code
stringlengths
2
1.05M
var assert = require("chai").assert; var fs = require("fs-extra"); var glob = require("glob"); var Box = require("@truffle/box"); var WorkflowCompile = require("@truffle/workflow-compile"); var Ganache = require("ganache-core"); var provision = require("@truffle/provisioner"); var Resolver = require("@truffle/resolver"); var Artifactor = require("@truffle/artifactor"); describe("config", function () { var config; var customRPCConfig = { gas: 90000, gasPrice: 2, from: "0x1234567890123456789012345678901234567890" }; before("Create a sandbox with extra config values", async function () { this.timeout(5000); config = await Box.sandbox("default"); config.resolver = new Resolver(config); config.artifactor = new Artifactor(config.contracts_build_directory); config.network = "development"; config.networks = { development: { network_id: "1", gas: customRPCConfig.gas, gasPrice: customRPCConfig.gasPrice, from: "0x1234567890123456789012345678901234567890", provider: Ganache.provider() } }; }); before("Compile contracts", async function () { this.timeout(10000); await WorkflowCompile.compileAndSave( config.with({ quiet: true }) ); }); after("Cleanup tmp files", function (done) { glob("tmp-*", (err, files) => { if (err) done(err); files.forEach(file => fs.removeSync(file)); done(); }); }); it("Provisioning contracts should set proper RPC values", function () { var contract = config.resolver.require("MetaCoin.sol"); provision(contract, config); assert.deepEqual(contract.defaults(), customRPCConfig); }); }).timeout(10000);
import CarouselComponent from './CarouselComponent'; import Carousel from './components/Carousel'; import CarouselCard from './components/CarouselCard'; import CarouselHeader from './components/CarouselHeader'; import CarouselMiniHeader from './components/CarouselMiniHeader'; import ViewPager from './components/ViewPager'; import PageControl from './components/PageControl'; export { Carousel, CarouselCard, CarouselHeader, CarouselMiniHeader, ViewPager, PageControl, }; export default CarouselComponent;
var vastUtil = require('ads/vast/vastUtil'); var VPAIDFLASHClient = require('vpaid-flash-client'); var VPAIDFlashTech = require('ads/vpaid/VPAIDFlashTech'); var VPAIDHTML5Tech = require('ads/vpaid/VPAIDHTML5Tech'); var xml = require('utils/xml'); var testUtils = require('../../test-utils'); describe("vastUtil", function () { it("must be an object", function () { assert.isObject(vastUtil); }); describe("_parseURLMacro", function () { var _parseURLMacro; beforeEach(function () { _parseURLMacro = vastUtil._parseURLMacro; }); it("must parse the passed macro using the passed variables", function () { assert.equal('http://foo.bar/BLA', _parseURLMacro('http://foo.bar/[CODE]', {CODE: 'BLA'})); assert.equal('http://foo.bar/BLA/123', _parseURLMacro('http://foo.bar/[CODE]/[END]', {CODE: 'BLA', END: 123})); }); }); describe("parseURLMacro", function () { var parseURLMacro; beforeEach(function () { parseURLMacro = vastUtil.parseURLMacro; }); it("must parse the passed macro and return the parsed url", function () { assert.equal( parseURLMacro('http://foo.bar/[CODE]/[END]', {CODE: 'BLA', END: 123}), 'http://foo.bar/BLA/123' ); }); it("must auto generate CACHEBUSTING variable if not passed ", function () { assert.match(parseURLMacro('http://foo.bar/[CACHEBUSTING]'), /http:\/\/foo\.bar\/\d+/); assert.equal(parseURLMacro('http://foo.bar/[CACHEBUSTING]/[CACHEBUSTING]', {CACHEBUSTING: 123}), 'http://foo.bar/123/123'); }); }); describe("parseURLMacros", function () { var parseURLMacros; beforeEach(function () { parseURLMacros = vastUtil.parseURLMacros; }); it("must be function", function () { assert.isFunction(vastUtil.parseURLMacros); }); it("must parse an array of macros and return an array with the parsed urls", function () { var macros = [ 'http://foo.bar/[CODE]', 'http://foo.bar/[CODE]/[END]' ]; assert.deepEqual(parseURLMacros(macros, {CODE: 'BLA', END: 123}), [ 'http://foo.bar/BLA', 'http://foo.bar/BLA/123' ]); }); it("must auto generate CACHEBUSTING variable if not passed ", function () { var macros = ['http://foo.bar/[CACHEBUSTING]']; assert.match(parseURLMacros(macros), /http:\/\/foo\.bar\/\d+/); assert.deepEqual(parseURLMacros(macros, {CACHEBUSTING: 123}), ['http://foo.bar/123']); }); }); describe("track", function () { var track; beforeEach(function () { track = vastUtil.track; }); it("must return an array with the created track images", function () { var macros = [ 'http://foo.bar/[CODE]', 'http://foo.bar/[CODE]/[END]' ]; var trackImgs = track(macros, {CODE: 'BLA', END: 123}); assert.equal(trackImgs.length, 2); assert.instanceOf(trackImgs[0], Image); assert.equal(trackImgs[0].src, "http://foo.bar/BLA"); assert.instanceOf(trackImgs[1], Image); assert.equal(trackImgs[1].src, "http://foo.bar/BLA/123"); }); }); describe("parseDuration", function () { var parseDuration; beforeEach(function () { parseDuration = vastUtil.parseDuration; }); it("must return null if the duration is not an string with the format HH:MM:SS[.mmm]", function () { assert.isNull(parseDuration()); assert.isNull(parseDuration(123)); assert.isNull(parseDuration('23:444:23')); assert.isNull(parseDuration('foo')); }); it("must return the duration in milliseconds", function () { assert.equal(parseDuration('00:00:00.001'), 1); assert.equal(parseDuration('00:00:01'), 1000); assert.equal(parseDuration('00:01:00'), 60000); assert.equal(parseDuration('01:00:00'), 3600000); assert.equal(parseDuration('01:11:09:456'), 4269000); }); }); describe("parseImpressions", function () { var parseImpressions; beforeEach(function () { parseImpressions = vastUtil.parseImpressions; }); it("must return an empty array if you pass no impressions", function () { testUtils.assertEmptyArray(parseImpressions()); }); it("must return an empty array if there is no real impression", function () { var inlineXML = '<InLine>' + '<Impression><![CDATA[]]></Impression>' + '</InLine>'; testUtils.assertEmptyArray(parseImpressions(xml.toJXONTree(inlineXML).impression)); }); it("must return an array with the passed impressions formatted", function () { var inlineXML = '<InLine>' + '<Impression id="DART">' + '<![CDATA[http://ad.doubleclick.net/imp;v7;x;223626102;0-0;0;47414672;0/0;30477563/30495440/1;;~aopt=0/0/ff/0;~cs=j%3fhttp://s0.2mdn.net/dot.gif]]>' + '</Impression>' + '</InLine>'; var impressionJTree = xml.toJXONTree(inlineXML).impression; assert.deepEqual(parseImpressions(impressionJTree), [ 'http://ad.doubleclick.net/imp;v7;x;223626102;0-0;0;47414672;0/0;30477563/30495440/1;;~aopt=0/0/ff/0;~cs=j%3fhttp://s0.2mdn.net/dot.gif' ]); }); it("must add all the passed impressions to the returned array", function () { var inlineXML = '<InLine>' + '<Impression id="DART">' + '<![CDATA[http://ad.doubleclick.net/imp;v7;x;223626102;0-0;0;47414672;0/0;30477563/30495440/1;;~aopt=0/0/ff/0;~cs=j%3fhttp://s0.2mdn.net/dot.gif]]>' + '</Impression>' + '<Impression id="ThirdParty"><![CDATA[http://ad.doubleclick.net/ad/N270.Process_Other/B3473145;sz=1x1;ord=6212269?]]></Impression>' + '<Impression><![CDATA[]]></Impression>' + '</InLine>'; var impressionJTree = xml.toJXONTree(inlineXML).impression; assert.deepEqual(parseImpressions(impressionJTree), [ 'http://ad.doubleclick.net/imp;v7;x;223626102;0-0;0;47414672;0/0;30477563/30495440/1;;~aopt=0/0/ff/0;~cs=j%3fhttp://s0.2mdn.net/dot.gif', 'http://ad.doubleclick.net/ad/N270.Process_Other/B3473145;sz=1x1;ord=6212269?' ]); }); }); describe("formatProgress", function () { it("must return the formatted progress", function () { assert.equal(vastUtil.formatProgress(12345000), "03:25:45.000"); assert.equal(vastUtil.formatProgress(123000), "00:02:03.000"); assert.equal(vastUtil.formatProgress(123545978), "34:19:05.978"); }); }); describe("parseOffset", function () { var parseOffset; beforeEach(function () { parseOffset = vastUtil.parseOffset; }); it("must return the passed offset string in ms", function () { assert.equal(parseOffset('00:00:05.000'), 5000); }); it("must be possible pass the offset as a percentage", function () { assert.equal(parseOffset('10%', 1000), 100); assert.equal(parseOffset('10.5%', 1000), 105); }); it("with a percentage offset and no duration must return null", function () { assert.isNull(parseOffset('10.5%')); }); it("must return null if you don't pass an offset", function () { assert.isNull(parseOffset()); assert.isNull(parseOffset(undefined, 123)); }); }); describe("isVPAID", function () { it("must return true if the passed mediaFile apiFramework attr is VPAID and false otherwiser", function () { assert.isFunction(vastUtil.isVPAID); [undefined, false, '', {}, []].forEach(function (wrongMediaFile) { assert.isFalse(vastUtil.isVPAID(wrongMediaFile)); }); assert.isFalse(vastUtil.isVPAID({apiFramework: 'JS'})); assert.isTrue(vastUtil.isVPAID({apiFramework: 'VPAID'})); }); }); describe("findSupportedVPAIDTech", function () { var FLASH_APP_MIME = 'application/x-shockwave-flash'; var HTML5_APP_MIME = 'application/javascript'; beforeEach(function () { sinon.stub(VPAIDFlashTech, 'supports'); sinon.stub(VPAIDHTML5Tech, 'supports'); }); afterEach(function () { VPAIDFlashTech.supports.restore(); VPAIDHTML5Tech.supports.restore(); }); it("must return Flash tech if it supports the passed mime type", function () { VPAIDFlashTech.supports.returns(true); VPAIDHTML5Tech.supports.returns(false); assert.equal(vastUtil.findSupportedVPAIDTech(FLASH_APP_MIME), VPAIDFlashTech); }); it("must return HTML tech if it supports the passed mime type", function () { VPAIDFlashTech.supports.returns(false); VPAIDHTML5Tech.supports.returns(true); assert.equal(vastUtil.findSupportedVPAIDTech(HTML5_APP_MIME), VPAIDHTML5Tech); }); it("must return null if no supported tech is found", function () { VPAIDFlashTech.supports.returns(false); VPAIDHTML5Tech.supports.returns(false); assert.isNull(vastUtil.findSupportedVPAIDTech(HTML5_APP_MIME)); }); }); describe("isFlashSupported", function() { beforeEach(function () { sinon.stub(VPAIDFLASHClient, 'isSupported'); }); it("must delegate in VPAIDFLASHClient.isSupported", function() { VPAIDFLASHClient.isSupported.returns(false); assert.isFalse(vastUtil.isFlashSupported()); VPAIDFLASHClient.isSupported.returns(true); assert.isTrue(vastUtil.isFlashSupported()); }); }); });
; define(['timemap', 'epl/Settings', 'lib/csc/Error', 'lib/knockout', 'timemap/Environment','lib/knockout.validation', 'lib/ajaxfileupload'], function (epl, Settings, Error, ko, Environment) { return (function () { /** * Creates the ViewModel to back the Upload Story screen. * @return void */ var UploadStoryViewModel = function () { var self = this; // Obtain branches for the 'Branches' drop down self.branchOptions = ko.observableArray([]); $.ajax({ type : "GET", dataType : "json", url : Settings.apiBranchUrl, success : function(response) { self.branchOptions(response.objects); }, error : function(response) { Error.throwNewError(new Error('UploadStory.branchesAjax')); } }); // Obtain the current user who is logged in self.user = ko.observable(); $.getJSON (Settings.apiAccountUrl + "current", function(data) { if (data.username != null) { self.user(data.username); } }); self.imagesDirectory = ko.observable(Environment.routes.imageDirectory); self.closeView = function () { window.location = '#'; }; // Set up empty story and form validation self.story = new Story(); ko.validation.configure({ insertMessages: false }); self.story.errors = ko.validation.group(self.story); // Ensure that when the user changes the story type, // the previous story field is cleared self.story.content_type.subscribe(function (previousValue) { if (previousValue == "text") { self.story.story_text(""); } else if (previousValue == "link") { self.story.link_url(""); } }, self.story, "beforeChange"); // On submit, upload the story self.submitStory = function () { if (!self.story.isValid()) { self.story.errors.showAllMessages(); return false; } // First, save the story without the media file (if present) $.ajax(Settings.apiStoryUrl, { data: ko.toJSON(self.story), type: "POST", dataType: "json", contentType: "application/json", success: function (result) { // Upload the media file in a separate ajax call if (self.story.content_type() == "media") { $.ajaxFileUpload({ // Obtain the story id from the response url: '/upload/' + result.id + '/', secureuri: false, fileElementId: 'fileInput', success: function (data, status) { var jsonData = jQuery.parseJSON($(data).text()); if (jsonData != null && jsonData.errors) { var error = "" + jsonData.errors; self.story.errorMessage(error); } else { top.location="#uploadStorySuccess"; } }, error: function (data, status, e) { if(typeof data == "object") { self.story.errorMessage("An error has occured"); } else { self.story.errorMessage(data); } } }); } else { top.location="#uploadStorySuccess"; } }, error: function (result) { self.story.errorMessage(result.responseText); } }); }; }; function Story() { this.title = ko.observable().extend({ required: { message: 'Title is required.' } }); this.description = ko.observable().extend({ required: { message: 'Description is required.' } }); this.content_type = ko.observable().extend({ required: { message: 'Story type must be selected.' } }); this.story_text = ko.observable().extend({ validation: { validator: function (val, content_type) { if (content_type() == "text" && (val == null || val == "")) { return false; } else { return true; } }, message: 'Story text must be entered.', params: this.content_type } }); this.link_url = ko.observable().extend({ validation: { validator: function (val, content_type) { if (content_type() == "link" && (val == null || val == "")) { return false; } else { return true; } }, message: 'Link URL must be entered.', params: this.content_type } }); this.branch = ko.observable(); this.year = ko.observable().extend({ required: { message: 'Year is required.' } }); this.month = ko.observable(); this.day = ko.observable(); this.public_approved = ko.observable(false); this.anonymous = ko.observable(false); this.custom_keywords = ko.observable(); this.preset_keywords = ko.observableArray([]); this.keywords = ko.computed(function() { // Returns an array of the checked predefined keywords, // as well as the comma separated user-entered keywords if (this.custom_keywords() != null) { var splitCustomKeywords = this.custom_keywords().split(","); return this.preset_keywords().concat(splitCustomKeywords); } else { return this.preset_keywords(); } }, this); this.errorMessage = ko.observable(); }; // Modifies the json to be compatible with what is expected from the API Story.prototype.toJSON = function() { var copy = this; delete copy.custom_keywords; delete copy.preset_keywords; delete copy.errors; delete copy.errorMessage; if (copy.branch == null) { copy.branch = null; } else { copy.branch = Settings.apiBranchUrl + copy.branch + "/"; } if (copy.month == null || copy.month == '') { delete copy.month; } if (copy.day == null || copy.day == '') { delete copy.day; } return copy; } return UploadStoryViewModel; })(); //End module });
import React from 'react'; export default class HeartBeat extends React.Component { render() { return null; } componentDidMount() { this.timer = setInterval(() => { fetch('/api/v1/heartbeat'); }, 5000); } componentWillUnmount() { clearInterval(this.timer); } }
/* This is the login react component. Hosted at /login */ var React = require('react'); var request = require('superagent'); var Login = React.createClass({ render: function() { return ( <div className="login-container"> <div className="loginmodal-container"> <h1>Login to Your Account</h1><br/> <form action="/api/login" method="post"> <input type="text" name="username" placeholder="Username" /> <input type="password" name="password" placeholder="Password"/> <input type="submit" className="login loginmodal-submit" value="Login" /> </form> <div className="login-help"> <a className="pull-right" href="#">Forgot Password</a> </div> </div> <div className="alternate-container"> <a href="/register">Create account</a> </div> </div> ); } }); module.exports = Login;
define([ 'angular', 'shield/shield-module-def' ], function (angular, shieldModule) { 'use strict'; shieldModule.factory('ShieldService', ['$state', 'Restangular', function ($state, Restangular) { var resourceUrl = 'shields'; return { showList: function () { $state.go('^.list'); }, list: function () { return Restangular.all(resourceUrl).getList(); }, create: function (shield) { return Restangular.all(resourceUrl).post(shield); }, read: function (id) { return Restangular.one(resourceUrl, id).get(); }, update: function (shield) { return shield.put(); }, remove: function (shield) { return shield.remove(); } }; }]); });
/** * @author info@andrevenancio.com (Andre Venancio) */ CANDY3D.Shaders = { gl: null, createProgram: function(gl, vsString, fsString) { this.gl = gl; var vs = this.createShader(vsString, this.gl.VERTEX_SHADER); var fs = this.createShader(fsString, this.gl.FRAGMENT_SHADER); var program = this.gl.createProgram(); this.gl.attachShader(program, vs); this.gl.attachShader(program, fs); this.gl.linkProgram(program); return program; }, createShader: function(str, type) { var shader = this.gl.createShader(type); this.gl.shaderSource(shader, str); this.gl.compileShader(shader); var compiled = this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS); if (!compiled) { var error = this.gl.getShaderInfoLog(shader); console.error('Error compiling shader', shader, error); this.gl.deleteShader(shader); return null; } return shader; } }; CANDY3D.Shaders.VERTEX = '' + 'attribute vec4 a_position;' + 'attribute vec4 a_color;' + 'uniform mat4 u_matrix;' + 'varying vec4 v_color;' + 'void main() { ' + ' gl_Position = u_matrix * a_position;' + ' v_color = a_color;' + '}'; CANDY3D.Shaders.FRAGMENT = '' + 'precision mediump float;' + 'varying vec4 v_color;' + 'void main() {' + ' gl_FragColor = v_color;' + '}';
//{namespace name=backend/connect/view/main} //{block name="backend/connect/view/config/import/panel"} Ext.define('Shopware.apps.Connect.view.config.import.UnitsMapping', { extend: 'Ext.grid.Panel', alias: 'widget.connect-units-mapping-list', store: 'config.ConnectUnits', border: false, selModel: "cellmodel", snippets: { connectUnitsHeader: '{s name=config/units/connect_units_header}importierte Maßeinheiten{/s}', localUnitsHeader: '{s name=config/units/shopware_units_header}Meine Maßeinheiten{/s}' }, initComponent: function() { var me = this; me.unitsStore = Ext.create('Shopware.apps.Connect.store.config.Units').load(); me.connectUnitsStore = Ext.create('Shopware.apps.Connect.store.config.ConnectUnits').load(); me.plugins = [ me.createCellEditor() ]; me.store = me.connectUnitsStore; Ext.applyIf(me, { height: 300, width: 400, columns: me.getColumns() }); me.callParent(arguments); }, getColumns: function() { var me = this; return [ { header: me.snippets.connectUnitsHeader, dataIndex: 'name', flex: 1 }, { header: me.snippets.localUnitsHeader, dataIndex: 'shopwareUnitKey', flex: 1, editor: { xtype: 'combo', store: me.unitsStore, editable: false, displayField: 'shopwareUnitName', valueField: 'shopwareUnitKey' }, renderer: function (value) { var index = me.unitsStore.findExact('shopwareUnitKey', value); if (index > -1) { return me.unitsStore.getAt(index).get('shopwareUnitName'); } return value; } } ]; }, createCellEditor: function() { var me = this; me.cellEditor = Ext.create('Ext.grid.plugin.CellEditing', { clicksToMoveEditor: 1, autoCancel: true }); return me.cellEditor; } }); //{/block}
var parser = require('../'); var should = require('should'); describe('Parser tests', function() { it('Test result should equal to `en-CA`', function() { should(parser(['fr', 'en-CA', 'fr-CA'], ['en', 'en-IN', 'en-CA', 'id', 'de'], 'en-US')).eql('en-CA'); }); it('Test result should equal to `en`', function() { should(parser(['fr', 'en-CA', 'fr-CA'], ['en', 'en-IN', 'id', 'de'], 'en-US')).eql('en'); }); it('Test result should equal to `fr`', function() { should(parser(['fr-CA', 'en'], ['fr', 'de'], 'en-US')).eql('fr'); }); it('Test result should equal to `en-US`', function() { should(parser(['fr', 'en'], ['fr-CA', 'de'], 'en-US')).eql('en-US'); }); it('Test result should equal to `en`', function() { should(parser(['en', 'en-CA', 'fr-CA'], ['en', 'en-IN', 'en-CA', 'id', 'de'], 'en-US')).eql('en'); }); it('Should throw an error if missing first default language', function() { should.throws(function() { parser(['fr', 'en-CA', 'fr-CA'], ['en', 'en-IN', 'en-CA', 'id', 'de']); }); }); it('Should throw an error if missing second argument', function() { should.throws(function() { parser(['fr', 'en-CA', 'fr-CA'], 'en', 'de'); }); }); it('Should throw an error if not using the right type argument', function() { should.throws(function() { parser('fr', ['fr-CA'], 'de'); }); }); });
import { do_action, add_action, i18n } from "./libs/functions" import { translate_to } from "./libs/actions" import { register_contextMenus } from "./libs/ui/translation" import { settings } from "./libs/config" import { MESSAGE_IN_BACKGROUND, NO_CONNECT_NAME, CONNECT_FROM_CONTENT, CONNECT_FROM_SYNTH, RESPONSE_FROM_BACKGROUND, CONNECT_WITH_TRANSLATING, TABS_UPDATE_CONNECT, FAB_TRIGGERED, TRANSLATE_WITH_CONTEXT_MENU, } from "./libs/actions/types" import { APISpeaking, TTSSpeaking } from "./libs/services/synth" import "./libs/actions/background" const scope = 'background' const { runtime, tabs } = browser // Initial Settings // settings().clear() settings().init() // settings().log() settings().get(({ context_menu_translate }) => { register_contextMenus(context_menu_translate) }) runtime.onConnect.addListener(port => { const { name, onMessage } = port switch (name) { case CONNECT_WITH_TRANSLATING: return onMessage.addListener(data => do_action(MESSAGE_IN_BACKGROUND, data, port)) case CONNECT_FROM_CONTENT: return onMessage.addListener(data => { do_action(MESSAGE_IN_BACKGROUND, data, port) }) case CONNECT_FROM_SYNTH: return onMessage.addListener(({ content, cfg }) => { const { api_speaking } = cfg if (!!api_speaking) { APISpeaking(content, cfg) } else { TTSSpeaking(content, cfg) } }) default: return onMessage.addListener(data => do_action(NO_CONNECT_NAME, data, port)) } }) // TODO: Need to fix mutiple complete status when open // link from search engine, e.g. baidu tabs.onUpdated.addListener((id , {}, { status, url }) => { // const port = tabs.connect(id, { name: TABS_UPDATE_CONNECT }) if (status !== 'complete' || url === 'about:blank') return void 0 tabs.sendMessage(id, { type: `TABS_UPDATE_${status.toUpperCase()}`, meta: { status, id }, payload: {}, }).catch(err => undefined && console.error(`Error: ${err}`)) })
var home = require('./home.js'); function routes (app) { app.get('/', home); app.post('/', home); } module.exports = routes;
const { hasOwnProperty } = Object.prototype; const shape = { generic: true, types: appendOrAssign, atrules: { prelude: appendOrAssignOrNull, descriptors: appendOrAssignOrNull }, properties: appendOrAssign, parseContext: assign, scope: deepAssign, atrule: ['parse'], pseudo: ['parse'], node: ['name', 'structure', 'parse', 'generate', 'walkContext'] }; function isObject(value) { return value && value.constructor === Object; } function copy(value) { return isObject(value) ? { ...value } : value; } function assign(dest, src) { return Object.assign(dest, src); } function deepAssign(dest, src) { for (const key in src) { if (hasOwnProperty.call(src, key)) { if (isObject(dest[key])) { deepAssign(dest[key], copy(src[key])); } else { dest[key] = copy(src[key]); } } } return dest; } function append(a, b) { if (typeof b === 'string' && /^\s*\|/.test(b)) { return typeof a === 'string' ? a + b : b.replace(/^\s*\|\s*/, ''); } return b || null; } function appendOrAssign(a, b) { if (typeof b === 'string') { return append(a, b); } const result = { ...a }; for (let key in b) { if (hasOwnProperty.call(b, key)) { result[key] = append(hasOwnProperty.call(a, key) ? a[key] : undefined, b[key]); } } return result; } function appendOrAssignOrNull(a, b) { const result = appendOrAssign(a, b); return !isObject(result) || Object.keys(result).length ? result : null; } function mix(dest, src, shape) { for (const key in shape) { if (hasOwnProperty.call(shape, key) === false) { continue; } if (shape[key] === true) { if (key in src) { if (hasOwnProperty.call(src, key)) { dest[key] = copy(src[key]); } } } else if (shape[key]) { if (typeof shape[key] === 'function') { const fn = shape[key]; dest[key] = fn({}, dest[key]); dest[key] = fn(dest[key] || {}, src[key]); } else if (isObject(shape[key])) { const result = {}; for (let name in dest[key]) { result[name] = mix({}, dest[key][name], shape[key]); } for (let name in src[key]) { result[name] = mix(result[name] || {}, src[key][name], shape[key]); } dest[key] = result; } else if (Array.isArray(shape[key])) { const res = {}; const innerShape = shape[key].reduce(function(s, k) { s[k] = true; return s; }, {}); for (const [name, value] of Object.entries(dest[key] || {})) { res[name] = {}; if (value) { mix(res[name], value, innerShape); } } for (const name in src[key]) { if (hasOwnProperty.call(src[key], name)) { if (!res[name]) { res[name] = {}; } if (src[key] && src[key][name]) { mix(res[name], src[key][name], innerShape); } } } dest[key] = res; } } } return dest; } export default (dest, src) => mix(dest, src, shape);
// __________________ // getHTMLMediaElement.js function getHTMLMediaElement(mediaElement, config) { config = config || {}; if (!mediaElement.nodeName || (mediaElement.nodeName.toLowerCase() != 'audio' && mediaElement.nodeName.toLowerCase() != 'video')) { if (!mediaElement.getVideoTracks().length) { return getAudioElement(mediaElement, config); } var mediaStream = mediaElement; mediaElement = document.createElement(mediaStream.getVideoTracks().length ? 'video' : 'audio'); try { mediaElement.setAttributeNode(document.createAttribute('autoplay')); mediaElement.setAttributeNode(document.createAttribute('playsinline')); } catch (e) { mediaElement.setAttribute('autoplay', true); mediaElement.setAttribute('playsinline', true); } if ('srcObject' in mediaElement) { mediaElement.srcObject = mediaStream; } else { mediaElement[!!navigator.mozGetUserMedia ? 'mozSrcObject' : 'src'] = !!navigator.mozGetUserMedia ? mediaStream : (window.URL || window.webkitURL).createObjectURL(mediaStream); } } if (mediaElement.nodeName && mediaElement.nodeName.toLowerCase() == 'audio') { return getAudioElement(mediaElement, config); } var buttons = config.buttons || ['mute-audio', 'mute-video', 'full-screen', 'volume-slider', 'stop']; buttons.has = function(element) { return buttons.indexOf(element) !== -1; }; config.toggle = config.toggle || []; config.toggle.has = function(element) { return config.toggle.indexOf(element) !== -1; }; var mediaElementContainer = document.createElement('div'); mediaElementContainer.className = 'media-container'; var mediaControls = document.createElement('div'); mediaControls.className = 'media-controls'; mediaElementContainer.appendChild(mediaControls); if (buttons.has('mute-audio')) { var muteAudio = document.createElement('div'); muteAudio.className = 'control ' + (config.toggle.has('mute-audio') ? 'unmute-audio selected' : 'mute-audio'); mediaControls.appendChild(muteAudio); muteAudio.onclick = function() { if (muteAudio.className.indexOf('unmute-audio') != -1) { muteAudio.className = muteAudio.className.replace('unmute-audio selected', 'mute-audio'); mediaElement.muted = false; mediaElement.volume = 1; if (config.onUnMuted) config.onUnMuted('audio'); } else { muteAudio.className = muteAudio.className.replace('mute-audio', 'unmute-audio selected'); mediaElement.muted = true; mediaElement.volume = 0; if (config.onMuted) config.onMuted('audio'); } }; } if (buttons.has('mute-video')) { var muteVideo = document.createElement('div'); muteVideo.className = 'control ' + (config.toggle.has('mute-video') ? 'unmute-video selected' : 'mute-video'); mediaControls.appendChild(muteVideo); muteVideo.onclick = function() { if (muteVideo.className.indexOf('unmute-video') != -1) { muteVideo.className = muteVideo.className.replace('unmute-video selected', 'mute-video'); mediaElement.muted = false; mediaElement.volume = 1; mediaElement.play(); if (config.onUnMuted) config.onUnMuted('video'); } else { muteVideo.className = muteVideo.className.replace('mute-video', 'unmute-video selected'); mediaElement.muted = true; mediaElement.volume = 0; mediaElement.pause(); if (config.onMuted) config.onMuted('video'); } }; } if (buttons.has('take-snapshot')) { var takeSnapshot = document.createElement('div'); takeSnapshot.className = 'control take-snapshot'; mediaControls.appendChild(takeSnapshot); takeSnapshot.onclick = function() { if (config.onTakeSnapshot) config.onTakeSnapshot(); }; } if (buttons.has('stop')) { var stop = document.createElement('div'); stop.className = 'control stop'; mediaControls.appendChild(stop); stop.onclick = function() { mediaElementContainer.style.opacity = 0; setTimeout(function() { if (mediaElementContainer.parentNode) { mediaElementContainer.parentNode.removeChild(mediaElementContainer); } }, 800); if (config.onStopped) config.onStopped(); }; } var volumeControl = document.createElement('div'); volumeControl.className = 'volume-control'; if (buttons.has('record-audio')) { var recordAudio = document.createElement('div'); recordAudio.className = 'control ' + (config.toggle.has('record-audio') ? 'stop-recording-audio selected' : 'record-audio'); volumeControl.appendChild(recordAudio); recordAudio.onclick = function() { if (recordAudio.className.indexOf('stop-recording-audio') != -1) { recordAudio.className = recordAudio.className.replace('stop-recording-audio selected', 'record-audio'); if (config.onRecordingStopped) config.onRecordingStopped('audio'); } else { recordAudio.className = recordAudio.className.replace('record-audio', 'stop-recording-audio selected'); if (config.onRecordingStarted) config.onRecordingStarted('audio'); } }; } if (buttons.has('record-video')) { var recordVideo = document.createElement('div'); recordVideo.className = 'control ' + (config.toggle.has('record-video') ? 'stop-recording-video selected' : 'record-video'); volumeControl.appendChild(recordVideo); recordVideo.onclick = function() { if (recordVideo.className.indexOf('stop-recording-video') != -1) { recordVideo.className = recordVideo.className.replace('stop-recording-video selected', 'record-video'); if (config.onRecordingStopped) config.onRecordingStopped('video'); } else { recordVideo.className = recordVideo.className.replace('record-video', 'stop-recording-video selected'); if (config.onRecordingStarted) config.onRecordingStarted('video'); } }; } if (buttons.has('volume-slider')) { var volumeSlider = document.createElement('div'); volumeSlider.className = 'control volume-slider'; volumeControl.appendChild(volumeSlider); var slider = document.createElement('input'); slider.type = 'range'; slider.min = 0; slider.max = 100; slider.value = 100; slider.onchange = function() { mediaElement.volume = '.' + slider.value.toString().substr(0, 1); }; volumeSlider.appendChild(slider); } if (buttons.has('full-screen')) { var zoom = document.createElement('div'); zoom.className = 'control ' + (config.toggle.has('zoom-in') ? 'zoom-out selected' : 'zoom-in'); if (!slider && !recordAudio && !recordVideo && zoom) { mediaControls.insertBefore(zoom, mediaControls.firstChild); } else volumeControl.appendChild(zoom); zoom.onclick = function() { if (zoom.className.indexOf('zoom-out') != -1) { zoom.className = zoom.className.replace('zoom-out selected', 'zoom-in'); exitFullScreen(); } else { zoom.className = zoom.className.replace('zoom-in', 'zoom-out selected'); launchFullscreen(mediaElementContainer); } }; function launchFullscreen(element) { if (element.requestFullscreen) { element.requestFullscreen(); } else if (element.mozRequestFullScreen) { element.mozRequestFullScreen(); } else if (element.webkitRequestFullscreen) { element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); } } function exitFullScreen() { if (document.fullscreen) { document.exitFullscreen(); } if (document.mozFullScreen) { document.mozCancelFullScreen(); } if (document.webkitIsFullScreen) { document.webkitExitFullscreen(); } } function screenStateChange(e) { if (e.srcElement != mediaElementContainer) return; var isFullScreeMode = document.webkitIsFullScreen || document.mozFullScreen || document.fullscreen; mediaElementContainer.style.width = (isFullScreeMode ? (window.innerWidth - 20) : config.width) + 'px'; mediaElementContainer.style.display = isFullScreeMode ? 'block' : 'inline-block'; if (config.height) { mediaBox.style.height = (isFullScreeMode ? (window.innerHeight - 20) : config.height) + 'px'; } if (!isFullScreeMode && config.onZoomout) config.onZoomout(); if (isFullScreeMode && config.onZoomin) config.onZoomin(); if (!isFullScreeMode && zoom.className.indexOf('zoom-out') != -1) { zoom.className = zoom.className.replace('zoom-out selected', 'zoom-in'); if (config.onZoomout) config.onZoomout(); } setTimeout(adjustControls, 1000); } document.addEventListener('fullscreenchange', screenStateChange, false); document.addEventListener('mozfullscreenchange', screenStateChange, false); document.addEventListener('webkitfullscreenchange', screenStateChange, false); } if (buttons.has('volume-slider') || buttons.has('full-screen') || buttons.has('record-audio') || buttons.has('record-video')) { mediaElementContainer.appendChild(volumeControl); } var mediaBox = document.createElement('div'); mediaBox.className = 'media-box'; mediaElementContainer.appendChild(mediaBox); if (config.title) { var h2 = document.createElement('h2'); h2.innerHTML = config.title; h2.setAttribute('style', 'position: absolute;color:white;font-size:17px;text-shadow: 1px 1px black;padding:0;margin:0;text-align: left; margin-top: 10px; margin-left: 10px; display: block; border: 0;line-height:1.5;z-index:1;'); mediaBox.appendChild(h2); } mediaBox.appendChild(mediaElement); if (!config.width) config.width = (innerWidth / 2) - 50; mediaElementContainer.style.width = config.width + 'px'; if (config.height) { mediaBox.style.height = config.height + 'px'; } mediaBox.querySelector('video').style.maxHeight = innerHeight + 'px'; var times = 0; function adjustControls() { mediaControls.style.marginLeft = (mediaElementContainer.clientWidth - mediaControls.clientWidth - 2) + 'px'; if (slider) { slider.style.width = (mediaElementContainer.clientWidth / 3) + 'px'; volumeControl.style.marginLeft = (mediaElementContainer.clientWidth / 3 - 30) + 'px'; if (zoom) zoom.style['border-top-right-radius'] = '5px'; } else { volumeControl.style.marginLeft = (mediaElementContainer.clientWidth - volumeControl.clientWidth - 2) + 'px'; } volumeControl.style.marginTop = (mediaElementContainer.clientHeight - volumeControl.clientHeight - 2) + 'px'; if (times < 10) { times++; setTimeout(adjustControls, 1000); } else times = 0; } if (config.showOnMouseEnter || typeof config.showOnMouseEnter === 'undefined') { mediaElementContainer.onmouseenter = mediaElementContainer.onmousedown = function() { adjustControls(); mediaControls.style.opacity = 1; volumeControl.style.opacity = 1; }; mediaElementContainer.onmouseleave = function() { mediaControls.style.opacity = 0; volumeControl.style.opacity = 0; }; } else { setTimeout(function() { adjustControls(); setTimeout(function() { mediaControls.style.opacity = 1; volumeControl.style.opacity = 1; }, 300); }, 700); } adjustControls(); mediaElementContainer.toggle = function(clasName) { if (typeof clasName != 'string') { for (var i = 0; i < clasName.length; i++) { mediaElementContainer.toggle(clasName[i]); } return; } if (clasName == 'mute-audio' && muteAudio) muteAudio.onclick(); if (clasName == 'mute-video' && muteVideo) muteVideo.onclick(); if (clasName == 'record-audio' && recordAudio) recordAudio.onclick(); if (clasName == 'record-video' && recordVideo) recordVideo.onclick(); if (clasName == 'stop' && stop) stop.onclick(); return this; }; mediaElementContainer.media = mediaElement; return mediaElementContainer; } // __________________ // getAudioElement.js function getAudioElement(mediaElement, config) { config = config || {}; if (!mediaElement.nodeName || (mediaElement.nodeName.toLowerCase() != 'audio' && mediaElement.nodeName.toLowerCase() != 'video')) { var mediaStream = mediaElement; mediaElement = document.createElement('audio'); try { mediaElement.setAttributeNode(document.createAttribute('autoplay')); mediaElement.setAttributeNode(document.createAttribute('controls')); } catch (e) { mediaElement.setAttribute('autoplay', true); mediaElement.setAttribute('controls', true); } if ('srcObject' in mediaElement) { mediaElement.mediaElement = mediaStream; } else { mediaElement[!!navigator.mozGetUserMedia ? 'mozSrcObject' : 'src'] = !!navigator.mozGetUserMedia ? mediaStream : (window.URL || window.webkitURL).createObjectURL(mediaStream); } } config.toggle = config.toggle || []; config.toggle.has = function(element) { return config.toggle.indexOf(element) !== -1; }; var mediaElementContainer = document.createElement('div'); mediaElementContainer.className = 'media-container'; var mediaControls = document.createElement('div'); mediaControls.className = 'media-controls'; mediaElementContainer.appendChild(mediaControls); var muteAudio = document.createElement('div'); muteAudio.className = 'control ' + (config.toggle.has('mute-audio') ? 'unmute-audio selected' : 'mute-audio'); mediaControls.appendChild(muteAudio); muteAudio.style['border-top-left-radius'] = '5px'; muteAudio.onclick = function() { if (muteAudio.className.indexOf('unmute-audio') != -1) { muteAudio.className = muteAudio.className.replace('unmute-audio selected', 'mute-audio'); mediaElement.muted = false; if (config.onUnMuted) config.onUnMuted('audio'); } else { muteAudio.className = muteAudio.className.replace('mute-audio', 'unmute-audio selected'); mediaElement.muted = true; if (config.onMuted) config.onMuted('audio'); } }; if (!config.buttons || (config.buttons && config.buttons.indexOf('record-audio') != -1)) { var recordAudio = document.createElement('div'); recordAudio.className = 'control ' + (config.toggle.has('record-audio') ? 'stop-recording-audio selected' : 'record-audio'); mediaControls.appendChild(recordAudio); recordAudio.onclick = function() { if (recordAudio.className.indexOf('stop-recording-audio') != -1) { recordAudio.className = recordAudio.className.replace('stop-recording-audio selected', 'record-audio'); if (config.onRecordingStopped) config.onRecordingStopped('audio'); } else { recordAudio.className = recordAudio.className.replace('record-audio', 'stop-recording-audio selected'); if (config.onRecordingStarted) config.onRecordingStarted('audio'); } }; } var volumeSlider = document.createElement('div'); volumeSlider.className = 'control volume-slider'; volumeSlider.style.width = 'auto'; mediaControls.appendChild(volumeSlider); var slider = document.createElement('input'); slider.style.marginTop = '11px'; slider.style.width = ' 200px'; if (config.buttons && config.buttons.indexOf('record-audio') == -1) { slider.style.width = ' 241px'; } slider.type = 'range'; slider.min = 0; slider.max = 100; slider.value = 100; slider.onchange = function() { mediaElement.volume = '.' + slider.value.toString().substr(0, 1); }; volumeSlider.appendChild(slider); var stop = document.createElement('div'); stop.className = 'control stop'; mediaControls.appendChild(stop); stop.onclick = function() { mediaElementContainer.style.opacity = 0; setTimeout(function() { if (mediaElementContainer.parentNode) { mediaElementContainer.parentNode.removeChild(mediaElementContainer); } }, 800); if (config.onStopped) config.onStopped(); }; stop.style['border-top-right-radius'] = '5px'; stop.style['border-bottom-right-radius'] = '5px'; var mediaBox = document.createElement('div'); mediaBox.className = 'media-box'; mediaElementContainer.appendChild(mediaBox); var h2 = document.createElement('h2'); h2.innerHTML = config.title || 'Audio Element'; h2.setAttribute('style', 'position: absolute;color: rgb(160, 160, 160);font-size: 20px;text-shadow: 1px 1px rgb(255, 255, 255);padding:0;margin:0;'); mediaBox.appendChild(h2); mediaBox.appendChild(mediaElement); mediaElementContainer.style.width = '329px'; mediaBox.style.height = '90px'; h2.style.width = mediaElementContainer.style.width; h2.style.height = '50px'; h2.style.overflow = 'hidden'; var times = 0; function adjustControls() { mediaControls.style.marginLeft = (mediaElementContainer.clientWidth - mediaControls.clientWidth - 7) + 'px'; mediaControls.style.marginTop = (mediaElementContainer.clientHeight - mediaControls.clientHeight - 6) + 'px'; if (times < 10) { times++; setTimeout(adjustControls, 1000); } else times = 0; } if (config.showOnMouseEnter || typeof config.showOnMouseEnter === 'undefined') { mediaElementContainer.onmouseenter = mediaElementContainer.onmousedown = function() { adjustControls(); mediaControls.style.opacity = 1; }; mediaElementContainer.onmouseleave = function() { mediaControls.style.opacity = 0; }; } else { setTimeout(function() { adjustControls(); setTimeout(function() { mediaControls.style.opacity = 1; }, 300); }, 700); } adjustControls(); mediaElementContainer.toggle = function(clasName) { if (typeof clasName != 'string') { for (var i = 0; i < clasName.length; i++) { mediaElementContainer.toggle(clasName[i]); } return; } if (clasName == 'mute-audio' && muteAudio) muteAudio.onclick(); if (clasName == 'record-audio' && recordAudio) recordAudio.onclick(); if (clasName == 'stop' && stop) stop.onclick(); return this; }; mediaElementContainer.media = mediaElement; return mediaElementContainer; }
var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); }; var _ = require('lodash'); var assert = require('assert'); var Smithy; (function (Smithy) { (function (Lifecycle) { Lifecycle[Lifecycle["Singleton"] = 0] = "Singleton"; Lifecycle[Lifecycle["Transient"] = 1] = "Transient"; })(Smithy.Lifecycle || (Smithy.Lifecycle = {})); var Lifecycle = Smithy.Lifecycle; (function (TargetType) { TargetType[TargetType["Type"] = 0] = "Type"; TargetType[TargetType["Instance"] = 1] = "Instance"; TargetType[TargetType["Function"] = 2] = "Function"; })(Smithy.TargetType || (Smithy.TargetType = {})); var TargetType = Smithy.TargetType; var Blacksmith = (function () { function Blacksmith(forge) { this.forge = forge; } Blacksmith.prototype.registerEquipment = function (equipment) { var _this = this; _.forEach(equipment, function (tool) { var binding; switch (tool.targetType) { case 0 /* Type */: binding = _this.forge.bind(tool.name).to.type(tool.target); break; case 2 /* Function */: binding = _this.forge.bind(tool.name).to.function(tool.target); break; case 1 /* Instance */: binding = _this.forge.bind(tool.name).to.instance(tool.target); break; } if (tool.when) { binding.when(tool.when); } else if (tool.hint) { binding.when(tool.hint); } if (tool.bindingArguments) { binding.with(tool.bindingArguments); } if (tool.lifecycle === 1 /* Transient */) { binding.transient(); } }); return this; }; return Blacksmith; })(); Smithy.Blacksmith = Blacksmith; var Tools; (function (Tools) { var BaseTool = (function () { function BaseTool(options) { _.assign(this, options); if (_.isUndefined(this.lifecycle)) { this.lifecycle = 0 /* Singleton */; } assert(_.isString(this.name), "'name' is required and must be a string"); assert(!_.isUndefined(this.target), "'target' is required"); assert(!_.isNull(this.target), "'target' is required"); if (!_.isUndefined(this.bindingArguments)) { assert(_.isObject(this.bindingArguments), "'bindingArguments', if defined, must be an object."); } if (!_.isUndefined(this.when)) { assert(_.isFunction(this.when), "'when', if defined, must be a function."); } if (!_.isUndefined(this.hint)) { assert(_.isString(this.hint), "'hint', if defined, must be a string."); } } return BaseTool; })(); Tools.BaseTool = BaseTool; var Function = (function (_super) { __extends(Function, _super); function Function(options) { _super.call(this, options); this.targetType = 2 /* Function */; assert(_.isFunction(this.target), "'target' is required and must be a function"); } return Function; })(BaseTool); Tools.Function = Function; var Instance = (function (_super) { __extends(Instance, _super); function Instance(options) { _super.call(this, options); this.targetType = 1 /* Instance */; } return Instance; })(BaseTool); Tools.Instance = Instance; var Type = (function (_super) { __extends(Type, _super); function Type(options) { _super.call(this, options); this.targetType = 0 /* Type */; assert(_.isFunction(this.target), "'target' is required and must be a function"); } return Type; })(BaseTool); Tools.Type = Type; })(Tools = Smithy.Tools || (Smithy.Tools = {})); })(Smithy || (Smithy = {})); module.exports = Smithy; //# sourceMappingURL=index.js.map
import test from 'ava' import { transformFileSync } from 'babel-core' import { readFileSync } from 'fs' import { resolve } from 'path' import plugin from '../dist' test(t => { let { code } = transformFileSync(resolve(__dirname, './fixtures/veui/components/source.js'), { babelrc: false, plugins: [ [ plugin, { package: 'veui-theme-dux', path: 'components', fileName: '${module}.less', transform: 'kebab-case' } ] ] }) t.is(code, readFileSync(resolve(__dirname, './fixtures/veui/expected.js'), 'utf8')) })
//Edit 'key' and 'columns' to connect your spreadsheet //enter google sheets key here var key = "https://docs.google.com/spreadsheets/d/19nPqTvg6QWrxygfIZJI2dayXzLsC2M7gZbKeoeraFMY/pubhtml"; //"data" refers to the column name with no spaces and no capitals //punctuation or numbers in your column name //"title" is the column name you want to appear in the published table var columns = [{ "data": "acronym", "title": "Acronym" }, { "data": "definition", "title": "Definition" }, { "data": "domain", "title": "Domain" }]; $(document).ready(function() { function initializeTabletopObject() { Tabletop.init({ key: key, callback: function(data, tabletop) { writeTable(data); //call up datatables function }, simpleSheet: true, debug: false }); } initializeTabletopObject(); function writeTable(data) { //select main div and put a table there //use bootstrap css to customize table style: http://getbootstrap.com/css/#tables $('#graphic').html( '<table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-condensed table-responsive" id="mySelection"></table>' ); //initialize the DataTable object and put settings in $("#mySelection").DataTable({ "autoWidth": false, "data": data, "columns": columns, "order": [ [2, "desc"] ], //order on second column "pagingType": "simple" //no page numbers //uncomment these options to simplify your table //"paging": false, //"searching": false, //"info": false }); } }); //end of writeTable
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = getName; function getName() { return 'Bob'; }
'use strict'; var mongoose = require('mongoose'), Schema = mongoose.Schema; var StateRegEx = /^((A[LKZR])|(C[AOT])|(D[EC])|(FL)|(GA)|(HI)|(I[DLNA])|(K[SY])|(LA)|(M[EDAINSOT])|(N[EVHJMYCD])|(O[HKR])|(PA)|(RI)|(S[CD])|(T[NX])|(UT)|(V[TA])|(W[AVIY]))$/, ZipRegEx = /^[0-9]{5}(?:-[0-9]{4})?$/; var MailboxSchema = new Schema({ street1: { type: String, uppercase: true, trim: true, required: true }, street1: { type: String, uppercase: true, trim: true, }, city: { type: String, uppercase: true, trim: true, required: true}, state: { type: String, uppercase: true, trim: true, match: StateRegEx, required: true }, zip: { type: String, match: ZipRegEx, required: true } }); exports.Mailbox = mongoose.model('Mailbox', MailboxSchema);
var SoundCloud = require('node-soundcloud'); var SoundCloudTrack = require('../../models/track/SoundCloudTrack'); function SoundCloudSearcher(config) { config = config || {}; var clientId = config.clientId; var clientSecret = config.clientSecret; if (!clientId || !clientSecret) { throw new Error('no passed clientId or clientSecret'); } this._clientId = clientId; this._clientSecret = clientSecret; // this library is designed to be used as singleton SoundCloud.init({ id: this._clientId, secret: this._clientSecret, uri: '' }); } SoundCloudSearcher.prototype.search = function(keyword, limit) { limit = limit || 200; var promise = new Promise((resolve, reject) => { SoundCloud.get('/tracks', { limit: limit, q: keyword }, (error, rawTracks) => { if (error) { reject(error); } else { var soundCloudTracks = rawTracks.map((rawTrack) => { var track = new SoundCloudTrack(); track.init(rawTrack); return track; }); resolve(soundCloudTracks); } }); }); return promise; }; module.exports = SoundCloudSearcher;
/* * Generated by PEG.js 0.10.0. * * http://pegjs.org/ */ "use strict"; function peg$subclass(child, parent) { function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); } function peg$SyntaxError(message, expected, found, location) { this.message = message; this.expected = expected; this.found = found; this.location = location; this.name = "SyntaxError"; if (typeof Error.captureStackTrace === "function") { Error.captureStackTrace(this, peg$SyntaxError); } } peg$subclass(peg$SyntaxError, Error); peg$SyntaxError.buildMessage = function(expected, found) { var DESCRIBE_EXPECTATION_FNS = { literal: function(expectation) { return "\"" + literalEscape(expectation.text) + "\""; }, "class": function(expectation) { var escapedParts = "", i; for (i = 0; i < expectation.parts.length; i++) { escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); } return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; }, any: function(expectation) { return "any character"; }, end: function(expectation) { return "end of input"; }, other: function(expectation) { return expectation.description; } }; function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); } function literalEscape(s) { return s .replace(/\\/g, '\\\\') .replace(/"/g, '\\"') .replace(/\0/g, '\\0') .replace(/\t/g, '\\t') .replace(/\n/g, '\\n') .replace(/\r/g, '\\r') .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); } function classEscape(s) { return s .replace(/\\/g, '\\\\') .replace(/\]/g, '\\]') .replace(/\^/g, '\\^') .replace(/-/g, '\\-') .replace(/\0/g, '\\0') .replace(/\t/g, '\\t') .replace(/\n/g, '\\n') .replace(/\r/g, '\\r') .replace(/[\x00-\x0F]/g, function(ch) { return '\\x0' + hex(ch); }) .replace(/[\x10-\x1F\x7F-\x9F]/g, function(ch) { return '\\x' + hex(ch); }); } function describeExpectation(expectation) { return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); } function describeExpected(expected) { var descriptions = new Array(expected.length), i, j; for (i = 0; i < expected.length; i++) { descriptions[i] = describeExpectation(expected[i]); } descriptions.sort(); if (descriptions.length > 0) { for (i = 1, j = 1; i < descriptions.length; i++) { if (descriptions[i - 1] !== descriptions[i]) { descriptions[j] = descriptions[i]; j++; } } descriptions.length = j; } switch (descriptions.length) { case 1: return descriptions[0]; case 2: return descriptions[0] + " or " + descriptions[1]; default: return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; } } function describeFound(found) { return found ? "\"" + literalEscape(found) + "\"" : "end of input"; } return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; }; function peg$parse(input, options) { options = options !== void 0 ? options : {}; var peg$FAILED = {}, peg$startRuleFunctions = { start: peg$parsestart }, peg$startRuleFunction = peg$parsestart, peg$c0 = function(statement) { return statement; }, peg$c1 = function(child1, boolean, child2) { return branchAstNode( 'boolean', boolean, child1, child2 ); }, peg$c2 = function(st) { return st; }, peg$c3 = function(op) { return op; }, peg$c4 = function(op1, op2) { return branchAstNode( 'boolean', 'NOT', op2, op1 ); }, peg$c5 = function(keyword) { return terminalAstNode( 'keyword', keyword ); }, peg$c6 = function(keywords) { return terminalAstNode( 'exact_match', keywords ) }, peg$c7 = "from:", peg$c8 = peg$literalExpectation("from:", false), peg$c9 = function(userhandle) { return terminalAstNode( 'from', userhandle ); }, peg$c10 = "to:", peg$c11 = peg$literalExpectation("to:", false), peg$c12 = function(userhandle) { return terminalAstNode( 'to', userhandle ); }, peg$c13 = "url:", peg$c14 = peg$literalExpectation("url:", false), peg$c15 = function(url) { return terminalAstNode( 'url', url); }, peg$c16 = function(url) { return terminalAstNode( 'url', url ); }, peg$c17 = "url_title:", peg$c18 = peg$literalExpectation("url_title:", false), peg$c19 = function(title) { return terminalAstNode( 'url_title', title ) }, peg$c20 = "url_description:", peg$c21 = peg$literalExpectation("url_description:", false), peg$c22 = function(title) { return terminalAstNode( 'url_description', title ) }, peg$c23 = "url_contains:", peg$c24 = peg$literalExpectation("url_contains:", false), peg$c25 = function(contains) { return terminalAstNode( 'url_contains', contains ) }, peg$c26 = "is:verified", peg$c27 = peg$literalExpectation("is:verified", false), peg$c28 = function() { return terminalAstNode( 'is', 'verified' ) }, peg$c29 = "is:retweet", peg$c30 = peg$literalExpectation("is:retweet", false), peg$c31 = function() { return terminalAstNode( 'is', 'retweet' ) }, peg$c32 = "has:links", peg$c33 = peg$literalExpectation("has:links", false), peg$c34 = function() { return terminalAstNode( 'has', 'links' ) }, peg$c35 = "has:geo", peg$c36 = peg$literalExpectation("has:geo", false), peg$c37 = function() { return terminalAstNode( 'has', 'geo' ) }, peg$c38 = "has:hashtags", peg$c39 = peg$literalExpectation("has:hashtags", false), peg$c40 = function() { return terminalAstNode( 'has', 'hashtags' ) }, peg$c41 = "has:mentions", peg$c42 = peg$literalExpectation("has:mentions", false), peg$c43 = function() { return terminalAstNode( 'has', 'mentions' ) }, peg$c44 = "has:media", peg$c45 = peg$literalExpectation("has:media", false), peg$c46 = function() { return terminalAstNode( 'has', 'media' ) }, peg$c47 = "has:profile_geo", peg$c48 = peg$literalExpectation("has:profile_geo", false), peg$c49 = function() { return terminalAstNode( 'has', 'profile_geo' ) }, peg$c50 = "has:profile_geo_subregion", peg$c51 = peg$literalExpectation("has:profile_geo_subregion", false), peg$c52 = function() { return terminalAstNode( 'has', 'profile_geo_subregion' ) }, peg$c53 = "has:profile_geo_region", peg$c54 = peg$literalExpectation("has:profile_geo_region", false), peg$c55 = function() { return terminalAstNode( 'has', 'profile_geo_region' ) }, peg$c56 = "has:profile_geo_locality", peg$c57 = peg$literalExpectation("has:profile_geo_locality", false), peg$c58 = function() { return terminalAstNode( 'has', 'profile_geo_locality' ) }, peg$c59 = "profile_region:", peg$c60 = peg$literalExpectation("profile_region:", false), peg$c61 = function(region) { return terminalAstNode( 'profile_region', region ) }, peg$c62 = "profile_region_contains:", peg$c63 = peg$literalExpectation("profile_region_contains:", false), peg$c64 = function(region) { return terminalAstNode( 'profile_region_contains', region ) }, peg$c65 = "profile_locality:", peg$c66 = peg$literalExpectation("profile_locality:", false), peg$c67 = function(region) { return terminalAstNode( 'profile_locality', region ) }, peg$c68 = "profile_locality_contains:", peg$c69 = peg$literalExpectation("profile_locality_contains:", false), peg$c70 = function(region) { return terminalAstNode( 'profile_locality_contains', region ) }, peg$c71 = "profile_subregion:", peg$c72 = peg$literalExpectation("profile_subregion:", false), peg$c73 = function(region) { return terminalAstNode( 'profile_subregion', region ) }, peg$c74 = "profile_subregion_contains:", peg$c75 = peg$literalExpectation("profile_subregion_contains:", false), peg$c76 = function(region) { return terminalAstNode( 'profile_subregion_contains', region ) }, peg$c77 = "retweets_of_status_id:", peg$c78 = peg$literalExpectation("retweets_of_status_id:", false), peg$c79 = function(statusId) { return terminalAstNode( 'retweets_of_status_id', statusId ) }, peg$c80 = "in_reply_to_status_id:", peg$c81 = peg$literalExpectation("in_reply_to_status_id:", false), peg$c82 = function(statusId) { return terminalAstNode( 'in_reply_to_status_id', statusId ) }, peg$c83 = "source:", peg$c84 = peg$literalExpectation("source:", false), peg$c85 = function(source) { return terminalAstNode( 'source', source ) }, peg$c86 = "place:", peg$c87 = peg$literalExpectation("place:", false), peg$c88 = function(place) { return terminalAstNode( 'place', place ) }, peg$c89 = "place_contains:", peg$c90 = peg$literalExpectation("place_contains:", false), peg$c91 = function(place) { return terminalAstNode( 'place_contains', place ) }, peg$c92 = "profile_country_code:", peg$c93 = peg$literalExpectation("profile_country_code:", false), peg$c94 = function(countryCode) { return terminalAstNode( 'profile_country_code', countryCode ) }, peg$c95 = "country_code:", peg$c96 = peg$literalExpectation("country_code:", false), peg$c97 = function(countryCode) { return terminalAstNode( 'country_code', countryCode ) }, peg$c98 = "statuses_count:", peg$c99 = peg$literalExpectation("statuses_count:", false), peg$c100 = function(range) { return terminalAstNode( 'statuses_count', range ); }, peg$c101 = "followers_count:", peg$c102 = peg$literalExpectation("followers_count:", false), peg$c103 = function(range) { return terminalAstNode( 'followers_count', range ); }, peg$c104 = "friends_count:", peg$c105 = peg$literalExpectation("friends_count:", false), peg$c106 = function(range) { return terminalAstNode( 'friends_count', range ); }, peg$c107 = "listed_count:", peg$c108 = peg$literalExpectation("listed_count:", false), peg$c109 = function(range) { return terminalAstNode( 'listed_count', range ); }, peg$c110 = "..", peg$c111 = peg$literalExpectation("..", false), peg$c112 = function(lb, ub) { return { lowerBound: lb, upperBound:ub }; }, peg$c113 = "sample:", peg$c114 = peg$literalExpectation("sample:", false), peg$c115 = function(percent) { return terminalAstNode( 'sample', percent ) }, peg$c116 = "bio:", peg$c117 = peg$literalExpectation("bio:", false), peg$c118 = function(bio) { return terminalAstNode( 'bio', bio ) }, peg$c119 = "bio_name:", peg$c120 = peg$literalExpectation("bio_name:", false), peg$c121 = function(bioName) { return terminalAstNode( 'bio_name', bioName ) }, peg$c122 = "bio_location:", peg$c123 = peg$literalExpectation("bio_location:", false), peg$c124 = function(bioLocation) { return terminalAstNode( 'bio_location', bioLocation ) }, peg$c125 = "retweets_of:", peg$c126 = peg$literalExpectation("retweets_of:", false), peg$c127 = function(userhandle) { return terminalAstNode( 'retweets_of', userhandle.join('') ) }, peg$c128 = function(userId) { return terminalAstNode( 'retweets_of', userId ) }, peg$c129 = "contains:", peg$c130 = peg$literalExpectation("contains:", false), peg$c131 = function(keyword) { return terminalAstNode( 'contains', keyword ); }, peg$c132 = "~", peg$c133 = peg$literalExpectation("~", false), peg$c134 = function(term, distance) { return terminalAstNode( 'proximity', { term : term, distance : distance } ); }, peg$c135 = "lang:", peg$c136 = peg$literalExpectation("lang:", false), peg$c137 = function(langCode) { return terminalAstNode('lang', langCode); }, peg$c138 = "time_zone:", peg$c139 = peg$literalExpectation("time_zone:", false), peg$c140 = function(timezone) { return terminalAstNode( 'time_zone', timezone.trim() ); }, peg$c141 = "profile_point_radius:[", peg$c142 = peg$literalExpectation("profile_point_radius:[", false), peg$c143 = "]", peg$c144 = peg$literalExpectation("]", false), peg$c145 = function(latitude, longitude, distance) { return terminalAstNode( 'profile_point_radius', { latitude : latitude, longitude : longitude, distance : distance } ); }, peg$c146 = "point_radius:[", peg$c147 = peg$literalExpectation("point_radius:[", false), peg$c148 = function(latitude, longitude, distance) { return terminalAstNode( 'point_radius', { latitude : latitude, longitude : longitude, distance : distance } ); }, peg$c149 = "profile_bounding_box:", peg$c150 = peg$literalExpectation("profile_bounding_box:", false), peg$c151 = function(box) { return terminalAstNode( 'profile_bounding_box', box ); }, peg$c152 = "bounding_box:", peg$c153 = peg$literalExpectation("bounding_box:", false), peg$c154 = function(box) { return terminalAstNode( 'bounding_box', box ); }, peg$c155 = "[", peg$c156 = peg$literalExpectation("[", false), peg$c157 = function(westLong, southLat, eastLong, northLat) { return { westLong : westLong, southLat : southLat, eastLong : eastLong, northLat : northLat } }, peg$c158 = function(minus, latitude, decimal) { return '' + minus + latitude + '.' + decimal; }, peg$c159 = function(minus, longitude, decimal) { return '' + ( minus || '' ) + longitude + '.' + decimal; }, peg$c160 = ".", peg$c161 = peg$literalExpectation(".", false), peg$c162 = "mi", peg$c163 = peg$literalExpectation("mi", false), peg$c164 = function(number, decimal, unit) { return number + '.' + decimal + unit; }, peg$c165 = function(string, strings) { return string + ' ' + multidimensionalArrayToString( strings ); }, peg$c166 = /^[a-zA-Z0-9!#$%&'()*+,-.\/:;<=>?@[\]\^_`{|}~]/, peg$c167 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "!", "#", "$", "%", "&", "'", "(", ")", "*", "+", [",", "."], "/", ":", ";", "<", "=", ">", "?", "@", "[", "]", "^", "_", "`", "{", "|", "}", "~"], false, false), peg$c168 = function(string) { return string.join('' ); }, peg$c169 = function(emojis) { return emoji( emojis ); }, peg$c170 = /^[a-zA-Z0-9_@,#'$]/, peg$c171 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_", "@", ",", "#", "'", "$"], false, false), peg$c172 = function(string) { return string.join(""); }, peg$c173 = function() { return 'NOT'; }, peg$c174 = "\"", peg$c175 = peg$literalExpectation("\"", false), peg$c176 = "(", peg$c177 = peg$literalExpectation("(", false), peg$c178 = ")", peg$c179 = peg$literalExpectation(")", false), peg$c180 = "OR", peg$c181 = peg$literalExpectation("OR", false), peg$c182 = "-", peg$c183 = peg$literalExpectation("-", false), peg$c184 = function() { return 'AND'; }, peg$c185 = function(minus, n1, n2) { return (minus || '') + n1 + "." + n2 }, peg$c186 = /^[0-9]/, peg$c187 = peg$classExpectation([["0", "9"]], false, false), peg$c188 = function(number) { return number.join(''); }, peg$c189 = /^[!"#$%&'()*+,-.\/:;<=>?@[\]\^_`{|}~]/, peg$c190 = peg$classExpectation(["!", "\"", "#", "$", "%", "&", "'", "(", ")", "*", "+", [",", "."], "/", ":", ";", "<", "=", ">", "?", "@", "[", "]", "^", "_", "`", "{", "|", "}", "~"], false, false), peg$c191 = /^[ \t\n\rs]/, peg$c192 = peg$classExpectation([" ", "\t", "\n", "\r", "s"], false, false), peg$c193 = peg$otherExpectation("whitespace"), peg$c194 = /^[ \t\n\r]/, peg$c195 = peg$classExpectation([" ", "\t", "\n", "\r"], false, false), peg$c196 = /^[a-zA-Z0-9_]/, peg$c197 = peg$classExpectation([["a", "z"], ["A", "Z"], ["0", "9"], "_"], false, false), peg$c198 = function(userhandle) { return userhandle.join(""); }, peg$c199 = "am", peg$c200 = peg$literalExpectation("am", false), peg$c201 = "ar", peg$c202 = peg$literalExpectation("ar", false), peg$c203 = "hy", peg$c204 = peg$literalExpectation("hy", false), peg$c205 = "bn", peg$c206 = peg$literalExpectation("bn", false), peg$c207 = "bg", peg$c208 = peg$literalExpectation("bg", false), peg$c209 = "my", peg$c210 = peg$literalExpectation("my", false), peg$c211 = "zh", peg$c212 = peg$literalExpectation("zh", false), peg$c213 = "cs", peg$c214 = peg$literalExpectation("cs", false), peg$c215 = "da", peg$c216 = peg$literalExpectation("da", false), peg$c217 = "nl", peg$c218 = peg$literalExpectation("nl", false), peg$c219 = "en", peg$c220 = peg$literalExpectation("en", false), peg$c221 = "et", peg$c222 = peg$literalExpectation("et", false), peg$c223 = "fi", peg$c224 = peg$literalExpectation("fi", false), peg$c225 = "fr", peg$c226 = peg$literalExpectation("fr", false), peg$c227 = "ka", peg$c228 = peg$literalExpectation("ka", false), peg$c229 = "de", peg$c230 = peg$literalExpectation("de", false), peg$c231 = "el", peg$c232 = peg$literalExpectation("el", false), peg$c233 = "gu", peg$c234 = peg$literalExpectation("gu", false), peg$c235 = "ht", peg$c236 = peg$literalExpectation("ht", false), peg$c237 = "iw", peg$c238 = peg$literalExpectation("iw", false), peg$c239 = "hi", peg$c240 = peg$literalExpectation("hi", false), peg$c241 = "hu", peg$c242 = peg$literalExpectation("hu", false), peg$c243 = "is", peg$c244 = peg$literalExpectation("is", false), peg$c245 = "in", peg$c246 = peg$literalExpectation("in", false), peg$c247 = "it", peg$c248 = peg$literalExpectation("it", false), peg$c249 = "ja", peg$c250 = peg$literalExpectation("ja", false), peg$c251 = "kn", peg$c252 = peg$literalExpectation("kn", false), peg$c253 = "km", peg$c254 = peg$literalExpectation("km", false), peg$c255 = "ko", peg$c256 = peg$literalExpectation("ko", false), peg$c257 = "lo", peg$c258 = peg$literalExpectation("lo", false), peg$c259 = "lv", peg$c260 = peg$literalExpectation("lv", false), peg$c261 = "lt", peg$c262 = peg$literalExpectation("lt", false), peg$c263 = "ml", peg$c264 = peg$literalExpectation("ml", false), peg$c265 = "dv", peg$c266 = peg$literalExpectation("dv", false), peg$c267 = "mr", peg$c268 = peg$literalExpectation("mr", false), peg$c269 = "ne", peg$c270 = peg$literalExpectation("ne", false), peg$c271 = "no", peg$c272 = peg$literalExpectation("no", false), peg$c273 = "or", peg$c274 = peg$literalExpectation("or", false), peg$c275 = "pa", peg$c276 = peg$literalExpectation("pa", false), peg$c277 = "ps", peg$c278 = peg$literalExpectation("ps", false), peg$c279 = "fa", peg$c280 = peg$literalExpectation("fa", false), peg$c281 = "pl", peg$c282 = peg$literalExpectation("pl", false), peg$c283 = "pt", peg$c284 = peg$literalExpectation("pt", false), peg$c285 = "ro", peg$c286 = peg$literalExpectation("ro", false), peg$c287 = "ru", peg$c288 = peg$literalExpectation("ru", false), peg$c289 = "sr", peg$c290 = peg$literalExpectation("sr", false), peg$c291 = "sd", peg$c292 = peg$literalExpectation("sd", false), peg$c293 = "si", peg$c294 = peg$literalExpectation("si", false), peg$c295 = "sk", peg$c296 = peg$literalExpectation("sk", false), peg$c297 = "sl", peg$c298 = peg$literalExpectation("sl", false), peg$c299 = "ckb", peg$c300 = peg$literalExpectation("ckb", false), peg$c301 = "es", peg$c302 = peg$literalExpectation("es", false), peg$c303 = "sv", peg$c304 = peg$literalExpectation("sv", false), peg$c305 = "tl", peg$c306 = peg$literalExpectation("tl", false), peg$c307 = "ta", peg$c308 = peg$literalExpectation("ta", false), peg$c309 = "te", peg$c310 = peg$literalExpectation("te", false), peg$c311 = "th", peg$c312 = peg$literalExpectation("th", false), peg$c313 = "bo", peg$c314 = peg$literalExpectation("bo", false), peg$c315 = "tr", peg$c316 = peg$literalExpectation("tr", false), peg$c317 = "uk", peg$c318 = peg$literalExpectation("uk", false), peg$c319 = "ur", peg$c320 = peg$literalExpectation("ur", false), peg$c321 = "ug", peg$c322 = peg$literalExpectation("ug", false), peg$c323 = "vi", peg$c324 = peg$literalExpectation("vi", false), peg$c325 = "cy", peg$c326 = peg$literalExpectation("cy", false), peg$c327 = "AF", peg$c328 = peg$literalExpectation("AF", false), peg$c329 = "AL", peg$c330 = peg$literalExpectation("AL", false), peg$c331 = "DZ", peg$c332 = peg$literalExpectation("DZ", false), peg$c333 = "AD", peg$c334 = peg$literalExpectation("AD", false), peg$c335 = "AO", peg$c336 = peg$literalExpectation("AO", false), peg$c337 = "AG", peg$c338 = peg$literalExpectation("AG", false), peg$c339 = "AR", peg$c340 = peg$literalExpectation("AR", false), peg$c341 = "AM", peg$c342 = peg$literalExpectation("AM", false), peg$c343 = "AU", peg$c344 = peg$literalExpectation("AU", false), peg$c345 = "AT", peg$c346 = peg$literalExpectation("AT", false), peg$c347 = "AZ", peg$c348 = peg$literalExpectation("AZ", false), peg$c349 = "BS", peg$c350 = peg$literalExpectation("BS", false), peg$c351 = "BH", peg$c352 = peg$literalExpectation("BH", false), peg$c353 = "BD", peg$c354 = peg$literalExpectation("BD", false), peg$c355 = "BB", peg$c356 = peg$literalExpectation("BB", false), peg$c357 = "BY", peg$c358 = peg$literalExpectation("BY", false), peg$c359 = "BE", peg$c360 = peg$literalExpectation("BE", false), peg$c361 = "BZ", peg$c362 = peg$literalExpectation("BZ", false), peg$c363 = "BJ", peg$c364 = peg$literalExpectation("BJ", false), peg$c365 = "BT", peg$c366 = peg$literalExpectation("BT", false), peg$c367 = "BO", peg$c368 = peg$literalExpectation("BO", false), peg$c369 = "BA", peg$c370 = peg$literalExpectation("BA", false), peg$c371 = "BW", peg$c372 = peg$literalExpectation("BW", false), peg$c373 = "BR", peg$c374 = peg$literalExpectation("BR", false), peg$c375 = "BN", peg$c376 = peg$literalExpectation("BN", false), peg$c377 = "BG", peg$c378 = peg$literalExpectation("BG", false), peg$c379 = "BF", peg$c380 = peg$literalExpectation("BF", false), peg$c381 = "BI", peg$c382 = peg$literalExpectation("BI", false), peg$c383 = "KH", peg$c384 = peg$literalExpectation("KH", false), peg$c385 = "CM", peg$c386 = peg$literalExpectation("CM", false), peg$c387 = "CA", peg$c388 = peg$literalExpectation("CA", false), peg$c389 = "CV", peg$c390 = peg$literalExpectation("CV", false), peg$c391 = "CF", peg$c392 = peg$literalExpectation("CF", false), peg$c393 = "TD", peg$c394 = peg$literalExpectation("TD", false), peg$c395 = "CL", peg$c396 = peg$literalExpectation("CL", false), peg$c397 = "CN", peg$c398 = peg$literalExpectation("CN", false), peg$c399 = "CO", peg$c400 = peg$literalExpectation("CO", false), peg$c401 = "KM", peg$c402 = peg$literalExpectation("KM", false), peg$c403 = "CD", peg$c404 = peg$literalExpectation("CD", false), peg$c405 = "CG", peg$c406 = peg$literalExpectation("CG", false), peg$c407 = "CR", peg$c408 = peg$literalExpectation("CR", false), peg$c409 = "CI", peg$c410 = peg$literalExpectation("CI", false), peg$c411 = "HR", peg$c412 = peg$literalExpectation("HR", false), peg$c413 = "CU", peg$c414 = peg$literalExpectation("CU", false), peg$c415 = "CY", peg$c416 = peg$literalExpectation("CY", false), peg$c417 = "CZ", peg$c418 = peg$literalExpectation("CZ", false), peg$c419 = "DK", peg$c420 = peg$literalExpectation("DK", false), peg$c421 = "DJ", peg$c422 = peg$literalExpectation("DJ", false), peg$c423 = "DM", peg$c424 = peg$literalExpectation("DM", false), peg$c425 = "DO", peg$c426 = peg$literalExpectation("DO", false), peg$c427 = "EC", peg$c428 = peg$literalExpectation("EC", false), peg$c429 = "EG", peg$c430 = peg$literalExpectation("EG", false), peg$c431 = "SV", peg$c432 = peg$literalExpectation("SV", false), peg$c433 = "GQ", peg$c434 = peg$literalExpectation("GQ", false), peg$c435 = "ER", peg$c436 = peg$literalExpectation("ER", false), peg$c437 = "EE", peg$c438 = peg$literalExpectation("EE", false), peg$c439 = "ET", peg$c440 = peg$literalExpectation("ET", false), peg$c441 = "FJ", peg$c442 = peg$literalExpectation("FJ", false), peg$c443 = "FI", peg$c444 = peg$literalExpectation("FI", false), peg$c445 = "FR", peg$c446 = peg$literalExpectation("FR", false), peg$c447 = "GA", peg$c448 = peg$literalExpectation("GA", false), peg$c449 = "GM", peg$c450 = peg$literalExpectation("GM", false), peg$c451 = "GE", peg$c452 = peg$literalExpectation("GE", false), peg$c453 = "DE", peg$c454 = peg$literalExpectation("DE", false), peg$c455 = "GH", peg$c456 = peg$literalExpectation("GH", false), peg$c457 = "GR", peg$c458 = peg$literalExpectation("GR", false), peg$c459 = "GD", peg$c460 = peg$literalExpectation("GD", false), peg$c461 = "GT", peg$c462 = peg$literalExpectation("GT", false), peg$c463 = "GN", peg$c464 = peg$literalExpectation("GN", false), peg$c465 = "GW", peg$c466 = peg$literalExpectation("GW", false), peg$c467 = "GY", peg$c468 = peg$literalExpectation("GY", false), peg$c469 = "HT", peg$c470 = peg$literalExpectation("HT", false), peg$c471 = "HN", peg$c472 = peg$literalExpectation("HN", false), peg$c473 = "HU", peg$c474 = peg$literalExpectation("HU", false), peg$c475 = "IS", peg$c476 = peg$literalExpectation("IS", false), peg$c477 = "IN", peg$c478 = peg$literalExpectation("IN", false), peg$c479 = "ID", peg$c480 = peg$literalExpectation("ID", false), peg$c481 = "IR", peg$c482 = peg$literalExpectation("IR", false), peg$c483 = "IQ", peg$c484 = peg$literalExpectation("IQ", false), peg$c485 = "IE", peg$c486 = peg$literalExpectation("IE", false), peg$c487 = "IL", peg$c488 = peg$literalExpectation("IL", false), peg$c489 = "IT", peg$c490 = peg$literalExpectation("IT", false), peg$c491 = "JM", peg$c492 = peg$literalExpectation("JM", false), peg$c493 = "JP", peg$c494 = peg$literalExpectation("JP", false), peg$c495 = "JO", peg$c496 = peg$literalExpectation("JO", false), peg$c497 = "KZ", peg$c498 = peg$literalExpectation("KZ", false), peg$c499 = "KE", peg$c500 = peg$literalExpectation("KE", false), peg$c501 = "KI", peg$c502 = peg$literalExpectation("KI", false), peg$c503 = "KP", peg$c504 = peg$literalExpectation("KP", false), peg$c505 = "KR", peg$c506 = peg$literalExpectation("KR", false), peg$c507 = "KW", peg$c508 = peg$literalExpectation("KW", false), peg$c509 = "KG", peg$c510 = peg$literalExpectation("KG", false), peg$c511 = "LA", peg$c512 = peg$literalExpectation("LA", false), peg$c513 = "LV", peg$c514 = peg$literalExpectation("LV", false), peg$c515 = "LB", peg$c516 = peg$literalExpectation("LB", false), peg$c517 = "LS", peg$c518 = peg$literalExpectation("LS", false), peg$c519 = "LR", peg$c520 = peg$literalExpectation("LR", false), peg$c521 = "LY", peg$c522 = peg$literalExpectation("LY", false), peg$c523 = "LI", peg$c524 = peg$literalExpectation("LI", false), peg$c525 = "LT", peg$c526 = peg$literalExpectation("LT", false), peg$c527 = "LU", peg$c528 = peg$literalExpectation("LU", false), peg$c529 = "MK", peg$c530 = peg$literalExpectation("MK", false), peg$c531 = "MG", peg$c532 = peg$literalExpectation("MG", false), peg$c533 = "MW", peg$c534 = peg$literalExpectation("MW", false), peg$c535 = "MY", peg$c536 = peg$literalExpectation("MY", false), peg$c537 = "MV", peg$c538 = peg$literalExpectation("MV", false), peg$c539 = "ML", peg$c540 = peg$literalExpectation("ML", false), peg$c541 = "MT", peg$c542 = peg$literalExpectation("MT", false), peg$c543 = "MH", peg$c544 = peg$literalExpectation("MH", false), peg$c545 = "MR", peg$c546 = peg$literalExpectation("MR", false), peg$c547 = "MU", peg$c548 = peg$literalExpectation("MU", false), peg$c549 = "MX", peg$c550 = peg$literalExpectation("MX", false), peg$c551 = "FM", peg$c552 = peg$literalExpectation("FM", false), peg$c553 = "MD", peg$c554 = peg$literalExpectation("MD", false), peg$c555 = "MC", peg$c556 = peg$literalExpectation("MC", false), peg$c557 = "MN", peg$c558 = peg$literalExpectation("MN", false), peg$c559 = "ME", peg$c560 = peg$literalExpectation("ME", false), peg$c561 = "MA", peg$c562 = peg$literalExpectation("MA", false), peg$c563 = "MZ", peg$c564 = peg$literalExpectation("MZ", false), peg$c565 = "MM", peg$c566 = peg$literalExpectation("MM", false), peg$c567 = "NA", peg$c568 = peg$literalExpectation("NA", false), peg$c569 = "NR", peg$c570 = peg$literalExpectation("NR", false), peg$c571 = "NP", peg$c572 = peg$literalExpectation("NP", false), peg$c573 = "NL", peg$c574 = peg$literalExpectation("NL", false), peg$c575 = "NZ", peg$c576 = peg$literalExpectation("NZ", false), peg$c577 = "NI", peg$c578 = peg$literalExpectation("NI", false), peg$c579 = "NE", peg$c580 = peg$literalExpectation("NE", false), peg$c581 = "NG", peg$c582 = peg$literalExpectation("NG", false), peg$c583 = "NO", peg$c584 = peg$literalExpectation("NO", false), peg$c585 = "OM", peg$c586 = peg$literalExpectation("OM", false), peg$c587 = "PK", peg$c588 = peg$literalExpectation("PK", false), peg$c589 = "PW", peg$c590 = peg$literalExpectation("PW", false), peg$c591 = "PA", peg$c592 = peg$literalExpectation("PA", false), peg$c593 = "PG", peg$c594 = peg$literalExpectation("PG", false), peg$c595 = "PY", peg$c596 = peg$literalExpectation("PY", false), peg$c597 = "PE", peg$c598 = peg$literalExpectation("PE", false), peg$c599 = "PH", peg$c600 = peg$literalExpectation("PH", false), peg$c601 = "PL", peg$c602 = peg$literalExpectation("PL", false), peg$c603 = "PT", peg$c604 = peg$literalExpectation("PT", false), peg$c605 = "QA", peg$c606 = peg$literalExpectation("QA", false), peg$c607 = "RO", peg$c608 = peg$literalExpectation("RO", false), peg$c609 = "RU", peg$c610 = peg$literalExpectation("RU", false), peg$c611 = "RW", peg$c612 = peg$literalExpectation("RW", false), peg$c613 = "KN", peg$c614 = peg$literalExpectation("KN", false), peg$c615 = "LC", peg$c616 = peg$literalExpectation("LC", false), peg$c617 = "VC", peg$c618 = peg$literalExpectation("VC", false), peg$c619 = "WS", peg$c620 = peg$literalExpectation("WS", false), peg$c621 = "SM", peg$c622 = peg$literalExpectation("SM", false), peg$c623 = "ST", peg$c624 = peg$literalExpectation("ST", false), peg$c625 = "SA", peg$c626 = peg$literalExpectation("SA", false), peg$c627 = "SN", peg$c628 = peg$literalExpectation("SN", false), peg$c629 = "RS", peg$c630 = peg$literalExpectation("RS", false), peg$c631 = "SC", peg$c632 = peg$literalExpectation("SC", false), peg$c633 = "SL", peg$c634 = peg$literalExpectation("SL", false), peg$c635 = "SG", peg$c636 = peg$literalExpectation("SG", false), peg$c637 = "SK", peg$c638 = peg$literalExpectation("SK", false), peg$c639 = "SI", peg$c640 = peg$literalExpectation("SI", false), peg$c641 = "SB", peg$c642 = peg$literalExpectation("SB", false), peg$c643 = "SO", peg$c644 = peg$literalExpectation("SO", false), peg$c645 = "ZA", peg$c646 = peg$literalExpectation("ZA", false), peg$c647 = "ES", peg$c648 = peg$literalExpectation("ES", false), peg$c649 = "LK", peg$c650 = peg$literalExpectation("LK", false), peg$c651 = "SD", peg$c652 = peg$literalExpectation("SD", false), peg$c653 = "SR", peg$c654 = peg$literalExpectation("SR", false), peg$c655 = "SZ", peg$c656 = peg$literalExpectation("SZ", false), peg$c657 = "SE", peg$c658 = peg$literalExpectation("SE", false), peg$c659 = "CH", peg$c660 = peg$literalExpectation("CH", false), peg$c661 = "SY", peg$c662 = peg$literalExpectation("SY", false), peg$c663 = "TJ", peg$c664 = peg$literalExpectation("TJ", false), peg$c665 = "TZ", peg$c666 = peg$literalExpectation("TZ", false), peg$c667 = "TH", peg$c668 = peg$literalExpectation("TH", false), peg$c669 = "TL", peg$c670 = peg$literalExpectation("TL", false), peg$c671 = "TG", peg$c672 = peg$literalExpectation("TG", false), peg$c673 = "TO", peg$c674 = peg$literalExpectation("TO", false), peg$c675 = "TT", peg$c676 = peg$literalExpectation("TT", false), peg$c677 = "TN", peg$c678 = peg$literalExpectation("TN", false), peg$c679 = "TR", peg$c680 = peg$literalExpectation("TR", false), peg$c681 = "TM", peg$c682 = peg$literalExpectation("TM", false), peg$c683 = "TV", peg$c684 = peg$literalExpectation("TV", false), peg$c685 = "UG", peg$c686 = peg$literalExpectation("UG", false), peg$c687 = "UA", peg$c688 = peg$literalExpectation("UA", false), peg$c689 = "AE", peg$c690 = peg$literalExpectation("AE", false), peg$c691 = "GB", peg$c692 = peg$literalExpectation("GB", false), peg$c693 = "US", peg$c694 = peg$literalExpectation("US", false), peg$c695 = "UY", peg$c696 = peg$literalExpectation("UY", false), peg$c697 = "UZ", peg$c698 = peg$literalExpectation("UZ", false), peg$c699 = "VU", peg$c700 = peg$literalExpectation("VU", false), peg$c701 = "VA", peg$c702 = peg$literalExpectation("VA", false), peg$c703 = "VE", peg$c704 = peg$literalExpectation("VE", false), peg$c705 = "VN", peg$c706 = peg$literalExpectation("VN", false), peg$c707 = "YE", peg$c708 = peg$literalExpectation("YE", false), peg$c709 = "ZM", peg$c710 = peg$literalExpectation("ZM", false), peg$c711 = "ZW", peg$c712 = peg$literalExpectation("ZW", false), peg$c713 = "TW", peg$c714 = peg$literalExpectation("TW", false), peg$c715 = "CX", peg$c716 = peg$literalExpectation("CX", false), peg$c717 = "CC", peg$c718 = peg$literalExpectation("CC", false), peg$c719 = "HM", peg$c720 = peg$literalExpectation("HM", false), peg$c721 = "NF", peg$c722 = peg$literalExpectation("NF", false), peg$c723 = "NC", peg$c724 = peg$literalExpectation("NC", false), peg$c725 = "PF", peg$c726 = peg$literalExpectation("PF", false), peg$c727 = "YT", peg$c728 = peg$literalExpectation("YT", false), peg$c729 = "GP", peg$c730 = peg$literalExpectation("GP", false), peg$c731 = "PM", peg$c732 = peg$literalExpectation("PM", false), peg$c733 = "WF", peg$c734 = peg$literalExpectation("WF", false), peg$c735 = "TF", peg$c736 = peg$literalExpectation("TF", false), peg$c737 = "BV", peg$c738 = peg$literalExpectation("BV", false), peg$c739 = "CK", peg$c740 = peg$literalExpectation("CK", false), peg$c741 = "NU", peg$c742 = peg$literalExpectation("NU", false), peg$c743 = "TK", peg$c744 = peg$literalExpectation("TK", false), peg$c745 = "GG", peg$c746 = peg$literalExpectation("GG", false), peg$c747 = "IM", peg$c748 = peg$literalExpectation("IM", false), peg$c749 = "JE", peg$c750 = peg$literalExpectation("JE", false), peg$c751 = "AI", peg$c752 = peg$literalExpectation("AI", false), peg$c753 = "BM", peg$c754 = peg$literalExpectation("BM", false), peg$c755 = "IO", peg$c756 = peg$literalExpectation("IO", false), peg$c757 = "VG", peg$c758 = peg$literalExpectation("VG", false), peg$c759 = "KY", peg$c760 = peg$literalExpectation("KY", false), peg$c761 = "FK", peg$c762 = peg$literalExpectation("FK", false), peg$c763 = "GI", peg$c764 = peg$literalExpectation("GI", false), peg$c765 = "MS", peg$c766 = peg$literalExpectation("MS", false), peg$c767 = "PN", peg$c768 = peg$literalExpectation("PN", false), peg$c769 = "SH", peg$c770 = peg$literalExpectation("SH", false), peg$c771 = "GS", peg$c772 = peg$literalExpectation("GS", false), peg$c773 = "TC", peg$c774 = peg$literalExpectation("TC", false), peg$c775 = "MP", peg$c776 = peg$literalExpectation("MP", false), peg$c777 = "PR", peg$c778 = peg$literalExpectation("PR", false), peg$c779 = "AS", peg$c780 = peg$literalExpectation("AS", false), peg$c781 = "UM", peg$c782 = peg$literalExpectation("UM", false), peg$c783 = "GU", peg$c784 = peg$literalExpectation("GU", false), peg$c785 = "VI", peg$c786 = peg$literalExpectation("VI", false), peg$c787 = "HK", peg$c788 = peg$literalExpectation("HK", false), peg$c789 = "MO", peg$c790 = peg$literalExpectation("MO", false), peg$c791 = "FO", peg$c792 = peg$literalExpectation("FO", false), peg$c793 = "GL", peg$c794 = peg$literalExpectation("GL", false), peg$c795 = "GF", peg$c796 = peg$literalExpectation("GF", false), peg$c797 = "MQ", peg$c798 = peg$literalExpectation("MQ", false), peg$c799 = "RE", peg$c800 = peg$literalExpectation("RE", false), peg$c801 = "AX", peg$c802 = peg$literalExpectation("AX", false), peg$c803 = "AW", peg$c804 = peg$literalExpectation("AW", false), peg$c805 = "AN", peg$c806 = peg$literalExpectation("AN", false), peg$c807 = "SJ", peg$c808 = peg$literalExpectation("SJ", false), peg$c809 = "AC", peg$c810 = peg$literalExpectation("AC", false), peg$c811 = "TA", peg$c812 = peg$literalExpectation("TA", false), peg$c813 = "\uD83C", peg$c814 = peg$literalExpectation("\uD83C", false), peg$c815 = /^[\uDF00-\uDFFA]/, peg$c816 = peg$classExpectation([["\uDF00", "\uDFFA"]], false, false), peg$c817 = "\uD83D", peg$c818 = peg$literalExpectation("\uD83D", false), peg$c819 = /^[\uDC00-\uDDFF]/, peg$c820 = peg$classExpectation([["\uDC00", "\uDDFF"]], false, false), peg$c821 = "\uDF85", peg$c822 = peg$literalExpectation("\uDF85", false), peg$c823 = "\uDFC3", peg$c824 = peg$literalExpectation("\uDFC3", false), peg$c825 = "\uDFC4", peg$c826 = peg$literalExpectation("\uDFC4", false), peg$c827 = "\uDFCA", peg$c828 = peg$literalExpectation("\uDFCA", false), peg$c829 = "\uDFCB", peg$c830 = peg$literalExpectation("\uDFCB", false), peg$c831 = "\uDC42", peg$c832 = peg$literalExpectation("\uDC42", false), peg$c833 = "\uDC43", peg$c834 = peg$literalExpectation("\uDC43", false), peg$c835 = /^[\uDC46-\uDC50]/, peg$c836 = peg$classExpectation([["\uDC46", "\uDC50"]], false, false), peg$c837 = /^[\uDC66-\uDC69]/, peg$c838 = peg$classExpectation([["\uDC66", "\uDC69"]], false, false), peg$c839 = "\uDC6E", peg$c840 = peg$literalExpectation("\uDC6E", false), peg$c841 = /^[\uDC70-\uDC78]/, peg$c842 = peg$classExpectation([["\uDC70", "\uDC78"]], false, false), peg$c843 = "\uDC7C", peg$c844 = peg$literalExpectation("\uDC7C", false), peg$c845 = /^[\uDC81-\uDC83]/, peg$c846 = peg$classExpectation([["\uDC81", "\uDC83"]], false, false), peg$c847 = /^[\uDC85-\uDC87]/, peg$c848 = peg$classExpectation([["\uDC85", "\uDC87"]], false, false), peg$c849 = "\uDCAA", peg$c850 = peg$literalExpectation("\uDCAA", false), peg$c851 = "\uDD75", peg$c852 = peg$literalExpectation("\uDD75", false), peg$c853 = "\uDD90", peg$c854 = peg$literalExpectation("\uDD90", false), peg$c855 = "\uDD95", peg$c856 = peg$literalExpectation("\uDD95", false), peg$c857 = "\uDD96", peg$c858 = peg$literalExpectation("\uDD96", false), peg$c859 = "\uD83E", peg$c860 = peg$literalExpectation("\uD83E", false), peg$c861 = /^[\uDD00-\uDDFF]/, peg$c862 = peg$classExpectation([["\uDD00", "\uDDFF"]], false, false), peg$c863 = "\uDD18", peg$c864 = peg$literalExpectation("\uDD18", false), peg$c865 = /^[\uDE00-\uDE4F]/, peg$c866 = peg$classExpectation([["\uDE00", "\uDE4F"]], false, false), peg$c867 = /^[\uDE45-\uDE47]/, peg$c868 = peg$classExpectation([["\uDE45", "\uDE47"]], false, false), peg$c869 = /^[\uDE4B-\uDE4F]/, peg$c870 = peg$classExpectation([["\uDE4B", "\uDE4F"]], false, false), peg$c871 = /^[\uDE80-\uDEC5]/, peg$c872 = peg$classExpectation([["\uDE80", "\uDEC5"]], false, false), peg$c873 = /^[\uDECB-\uDED0]/, peg$c874 = peg$classExpectation([["\uDECB", "\uDED0"]], false, false), peg$c875 = /^[\uDEE0-\uDEE5]/, peg$c876 = peg$classExpectation([["\uDEE0", "\uDEE5"]], false, false), peg$c877 = "\uDEE9", peg$c878 = peg$literalExpectation("\uDEE9", false), peg$c879 = /^[\uDEEB-\uDEEC]/, peg$c880 = peg$classExpectation([["\uDEEB", "\uDEEC"]], false, false), peg$c881 = "\uDEF0", peg$c882 = peg$literalExpectation("\uDEF0", false), peg$c883 = "\uDEF3", peg$c884 = peg$literalExpectation("\uDEF3", false), peg$c885 = "\uDEA3", peg$c886 = peg$literalExpectation("\uDEA3", false), peg$c887 = /^[\uDEB4-\uDEB6]/, peg$c888 = peg$classExpectation([["\uDEB4", "\uDEB6"]], false, false), peg$c889 = "\uDEC0", peg$c890 = peg$literalExpectation("\uDEC0", false), peg$c891 = /^[\u2600-\u26FF]/, peg$c892 = peg$classExpectation([["\u2600", "\u26FF"]], false, false), peg$c893 = "\u261D", peg$c894 = peg$literalExpectation("\u261D", false), peg$c895 = "\u26F9", peg$c896 = peg$literalExpectation("\u26F9", false), peg$c897 = "\u2712", peg$c898 = peg$literalExpectation("\u2712", false), peg$c899 = "\u2714", peg$c900 = peg$literalExpectation("\u2714", false), peg$c901 = "\u2716", peg$c902 = peg$literalExpectation("\u2716", false), peg$c903 = "\u271D", peg$c904 = peg$literalExpectation("\u271D", false), peg$c905 = "\u2721", peg$c906 = peg$literalExpectation("\u2721", false), peg$c907 = "\u2728", peg$c908 = peg$literalExpectation("\u2728", false), peg$c909 = /^[\u2733-\u2734]/, peg$c910 = peg$classExpectation([["\u2733", "\u2734"]], false, false), peg$c911 = "\u2744", peg$c912 = peg$literalExpectation("\u2744", false), peg$c913 = "\u2747", peg$c914 = peg$literalExpectation("\u2747", false), peg$c915 = "\u274C", peg$c916 = peg$literalExpectation("\u274C", false), peg$c917 = "\u274E", peg$c918 = peg$literalExpectation("\u274E", false), peg$c919 = /^[\u2753-\u2755]/, peg$c920 = peg$classExpectation([["\u2753", "\u2755"]], false, false), peg$c921 = "\u2757", peg$c922 = peg$literalExpectation("\u2757", false), peg$c923 = /^[\u2763-\u2764]/, peg$c924 = peg$classExpectation([["\u2763", "\u2764"]], false, false), peg$c925 = /^[\u2795-\u2797]/, peg$c926 = peg$classExpectation([["\u2795", "\u2797"]], false, false), peg$c927 = "\u27A1", peg$c928 = peg$literalExpectation("\u27A1", false), peg$c929 = "\u27B0", peg$c930 = peg$literalExpectation("\u27B0", false), peg$c931 = "\u27BF", peg$c932 = peg$literalExpectation("\u27BF", false), peg$c933 = "\u2702", peg$c934 = peg$literalExpectation("\u2702", false), peg$c935 = "\u2705", peg$c936 = peg$literalExpectation("\u2705", false), peg$c937 = /^[\u2708-\u270D]/, peg$c938 = peg$classExpectation([["\u2708", "\u270D"]], false, false), peg$c939 = "\u270F", peg$c940 = peg$literalExpectation("\u270F", false), peg$c941 = /^[\u270A-\u270D]/, peg$c942 = peg$classExpectation([["\u270A", "\u270D"]], false, false), peg$c943 = /^[\u2194-\u2199]/, peg$c944 = peg$classExpectation([["\u2194", "\u2199"]], false, false), peg$c945 = /^[\u21A9-\u21AA]/, peg$c946 = peg$classExpectation([["\u21A9", "\u21AA"]], false, false), peg$c947 = "#", peg$c948 = peg$literalExpectation("#", false), peg$c949 = "*", peg$c950 = peg$literalExpectation("*", false), peg$c951 = "\u3030", peg$c952 = peg$literalExpectation("\u3030", false), peg$c953 = "\u303D", peg$c954 = peg$literalExpectation("\u303D", false), peg$c955 = /^[\uDD70-\uDD71]/, peg$c956 = peg$classExpectation([["\uDD70", "\uDD71"]], false, false), peg$c957 = /^[\uDD7E-\uDD7F]/, peg$c958 = peg$classExpectation([["\uDD7E", "\uDD7F"]], false, false), peg$c959 = "\uDD8E", peg$c960 = peg$literalExpectation("\uDD8E", false), peg$c961 = /^[\uDD91-\uDD9A]/, peg$c962 = peg$classExpectation([["\uDD91", "\uDD9A"]], false, false), peg$c963 = /^[\uDDE6-\uDDFF]/, peg$c964 = peg$classExpectation([["\uDDE6", "\uDDFF"]], false, false), peg$c965 = "\u24C2", peg$c966 = peg$literalExpectation("\u24C2", false), peg$c967 = "\u3297", peg$c968 = peg$literalExpectation("\u3297", false), peg$c969 = "\u3299", peg$c970 = peg$literalExpectation("\u3299", false), peg$c971 = /^[\uDE01-\uDE02]/, peg$c972 = peg$classExpectation([["\uDE01", "\uDE02"]], false, false), peg$c973 = "\uDE1A", peg$c974 = peg$literalExpectation("\uDE1A", false), peg$c975 = "\uDE2F", peg$c976 = peg$literalExpectation("\uDE2F", false), peg$c977 = /^[\uDE32-\uDE3A]/, peg$c978 = peg$classExpectation([["\uDE32", "\uDE3A"]], false, false), peg$c979 = /^[\uDE50-\uDE51]/, peg$c980 = peg$classExpectation([["\uDE50", "\uDE51"]], false, false), peg$c981 = "\u203C", peg$c982 = peg$literalExpectation("\u203C", false), peg$c983 = "\u2049", peg$c984 = peg$literalExpectation("\u2049", false), peg$c985 = /^[\u25AA-\u25AB]/, peg$c986 = peg$classExpectation([["\u25AA", "\u25AB"]], false, false), peg$c987 = "\u25B6", peg$c988 = peg$literalExpectation("\u25B6", false), peg$c989 = "\u25C0", peg$c990 = peg$literalExpectation("\u25C0", false), peg$c991 = /^[\u25FB-\u25FE]/, peg$c992 = peg$classExpectation([["\u25FB", "\u25FE"]], false, false), peg$c993 = "\xA9", peg$c994 = peg$literalExpectation("\xA9", false), peg$c995 = "\xAE", peg$c996 = peg$literalExpectation("\xAE", false), peg$c997 = "\u2122", peg$c998 = peg$literalExpectation("\u2122", false), peg$c999 = "\u2139", peg$c1000 = peg$literalExpectation("\u2139", false), peg$c1001 = "\uDC04", peg$c1002 = peg$literalExpectation("\uDC04", false), peg$c1003 = /^[\u2B05-\u2B07]/, peg$c1004 = peg$classExpectation([["\u2B05", "\u2B07"]], false, false), peg$c1005 = /^[\u2B1B-\u2B1C]/, peg$c1006 = peg$classExpectation([["\u2B1B", "\u2B1C"]], false, false), peg$c1007 = "\u2B50", peg$c1008 = peg$literalExpectation("\u2B50", false), peg$c1009 = "\u2B55", peg$c1010 = peg$literalExpectation("\u2B55", false), peg$c1011 = /^[\u231A-\u231B]/, peg$c1012 = peg$classExpectation([["\u231A", "\u231B"]], false, false), peg$c1013 = "\u2328", peg$c1014 = peg$literalExpectation("\u2328", false), peg$c1015 = "\u23CF", peg$c1016 = peg$literalExpectation("\u23CF", false), peg$c1017 = /^[\u23E9-\u23F3]/, peg$c1018 = peg$classExpectation([["\u23E9", "\u23F3"]], false, false), peg$c1019 = /^[\u23F8-\u23FA]/, peg$c1020 = peg$classExpectation([["\u23F8", "\u23FA"]], false, false), peg$c1021 = "\uDCCF", peg$c1022 = peg$literalExpectation("\uDCCF", false), peg$c1023 = /^[\u2934-\u2935]/, peg$c1024 = peg$classExpectation([["\u2934", "\u2935"]], false, false), peg$c1025 = /^[\uDFFB-\uDFFF]/, peg$c1026 = peg$classExpectation([["\uDFFB", "\uDFFF"]], false, false), peg$c1027 = peg$otherExpectation("Zero width joiner"), peg$c1028 = "\u200D", peg$c1029 = peg$literalExpectation("\u200D", false), peg$c1030 = "\uFE0E", peg$c1031 = peg$literalExpectation("\uFE0E", false), peg$c1032 = "\uFE0F", peg$c1033 = peg$literalExpectation("\uFE0F", false), peg$c1034 = "\uDC68", peg$c1035 = peg$literalExpectation("\uDC68", false), peg$c1036 = "\uDC69", peg$c1037 = peg$literalExpectation("\uDC69", false), peg$c1038 = "\uDC66", peg$c1039 = peg$literalExpectation("\uDC66", false), peg$c1040 = "\uDC67", peg$c1041 = peg$literalExpectation("\uDC67", false), peg$c1042 = "\u2764", peg$c1043 = peg$literalExpectation("\u2764", false), peg$c1044 = "\uDC8B", peg$c1045 = peg$literalExpectation("\uDC8B", false), peg$c1046 = "\uDC41", peg$c1047 = peg$literalExpectation("\uDC41", false), peg$c1048 = "\uDDE8", peg$c1049 = peg$literalExpectation("\uDDE8", false), peg$currPos = 0, peg$savedPos = 0, peg$posDetailsCache = [{ line: 1, column: 1 }], peg$maxFailPos = 0, peg$maxFailExpected = [], peg$silentFails = 0, peg$result; if ("startRule" in options) { if (!(options.startRule in peg$startRuleFunctions)) { throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); } peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; } function text() { return input.substring(peg$savedPos, peg$currPos); } function location() { return peg$computeLocation(peg$savedPos, peg$currPos); } function expected(description, location) { location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) throw peg$buildStructuredError( [peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location ); } function error(message, location) { location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos) throw peg$buildSimpleError(message, location); } function peg$literalExpectation(text, ignoreCase) { return { type: "literal", text: text, ignoreCase: ignoreCase }; } function peg$classExpectation(parts, inverted, ignoreCase) { return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; } function peg$anyExpectation() { return { type: "any" }; } function peg$endExpectation() { return { type: "end" }; } function peg$otherExpectation(description) { return { type: "other", description: description }; } function peg$computePosDetails(pos) { var details = peg$posDetailsCache[pos], p; if (details) { return details; } else { p = pos - 1; while (!peg$posDetailsCache[p]) { p--; } details = peg$posDetailsCache[p]; details = { line: details.line, column: details.column }; while (p < pos) { if (input.charCodeAt(p) === 10) { details.line++; details.column = 1; } else { details.column++; } p++; } peg$posDetailsCache[pos] = details; return details; } } function peg$computeLocation(startPos, endPos) { var startPosDetails = peg$computePosDetails(startPos), endPosDetails = peg$computePosDetails(endPos); return { start: { offset: startPos, line: startPosDetails.line, column: startPosDetails.column }, end: { offset: endPos, line: endPosDetails.line, column: endPosDetails.column } }; } function peg$fail(expected) { if (peg$currPos < peg$maxFailPos) { return; } if (peg$currPos > peg$maxFailPos) { peg$maxFailPos = peg$currPos; peg$maxFailExpected = []; } peg$maxFailExpected.push(expected); } function peg$buildSimpleError(message, location) { return new peg$SyntaxError(message, null, null, location); } function peg$buildStructuredError(expected, found, location) { return new peg$SyntaxError( peg$SyntaxError.buildMessage(expected, found), expected, found, location ); } function peg$parsestart() { var s0, s1, s2, s3; s0 = peg$currPos; s1 = peg$parse_(); if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parsestatement(); while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parsestatement(); } if (s2 !== peg$FAILED) { s3 = peg$parse_(); if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c0(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsestatement() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; s0 = peg$currPos; s1 = peg$parselb(); if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { s3 = peg$parsestatement(); if (s3 !== peg$FAILED) { s4 = peg$parse_(); if (s4 !== peg$FAILED) { s5 = peg$parserb(); if (s5 !== peg$FAILED) { s6 = peg$parse_(); if (s6 !== peg$FAILED) { s7 = peg$parseboolean(); if (s7 !== peg$FAILED) { s8 = peg$parse_(); if (s8 !== peg$FAILED) { s9 = peg$parsestatement(); if (s9 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c1(s3, s7, s9); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parselb(); if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { s3 = peg$parsestatement(); if (s3 !== peg$FAILED) { s4 = peg$parse_(); if (s4 !== peg$FAILED) { s5 = peg$parserb(); if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c2(s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseoperator(); if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { s3 = peg$parseboolean(); if (s3 !== peg$FAILED) { s4 = peg$parse_(); if (s4 !== peg$FAILED) { s5 = peg$parsestatement(); if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c1(s1, s3, s5); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$parseoperator(); } } } return s0; } function peg$parseoperator() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; s1 = peg$parselb(); if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { s3 = peg$parseoperator(); if (s3 !== peg$FAILED) { s4 = peg$parse_(); if (s4 !== peg$FAILED) { s5 = peg$parserb(); if (s5 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c3(s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parsenegator(); if (s1 !== peg$FAILED) { s2 = peg$parseoperator(); if (s2 !== peg$FAILED) { s3 = peg$parsewhiteSpace(); if (s3 !== peg$FAILED) { s4 = peg$parseoperator(); if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c4(s2, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$parsefollowersCount(); if (s0 === peg$FAILED) { s0 = peg$parsecontains(); if (s0 === peg$FAILED) { s0 = peg$parseproximity(); if (s0 === peg$FAILED) { s0 = peg$parsefrom(); if (s0 === peg$FAILED) { s0 = peg$parseurl(); if (s0 === peg$FAILED) { s0 = peg$parseurlTitle(); if (s0 === peg$FAILED) { s0 = peg$parseurlDescription(); if (s0 === peg$FAILED) { s0 = peg$parseurlContains(); if (s0 === peg$FAILED) { s0 = peg$parsehasLinks(); if (s0 === peg$FAILED) { s0 = peg$parsesample(); if (s0 === peg$FAILED) { s0 = peg$parseto(); if (s0 === peg$FAILED) { s0 = peg$parsebio(); if (s0 === peg$FAILED) { s0 = peg$parsebioName(); if (s0 === peg$FAILED) { s0 = peg$parsebioLocation(); if (s0 === peg$FAILED) { s0 = peg$parseretweetsOf(); if (s0 === peg$FAILED) { s0 = peg$parsepointradius(); if (s0 === peg$FAILED) { s0 = peg$parsestatusesCount(); if (s0 === peg$FAILED) { s0 = peg$parsefollowersCount(); if (s0 === peg$FAILED) { s0 = peg$parsefriendsCount(); if (s0 === peg$FAILED) { s0 = peg$parselistedCount(); if (s0 === peg$FAILED) { s0 = peg$parseisVerified(); if (s0 === peg$FAILED) { s0 = peg$parseisRetweet(); if (s0 === peg$FAILED) { s0 = peg$parsesource(); if (s0 === peg$FAILED) { s0 = peg$parseplace(); if (s0 === peg$FAILED) { s0 = peg$parseplaceContains(); if (s0 === peg$FAILED) { s0 = peg$parsecountryCode(); if (s0 === peg$FAILED) { s0 = peg$parsehasGeo(); if (s0 === peg$FAILED) { s0 = peg$parsehasHashtags(); if (s0 === peg$FAILED) { s0 = peg$parsehasMentions(); if (s0 === peg$FAILED) { s0 = peg$parsehasMedia(); if (s0 === peg$FAILED) { s0 = peg$parsehasProfileGeoRegion(); if (s0 === peg$FAILED) { s0 = peg$parsehasProfileGeoSubRegion(); if (s0 === peg$FAILED) { s0 = peg$parsehasProfileGeoLocality(); if (s0 === peg$FAILED) { s0 = peg$parsehasProfileGeo(); if (s0 === peg$FAILED) { s0 = peg$parseretweetOfStatusId(); if (s0 === peg$FAILED) { s0 = peg$parseinReplyToStatusId(); if (s0 === peg$FAILED) { s0 = peg$parseprofileRegion(); if (s0 === peg$FAILED) { s0 = peg$parseprofileRegionContains(); if (s0 === peg$FAILED) { s0 = peg$parseprofileLocality(); if (s0 === peg$FAILED) { s0 = peg$parseprofileLocalityContains(); if (s0 === peg$FAILED) { s0 = peg$parseprofileSubRegion(); if (s0 === peg$FAILED) { s0 = peg$parseprofileSubRegionContains(); if (s0 === peg$FAILED) { s0 = peg$parseboundingBox(); if (s0 === peg$FAILED) { s0 = peg$parsetimeZone(); if (s0 === peg$FAILED) { s0 = peg$parselang(); if (s0 === peg$FAILED) { s0 = peg$parsekeywordMatch(); if (s0 === peg$FAILED) { s0 = peg$parseexactMatch(); } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } return s0; } function peg$parsekeywordMatch() { var s0, s1; s0 = peg$currPos; s1 = peg$parsecharacterString(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c5(s1); } s0 = s1; return s0; } function peg$parseexactMatch() { var s0, s1; s0 = peg$currPos; s1 = peg$parsemultiKeywordString(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c6(s1); } s0 = s1; return s0; } function peg$parsefrom() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 5) === peg$c7) { s1 = peg$c7; peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c8); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c9(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 5) === peg$c7) { s1 = peg$c7; peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c8); } } if (s1 !== peg$FAILED) { s2 = peg$parseuserhandle(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c9(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseto() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 3) === peg$c10) { s1 = peg$c10; peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c11); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c12(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 3) === peg$c10) { s1 = peg$c10; peg$currPos += 3; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c11); } } if (s1 !== peg$FAILED) { s2 = peg$parseuserhandle(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c12(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseurl() { var s0, s1, s2, s3, s4; s0 = peg$currPos; if (input.substr(peg$currPos, 4) === peg$c13) { s1 = peg$c13; peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c14); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c15(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 4) === peg$c13) { s1 = peg$c13; peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c14); } } if (s1 !== peg$FAILED) { s2 = peg$parsequote(); if (s2 !== peg$FAILED) { s3 = peg$parsekeywordString(); if (s3 !== peg$FAILED) { s4 = peg$parsequote(); if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c16(s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseurlTitle() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 10) === peg$c17) { s1 = peg$c17; peg$currPos += 10; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c18); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c19(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseurlDescription() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 16) === peg$c20) { s1 = peg$c20; peg$currPos += 16; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c21); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c22(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseurlContains() { var s0, s1, s2, s3, s4; s0 = peg$currPos; if (input.substr(peg$currPos, 13) === peg$c23) { s1 = peg$c23; peg$currPos += 13; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c24); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c25(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 13) === peg$c23) { s1 = peg$c23; peg$currPos += 13; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c24); } } if (s1 !== peg$FAILED) { s2 = peg$parsequote(); if (s2 !== peg$FAILED) { s3 = peg$parsekeywordString(); if (s3 !== peg$FAILED) { s4 = peg$parsequote(); if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c25(s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseisVerified() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 11) === peg$c26) { s1 = peg$c26; peg$currPos += 11; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c27); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c28(); } s0 = s1; return s0; } function peg$parseisRetweet() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 10) === peg$c29) { s1 = peg$c29; peg$currPos += 10; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c30); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c31(); } s0 = s1; return s0; } function peg$parsehasLinks() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 9) === peg$c32) { s1 = peg$c32; peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c33); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c34(); } s0 = s1; return s0; } function peg$parsehasGeo() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 7) === peg$c35) { s1 = peg$c35; peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c36); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c37(); } s0 = s1; return s0; } function peg$parsehasHashtags() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 12) === peg$c38) { s1 = peg$c38; peg$currPos += 12; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c39); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c40(); } s0 = s1; return s0; } function peg$parsehasMentions() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 12) === peg$c41) { s1 = peg$c41; peg$currPos += 12; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c42); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c43(); } s0 = s1; return s0; } function peg$parsehasMedia() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 9) === peg$c44) { s1 = peg$c44; peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c45); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c46(); } s0 = s1; return s0; } function peg$parsehasProfileGeo() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 15) === peg$c47) { s1 = peg$c47; peg$currPos += 15; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c48); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c49(); } s0 = s1; return s0; } function peg$parsehasProfileGeoSubRegion() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 25) === peg$c50) { s1 = peg$c50; peg$currPos += 25; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c51); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c52(); } s0 = s1; return s0; } function peg$parsehasProfileGeoRegion() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 22) === peg$c53) { s1 = peg$c53; peg$currPos += 22; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c54); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c55(); } s0 = s1; return s0; } function peg$parsehasProfileGeoLocality() { var s0, s1; s0 = peg$currPos; if (input.substr(peg$currPos, 24) === peg$c56) { s1 = peg$c56; peg$currPos += 24; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c57); } } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c58(); } s0 = s1; return s0; } function peg$parseprofileRegion() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 15) === peg$c59) { s1 = peg$c59; peg$currPos += 15; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c60); } } if (s1 !== peg$FAILED) { s2 = peg$parsemultiKeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c61(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseprofileRegionContains() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 24) === peg$c62) { s1 = peg$c62; peg$currPos += 24; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c63); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c64(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseprofileLocality() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 17) === peg$c65) { s1 = peg$c65; peg$currPos += 17; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c66); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c67(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseprofileLocalityContains() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 26) === peg$c68) { s1 = peg$c68; peg$currPos += 26; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c69); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c70(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseprofileSubRegion() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 18) === peg$c71) { s1 = peg$c71; peg$currPos += 18; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c72); } } if (s1 !== peg$FAILED) { s2 = peg$parsemultiKeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c73(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseprofileSubRegionContains() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 27) === peg$c74) { s1 = peg$c74; peg$currPos += 27; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c75); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c76(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseretweetOfStatusId() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 22) === peg$c77) { s1 = peg$c77; peg$currPos += 22; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c78); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c79(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseinReplyToStatusId() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 22) === peg$c80) { s1 = peg$c80; peg$currPos += 22; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c81); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c82(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsesource() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 7) === peg$c83) { s1 = peg$c83; peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c84); } } if (s1 !== peg$FAILED) { s2 = peg$parsemultiKeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c85(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 7) === peg$c83) { s1 = peg$c83; peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c84); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c85(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseplace() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 6) === peg$c86) { s1 = peg$c86; peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c87); } } if (s1 !== peg$FAILED) { s2 = peg$parsemultiKeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c88(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 6) === peg$c86) { s1 = peg$c86; peg$currPos += 6; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c87); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c88(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseplaceContains() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 15) === peg$c89) { s1 = peg$c89; peg$currPos += 15; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c90); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c91(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsecountryCode() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 21) === peg$c92) { s1 = peg$c92; peg$currPos += 21; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c93); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c94(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 13) === peg$c95) { s1 = peg$c95; peg$currPos += 13; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c96); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c97(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parsestatusesCount() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 15) === peg$c98) { s1 = peg$c98; peg$currPos += 15; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c99); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumberRange(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c100(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsefollowersCount() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 16) === peg$c101) { s1 = peg$c101; peg$currPos += 16; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c102); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumberRange(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c103(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsefriendsCount() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 14) === peg$c104) { s1 = peg$c104; peg$currPos += 14; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c105); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumberRange(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c106(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parselistedCount() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 13) === peg$c107) { s1 = peg$c107; peg$currPos += 13; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c108); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumberRange(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c109(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsenumberRange() { var s0, s1, s2, s3; s0 = peg$currPos; s1 = peg$parsenumber(); if (s1 !== peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c110) { s2 = peg$c110; peg$currPos += 2; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c111); } } if (s2 !== peg$FAILED) { s3 = peg$parsenumber(); if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c112(s1, s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$parsenumber(); } return s0; } function peg$parsesample() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 7) === peg$c113) { s1 = peg$c113; peg$currPos += 7; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c114); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c115(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsebio() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 4) === peg$c116) { s1 = peg$c116; peg$currPos += 4; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c117); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c118(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsebioName() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 9) === peg$c119) { s1 = peg$c119; peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c120); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c121(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsebioLocation() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 13) === peg$c122) { s1 = peg$c122; peg$currPos += 13; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c123); } } if (s1 !== peg$FAILED) { s2 = peg$parsekeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c124(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseretweetsOf() { var s0, s1, s2, s3; s0 = peg$currPos; if (input.substr(peg$currPos, 12) === peg$c125) { s1 = peg$c125; peg$currPos += 12; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c126); } } if (s1 !== peg$FAILED) { s2 = []; s3 = peg$parseuserhandle(); if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); s3 = peg$parseuserhandle(); } } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c127(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 12) === peg$c125) { s1 = peg$c125; peg$currPos += 12; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c126); } } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c128(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parsecontains() { var s0, s1, s2, s3, s4; s0 = peg$currPos; if (input.substr(peg$currPos, 9) === peg$c129) { s1 = peg$c129; peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c130); } } if (s1 !== peg$FAILED) { s2 = peg$parsequote(); if (s2 !== peg$FAILED) { s3 = peg$parsecharacterString(); if (s3 !== peg$FAILED) { s4 = peg$parsequote(); if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c131(s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 9) === peg$c129) { s1 = peg$c129; peg$currPos += 9; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c130); } } if (s1 !== peg$FAILED) { s2 = peg$parsecharacterString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c131(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseproximity() { var s0, s1, s2, s3; s0 = peg$currPos; s1 = peg$parsemultiKeywordString(); if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 126) { s2 = peg$c132; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c133); } } if (s2 !== peg$FAILED) { s3 = peg$parsenumber(); if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c134(s1, s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parselang() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 5) === peg$c135) { s1 = peg$c135; peg$currPos += 5; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c136); } } if (s1 !== peg$FAILED) { s2 = peg$parselangCodes(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c137(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsetimeZone() { var s0, s1, s2; s0 = peg$currPos; if (input.substr(peg$currPos, 10) === peg$c138) { s1 = peg$c138; peg$currPos += 10; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c139); } } if (s1 !== peg$FAILED) { s2 = peg$parsemultiKeywordString(); if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c140(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsepointradius() { var s0, s1, s2, s3, s4, s5, s6, s7; s0 = peg$currPos; if (input.substr(peg$currPos, 22) === peg$c141) { s1 = peg$c141; peg$currPos += 22; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c142); } } if (s1 !== peg$FAILED) { s2 = peg$parselatitude(); if (s2 !== peg$FAILED) { s3 = peg$parsewhiteSpace(); if (s3 !== peg$FAILED) { s4 = peg$parselongitude(); if (s4 !== peg$FAILED) { s5 = peg$parsewhiteSpace(); if (s5 !== peg$FAILED) { s6 = peg$parsedistance(); if (s6 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 93) { s7 = peg$c143; peg$currPos++; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c144); } } if (s7 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c145(s2, s4, s6); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 14) === peg$c146) { s1 = peg$c146; peg$currPos += 14; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c147); } } if (s1 !== peg$FAILED) { s2 = peg$parselatitude(); if (s2 !== peg$FAILED) { s3 = peg$parsewhiteSpace(); if (s3 !== peg$FAILED) { s4 = peg$parselongitude(); if (s4 !== peg$FAILED) { s5 = peg$parsewhiteSpace(); if (s5 !== peg$FAILED) { s6 = peg$parsedistance(); if (s6 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 93) { s7 = peg$c143; peg$currPos++; } else { s7 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c144); } } if (s7 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c148(s2, s4, s6); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseboundingBox() { var s0, s1, s2, s3; s0 = peg$currPos; if (input.substr(peg$currPos, 21) === peg$c149) { s1 = peg$c149; peg$currPos += 21; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c150); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { s3 = peg$parsecoordinateBox(); if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c151(s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.substr(peg$currPos, 13) === peg$c152) { s1 = peg$c152; peg$currPos += 13; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c153); } } if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { s3 = peg$parsecoordinateBox(); if (s3 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c154(s3); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parsecoordinateBox() { var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 91) { s1 = peg$c155; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c156); } } if (s1 !== peg$FAILED) { s2 = peg$parsedecimal(); if (s2 !== peg$FAILED) { s3 = peg$parsewhiteSpace(); if (s3 !== peg$FAILED) { s4 = peg$parsedecimal(); if (s4 !== peg$FAILED) { s5 = peg$parsewhiteSpace(); if (s5 !== peg$FAILED) { s6 = peg$parsedecimal(); if (s6 !== peg$FAILED) { s7 = peg$parsewhiteSpace(); if (s7 !== peg$FAILED) { s8 = peg$parsedecimal(); if (s8 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 93) { s9 = peg$c143; peg$currPos++; } else { s9 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c144); } } if (s9 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c157(s2, s4, s6, s8); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parselatitude() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = peg$parseminus(); if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); if (s2 !== peg$FAILED) { s3 = peg$parseperiod(); if (s3 !== peg$FAILED) { s4 = peg$parsenumber(); if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c158(s1, s2, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parselongitude() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = peg$parseminus(); if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); if (s2 !== peg$FAILED) { s3 = peg$parseperiod(); if (s3 !== peg$FAILED) { s4 = peg$parsenumber(); if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c159(s1, s2, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsedistance() { var s0, s1, s2, s3, s4; s0 = peg$currPos; s1 = peg$parsenumber(); if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { s2 = peg$c160; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c161); } } if (s2 !== peg$FAILED) { s3 = peg$parsenumber(); if (s3 !== peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c162) { s4 = peg$c162; peg$currPos += 2; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c163); } } if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c164(s1, s3, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsemultiKeywordString() { var s0, s1, s2, s3, s4, s5, s6, s7; s0 = peg$currPos; s1 = peg$parsequote(); if (s1 !== peg$FAILED) { s2 = peg$parse_(); if (s2 !== peg$FAILED) { s3 = peg$parsekeywordString(); if (s3 !== peg$FAILED) { s4 = []; s5 = peg$currPos; s6 = peg$parse_(); if (s6 !== peg$FAILED) { s7 = peg$parsekeywordString(); if (s7 !== peg$FAILED) { s6 = [s6, s7]; s5 = s6; } else { peg$currPos = s5; s5 = peg$FAILED; } } else { peg$currPos = s5; s5 = peg$FAILED; } while (s5 !== peg$FAILED) { s4.push(s5); s5 = peg$currPos; s6 = peg$parse_(); if (s6 !== peg$FAILED) { s7 = peg$parsekeywordString(); if (s7 !== peg$FAILED) { s6 = [s6, s7]; s5 = s6; } else { peg$currPos = s5; s5 = peg$FAILED; } } else { peg$currPos = s5; s5 = peg$FAILED; } } if (s4 !== peg$FAILED) { s5 = peg$parse_(); if (s5 !== peg$FAILED) { s6 = peg$parsequote(); if (s6 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c165(s3, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsekeywordString() { var s0, s1, s2; s0 = peg$currPos; s1 = []; if (peg$c166.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c167); } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); if (peg$c166.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c167); } } } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c168(s1); } s0 = s1; if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseEmoji(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c169(s1); } s0 = s1; } return s0; } function peg$parsecharacterString() { var s0, s1, s2, s3; s0 = peg$currPos; s1 = peg$currPos; peg$silentFails++; s2 = peg$parseor(); peg$silentFails--; if (s2 === peg$FAILED) { s1 = void 0; } else { peg$currPos = s1; s1 = peg$FAILED; } if (s1 !== peg$FAILED) { s2 = []; if (peg$c170.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c171); } } if (s3 !== peg$FAILED) { while (s3 !== peg$FAILED) { s2.push(s3); if (peg$c170.test(input.charAt(peg$currPos))) { s3 = input.charAt(peg$currPos); peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c171); } } } } else { s2 = peg$FAILED; } if (s2 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c172(s2); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = []; s2 = peg$parseEmoji(); if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); s2 = peg$parseEmoji(); } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c169(s1); } s0 = s1; } return s0; } function peg$parseboolean() { var s0; s0 = peg$parseor(); if (s0 === peg$FAILED) { s0 = peg$parsenegator(); if (s0 === peg$FAILED) { s0 = peg$parseand(); } } return s0; } function peg$parsenegator() { var s0, s1; s0 = peg$currPos; s1 = peg$parseminus(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c173(); } s0 = s1; return s0; } function peg$parsequote() { var s0; if (input.charCodeAt(peg$currPos) === 34) { s0 = peg$c174; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c175); } } return s0; } function peg$parselb() { var s0; if (input.charCodeAt(peg$currPos) === 40) { s0 = peg$c176; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c177); } } return s0; } function peg$parserb() { var s0; if (input.charCodeAt(peg$currPos) === 41) { s0 = peg$c178; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c179); } } return s0; } function peg$parseor() { var s0; if (input.substr(peg$currPos, 2) === peg$c180) { s0 = peg$c180; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c181); } } return s0; } function peg$parseminus() { var s0; if (input.charCodeAt(peg$currPos) === 45) { s0 = peg$c182; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c183); } } return s0; } function peg$parseperiod() { var s0; if (input.charCodeAt(peg$currPos) === 46) { s0 = peg$c160; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c161); } } return s0; } function peg$parseand() { var s0, s1; s0 = peg$currPos; s1 = peg$parse_(); if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c184(); } s0 = s1; return s0; } function peg$parsedecimal() { var s0, s1, s2, s3, s4; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 45) { s1 = peg$c182; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c183); } } if (s1 === peg$FAILED) { s1 = null; } if (s1 !== peg$FAILED) { s2 = peg$parsenumber(); if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 46) { s3 = peg$c160; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c161); } } if (s3 !== peg$FAILED) { s4 = peg$parsenumber(); if (s4 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c185(s1, s2, s4); s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsenumber() { var s0, s1, s2; s0 = peg$currPos; s1 = []; if (peg$c186.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c187); } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); if (peg$c186.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c187); } } } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c188(s1); } s0 = s1; return s0; } function peg$parsepunctuation() { var s0; if (peg$c189.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c190); } } return s0; } function peg$parsewhiteSpace() { var s0; if (peg$c191.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c192); } } return s0; } function peg$parse_() { var s0, s1; peg$silentFails++; s0 = []; if (peg$c194.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c195); } } while (s1 !== peg$FAILED) { s0.push(s1); if (peg$c194.test(input.charAt(peg$currPos))) { s1 = input.charAt(peg$currPos); peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c195); } } } peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c193); } } return s0; } function peg$parseuserhandle() { var s0, s1, s2; s0 = peg$currPos; s1 = []; if (peg$c196.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c197); } } if (s2 !== peg$FAILED) { while (s2 !== peg$FAILED) { s1.push(s2); if (peg$c196.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c197); } } } } else { s1 = peg$FAILED; } if (s1 !== peg$FAILED) { peg$savedPos = s0; s1 = peg$c198(s1); } s0 = s1; return s0; } function peg$parselangCodes() { var s0; if (input.substr(peg$currPos, 2) === peg$c199) { s0 = peg$c199; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c200); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c201) { s0 = peg$c201; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c202); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c203) { s0 = peg$c203; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c204); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c205) { s0 = peg$c205; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c206); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c207) { s0 = peg$c207; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c208); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c209) { s0 = peg$c209; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c210); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c211) { s0 = peg$c211; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c212); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c213) { s0 = peg$c213; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c214); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c215) { s0 = peg$c215; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c216); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c217) { s0 = peg$c217; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c218); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c219) { s0 = peg$c219; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c220); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c221) { s0 = peg$c221; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c222); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c223) { s0 = peg$c223; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c224); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c225) { s0 = peg$c225; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c226); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c227) { s0 = peg$c227; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c228); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c229) { s0 = peg$c229; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c230); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c231) { s0 = peg$c231; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c232); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c233) { s0 = peg$c233; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c234); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c235) { s0 = peg$c235; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c236); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c237) { s0 = peg$c237; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c238); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c239) { s0 = peg$c239; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c240); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c241) { s0 = peg$c241; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c242); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c243) { s0 = peg$c243; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c244); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c245) { s0 = peg$c245; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c246); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c247) { s0 = peg$c247; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c248); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c249) { s0 = peg$c249; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c250); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c251) { s0 = peg$c251; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c252); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c253) { s0 = peg$c253; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c254); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c255) { s0 = peg$c255; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c256); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c257) { s0 = peg$c257; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c258); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c259) { s0 = peg$c259; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c260); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c261) { s0 = peg$c261; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c262); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c263) { s0 = peg$c263; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c264); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c265) { s0 = peg$c265; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c266); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c267) { s0 = peg$c267; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c268); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c269) { s0 = peg$c269; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c270); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c271) { s0 = peg$c271; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c272); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c273) { s0 = peg$c273; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c274); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c275) { s0 = peg$c275; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c276); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c277) { s0 = peg$c277; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c278); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c279) { s0 = peg$c279; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c280); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c281) { s0 = peg$c281; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c282); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c283) { s0 = peg$c283; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c284); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c285) { s0 = peg$c285; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c286); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c287) { s0 = peg$c287; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c288); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c289) { s0 = peg$c289; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c290); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c291) { s0 = peg$c291; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c292); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c293) { s0 = peg$c293; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c294); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c295) { s0 = peg$c295; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c296); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c297) { s0 = peg$c297; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c298); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 3) === peg$c299) { s0 = peg$c299; peg$currPos += 3; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c300); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c301) { s0 = peg$c301; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c302); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c303) { s0 = peg$c303; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c304); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c305) { s0 = peg$c305; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c306); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c307) { s0 = peg$c307; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c308); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c309) { s0 = peg$c309; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c310); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c311) { s0 = peg$c311; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c312); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c313) { s0 = peg$c313; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c314); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c315) { s0 = peg$c315; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c316); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c317) { s0 = peg$c317; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c318); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c319) { s0 = peg$c319; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c320); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c321) { s0 = peg$c321; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c322); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c323) { s0 = peg$c323; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c324); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c325) { s0 = peg$c325; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c326); } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } return s0; } function peg$parsecountryCodes() { var s0; if (input.substr(peg$currPos, 2) === peg$c327) { s0 = peg$c327; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c328); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c329) { s0 = peg$c329; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c330); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c331) { s0 = peg$c331; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c332); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c333) { s0 = peg$c333; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c334); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c335) { s0 = peg$c335; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c336); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c337) { s0 = peg$c337; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c338); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c339) { s0 = peg$c339; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c340); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c341) { s0 = peg$c341; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c342); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c343) { s0 = peg$c343; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c344); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c345) { s0 = peg$c345; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c346); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c347) { s0 = peg$c347; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c348); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c349) { s0 = peg$c349; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c350); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c351) { s0 = peg$c351; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c352); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c353) { s0 = peg$c353; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c354); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c355) { s0 = peg$c355; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c356); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c357) { s0 = peg$c357; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c358); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c359) { s0 = peg$c359; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c360); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c361) { s0 = peg$c361; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c362); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c363) { s0 = peg$c363; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c364); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c365) { s0 = peg$c365; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c366); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c367) { s0 = peg$c367; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c368); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c369) { s0 = peg$c369; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c370); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c371) { s0 = peg$c371; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c372); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c373) { s0 = peg$c373; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c374); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c375) { s0 = peg$c375; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c376); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c377) { s0 = peg$c377; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c378); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c379) { s0 = peg$c379; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c380); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c381) { s0 = peg$c381; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c382); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c383) { s0 = peg$c383; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c384); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c385) { s0 = peg$c385; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c386); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c387) { s0 = peg$c387; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c388); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c389) { s0 = peg$c389; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c390); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c391) { s0 = peg$c391; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c392); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c393) { s0 = peg$c393; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c394); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c395) { s0 = peg$c395; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c396); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c397) { s0 = peg$c397; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c398); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c399) { s0 = peg$c399; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c400); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c401) { s0 = peg$c401; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c402); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c403) { s0 = peg$c403; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c404); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c405) { s0 = peg$c405; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c406); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c407) { s0 = peg$c407; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c408); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c409) { s0 = peg$c409; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c410); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c411) { s0 = peg$c411; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c412); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c413) { s0 = peg$c413; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c414); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c415) { s0 = peg$c415; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c416); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c417) { s0 = peg$c417; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c418); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c419) { s0 = peg$c419; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c420); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c421) { s0 = peg$c421; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c422); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c423) { s0 = peg$c423; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c424); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c425) { s0 = peg$c425; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c426); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c427) { s0 = peg$c427; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c428); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c429) { s0 = peg$c429; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c430); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c431) { s0 = peg$c431; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c432); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c433) { s0 = peg$c433; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c434); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c435) { s0 = peg$c435; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c436); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c437) { s0 = peg$c437; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c438); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c439) { s0 = peg$c439; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c440); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c441) { s0 = peg$c441; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c442); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c443) { s0 = peg$c443; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c444); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c445) { s0 = peg$c445; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c446); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c447) { s0 = peg$c447; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c448); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c449) { s0 = peg$c449; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c450); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c451) { s0 = peg$c451; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c452); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c453) { s0 = peg$c453; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c454); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c455) { s0 = peg$c455; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c456); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c457) { s0 = peg$c457; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c458); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c459) { s0 = peg$c459; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c460); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c461) { s0 = peg$c461; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c462); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c463) { s0 = peg$c463; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c464); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c465) { s0 = peg$c465; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c466); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c467) { s0 = peg$c467; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c468); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c469) { s0 = peg$c469; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c470); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c471) { s0 = peg$c471; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c472); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c473) { s0 = peg$c473; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c474); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c475) { s0 = peg$c475; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c476); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c477) { s0 = peg$c477; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c478); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c479) { s0 = peg$c479; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c480); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c481) { s0 = peg$c481; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c482); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c483) { s0 = peg$c483; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c484); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c485) { s0 = peg$c485; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c486); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c487) { s0 = peg$c487; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c488); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c489) { s0 = peg$c489; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c490); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c491) { s0 = peg$c491; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c492); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c493) { s0 = peg$c493; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c494); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c495) { s0 = peg$c495; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c496); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c497) { s0 = peg$c497; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c498); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c499) { s0 = peg$c499; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c500); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c501) { s0 = peg$c501; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c502); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c503) { s0 = peg$c503; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c504); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c505) { s0 = peg$c505; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c506); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c507) { s0 = peg$c507; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c508); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c509) { s0 = peg$c509; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c510); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c511) { s0 = peg$c511; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c512); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c513) { s0 = peg$c513; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c514); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c515) { s0 = peg$c515; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c516); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c517) { s0 = peg$c517; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c518); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c519) { s0 = peg$c519; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c520); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c521) { s0 = peg$c521; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c522); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c523) { s0 = peg$c523; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c524); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c525) { s0 = peg$c525; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c526); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c527) { s0 = peg$c527; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c528); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c529) { s0 = peg$c529; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c530); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c531) { s0 = peg$c531; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c532); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c533) { s0 = peg$c533; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c534); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c535) { s0 = peg$c535; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c536); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c537) { s0 = peg$c537; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c538); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c539) { s0 = peg$c539; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c540); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c541) { s0 = peg$c541; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c542); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c543) { s0 = peg$c543; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c544); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c545) { s0 = peg$c545; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c546); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c547) { s0 = peg$c547; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c548); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c549) { s0 = peg$c549; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c550); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c551) { s0 = peg$c551; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c552); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c553) { s0 = peg$c553; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c554); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c555) { s0 = peg$c555; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c556); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c557) { s0 = peg$c557; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c558); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c559) { s0 = peg$c559; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c560); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c561) { s0 = peg$c561; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c562); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c563) { s0 = peg$c563; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c564); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c565) { s0 = peg$c565; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c566); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c567) { s0 = peg$c567; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c568); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c569) { s0 = peg$c569; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c570); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c571) { s0 = peg$c571; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c572); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c573) { s0 = peg$c573; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c574); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c575) { s0 = peg$c575; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c576); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c577) { s0 = peg$c577; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c578); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c579) { s0 = peg$c579; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c580); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c581) { s0 = peg$c581; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c582); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c583) { s0 = peg$c583; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c584); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c585) { s0 = peg$c585; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c586); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c587) { s0 = peg$c587; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c588); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c589) { s0 = peg$c589; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c590); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c591) { s0 = peg$c591; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c592); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c593) { s0 = peg$c593; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c594); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c595) { s0 = peg$c595; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c596); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c597) { s0 = peg$c597; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c598); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c599) { s0 = peg$c599; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c600); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c601) { s0 = peg$c601; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c602); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c603) { s0 = peg$c603; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c604); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c605) { s0 = peg$c605; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c606); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c607) { s0 = peg$c607; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c608); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c609) { s0 = peg$c609; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c610); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c611) { s0 = peg$c611; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c612); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c613) { s0 = peg$c613; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c614); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c615) { s0 = peg$c615; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c616); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c617) { s0 = peg$c617; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c618); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c619) { s0 = peg$c619; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c620); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c621) { s0 = peg$c621; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c622); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c623) { s0 = peg$c623; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c624); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c625) { s0 = peg$c625; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c626); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c627) { s0 = peg$c627; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c628); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c629) { s0 = peg$c629; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c630); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c631) { s0 = peg$c631; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c632); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c633) { s0 = peg$c633; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c634); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c635) { s0 = peg$c635; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c636); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c637) { s0 = peg$c637; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c638); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c639) { s0 = peg$c639; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c640); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c641) { s0 = peg$c641; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c642); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c643) { s0 = peg$c643; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c644); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c645) { s0 = peg$c645; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c646); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c647) { s0 = peg$c647; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c648); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c649) { s0 = peg$c649; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c650); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c651) { s0 = peg$c651; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c652); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c653) { s0 = peg$c653; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c654); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c655) { s0 = peg$c655; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c656); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c657) { s0 = peg$c657; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c658); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c659) { s0 = peg$c659; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c660); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c661) { s0 = peg$c661; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c662); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c663) { s0 = peg$c663; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c664); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c665) { s0 = peg$c665; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c666); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c667) { s0 = peg$c667; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c668); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c669) { s0 = peg$c669; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c670); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c671) { s0 = peg$c671; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c672); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c673) { s0 = peg$c673; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c674); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c675) { s0 = peg$c675; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c676); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c677) { s0 = peg$c677; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c678); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c679) { s0 = peg$c679; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c680); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c681) { s0 = peg$c681; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c682); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c683) { s0 = peg$c683; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c684); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c685) { s0 = peg$c685; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c686); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c687) { s0 = peg$c687; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c688); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c689) { s0 = peg$c689; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c690); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c691) { s0 = peg$c691; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c692); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c693) { s0 = peg$c693; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c694); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c695) { s0 = peg$c695; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c696); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c697) { s0 = peg$c697; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c698); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c699) { s0 = peg$c699; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c700); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c701) { s0 = peg$c701; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c702); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c703) { s0 = peg$c703; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c704); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c705) { s0 = peg$c705; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c706); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c707) { s0 = peg$c707; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c708); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c709) { s0 = peg$c709; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c710); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c711) { s0 = peg$c711; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c712); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c451) { s0 = peg$c451; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c452); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c713) { s0 = peg$c713; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c714); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c347) { s0 = peg$c347; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c348); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c415) { s0 = peg$c415; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c416); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c553) { s0 = peg$c553; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c554); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c643) { s0 = peg$c643; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c644); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c451) { s0 = peg$c451; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c452); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c343) { s0 = peg$c343; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c344); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c715) { s0 = peg$c715; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c716); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c717) { s0 = peg$c717; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c718); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c343) { s0 = peg$c343; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c344); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c719) { s0 = peg$c719; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c720); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c721) { s0 = peg$c721; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c722); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c723) { s0 = peg$c723; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c724); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c725) { s0 = peg$c725; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c726); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c727) { s0 = peg$c727; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c728); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c729) { s0 = peg$c729; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c730); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c729) { s0 = peg$c729; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c730); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c731) { s0 = peg$c731; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c732); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c733) { s0 = peg$c733; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c734); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c735) { s0 = peg$c735; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c736); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c725) { s0 = peg$c725; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c726); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c737) { s0 = peg$c737; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c738); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c739) { s0 = peg$c739; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c740); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c741) { s0 = peg$c741; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c742); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c743) { s0 = peg$c743; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c744); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c745) { s0 = peg$c745; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c746); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c747) { s0 = peg$c747; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c748); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c749) { s0 = peg$c749; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c750); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c751) { s0 = peg$c751; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c752); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c753) { s0 = peg$c753; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c754); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c755) { s0 = peg$c755; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c756); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c757) { s0 = peg$c757; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c758); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c759) { s0 = peg$c759; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c760); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c761) { s0 = peg$c761; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c762); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c763) { s0 = peg$c763; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c764); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c765) { s0 = peg$c765; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c766); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c767) { s0 = peg$c767; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c768); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c769) { s0 = peg$c769; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c770); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c771) { s0 = peg$c771; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c772); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c773) { s0 = peg$c773; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c774); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c775) { s0 = peg$c775; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c776); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c777) { s0 = peg$c777; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c778); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c779) { s0 = peg$c779; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c780); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c781) { s0 = peg$c781; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c782); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c783) { s0 = peg$c783; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c784); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c785) { s0 = peg$c785; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c786); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c781) { s0 = peg$c781; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c782); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c787) { s0 = peg$c787; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c788); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c789) { s0 = peg$c789; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c790); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c791) { s0 = peg$c791; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c792); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c793) { s0 = peg$c793; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c794); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c795) { s0 = peg$c795; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c796); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c729) { s0 = peg$c729; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c730); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c797) { s0 = peg$c797; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c798); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c799) { s0 = peg$c799; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c800); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c801) { s0 = peg$c801; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c802); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c803) { s0 = peg$c803; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c804); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c805) { s0 = peg$c805; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c806); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c807) { s0 = peg$c807; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c808); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c809) { s0 = peg$c809; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c810); } } if (s0 === peg$FAILED) { if (input.substr(peg$currPos, 2) === peg$c811) { s0 = peg$c811; peg$currPos += 2; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c812); } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } return s0; } function peg$parseEmoji() { var s0; s0 = peg$parseMiscellaneous_Symbols_and_Pictographs(); if (s0 === peg$FAILED) { s0 = peg$parseSupplemental_Symbols_and_Pictographs(); if (s0 === peg$FAILED) { s0 = peg$parseEmoticons(); if (s0 === peg$FAILED) { s0 = peg$parseTransport_and_Map_Symbols(); if (s0 === peg$FAILED) { s0 = peg$parseMiscellaneous_Symbols(); if (s0 === peg$FAILED) { s0 = peg$parseDingbats(); if (s0 === peg$FAILED) { s0 = peg$parseArrows(); if (s0 === peg$FAILED) { s0 = peg$parseBasic_Latin(); if (s0 === peg$FAILED) { s0 = peg$parseCJK_Symbols_and_Punctuation(); if (s0 === peg$FAILED) { s0 = peg$parseEnclosed_Alphanumeric_Supplement(); if (s0 === peg$FAILED) { s0 = peg$parseEnclosed_Alphanumerics(); if (s0 === peg$FAILED) { s0 = peg$parseEnclosed_Ideographic_Supplement(); if (s0 === peg$FAILED) { s0 = peg$parseGeneral_Punctuation(); if (s0 === peg$FAILED) { s0 = peg$parseGeometric_Shapes(); if (s0 === peg$FAILED) { s0 = peg$parseLatin1_Supplement(); if (s0 === peg$FAILED) { s0 = peg$parseLetterlike_Symbols(); if (s0 === peg$FAILED) { s0 = peg$parseMahjong_Tiles(); if (s0 === peg$FAILED) { s0 = peg$parseMiscellaneous_Symbols_and_Arrows(); if (s0 === peg$FAILED) { s0 = peg$parseMiscellaneous_Technical(); if (s0 === peg$FAILED) { s0 = peg$parsePlaying_cards(); if (s0 === peg$FAILED) { s0 = peg$parseSupplemental_ArrowsB(); } } } } } } } } } } } } } } } } } } } } return s0; } function peg$parseMiscellaneous_Symbols_and_Pictographs() { var s0, s1, s2; s0 = peg$parseMiscellaneous_Symbols_and_Pictographs_Sequences(); if (s0 === peg$FAILED) { s0 = peg$currPos; s1 = peg$parseMiscellaneous_Symbols_and_Pictographs_Diversity(); if (s1 !== peg$FAILED) { s2 = peg$parseFitzpatrick_Modifier(); if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (peg$c815.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c816); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c819.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c820); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } } return s0; } function peg$parseMiscellaneous_Symbols_and_Pictographs_Sequences() { var s0; s0 = peg$parseKiss_Sequence(); if (s0 === peg$FAILED) { s0 = peg$parseCouple_With_Heart_Sequence(); if (s0 === peg$FAILED) { s0 = peg$parseFamily_Sequence(); if (s0 === peg$FAILED) { s0 = peg$parseLeft_Eye_Speech_Bubble_Sequence(); } } } return s0; } function peg$parseMiscellaneous_Symbols_and_Pictographs_Diversity() { var s0, s1, s2; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 57221) { s2 = peg$c821; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c822); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 57283) { s2 = peg$c823; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c824); } } if (s2 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 57284) { s2 = peg$c825; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c826); } } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 57290) { s2 = peg$c827; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c828); } } if (s2 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 57291) { s2 = peg$c829; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c830); } } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56386) { s2 = peg$c831; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c832); } } if (s2 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56387) { s2 = peg$c833; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c834); } } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c835.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c836); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c837.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c838); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56430) { s2 = peg$c839; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c840); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c841.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c842); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56444) { s2 = peg$c843; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c844); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c845.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c846); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c847.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c848); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56490) { s2 = peg$c849; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c850); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56693) { s2 = peg$c851; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c852); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56720) { s2 = peg$c853; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c854); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56725) { s2 = peg$c855; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c856); } } if (s2 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56726) { s2 = peg$c857; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c858); } } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } } } } } } } } } } } } } return s0; } function peg$parseSupplemental_Symbols_and_Pictographs() { var s0, s1, s2; s0 = peg$currPos; s1 = peg$parseSupplemental_Symbols_and_Pictographs_Diversity(); if (s1 !== peg$FAILED) { s2 = peg$parseFitzpatrick_Modifier(); if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55358) { s1 = peg$c859; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c860); } } if (s1 !== peg$FAILED) { if (peg$c861.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c862); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseSupplemental_Symbols_and_Pictographs_Diversity() { var s0, s1, s2; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55358) { s1 = peg$c859; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c860); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56600) { s2 = peg$c863; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c864); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseEmoticons() { var s0, s1, s2; s0 = peg$currPos; s1 = peg$parseEmoticons_Diversity(); if (s1 !== peg$FAILED) { s2 = peg$parseFitzpatrick_Modifier(); if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c865.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c866); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseEmoticons_Diversity() { var s0, s1, s2; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c867.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c868); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c869.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c870); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } return s0; } function peg$parseTransport_and_Map_Symbols() { var s0, s1, s2; s0 = peg$currPos; s1 = peg$parseTransport_and_Map_Symbols_Diversity(); if (s1 !== peg$FAILED) { s2 = peg$parseFitzpatrick_Modifier(); if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c871.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c872); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c873.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c874); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c875.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c876); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 57065) { s2 = peg$c877; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c878); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c879.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c880); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 57072) { s2 = peg$c881; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c882); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 57075) { s2 = peg$c883; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c884); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } } } } } } return s0; } function peg$parseTransport_and_Map_Symbols_Diversity() { var s0, s1, s2; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56995) { s2 = peg$c885; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c886); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (peg$c887.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c888); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 57024) { s2 = peg$c889; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c890); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } return s0; } function peg$parseMiscellaneous_Symbols() { var s0, s1, s2; s0 = peg$currPos; s1 = peg$parseMiscellaneous_Symbols_Diversity(); if (s1 !== peg$FAILED) { s2 = peg$parseFitzpatrick_Modifier(); if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { if (peg$c891.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c892); } } } return s0; } function peg$parseMiscellaneous_Symbols_Diversity() { var s0; if (input.charCodeAt(peg$currPos) === 9757) { s0 = peg$c893; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c894); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 9977) { s0 = peg$c895; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c896); } } } return s0; } function peg$parseDingbats() { var s0, s1, s2; s0 = peg$currPos; s1 = peg$parseDingbats_Diversity(); if (s1 !== peg$FAILED) { s2 = peg$parseFitzpatrick_Modifier(); if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10002) { s0 = peg$c897; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c898); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10004) { s0 = peg$c899; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c900); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10006) { s0 = peg$c901; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c902); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10013) { s0 = peg$c903; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c904); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10017) { s0 = peg$c905; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c906); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10024) { s0 = peg$c907; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c908); } } if (s0 === peg$FAILED) { if (peg$c909.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c910); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10052) { s0 = peg$c911; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c912); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10055) { s0 = peg$c913; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c914); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10060) { s0 = peg$c915; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c916); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10062) { s0 = peg$c917; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c918); } } if (s0 === peg$FAILED) { if (peg$c919.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c920); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10071) { s0 = peg$c921; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c922); } } if (s0 === peg$FAILED) { if (peg$c923.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c924); } } if (s0 === peg$FAILED) { if (peg$c925.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c926); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10145) { s0 = peg$c927; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c928); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10160) { s0 = peg$c929; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c930); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 10175) { s0 = peg$c931; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c932); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 9986) { s0 = peg$c933; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c934); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 9989) { s0 = peg$c935; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c936); } } if (s0 === peg$FAILED) { if (peg$c937.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c938); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 9999) { s0 = peg$c939; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c940); } } } } } } } } } } } } } } } } } } } } } } } } return s0; } function peg$parseDingbats_Diversity() { var s0; if (peg$c941.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c942); } } return s0; } function peg$parseArrows() { var s0; if (peg$c943.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c944); } } if (s0 === peg$FAILED) { if (peg$c945.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c946); } } } return s0; } function peg$parseBasic_Latin() { var s0; if (input.charCodeAt(peg$currPos) === 35) { s0 = peg$c947; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c948); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 42) { s0 = peg$c949; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c950); } } if (s0 === peg$FAILED) { if (peg$c186.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c187); } } } } return s0; } function peg$parseCJK_Symbols_and_Punctuation() { var s0; if (input.charCodeAt(peg$currPos) === 12336) { s0 = peg$c951; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c952); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 12349) { s0 = peg$c953; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c954); } } } return s0; } function peg$parseEnclosed_Alphanumeric_Supplement() { var s0, s1, s2; s0 = peg$parseRegional_Indicator_Symbol(); if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (peg$c955.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c956); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (peg$c957.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c958); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56718) { s2 = peg$c959; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c960); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (peg$c961.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c962); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (peg$c963.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c964); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } } } } return s0; } function peg$parseRegional_Indicator_Symbol() { var s0, s1, s2, s3, s4; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (peg$c963.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c964); } } if (s2 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 55356) { s3 = peg$c813; peg$currPos++; } else { s3 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s3 !== peg$FAILED) { if (peg$c963.test(input.charAt(peg$currPos))) { s4 = input.charAt(peg$currPos); peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c964); } } if (s4 !== peg$FAILED) { s1 = [s1, s2, s3, s4]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseEnclosed_Alphanumerics() { var s0; if (input.charCodeAt(peg$currPos) === 9410) { s0 = peg$c965; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c966); } } return s0; } function peg$parseEnclosed_CJK_Letters_and_Months() { var s0; if (input.charCodeAt(peg$currPos) === 12951) { s0 = peg$c967; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c968); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 12953) { s0 = peg$c969; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c970); } } } return s0; } function peg$parseEnclosed_Ideographic_Supplement() { var s0, s1, s2; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (peg$c971.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c972); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56858) { s2 = peg$c973; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c974); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56879) { s2 = peg$c975; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c976); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (peg$c977.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c978); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } if (s0 === peg$FAILED) { s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (peg$c979.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c980); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } } } } return s0; } function peg$parseGeneral_Punctuation() { var s0; if (input.charCodeAt(peg$currPos) === 8252) { s0 = peg$c981; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c982); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8265) { s0 = peg$c983; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c984); } } } return s0; } function peg$parseGeometric_Shapes() { var s0; if (peg$c985.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c986); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 9654) { s0 = peg$c987; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c988); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 9664) { s0 = peg$c989; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c990); } } if (s0 === peg$FAILED) { if (peg$c991.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c992); } } } } } return s0; } function peg$parseLatin1_Supplement() { var s0; if (input.charCodeAt(peg$currPos) === 169) { s0 = peg$c993; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c994); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 174) { s0 = peg$c995; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c996); } } } return s0; } function peg$parseLetterlike_Symbols() { var s0; if (input.charCodeAt(peg$currPos) === 8482) { s0 = peg$c997; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c998); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 8505) { s0 = peg$c999; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1000); } } } return s0; } function peg$parseMahjong_Tiles() { var s0, s1, s2; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56324) { s2 = peg$c1001; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1002); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseMiscellaneous_Symbols_and_Arrows() { var s0; if (peg$c1003.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1004); } } if (s0 === peg$FAILED) { if (peg$c1005.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1006); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 11088) { s0 = peg$c1007; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1008); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 11093) { s0 = peg$c1009; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1010); } } } } } return s0; } function peg$parseMiscellaneous_Technical() { var s0; if (peg$c1011.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1012); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 9000) { s0 = peg$c1013; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1014); } } if (s0 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 9167) { s0 = peg$c1015; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1016); } } if (s0 === peg$FAILED) { if (peg$c1017.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1018); } } if (s0 === peg$FAILED) { if (peg$c1019.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1020); } } } } } } return s0; } function peg$parsePlaying_cards() { var s0, s1, s2; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56527) { s2 = peg$c1021; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1022); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseSupplemental_ArrowsB() { var s0; if (peg$c1023.test(input.charAt(peg$currPos))) { s0 = input.charAt(peg$currPos); peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1024); } } return s0; } function peg$parseFitzpatrick_Modifier() { var s0, s1, s2; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55356) { s1 = peg$c813; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c814); } } if (s1 !== peg$FAILED) { if (peg$c1025.test(input.charAt(peg$currPos))) { s2 = input.charAt(peg$currPos); peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1026); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parsezw() { var s0, s1; peg$silentFails++; if (input.charCodeAt(peg$currPos) === 8205) { s0 = peg$c1028; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1029); } } peg$silentFails--; if (s0 === peg$FAILED) { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1027); } } return s0; } function peg$parseText_Variant() { var s0; if (input.charCodeAt(peg$currPos) === 65038) { s0 = peg$c1030; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1031); } } return s0; } function peg$parseEmoji_Variant() { var s0; if (input.charCodeAt(peg$currPos) === 65039) { s0 = peg$c1032; peg$currPos++; } else { s0 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1033); } } return s0; } function peg$parseManOrWoman() { var s0, s1, s2, s3; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56424) { s2 = peg$c1034; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1035); } } if (s2 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56425) { s2 = peg$c1036; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1037); } } } if (s2 !== peg$FAILED) { s3 = peg$parseFitzpatrick_Modifier(); if (s3 === peg$FAILED) { s3 = null; } if (s3 !== peg$FAILED) { s1 = [s1, s2, s3]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseBoyOrGirl() { var s0, s1, s2, s3; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56422) { s2 = peg$c1038; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1039); } } if (s2 === peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56423) { s2 = peg$c1040; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1041); } } } if (s2 !== peg$FAILED) { s3 = peg$parseFitzpatrick_Modifier(); if (s3 === peg$FAILED) { s3 = null; } if (s3 !== peg$FAILED) { s1 = [s1, s2, s3]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseHeart() { var s0, s1, s2; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 10084) { s1 = peg$c1042; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1043); } } if (s1 !== peg$FAILED) { s2 = peg$parseEmoji_Variant(); if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseKiss() { var s0, s1, s2; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56459) { s2 = peg$c1044; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1045); } } if (s2 !== peg$FAILED) { s1 = [s1, s2]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseKiss_Sequence() { var s0, s1, s2, s3, s4, s5, s6, s7; s0 = peg$currPos; s1 = peg$parseManOrWoman(); if (s1 !== peg$FAILED) { s2 = peg$parsezw(); if (s2 !== peg$FAILED) { s3 = peg$parseHeart(); if (s3 !== peg$FAILED) { s4 = peg$parsezw(); if (s4 !== peg$FAILED) { s5 = peg$parseKiss(); if (s5 !== peg$FAILED) { s6 = peg$parsezw(); if (s6 !== peg$FAILED) { s7 = peg$parseManOrWoman(); if (s7 !== peg$FAILED) { s1 = [s1, s2, s3, s4, s5, s6, s7]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseCouple_With_Heart_Sequence() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; s1 = peg$parseManOrWoman(); if (s1 !== peg$FAILED) { s2 = peg$parsezw(); if (s2 !== peg$FAILED) { s3 = peg$parseHeart(); if (s3 !== peg$FAILED) { s4 = peg$parsezw(); if (s4 !== peg$FAILED) { s5 = peg$parseManOrWoman(); if (s5 !== peg$FAILED) { s1 = [s1, s2, s3, s4, s5]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseFamily_Sequence() { var s0, s1, s2, s3, s4, s5, s6, s7; s0 = peg$currPos; s1 = peg$parseManOrWoman(); if (s1 !== peg$FAILED) { s2 = peg$currPos; s3 = peg$parsezw(); if (s3 !== peg$FAILED) { s4 = peg$parseManOrWoman(); if (s4 !== peg$FAILED) { s3 = [s3, s4]; s2 = s3; } else { peg$currPos = s2; s2 = peg$FAILED; } } else { peg$currPos = s2; s2 = peg$FAILED; } if (s2 === peg$FAILED) { s2 = null; } if (s2 !== peg$FAILED) { s3 = peg$parsezw(); if (s3 !== peg$FAILED) { s4 = peg$parseBoyOrGirl(); if (s4 !== peg$FAILED) { s5 = peg$currPos; s6 = peg$parsezw(); if (s6 !== peg$FAILED) { s7 = peg$parseBoyOrGirl(); if (s7 !== peg$FAILED) { s6 = [s6, s7]; s5 = s6; } else { peg$currPos = s5; s5 = peg$FAILED; } } else { peg$currPos = s5; s5 = peg$FAILED; } if (s5 === peg$FAILED) { s5 = null; } if (s5 !== peg$FAILED) { s1 = [s1, s2, s3, s4, s5]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function peg$parseLeft_Eye_Speech_Bubble_Sequence() { var s0, s1, s2, s3, s4, s5; s0 = peg$currPos; if (input.charCodeAt(peg$currPos) === 55357) { s1 = peg$c817; peg$currPos++; } else { s1 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s1 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56385) { s2 = peg$c1046; peg$currPos++; } else { s2 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1047); } } if (s2 !== peg$FAILED) { s3 = peg$parsezw(); if (s3 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 55357) { s4 = peg$c817; peg$currPos++; } else { s4 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c818); } } if (s4 !== peg$FAILED) { if (input.charCodeAt(peg$currPos) === 56808) { s5 = peg$c1048; peg$currPos++; } else { s5 = peg$FAILED; if (peg$silentFails === 0) { peg$fail(peg$c1049); } } if (s5 !== peg$FAILED) { s1 = [s1, s2, s3, s4, s5]; s0 = s1; } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } } else { peg$currPos = s0; s0 = peg$FAILED; } return s0; } function terminalAstNode( name, value ) { return { name : name, value : value }; } function branchAstNode( name, value, leftBranch, rightBranch ) { return { name : name, value : value, leftBranch : leftBranch, rightBranch : rightBranch }; } function multidimensionalArrayToString( array ) { if( array === undefined ) return ''; return array.map(function( thisArrayElement ) { return thisArrayElement.reduce(function( carry, thisElement ) { return carry + ' ' + thisElement; }).trim(); }).join( ' ' ).trim(); } function emoji( input ) { if( typeof input === 'string' ) return input; if( typeof input[0] === 'object' ) return input[0].join( '' ); return input.join( '' ); } peg$result = peg$startRuleFunction(); if (peg$result !== peg$FAILED && peg$currPos === input.length) { return peg$result; } else { if (peg$result !== peg$FAILED && peg$currPos < input.length) { peg$fail(peg$endExpectation()); } throw peg$buildStructuredError( peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos) ); } } module.exports = { SyntaxError: peg$SyntaxError, parse: peg$parse };
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var PolygonDrawerBase_1 = require("./PolygonDrawerBase"); var StarDrawer = (function (_super) { __extends(StarDrawer, _super); function StarDrawer() { return _super !== null && _super.apply(this, arguments) || this; } StarDrawer.prototype.getSidesData = function (particle, radius) { var _a, _b; var sides = (_b = (_a = particle.polygon) === null || _a === void 0 ? void 0 : _a.sides) !== null && _b !== void 0 ? _b : 5; var side = { count: { denominator: 2, numerator: sides, }, length: radius * 2 * 2.66 / (sides / 3), }; return side; }; StarDrawer.prototype.getCenter = function (particle, radius) { var _a, _b; var sides = (_b = (_a = particle.polygon) === null || _a === void 0 ? void 0 : _a.sides) !== null && _b !== void 0 ? _b : 5; var start = { x: -radius * 2 / (sides / 4), y: -radius / (2 * 2.66 / 3.5), }; return start; }; return StarDrawer; }(PolygonDrawerBase_1.PolygonDrawerBase)); exports.StarDrawer = StarDrawer;
var slideways = require('../'); var slider = slideways({ min: 2, max: 10, snap: 0.1, init: 5 }); slider.appendTo('#slider'); var result = document.querySelector('#result'); slider.on('value', function (value) { result.value = value; });
'use strict' var appearanceConfig = require('./config/appearance') var modules = [ 'ngMaterial', 'md.data.table', 'gettext', 'monospaced.qrcode', 'infinite-scroll', 'arkclient.filters', 'arkclient.services', 'arkclient.components', 'arkclient.directives', 'arkclient.accounts' ] var app = angular.module('arkclient', modules) app.config(function ($mdIconProvider) { $mdIconProvider .icon('menu', './assets/svg/menu.svg', 24) .icon('ledger', './assets/svg/ledger.svg', 24) .icon('qrcode', './assets/svg/qrcode.svg', 24) }) app.config(function ($provide, $mdThemingProvider) { var themes = appearanceConfig.themes var themeNames = Object.keys(themes) themeNames.forEach(function (key) { var theme = $mdThemingProvider.theme(key) .primaryPalette(themes[key].primary) .accentPalette(themes[key].accent) .warnPalette(themes[key].warn) if (themes[key].background) theme.backgroundPalette(themes[key].background) }) $mdThemingProvider.alwaysWatchTheme(true) $provide.value('$mdThemingProvider', $mdThemingProvider) }) app.config(['$qProvider', function ($qProvider) { $qProvider.errorOnUnhandledRejections(false) }]) const electron = require('electron') const remote = electron.remote const Menu = remote.Menu const InputMenu = Menu.buildFromTemplate([{ label: 'Undo', role: 'undo' }, { label: 'Redo', role: 'redo' }, { type: 'separator' }, { label: 'Cut', role: 'cut' }, { label: 'Copy', role: 'copy' }, { label: 'Paste', role: 'paste' }, { type: 'separator' }, { label: 'Select all', role: 'selectall' } ]) document.body.addEventListener('contextmenu', (e) => { e.preventDefault() e.stopPropagation() let node = e.target while (node) { if (node.nodeName.match(/^(input|textarea)$/i) || node.isContentEditable) { InputMenu.popup(remote.getCurrentWindow()) break } node = node.parentNode } })
byte_array_to_string = function(array) { var ret_val = []; for(var j=0;j<array.length;j++) ret_val.push(array[j].toString(16)); return ret_val; } if(typeof(exports) != 'undefined') { exports.byte_array_to_string = byte_array_to_string; }
'use strict'; // Locations controller angular.module('locations').controller('LocationsController', ['$scope', '$stateParams', '$location', 'Authentication', 'Locations', function($scope, $stateParams, $location, Authentication, Locations) { $scope.authentication = Authentication; $scope.lines = []; $scope.addLine = function() { $scope.lines.push($scope.newLine); $scope.newLine = ''; }; $scope.createBusstop = function() { // Create new Location object var busstop = new Locations({ name: this.name, lat: this.lat, lng: this.lng, info: $scope.lines }); busstop.$save(function(response) { $location.path('locations/' + response._id); // Clear form fields $scope.name = ''; }, function(errorResponse) { $scope.error = errorResponse.data.message; }); }; // Create new Location $scope.create = function() { // Create new Location object var location = new Locations ({ name: this.name, info: this.info }); console.log(location); // Redirect after save //location.$save(function(response) { // $location.path('locations/' + response._id); // // // Clear form fields // $scope.name = ''; //}, function(errorResponse) { // $scope.error = errorResponse.data.message; //}); }; // Remove existing Location $scope.remove = function(location) { if ( location ) { location.$remove(); for (var i in $scope.locations) { if ($scope.locations [i] === location) { $scope.locations.splice(i, 1); } } } else { $scope.location.$remove(function() { $location.path('locations'); }); } }; // Update existing Location $scope.update = function() { var location = $scope.location; location.$update(function() { $location.path('locations/' + location._id); }, function(errorResponse) { $scope.error = errorResponse.data.message; }); }; // Find a list of Locations $scope.find = function() { $scope.locations = Locations.query(); }; // Find existing Location $scope.findOne = function() { $scope.location = Locations.get({ locationId: $stateParams.locationId }); }; } ]);
import React from "react" export default function LocalPlugin2() { return <div>{REPLACE_ME_2}</div> }
/** * @desc this directive sets a focus to input element */ (function() { 'use strict'; function autoFocus($timeout) { function link(scope, element) { $timeout(function() { element[0].focus(); }); } return { restrict: 'A', link: link }; } angular.module('angular.widgets') .directive('autoFocus', ['$timeout', autoFocus]); })();
/*! UIkit 3.6.8 | https://www.getuikit.com | (c) 2014 - 2021 YOOtheme | MIT License */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('uikit-util')) : typeof define === 'function' && define.amd ? define('uikitcountdown', ['uikit-util'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.UIkitCountdown = factory(global.UIkit.util)); }(this, (function (uikitUtil) { 'use strict'; var Class = { connected: function() { !uikitUtil.hasClass(this.$el, this.$name) && uikitUtil.addClass(this.$el, this.$name); } }; var Component = { mixins: [Class], props: { date: String, clsWrapper: String }, data: { date: '', clsWrapper: '.uk-countdown-%unit%' }, computed: { date: function(ref) { var date = ref.date; return Date.parse(date); }, days: function(ref, $el) { var clsWrapper = ref.clsWrapper; return uikitUtil.$(clsWrapper.replace('%unit%', 'days'), $el); }, hours: function(ref, $el) { var clsWrapper = ref.clsWrapper; return uikitUtil.$(clsWrapper.replace('%unit%', 'hours'), $el); }, minutes: function(ref, $el) { var clsWrapper = ref.clsWrapper; return uikitUtil.$(clsWrapper.replace('%unit%', 'minutes'), $el); }, seconds: function(ref, $el) { var clsWrapper = ref.clsWrapper; return uikitUtil.$(clsWrapper.replace('%unit%', 'seconds'), $el); }, units: function() { var this$1 = this; return ['days', 'hours', 'minutes', 'seconds'].filter(function (unit) { return this$1[unit]; }); } }, connected: function() { this.start(); }, disconnected: function() { var this$1 = this; this.stop(); this.units.forEach(function (unit) { return uikitUtil.empty(this$1[unit]); }); }, events: [ { name: 'visibilitychange', el: uikitUtil.inBrowser && document, handler: function() { if (document.hidden) { this.stop(); } else { this.start(); } } } ], update: { write: function() { var this$1 = this; var timespan = getTimeSpan(this.date); if (timespan.total <= 0) { this.stop(); timespan.days = timespan.hours = timespan.minutes = timespan.seconds = 0; } this.units.forEach(function (unit) { var digits = String(Math.floor(timespan[unit])); digits = digits.length < 2 ? ("0" + digits) : digits; var el = this$1[unit]; if (el.textContent !== digits) { digits = digits.split(''); if (digits.length !== el.children.length) { uikitUtil.html(el, digits.map(function () { return '<span></span>'; }).join('')); } digits.forEach(function (digit, i) { return el.children[i].textContent = digit; }); } }); } }, methods: { start: function() { this.stop(); if (this.date && this.units.length) { this.$update(); this.timer = setInterval(this.$update, 1000); } }, stop: function() { if (this.timer) { clearInterval(this.timer); this.timer = null; } } } }; function getTimeSpan(date) { var total = date - Date.now(); return { total: total, seconds: total / 1000 % 60, minutes: total / 1000 / 60 % 60, hours: total / 1000 / 60 / 60 % 24, days: total / 1000 / 60 / 60 / 24 }; } if (typeof window !== 'undefined' && window.UIkit) { window.UIkit.component('countdown', Component); } return Component; })));
// publish npm pkg config const merge = require('webpack-merge'); const webpack = require('webpack'); const {resolve} = require('path'); const commonConfig = require('./webpack.config.common'); module.exports = merge(commonConfig, { entry: './loader.tsx', context: resolve(__dirname, ''), output: { filename: 'bundle.min.js', path: resolve(__dirname, 'lib'), publicPath: '/', libraryTarget: 'umd', }, plugins: [ new webpack.LoaderOptionsPlugin({ debug: false, minimize: true, }), new webpack.optimize.UglifyJsPlugin({ sourceMap: false, }), ], externals: [ { 'react': { root: 'React', commonjs2: 'react', commonjs: 'react', amd: 'react' }, 'react-dom': { root: 'ReactDOM', commonjs2: 'react-dom', commonjs: 'react-dom', amd: 'react-dom' } } ], });
export default angular => { const ngModule = angular.module('lazyModule', []); require('./lazyController')(ngModule); };
/*! Buefy v0.9.18 | MIT License | github.com/buefy/buefy */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = global || self, factory(global.Icon = {})); }(this, function (exports) { 'use strict'; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest(); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } var config = { defaultContainerElement: null, defaultIconPack: 'mdi', defaultIconComponent: null, defaultIconPrev: 'chevron-left', defaultIconNext: 'chevron-right', defaultLocale: undefined, defaultDialogConfirmText: null, defaultDialogCancelText: null, defaultSnackbarDuration: 3500, defaultSnackbarPosition: null, defaultToastDuration: 2000, defaultToastPosition: null, defaultNotificationDuration: 2000, defaultNotificationPosition: null, defaultTooltipType: 'is-primary', defaultTooltipDelay: null, defaultSidebarDelay: null, defaultInputAutocomplete: 'on', defaultDateFormatter: null, defaultDateParser: null, defaultDateCreator: null, defaultTimeCreator: null, defaultDayNames: null, defaultMonthNames: null, defaultFirstDayOfWeek: null, defaultUnselectableDaysOfWeek: null, defaultTimeFormatter: null, defaultTimeParser: null, defaultModalCanCancel: ['escape', 'x', 'outside', 'button'], defaultModalScroll: null, defaultDatepickerMobileNative: true, defaultTimepickerMobileNative: true, defaultNoticeQueue: true, defaultInputHasCounter: true, defaultTaginputHasCounter: true, defaultUseHtml5Validation: true, defaultDropdownMobileModal: true, defaultFieldLabelPosition: null, defaultDatepickerYearsRange: [-100, 10], defaultDatepickerNearbyMonthDays: true, defaultDatepickerNearbySelectableMonthDays: false, defaultDatepickerShowWeekNumber: false, defaultDatepickerWeekNumberClickable: false, defaultDatepickerMobileModal: true, defaultTrapFocus: true, defaultAutoFocus: true, defaultButtonRounded: false, defaultSwitchRounded: true, defaultCarouselInterval: 3500, defaultTabsExpanded: false, defaultTabsAnimated: true, defaultTabsType: null, defaultStatusIcon: true, defaultProgrammaticPromise: false, defaultLinkTags: ['a', 'button', 'input', 'router-link', 'nuxt-link', 'n-link', 'RouterLink', 'NuxtLink', 'NLink'], defaultImageWebpFallback: null, defaultImageLazy: true, defaultImageResponsive: true, defaultImageRatio: null, defaultImageSrcsetFormatter: null, defaultBreadcrumbTag: 'a', defaultBreadcrumbAlign: 'is-left', defaultBreadcrumbSeparator: '', defaultBreadcrumbSize: 'is-medium', customIconPacks: null }; /** * Merge function to replace Object.assign with deep merging possibility */ var isObject = function isObject(item) { return _typeof(item) === 'object' && !Array.isArray(item); }; var mergeFn = function mergeFn(target, source) { var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; if (deep || !Object.assign) { var isDeep = function isDeep(prop) { return isObject(source[prop]) && target !== null && target.hasOwnProperty(prop) && isObject(target[prop]); }; var replaced = Object.getOwnPropertyNames(source).map(function (prop) { return _defineProperty({}, prop, isDeep(prop) ? mergeFn(target[prop], source[prop], deep) : source[prop]); }).reduce(function (a, b) { return _objectSpread2({}, a, {}, b); }, {}); return _objectSpread2({}, target, {}, replaced); } else { return Object.assign(target, source); } }; var merge = mergeFn; var mdiIcons = { sizes: { 'default': 'mdi-24px', 'is-small': null, 'is-medium': 'mdi-36px', 'is-large': 'mdi-48px' }, iconPrefix: 'mdi-' }; var faIcons = function faIcons() { var faIconPrefix = config && config.defaultIconComponent ? '' : 'fa-'; return { sizes: { 'default': null, 'is-small': null, 'is-medium': faIconPrefix + 'lg', 'is-large': faIconPrefix + '2x' }, iconPrefix: faIconPrefix, internalIcons: { 'information': 'info-circle', 'alert': 'exclamation-triangle', 'alert-circle': 'exclamation-circle', 'chevron-right': 'angle-right', 'chevron-left': 'angle-left', 'chevron-down': 'angle-down', 'eye-off': 'eye-slash', 'menu-down': 'caret-down', 'menu-up': 'caret-up', 'close-circle': 'times-circle' } }; }; var getIcons = function getIcons() { var icons = { mdi: mdiIcons, fa: faIcons(), fas: faIcons(), far: faIcons(), fad: faIcons(), fab: faIcons(), fal: faIcons(), 'fa-solid': faIcons(), 'fa-regular': faIcons(), 'fa-light': faIcons(), 'fa-thin': faIcons(), 'fa-duotone': faIcons(), 'fa-brands': faIcons() }; if (config && config.customIconPacks) { icons = merge(icons, config.customIconPacks, true); } return icons; }; var script = { name: 'BIcon', props: { type: [String, Object], component: String, pack: String, icon: String, size: String, customSize: String, customClass: String, both: Boolean // This is used internally to show both MDI and FA icon }, computed: { iconConfig: function iconConfig() { var allIcons = getIcons(); return allIcons[this.newPack]; }, iconPrefix: function iconPrefix() { if (this.iconConfig && this.iconConfig.iconPrefix) { return this.iconConfig.iconPrefix; } return ''; }, /** * Internal icon name based on the pack. * If pack is 'fa', gets the equivalent FA icon name of the MDI, * internal icons are always MDI. */ newIcon: function newIcon() { return "".concat(this.iconPrefix).concat(this.getEquivalentIconOf(this.icon)); }, newPack: function newPack() { return this.pack || config.defaultIconPack; }, newType: function newType() { if (!this.type) return; var splitType = []; if (typeof this.type === 'string') { splitType = this.type.split('-'); } else { for (var key in this.type) { if (this.type[key]) { splitType = key.split('-'); break; } } } if (splitType.length <= 1) return; var _splitType = splitType, _splitType2 = _toArray(_splitType), type = _splitType2.slice(1); return "has-text-".concat(type.join('-')); }, newCustomSize: function newCustomSize() { return this.customSize || this.customSizeByPack; }, customSizeByPack: function customSizeByPack() { if (this.iconConfig && this.iconConfig.sizes) { if (this.size && this.iconConfig.sizes[this.size] !== undefined) { return this.iconConfig.sizes[this.size]; } else if (this.iconConfig.sizes.default) { return this.iconConfig.sizes.default; } } return null; }, useIconComponent: function useIconComponent() { return this.component || config.defaultIconComponent; } }, methods: { /** * Equivalent icon name of the MDI. */ getEquivalentIconOf: function getEquivalentIconOf(value) { // Only transform the class if the both prop is set to true if (!this.both) { return value; } if (this.iconConfig && this.iconConfig.internalIcons && this.iconConfig.internalIcons[value]) { return this.iconConfig.internalIcons[value]; } return value; } } }; function normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */ , shadowMode, createInjector, createInjectorSSR, createInjectorShadow) { if (typeof shadowMode !== 'boolean') { createInjectorSSR = createInjector; createInjector = shadowMode; shadowMode = false; } // Vue.extend constructor export interop. var options = typeof script === 'function' ? script.options : script; // render functions if (template && template.render) { options.render = template.render; options.staticRenderFns = template.staticRenderFns; options._compiled = true; // functional template if (isFunctionalTemplate) { options.functional = true; } } // scopedId if (scopeId) { options._scopeId = scopeId; } var hook; if (moduleIdentifier) { // server build hook = function hook(context) { // 2.3 injection context = context || // cached call this.$vnode && this.$vnode.ssrContext || // stateful this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext; // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__; } // inject component styles if (style) { style.call(this, createInjectorSSR(context)); } // register component module identifier for async chunk inference if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier); } }; // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook; } else if (style) { hook = shadowMode ? function () { style.call(this, createInjectorShadow(this.$root.$options.shadowRoot)); } : function (context) { style.call(this, createInjector(context)); }; } if (hook) { if (options.functional) { // register for functional component in vue file var originalRender = options.render; options.render = function renderWithStyleInjection(h, context) { hook.call(context); return originalRender(h, context); }; } else { // inject component registration as beforeCreate hook var existing = options.beforeCreate; options.beforeCreate = existing ? [].concat(existing, hook) : [hook]; } } return script; } var normalizeComponent_1 = normalizeComponent; /* script */ const __vue_script__ = script; /* template */ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',{staticClass:"icon",class:[_vm.newType, _vm.size]},[(!_vm.useIconComponent)?_c('i',{class:[_vm.newPack, _vm.newIcon, _vm.newCustomSize, _vm.customClass]}):_c(_vm.useIconComponent,{tag:"component",class:[_vm.customClass],attrs:{"icon":[_vm.newPack, _vm.newIcon],"size":_vm.newCustomSize}})],1)}; var __vue_staticRenderFns__ = []; /* style */ const __vue_inject_styles__ = undefined; /* scoped */ const __vue_scope_id__ = undefined; /* module identifier */ const __vue_module_identifier__ = undefined; /* functional template */ const __vue_is_functional_template__ = false; /* style inject */ /* style inject SSR */ var Icon = normalizeComponent_1( { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ }, __vue_inject_styles__, __vue_script__, __vue_scope_id__, __vue_is_functional_template__, __vue_module_identifier__, undefined, undefined ); var use = function use(plugin) { if (typeof window !== 'undefined' && window.Vue) { window.Vue.use(plugin); } }; var registerComponent = function registerComponent(Vue, component) { Vue.component(component.name, component); }; var Plugin = { install: function install(Vue) { registerComponent(Vue, Icon); } }; use(Plugin); exports.BIcon = Icon; exports.default = Plugin; Object.defineProperty(exports, '__esModule', { value: true }); }));
// // Use to uglify JS // module.exports = { dist: { /*src: ['dist/scripts/swagger-ui.js'], dest: 'dist/scripts/swagger-ui.min.js'*/ files: { 'dist/scripts/swagger-ui.min.js': ['dist/scripts/swagger-ui.js'], 'dist/scripts/modules/swagger-external-references.min.js': ['dist/scripts/modules/swagger-external-references.js'], 'dist/scripts/modules/swagger-xml-formatter.min.js': ['dist/scripts/modules/swagger-xml-formatter.js'], 'dist/scripts/modules/swagger1-to-swagger2-converter.min.js': ['dist/scripts/modules/swagger1-to-swagger2-converter.js'] } }/*, distExternals: { src: ['dist/scripts/modules/swagger-external-references.js'], dest: 'dist/scripts/modules/swagger-external-references.min.js' }, distXml: { src: ['dist/scripts/modules/swagger-xml-formatter.js'], dest: 'dist/scripts/modules/swagger-xml-formatter.min.js' }*/ }
'use strict'; exports.ARROR_DOWN = 40; exports.ARROR_UP = 38; exports.ENTER = 13; exports.ESC = 27; exports.SPACE = 32; exports.TAB = 9;
'use strict'; var config = { formId: 'tkf-karakterklage', formName: 'Klage på karakter', initialState: { personnummer: '', navn: '', adresse: '', klagegrunnlag: '', fagkode: '', fag: '', dato: '', skolenavn: '', skoleadresse: '', skoletelefon: '', skolemail: '' }, SERVER_PORT: 3000, API_POST_HOST: 'api.t-fk.no', API_POST_PATH: '/forms' }; module.exports = config;
'use strict' var lib = require('./lib'), { Video } = require('./lib/videos.js'), Youtube = lib.Youtube; module.exports = Youtube
var Type = (function () { function Type() { } return Type; }()); export { Type }; Type.plot = 'plot'; Type.resource = 'resources'; Type.upgrade = 'upgrades'; Type.storeItem = 'storeItems'; Type.tab = 'tabs'; Type.village = 'village'; //# sourceMappingURL=type.js.map
/*! * chartjs-plugin-streaming v2.0.0 * https://nagix.github.io/chartjs-plugin-streaming * (c) 2017-2021 Akihiko Kusanagi * Released under the MIT license */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('chart.js'), require('chart.js/helpers')) : typeof define === 'function' && define.amd ? define(['chart.js', 'chart.js/helpers'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ChartStreaming = factory(global.Chart, global.Chart.helpers)); }(this, (function (chart_js, helpers) { 'use strict'; function clamp(value, lower, upper) { return Math.min(Math.max(value, lower), upper); } function resolveOption(scale, key) { const realtimeOpts = scale.options.realtime; const streamingOpts = scale.chart.options.plugins.streaming; return helpers.valueOrDefault(realtimeOpts[key], streamingOpts[key]); } function getAxisMap(element, {x, y}, {xAxisID, yAxisID}) { const axisMap = {}; helpers.each(x, key => { axisMap[key] = {axisId: xAxisID}; }); helpers.each(y, key => { axisMap[key] = {axisId: yAxisID}; }); return axisMap; } const cancelAnimFrame = (function() { if (typeof window === 'undefined') { return helpers.noop; } return window.cancelAnimationFrame; }()); function startFrameRefreshTimer(context, func) { if (!context.frameRequestID) { const refresh = () => { const nextRefresh = context.nextRefresh || 0; const now = Date.now(); if (nextRefresh <= now) { const newFrameRate = helpers.callback(func); const frameDuration = 1000 / (Math.max(newFrameRate, 0) || 30); const newNextRefresh = context.nextRefresh + frameDuration || 0; context.nextRefresh = newNextRefresh > now ? newNextRefresh : now + frameDuration; } context.frameRequestID = helpers.requestAnimFrame.call(window, refresh); }; context.frameRequestID = helpers.requestAnimFrame.call(window, refresh); } } function stopFrameRefreshTimer(context) { const frameRequestID = context.frameRequestID; if (frameRequestID) { cancelAnimFrame.call(window, frameRequestID); delete context.frameRequestID; } } function stopDataRefreshTimer(context) { const refreshTimerID = context.refreshTimerID; if (refreshTimerID) { clearInterval(refreshTimerID); delete context.refreshTimerID; delete context.refreshInterval; } } function startDataRefreshTimer(context, func, interval) { if (!context.refreshTimerID) { context.refreshTimerID = setInterval(() => { const newInterval = helpers.callback(func); if (context.refreshInterval !== newInterval && !isNaN(newInterval)) { stopDataRefreshTimer(context); startDataRefreshTimer(context, func, newInterval); } }, interval || 0); context.refreshInterval = interval || 0; } } function scaleValue(scale, value, fallback) { value = typeof value === 'number' ? value : scale.parse(value); return helpers.isFinite(value) ? {value: scale.getPixelForValue(value), transitionable: true} : {value: fallback}; } function updateBoxAnnotation(element, chart, options) { const {scales, chartArea} = chart; const {xScaleID, yScaleID, xMin, xMax, yMin, yMax} = options; const xScale = scales[xScaleID]; const yScale = scales[yScaleID]; const {top, left, bottom, right} = chartArea; const streaming = element.$streaming = {}; if (xScale) { const min = scaleValue(xScale, xMin, left); const max = scaleValue(xScale, xMax, right); const reverse = min.value > max.value; if (min.transitionable) { streaming[reverse ? 'x2' : 'x'] = {axisId: xScaleID}; } if (max.transitionable) { streaming[reverse ? 'x' : 'x2'] = {axisId: xScaleID}; } if (min.transitionable !== max.transitionable) { streaming.width = {axisId: xScaleID, reverse: min.transitionable}; } } if (yScale) { const min = scaleValue(yScale, yMin, top); const max = scaleValue(yScale, yMax, bottom); const reverse = min.value > max.value; if (min.transitionable) { streaming[reverse ? 'y2' : 'y'] = {axisId: yScaleID}; } if (max.transitionable) { streaming[reverse ? 'y' : 'y2'] = {axisId: yScaleID}; } if (min.transitionable !== max.transitionable) { streaming.height = {axisId: yScaleID, reverse: min.transitionable}; } } } function updateLineAnnotation(element, chart, options) { const {scales, chartArea} = chart; const {scaleID, value} = options; const scale = scales[scaleID]; const {top, left, bottom, right} = chartArea; const streaming = element.$streaming = {}; if (scale) { const isHorizontal = scale.isHorizontal(); const pixel = scaleValue(scale, value); if (pixel.transitionable) { streaming[isHorizontal ? 'x' : 'y'] = {axisId: scaleID}; streaming[isHorizontal ? 'x2' : 'y2'] = {axisId: scaleID}; } return isHorizontal ? {top, bottom} : {left, right}; } const {xScaleID, yScaleID, xMin, xMax, yMin, yMax} = options; const xScale = scales[xScaleID]; const yScale = scales[yScaleID]; const clip = {}; if (xScale) { const min = scaleValue(xScale, xMin); const max = scaleValue(xScale, xMax); if (min.transitionable) { streaming.x = {axisId: xScaleID}; } else { clip.left = left; } if (max.transitionable) { streaming.x2 = {axisId: xScaleID}; } else { clip.right = right; } } if (yScale) { const min = scaleValue(yScale, yMin); const max = scaleValue(yScale, yMax); if (min.transitionable) { streaming.y = {axisId: yScaleID}; } else { clip.top = top; } if (max.transitionable) { streaming.y2 = {axisId: yScaleID}; } else { clip.bottom = bottom; } } return clip; } function updatePointAnnotation(element, chart, options) { const scales = chart.scales; const {xScaleID, yScaleID, xValue, yValue} = options; const xScale = scales[xScaleID]; const yScale = scales[yScaleID]; const streaming = element.$streaming = {}; if (xScale) { const x = scaleValue(xScale, xValue); if (x.transitionable) { streaming.x = {axisId: xScaleID}; } } if (yScale) { const y = scaleValue(yScale, yValue); if (y.transitionable) { streaming.y = {axisId: yScaleID}; } } } function initAnnotationPlugin() { const BoxAnnotation = chart_js.registry.getElement('boxAnnotation'); const LineAnnotation = chart_js.registry.getElement('lineAnnotation'); const PointAnnotation = chart_js.registry.getElement('pointAnnotation'); const resolveBoxAnnotationProperties = BoxAnnotation.prototype.resolveElementProperties; const resolveLineAnnotationProperties = LineAnnotation.prototype.resolveElementProperties; const resolvePointAnnotationProperties = PointAnnotation.prototype.resolveElementProperties; BoxAnnotation.prototype.resolveElementProperties = function(chart, options) { updateBoxAnnotation(this, chart, options); return resolveBoxAnnotationProperties.call(this, chart, options); }; LineAnnotation.prototype.resolveElementProperties = function(chart, options) { const chartArea = chart.chartArea; chart.chartArea = updateLineAnnotation(this, chart, options); const properties = resolveLineAnnotationProperties.call(this, chart, options); chart.chartArea = chartArea; return properties; }; PointAnnotation.prototype.resolveElementProperties = function(chart, options) { updatePointAnnotation(this, chart, options); return resolvePointAnnotationProperties.call(this, chart, options); }; } function attachChart$1(plugin, chart) { const streaming = chart.$streaming; if (streaming.annotationPlugin !== plugin) { const afterUpdate = plugin.afterUpdate; initAnnotationPlugin(); streaming.annotationPlugin = plugin; plugin.afterUpdate = (_chart, args, options) => { const mode = args.mode; const animationOpts = options.animation; if (mode === 'quiet') { options.animation = false; } afterUpdate.call(this, _chart, args, options); if (mode === 'quiet') { options.animation = animationOpts; } }; } } function getElements(chart) { const plugin = chart.$streaming.annotationPlugin; if (plugin) { const state = plugin._getState(chart); return state && state.elements || []; } return []; } function detachChart$1(chart) { delete chart.$streaming.annotationPlugin; } const transitionKeys$1 = {x: ['x', 'caretX'], y: ['y', 'caretY']}; function update$1(...args) { const me = this; const element = me.getActiveElements()[0]; if (element) { const meta = me._chart.getDatasetMeta(element.datasetIndex); me.$streaming = getAxisMap(me, transitionKeys$1, meta); } else { me.$streaming = {}; } me.constructor.prototype.update.call(me, ...args); } const chartStates = new WeakMap(); function getState(chart) { let state = chartStates.get(chart); if (!state) { state = {originalScaleOptions: {}}; chartStates.set(chart, state); } return state; } function removeState(chart) { chartStates.delete(chart); } function storeOriginalScaleOptions(chart) { const {originalScaleOptions} = getState(chart); const scales = chart.scales; helpers.each(scales, scale => { const id = scale.id; if (!originalScaleOptions[id]) { originalScaleOptions[id] = { duration: resolveOption(scale, 'duration'), delay: resolveOption(scale, 'delay') }; } }); helpers.each(originalScaleOptions, (opt, key) => { if (!scales[key]) { delete originalScaleOptions[key]; } }); return originalScaleOptions; } function zoomRealTimeScale(scale, zoom, center, limits) { const {chart, axis} = scale; const {minDuration = 0, maxDuration = Infinity, minDelay = -Infinity, maxDelay = Infinity} = limits && limits[axis] || {}; const realtimeOpts = scale.options.realtime; const duration = resolveOption(scale, 'duration'); const delay = resolveOption(scale, 'delay'); const newDuration = clamp(duration * (2 - zoom), minDuration, maxDuration); let maxPercent, newDelay; storeOriginalScaleOptions(chart); if (scale.isHorizontal()) { maxPercent = (scale.right - center.x) / (scale.right - scale.left); } else { maxPercent = (scale.bottom - center.y) / (scale.bottom - scale.top); } newDelay = delay + maxPercent * (duration - newDuration); realtimeOpts.duration = newDuration; realtimeOpts.delay = clamp(newDelay, minDelay, maxDelay); return newDuration !== scale.max - scale.min; } function panRealTimeScale(scale, delta, limits) { const {chart, axis} = scale; const {minDelay = -Infinity, maxDelay = Infinity} = limits && limits[axis] || {}; const delay = resolveOption(scale, 'delay'); const newDelay = delay + (scale.getValueForPixel(delta) - scale.getValueForPixel(0)); storeOriginalScaleOptions(chart); scale.options.realtime.delay = clamp(newDelay, minDelay, maxDelay); return true; } function resetRealTimeScaleOptions(chart) { const originalScaleOptions = storeOriginalScaleOptions(chart); helpers.each(chart.scales, scale => { const realtimeOptions = scale.options.realtime; if (realtimeOptions) { const original = originalScaleOptions[scale.id]; if (original) { realtimeOptions.duration = original.duration; realtimeOptions.delay = original.delay; } else { delete realtimeOptions.duration; delete realtimeOptions.delay; } } }); } function initZoomPlugin(plugin) { plugin.zoomFunctions.realtime = zoomRealTimeScale; plugin.panFunctions.realtime = panRealTimeScale; } function attachChart(plugin, chart) { const streaming = chart.$streaming; if (streaming.zoomPlugin !== plugin) { const resetZoom = streaming.resetZoom = chart.resetZoom; initZoomPlugin(plugin); chart.resetZoom = transition => { resetRealTimeScaleOptions(chart); resetZoom(transition); }; streaming.zoomPlugin = plugin; } } function detachChart(chart) { const streaming = chart.$streaming; if (streaming.zoomPlugin) { chart.resetZoom = streaming.resetZoom; removeState(chart); delete streaming.resetZoom; delete streaming.zoomPlugin; } } const INTERVALS = { millisecond: { common: true, size: 1, steps: [1, 2, 5, 10, 20, 50, 100, 250, 500] }, second: { common: true, size: 1000, steps: [1, 2, 5, 10, 15, 30] }, minute: { common: true, size: 60000, steps: [1, 2, 5, 10, 15, 30] }, hour: { common: true, size: 3600000, steps: [1, 2, 3, 6, 12] }, day: { common: true, size: 86400000, steps: [1, 2, 5] }, week: { common: false, size: 604800000, steps: [1, 2, 3, 4] }, month: { common: true, size: 2.628e9, steps: [1, 2, 3] }, quarter: { common: false, size: 7.884e9, steps: [1, 2, 3, 4] }, year: { common: true, size: 3.154e10 } }; const UNITS = Object.keys(INTERVALS); function determineStepSize(min, max, unit, capacity) { const range = max - min; const {size: milliseconds, steps} = INTERVALS[unit]; let factor; if (!steps) { return Math.ceil(range / (capacity * milliseconds)); } for (let i = 0, ilen = steps.length; i < ilen; ++i) { factor = steps[i]; if (Math.ceil(range / (milliseconds * factor)) <= capacity) { break; } } return factor; } function determineUnitForAutoTicks(minUnit, min, max, capacity) { const range = max - min; const ilen = UNITS.length; for (let i = UNITS.indexOf(minUnit); i < ilen - 1; ++i) { const {common, size, steps} = INTERVALS[UNITS[i]]; const factor = steps ? steps[steps.length - 1] : Number.MAX_SAFE_INTEGER; if (common && Math.ceil(range / (factor * size)) <= capacity) { return UNITS[i]; } } return UNITS[ilen - 1]; } function determineMajorUnit(unit) { for (let i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i) { if (INTERVALS[UNITS[i]].common) { return UNITS[i]; } } } function addTick(ticks, time, timestamps) { if (!timestamps) { ticks[time] = true; } else if (timestamps.length) { const {lo, hi} = helpers._lookup(timestamps, time); const timestamp = timestamps[lo] >= time ? timestamps[lo] : timestamps[hi]; ticks[timestamp] = true; } } const datasetPropertyKeys = [ 'pointBackgroundColor', 'pointBorderColor', 'pointBorderWidth', 'pointRadius', 'pointRotation', 'pointStyle', 'pointHitRadius', 'pointHoverBackgroundColor', 'pointHoverBorderColor', 'pointHoverBorderWidth', 'pointHoverRadius', 'backgroundColor', 'borderColor', 'borderSkipped', 'borderWidth', 'hoverBackgroundColor', 'hoverBorderColor', 'hoverBorderWidth', 'hoverRadius', 'hitRadius', 'radius', 'rotation' ]; function clean(scale) { const {chart, id, max} = scale; const duration = resolveOption(scale, 'duration'); const delay = resolveOption(scale, 'delay'); const ttl = resolveOption(scale, 'ttl'); const pause = resolveOption(scale, 'pause'); const min = Date.now() - (isNaN(ttl) ? duration + delay : ttl); let i, start, count, removalRange; helpers.each(chart.data.datasets, (dataset, datasetIndex) => { const meta = chart.getDatasetMeta(datasetIndex); const axis = id === meta.xAxisID && 'x' || id === meta.yAxisID && 'y'; if (axis) { const controller = meta.controller; const data = dataset.data; const length = data.length; if (pause) { for (i = 0; i < length; ++i) { const point = controller.getParsed(i); if (point && !(point[axis] < max)) { break; } } start = i + 2; } else { start = 0; } for (i = start; i < length; ++i) { const point = controller.getParsed(i); if (!point || !(point[axis] <= min)) { break; } } count = i - start; if (isNaN(ttl)) { count = Math.max(count - 2, 0); } data.splice(start, count); helpers.each(datasetPropertyKeys, key => { if (helpers.isArray(dataset[key])) { dataset[key].splice(start, count); } }); helpers.each(dataset.datalabels, value => { if (helpers.isArray(value)) { value.splice(start, count); } }); if (typeof data[0] !== 'object') { removalRange = { start: start, count: count }; } helpers.each(chart._active, (item, index) => { if (item.datasetIndex === datasetIndex && item.index >= start) { if (item.index >= start + count) { item.index -= count; } else { chart._active.splice(index, 1); } } }, null, true); } }); if (removalRange) { chart.data.labels.splice(removalRange.start, removalRange.count); } } function transition(element, id, translate) { const animations = element.$animations || {}; helpers.each(element.$streaming, (item, key) => { if (item.axisId === id) { const delta = item.reverse ? -translate : translate; const animation = animations[key]; if (helpers.isFinite(element[key])) { element[key] -= delta; } if (animation) { animation._from -= delta; animation._to -= delta; } } }); } function scroll(scale) { const {chart, id, $realtime: realtime} = scale; const duration = resolveOption(scale, 'duration'); const delay = resolveOption(scale, 'delay'); const isHorizontal = scale.isHorizontal(); const length = isHorizontal ? scale.width : scale.height; const now = Date.now(); const tooltip = chart.tooltip; const annotations = getElements(chart); let offset = length * (now - realtime.head) / duration; if (isHorizontal === !!scale.options.reverse) { offset = -offset; } helpers.each(chart.data.datasets, (dataset, datasetIndex) => { const meta = chart.getDatasetMeta(datasetIndex); const {data: elements = [], dataset: element} = meta; for (let i = 0, ilen = elements.length; i < ilen; ++i) { transition(elements[i], id, offset); } if (element) { transition(element, id, offset); delete element._path; } }); for (let i = 0, ilen = annotations.length; i < ilen; ++i) { transition(annotations[i], id, offset); } if (tooltip) { transition(tooltip, id, offset); } scale.max = now - delay; scale.min = scale.max - duration; realtime.head = now; } class RealTimeScale extends chart_js.TimeScale { constructor(props) { super(props); this.$realtime = this.$realtime || {}; } init(scaleOpts, opts) { const me = this; super.init(scaleOpts, opts); startDataRefreshTimer(me.$realtime, () => { const chart = me.chart; const onRefresh = resolveOption(me, 'onRefresh'); helpers.callback(onRefresh, [chart], me); clean(me); chart.update('quiet'); return resolveOption(me, 'refresh'); }); } update(maxWidth, maxHeight, margins) { const me = this; const {$realtime: realtime, options} = me; const {bounds, offset, ticks: ticksOpts} = options; const {autoSkip, source, major: majorTicksOpts} = ticksOpts; const majorEnabled = majorTicksOpts.enabled; if (resolveOption(me, 'pause')) { stopFrameRefreshTimer(realtime); } else { if (!realtime.frameRequestID) { realtime.head = Date.now(); } startFrameRefreshTimer(realtime, () => { const chart = me.chart; const streaming = chart.$streaming; scroll(me); if (streaming) { helpers.callback(streaming.render, [chart]); } return resolveOption(me, 'frameRate'); }); } options.bounds = undefined; options.offset = false; ticksOpts.autoSkip = false; ticksOpts.source = source === 'auto' ? '' : source; majorTicksOpts.enabled = true; super.update(maxWidth, maxHeight, margins); options.bounds = bounds; options.offset = offset; ticksOpts.autoSkip = autoSkip; ticksOpts.source = source; majorTicksOpts.enabled = majorEnabled; } buildTicks() { const me = this; const duration = resolveOption(me, 'duration'); const delay = resolveOption(me, 'delay'); const max = me.$realtime.head - delay; const min = max - duration; const maxArray = [1e15, max]; const minArray = [-1e15, min]; Object.defineProperty(me, 'min', { get: () => minArray.shift(), set: helpers.noop }); Object.defineProperty(me, 'max', { get: () => maxArray.shift(), set: helpers.noop }); const ticks = super.buildTicks(); delete me.min; delete me.max; me.min = min; me.max = max; return ticks; } calculateLabelRotation() { const ticksOpts = this.options.ticks; const maxRotation = ticksOpts.maxRotation; ticksOpts.maxRotation = ticksOpts.minRotation || 0; super.calculateLabelRotation(); ticksOpts.maxRotation = maxRotation; } fit() { const me = this; const options = me.options; super.fit(); if (options.ticks.display && options.display && me.isHorizontal()) { me.paddingLeft = 3; me.paddingRight = 3; me._handleMargins(); } } draw(chartArea) { const me = this; const {chart, ctx} = me; const area = me.isHorizontal() ? { left: chartArea.left, top: 0, right: chartArea.right, bottom: chart.height } : { left: 0, top: chartArea.top, right: chart.width, bottom: chartArea.bottom }; me._gridLineItems = null; me._labelItems = null; helpers.clipArea(ctx, area); super.draw(chartArea); helpers.unclipArea(ctx); } destroy() { const realtime = this.$realtime; stopFrameRefreshTimer(realtime); stopDataRefreshTimer(realtime); } _generate() { const me = this; const adapter = me._adapter; const duration = resolveOption(me, 'duration'); const delay = resolveOption(me, 'delay'); const refresh = resolveOption(me, 'refresh'); const max = me.$realtime.head - delay; const min = max - duration; const capacity = me._getLabelCapacity(min); const {time: timeOpts, ticks: ticksOpts} = me.options; const minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, capacity); const major = determineMajorUnit(minor); const stepSize = timeOpts.stepSize || determineStepSize(min, max, minor, capacity); const weekday = minor === 'week' ? timeOpts.isoWeekday : false; const majorTicksEnabled = ticksOpts.major.enabled; const hasWeekday = helpers.isNumber(weekday) || weekday === true; const interval = INTERVALS[minor]; const ticks = {}; let first = min; let time, count; if (hasWeekday) { first = +adapter.startOf(first, 'isoWeek', weekday); } first = +adapter.startOf(first, hasWeekday ? 'day' : minor); if (adapter.diff(max, min, minor) > 100000 * stepSize) { throw new Error(min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor); } time = first; if (majorTicksEnabled && major && !hasWeekday && !timeOpts.round) { time = +adapter.startOf(time, major); time = +adapter.add(time, ~~((first - time) / (interval.size * stepSize)) * stepSize, minor); } const timestamps = ticksOpts.source === 'data' && me.getDataTimestamps(); for (count = 0; time < max + refresh; time = +adapter.add(time, stepSize, minor), count++) { addTick(ticks, time, timestamps); } if (time === max + refresh || count === 1) { addTick(ticks, time, timestamps); } return Object.keys(ticks).sort((a, b) => a - b).map(x => +x); } } RealTimeScale.id = 'realtime'; RealTimeScale.defaults = { bounds: 'data', adapters: {}, time: { parser: false, unit: false, round: false, isoWeekday: false, minUnit: 'millisecond', displayFormats: {} }, realtime: {}, ticks: { autoSkip: false, source: 'auto', major: { enabled: true } } }; chart_js.defaults.describe('scale.realtime', { _scriptable: name => name !== 'onRefresh' }); var version = "2.0.0"; chart_js.defaults.set('transitions', { quiet: { animation: { duration: 0 } } }); const transitionKeys = {x: ['x', 'cp1x', 'cp2x'], y: ['y', 'cp1y', 'cp2y']}; function update(mode) { const me = this; if (mode === 'quiet') { helpers.each(me.data.datasets, (dataset, datasetIndex) => { const controller = me.getDatasetMeta(datasetIndex).controller; controller._setStyle = function(element, index, _mode, active) { chart_js.DatasetController.prototype._setStyle.call(this, element, index, 'quiet', active); }; }); } chart_js.Chart.prototype.update.call(me, mode); if (mode === 'quiet') { helpers.each(me.data.datasets, (dataset, datasetIndex) => { delete me.getDatasetMeta(datasetIndex).controller._setStyle; }); } } function render(chart) { const streaming = chart.$streaming; chart.render(); if (streaming.lastMouseEvent) { setTimeout(() => { const lastMouseEvent = streaming.lastMouseEvent; if (lastMouseEvent) { chart._eventHandler(lastMouseEvent); } }, 0); } } var StreamingPlugin = { id: 'streaming', version, beforeInit(chart) { const streaming = chart.$streaming = chart.$streaming || {render}; const canvas = streaming.canvas = chart.canvas; const mouseEventListener = streaming.mouseEventListener = event => { const pos = helpers.getRelativePosition(event, chart); streaming.lastMouseEvent = { type: 'mousemove', chart: chart, native: event, x: pos.x, y: pos.y }; }; canvas.addEventListener('mousedown', mouseEventListener); canvas.addEventListener('mouseup', mouseEventListener); }, afterInit(chart) { chart.update = update; }, beforeUpdate(chart) { const {scales, elements} = chart.options; const tooltip = chart.tooltip; helpers.each(scales, ({type}) => { if (type === 'realtime') { elements.line.capBezierPoints = false; } }); if (tooltip) { tooltip.update = update$1; } try { const plugin = chart_js.registry.getPlugin('annotation'); attachChart$1(plugin, chart); } catch (e) { detachChart$1(chart); } try { const plugin = chart_js.registry.getPlugin('zoom'); attachChart(plugin, chart); } catch (e) { detachChart(chart); } }, beforeDatasetUpdate(chart, args) { const {meta, mode} = args; if (mode === 'quiet') { const {controller, $animations} = meta; if ($animations && $animations.visible && $animations.visible._active) { controller.updateElement = helpers.noop; controller.updateSharedOptions = helpers.noop; } } }, afterDatasetUpdate(chart, args) { const {meta, mode} = args; const {data: elements = [], dataset: element, controller} = meta; for (let i = 0, ilen = elements.length; i < ilen; ++i) { elements[i].$streaming = getAxisMap(elements[i], transitionKeys, meta); } if (element) { element.$streaming = getAxisMap(element, transitionKeys, meta); } if (mode === 'quiet') { delete controller.updateElement; delete controller.updateSharedOptions; } }, beforeDatasetDraw(chart, args) { const {ctx, chartArea, width, height} = chart; const {xAxisID, yAxisID, controller} = args.meta; const area = { left: 0, top: 0, right: width, bottom: height }; if (xAxisID && controller.getScaleForId(xAxisID) instanceof RealTimeScale) { area.left = chartArea.left; area.right = chartArea.right; } if (yAxisID && controller.getScaleForId(yAxisID) instanceof RealTimeScale) { area.top = chartArea.top; area.bottom = chartArea.bottom; } helpers.clipArea(ctx, area); }, afterDatasetDraw(chart) { helpers.unclipArea(chart.ctx); }, beforeEvent(chart, args) { const streaming = chart.$streaming; const event = args.event; if (event.type === 'mousemove') { streaming.lastMouseEvent = event; } else if (event.type === 'mouseout') { delete streaming.lastMouseEvent; } }, destroy(chart) { const {scales, $streaming: streaming, tooltip} = chart; const {canvas, mouseEventListener} = streaming; delete chart.update; if (tooltip) { delete tooltip.update; } canvas.removeEventListener('mousedown', mouseEventListener); canvas.removeEventListener('mouseup', mouseEventListener); helpers.each(scales, scale => { if (scale instanceof RealTimeScale) { scale.destroy(); } }); }, defaults: { duration: 10000, delay: 0, frameRate: 30, refresh: 1000, onRefresh: null, pause: false, ttl: undefined }, descriptors: { _scriptable: name => name !== 'onRefresh' } }; const registerables = [StreamingPlugin, RealTimeScale]; chart_js.Chart.register(registerables); return registerables; })));
/** * @license Highstock JS v9.1.1 (2021-06-04) * * Indicator series type for Highcharts Stock * * (c) 2010-2021 Paweł Dalek * * 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/indicators/natr', ['highcharts', 'highcharts/modules/stock'], function (Highcharts) { factory(Highcharts); factory.Highcharts = Highcharts; return factory; }); } else { 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, 'Stock/Indicators/NATR/NATRIndicator.js', [_modules['Core/Series/SeriesRegistry.js'], _modules['Core/Utilities.js']], function (SeriesRegistry, U) { /* * * * License: www.highcharts.com/license * * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!! * * */ var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var ATRIndicator = SeriesRegistry.seriesTypes.atr; var merge = U.merge, extend = U.extend; /** * The NATR series type. * * @private * @class * @name Highcharts.seriesTypes.natr * * @augments Highcharts.Series */ var NATRIndicator = /** @class */ (function (_super) { __extends(NATRIndicator, _super); function NATRIndicator() { var _this = _super !== null && _super.apply(this, arguments) || this; /** * @lends Highcharts.Series# */ /* * * * Properties * * */ _this.data = void 0; _this.points = void 0; _this.options = void 0; return _this; } /* * * * Functions * * */ NATRIndicator.prototype.getValues = function (series, params) { var atrData = (ATRIndicator.prototype.getValues.apply(this, arguments)), atrLength = atrData.values.length, period = params.period - 1, yVal = series.yData, i = 0; if (!atrData) { return; } for (; i < atrLength; i++) { atrData.yData[i] = (atrData.values[i][1] / yVal[period][3] * 100); atrData.values[i][1] = atrData.yData[i]; period++; } return atrData; }; /** * Normalized average true range indicator (NATR). This series requires * `linkedTo` option to be set and should be loaded after the * `stock/indicators/indicators.js` and `stock/indicators/atr.js`. * * @sample {highstock} stock/indicators/natr * NATR indicator * * @extends plotOptions.atr * @since 7.0.0 * @product highstock * @requires stock/indicators/indicators * @requires stock/indicators/natr * @optionparent plotOptions.natr */ NATRIndicator.defaultOptions = merge(ATRIndicator.defaultOptions, { tooltip: { valueSuffix: '%' } }); return NATRIndicator; }(ATRIndicator)); extend(NATRIndicator.prototype, { requiredIndicators: ['atr'] }); SeriesRegistry.registerSeriesType('natr', NATRIndicator); /* * * * Default Export * * */ /** * A `NATR` series. If the [type](#series.natr.type) option is not specified, it * is inherited from [chart.type](#chart.type). * * @extends series,plotOptions.natr * @since 7.0.0 * @product highstock * @excluding dataParser, dataURL * @requires stock/indicators/indicators * @requires stock/indicators/natr * @apioption series.natr */ ''; // to include the above in the js output' return NATRIndicator; }); _registerModule(_modules, 'masters/indicators/natr.src.js', [], function () { }); }));
/*! * DevExtreme (dx.messages.cs.js) * Version: 19.2.10 (build 20330-0310) * Build date: Wed Nov 25 2020 * * Copyright (c) 2012 - 2020 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ "use strict"; ! function(root, factory) { if ("function" === typeof define && define.amd) { define(function(require) { factory(require("devextreme/localization")) }) } else { if ("object" === typeof module && module.exports) { factory(require("devextreme/localization")) } else { factory(DevExpress.localization) } } }(this, function(localization) { localization.loadMessages({ cs: { Yes: "Ano", No: "Ne", Cancel: "Zru\u0161it", Clear: "Smazat", Done: "Hotovo", Loading: "Nahr\xe1v\xe1n\xed...", Select: "V\xfdb\u011br...", Search: "Hledat", Back: "Zp\u011bt", OK: "OK", "dxCollectionWidget-noDataText": "\u017d\xe1dn\xe1 data k zobrazen\xed", "dxDropDownEditor-selectLabel": "V\xfdb\u011br", "validation-required": "povinn\xe9", "validation-required-formatted": "{0} je povinn\xfdch", "validation-numeric": "Hodnota mus\xed b\xfdt \u010d\xedslo", "validation-numeric-formatted": "{0} mus\xed b\xfdt \u010d\xedslo", "validation-range": "Hodnota je mimo rozsah", "validation-range-formatted": "{0} je mimo rozsah", "validation-stringLength": "D\xe9lka textov\xe9ho \u0159etezce nen\xed spr\xe1vn\xe1", "validation-stringLength-formatted": "D\xe9lka textu {0} nen\xed spr\xe1vn\xe1", "validation-custom": "Neplatn\xe1 hodnota", "validation-custom-formatted": "{0} je neplatn\xfdch", "validation-async": "Neplatn\xe1 hodnota", "validation-async-formatted": "{0} je neplatn\xfdch", "validation-compare": "Hodnoty se neshoduj\xed", "validation-compare-formatted": "{0} se neshoduje", "validation-pattern": "Hodnota neodpov\xedd\xe1 vzoru", "validation-pattern-formatted": "{0} neodpov\xedd\xe1 vzoru", "validation-email": "Neplatn\xfd email", "validation-email-formatted": "{0} nen\xed platn\xfd", "validation-mask": "Hodnota nen\xed platn\xe1", "dxLookup-searchPlaceholder": "Minim\xe1ln\xed po\u010det znak\u016f: {0}", "dxList-pullingDownText": "St\xe1hn\u011bte dol\u016f pro obnoven\xed...", "dxList-pulledDownText": "Uvoln\u011bte pro obnoven\xed...", "dxList-refreshingText": "Obnovuji...", "dxList-pageLoadingText": "Nahr\xe1v\xe1m...", "dxList-nextButtonText": "V\xedce", "dxList-selectAll": "Vybrat v\u0161e", "dxListEditDecorator-delete": "Smazat", "dxListEditDecorator-more": "V\xedce", "dxScrollView-pullingDownText": "St\xe1hn\u011bte dol\u016f pro obnoven\xed...", "dxScrollView-pulledDownText": "Uvoln\u011bte pro obnoven\xed...", "dxScrollView-refreshingText": "Obnovuji...", "dxScrollView-reachBottomText": "Nahr\xe1v\xe1m...", "dxDateBox-simulatedDataPickerTitleTime": "Vyberte \u010das", "dxDateBox-simulatedDataPickerTitleDate": "Vyberte datum", "dxDateBox-simulatedDataPickerTitleDateTime": "Vyberte datum a \u010das", "dxDateBox-validation-datetime": "Hodnota mus\xed b\xfdt datum nebo \u010das", "dxFileUploader-selectFile": "Vyberte soubor", "dxFileUploader-dropFile": "nebo p\u0159eneste soubor sem", "dxFileUploader-bytes": "byt\u016f", "dxFileUploader-kb": "kb", "dxFileUploader-Mb": "Mb", "dxFileUploader-Gb": "Gb", "dxFileUploader-upload": "Nahr\xe1t", "dxFileUploader-uploaded": "Nahr\xe1no", "dxFileUploader-readyToUpload": "P\u0159ipraveno k nahr\xe1n\xed", "dxFileUploader-uploadFailedMessage": "Nahr\xe1v\xe1n\xed selhalo", "dxFileUploader-invalidFileExtension": "", "dxFileUploader-invalidMaxFileSize": "", "dxFileUploader-invalidMinFileSize": "", "dxRangeSlider-ariaFrom": "Od", "dxRangeSlider-ariaTill": "Do", "dxSwitch-switchedOnText": "ZAP", "dxSwitch-switchedOffText": "VYP", "dxForm-optionalMark": "voliteln\xfd", "dxForm-requiredMessage": "{0} je vy\u017eadov\xe1no", "dxNumberBox-invalidValueMessage": "Hodnota mus\xed b\xfdt \u010d\xedslo", "dxNumberBox-noDataText": "\u017d\xe1dn\xe1 data", "dxDataGrid-columnChooserTitle": "V\xfdb\u011br sloupc\u016f", "dxDataGrid-columnChooserEmptyText": "P\u0159esu\u0148te sloupec zde pro skyt\xed", "dxDataGrid-groupContinuesMessage": "Pokra\u010dovat na dal\u0161\xed stran\u011b", "dxDataGrid-groupContinuedMessage": "Pokra\u010dov\xe1n\xed z p\u0159edchoz\xed strany", "dxDataGrid-groupHeaderText": "Slou\u010dit sloupce", "dxDataGrid-ungroupHeaderText": "Odd\u011blit", "dxDataGrid-ungroupAllText": "Odd\u011blit v\u0161e", "dxDataGrid-editingEditRow": "Upravit", "dxDataGrid-editingSaveRowChanges": "Ulo\u017eit", "dxDataGrid-editingCancelRowChanges": "Zru\u0161it", "dxDataGrid-editingDeleteRow": "Smazat", "dxDataGrid-editingUndeleteRow": "Obnovit", "dxDataGrid-editingConfirmDeleteMessage": "Opravdu chcete smazat tento z\xe1znam?", "dxDataGrid-validationCancelChanges": "Zru\u0161it zm\u011bny", "dxDataGrid-groupPanelEmptyText": "P\u0159eneste hlavi\u010dku sloupce zde pro slou\u010den\xed", "dxDataGrid-noDataText": "\u017d\xe1dn\xe1 data", "dxDataGrid-searchPanelPlaceholder": "Hled\xe1n\xed...", "dxDataGrid-filterRowShowAllText": "(V\u0161e)", "dxDataGrid-filterRowResetOperationText": "Reset", "dxDataGrid-filterRowOperationEquals": "Rovn\xe1 se", "dxDataGrid-filterRowOperationNotEquals": "Nerovn\xe1 se", "dxDataGrid-filterRowOperationLess": "Men\u0161\xed", "dxDataGrid-filterRowOperationLessOrEquals": "Men\u0161\xed nebo rovno", "dxDataGrid-filterRowOperationGreater": "V\u011bt\u0161\xed", "dxDataGrid-filterRowOperationGreaterOrEquals": "V\u011bt\u0161\xed nebo rovno", "dxDataGrid-filterRowOperationStartsWith": "Za\u010d\xedn\xe1 na", "dxDataGrid-filterRowOperationContains": "Obsahuje", "dxDataGrid-filterRowOperationNotContains": "Neobsahuje", "dxDataGrid-filterRowOperationEndsWith": "Kon\u010d\xed na", "dxDataGrid-filterRowOperationBetween": "Mezi", "dxDataGrid-filterRowOperationBetweenStartText": "Za\u010d\xedn\xe1", "dxDataGrid-filterRowOperationBetweenEndText": "Kon\u010d\xed", "dxDataGrid-applyFilterText": "Pou\u017e\xedt filtr", "dxDataGrid-trueText": "Plat\xed", "dxDataGrid-falseText": "Neplat\xed", "dxDataGrid-sortingAscendingText": "Srovnat vzestupn\u011b", "dxDataGrid-sortingDescendingText": "Srovnat sestupn\u011b", "dxDataGrid-sortingClearText": "Zru\u0161it rovn\xe1n\xed", "dxDataGrid-editingSaveAllChanges": "Ulo\u017eit zm\u011bny", "dxDataGrid-editingCancelAllChanges": "Zru\u0161it zm\u011bny", "dxDataGrid-editingAddRow": "P\u0159idat \u0159\xe1dek", "dxDataGrid-summaryMin": "Min: {0}", "dxDataGrid-summaryMinOtherColumn": "Min {1} je {0}", "dxDataGrid-summaryMax": "Max: {0}", "dxDataGrid-summaryMaxOtherColumn": "Max {1} je {0}", "dxDataGrid-summaryAvg": "Pr\u016fm.: {0}", "dxDataGrid-summaryAvgOtherColumn": "Pr\u016fm\u011br ze {1} je {0}", "dxDataGrid-summarySum": "Suma: {0}", "dxDataGrid-summarySumOtherColumn": "Suma {1} je {0}", "dxDataGrid-summaryCount": "Po\u010det: {0}", "dxDataGrid-columnFixingFix": "Uchytit", "dxDataGrid-columnFixingUnfix": "Uvolnit", "dxDataGrid-columnFixingLeftPosition": "Vlevo", "dxDataGrid-columnFixingRightPosition": "Vpravo", "dxDataGrid-exportTo": "Export", "dxDataGrid-exportToExcel": "Export do se\u0161itu Excel", "dxDataGrid-exporting": "Export...", "dxDataGrid-excelFormat": "soubor Excel", "dxDataGrid-selectedRows": "Vybran\xe9 \u0159\xe1dky", "dxDataGrid-exportSelectedRows": "Export vybran\xfdch \u0159\xe1dk\u016f", "dxDataGrid-exportAll": "Exportovat v\u0161echny z\xe1znamy", "dxDataGrid-headerFilterEmptyValue": "(pr\xe1zdn\xe9)", "dxDataGrid-headerFilterOK": "OK", "dxDataGrid-headerFilterCancel": "Zru\u0161it", "dxDataGrid-ariaColumn": "Sloupec", "dxDataGrid-ariaValue": "Hodnota", "dxDataGrid-ariaFilterCell": "Filtrovat bu\u0148ku", "dxDataGrid-ariaCollapse": "Sbalit", "dxDataGrid-ariaExpand": "Rozbalit", "dxDataGrid-ariaDataGrid": "Datov\xe1 m\u0159\xed\u017eka", "dxDataGrid-ariaSearchInGrid": "Hledat v datov\xe9 m\u0159\xed\u017ece", "dxDataGrid-ariaSelectAll": "Vybrat v\u0161e", "dxDataGrid-ariaSelectRow": "Vybrat \u0159\xe1dek", "dxDataGrid-filterBuilderPopupTitle": "Tvorba Filtru", "dxDataGrid-filterPanelCreateFilter": "Vytvo\u0159it Filtr", "dxDataGrid-filterPanelClearFilter": "Smazat", "dxDataGrid-filterPanelFilterEnabledHint": "Povolit Filtr", "dxTreeList-ariaTreeList": "Tree list", "dxTreeList-editingAddRowToNode": "P\u0159idat", "dxPager-infoText": "Strana {0} ze {1} ({2} polo\u017eek)", "dxPager-pagesCountText": "ze", "dxPivotGrid-grandTotal": "Celkem", "dxPivotGrid-total": "{0} Celkem", "dxPivotGrid-fieldChooserTitle": "V\xfdb\u011br pole", "dxPivotGrid-showFieldChooser": "Zobrazit v\xfdb\u011br pole", "dxPivotGrid-expandAll": "Rozbalit v\u0161e", "dxPivotGrid-collapseAll": "Sbalit v\u0161e", "dxPivotGrid-sortColumnBySummary": 'Srovnat "{0}" podle tohoto sloupce', "dxPivotGrid-sortRowBySummary": 'Srovnat "{0}" podle tohoto \u0159\xe1dku', "dxPivotGrid-removeAllSorting": "Odstranit ve\u0161ker\xe9 t\u0159\xedd\u011bn\xed", "dxPivotGrid-dataNotAvailable": "nedostupn\xe9", "dxPivotGrid-rowFields": "Pole \u0159\xe1dk\u016f", "dxPivotGrid-columnFields": "Pole sloupc\u016f", "dxPivotGrid-dataFields": "Pole dat", "dxPivotGrid-filterFields": "Filtrovat pole", "dxPivotGrid-allFields": "V\u0161echna pole", "dxPivotGrid-columnFieldArea": "Zde vlo\u017ete pole sloupc\u016f", "dxPivotGrid-dataFieldArea": "Zde vlo\u017ete pole dat", "dxPivotGrid-rowFieldArea": "Zde vlo\u017ete pole \u0159\xe1dk\u016f", "dxPivotGrid-filterFieldArea": "Zde vlo\u017ete filtr pole", "dxScheduler-editorLabelTitle": "P\u0159edm\u011bt", "dxScheduler-editorLabelStartDate": "Po\u010d\xe1te\u010dn\xed datum", "dxScheduler-editorLabelEndDate": "Koncov\xe9 datum", "dxScheduler-editorLabelDescription": "Popis", "dxScheduler-editorLabelRecurrence": "Opakovat", "dxScheduler-openAppointment": "Otev\u0159\xedt sch\u016fzku", "dxScheduler-recurrenceNever": "Nikdy", "dxScheduler-recurrenceDaily": "Denn\u011b", "dxScheduler-recurrenceWeekly": "T\xfddn\u011b", "dxScheduler-recurrenceMonthly": "M\u011bs\xed\u010dn\u011b", "dxScheduler-recurrenceYearly": "Ro\u010dn\u011b", "dxScheduler-recurrenceRepeatEvery": "Ka\u017ed\xfd", "dxScheduler-recurrenceRepeatOn": "Repeat On", "dxScheduler-recurrenceEnd": "Konec opakov\xe1n\xed", "dxScheduler-recurrenceAfter": "Po", "dxScheduler-recurrenceOn": "Zap", "dxScheduler-recurrenceRepeatDaily": "dn\xed", "dxScheduler-recurrenceRepeatWeekly": "t\xfddn\u016f", "dxScheduler-recurrenceRepeatMonthly": "m\u011bs\xedc\u016f", "dxScheduler-recurrenceRepeatYearly": "rok\u016f", "dxScheduler-switcherDay": "Den", "dxScheduler-switcherWeek": "T\xfdden", "dxScheduler-switcherWorkWeek": "Pracovn\xed t\xfdden", "dxScheduler-switcherMonth": "M\u011bs\xedc", "dxScheduler-switcherAgenda": "Agenda", "dxScheduler-switcherTimelineDay": "\u010casov\xe1 osa den", "dxScheduler-switcherTimelineWeek": "\u010casov\xe1 osa t\xfdden", "dxScheduler-switcherTimelineWorkWeek": "\u010casov\xe1 osa pracovn\xed t\xfdden", "dxScheduler-switcherTimelineMonth": "\u010casov\xe1 osa m\u011bs\xedc", "dxScheduler-recurrenceRepeatOnDate": "na den", "dxScheduler-recurrenceRepeatCount": "v\xfdskyt\u016f", "dxScheduler-allDay": "Cel\xfd den", "dxScheduler-confirmRecurrenceEditMessage": "Chcete upravit pouze tuto sch\u016fzku nebo celou s\xe9rii?", "dxScheduler-confirmRecurrenceDeleteMessage": "Chcete smazat pouze tuto sch\u016fzku nebo celou s\xe9rii?", "dxScheduler-confirmRecurrenceEditSeries": "Upravit s\xe9rii", "dxScheduler-confirmRecurrenceDeleteSeries": "Smazat s\xe9rii", "dxScheduler-confirmRecurrenceEditOccurrence": "Upravit sch\u016fzku", "dxScheduler-confirmRecurrenceDeleteOccurrence": "Smazat sch\u016fzku", "dxScheduler-noTimezoneTitle": "Bez \u010dasov\xe9 z\xf3ny", "dxScheduler-moreAppointments": "{0} nav\xedc", "dxCalendar-todayButtonText": "Dnes", "dxCalendar-ariaWidgetName": "Kalend\xe1\u0159", "dxColorView-ariaRed": "\u010cerven\xe1", "dxColorView-ariaGreen": "Zelen\xe1", "dxColorView-ariaBlue": "Modr\xe1", "dxColorView-ariaAlpha": "Pr\u016fhledn\xe1", "dxColorView-ariaHex": "K\xf3d barvy", "dxTagBox-selected": "{0} vybr\xe1no", "dxTagBox-allSelected": "V\u0161e vybr\xe1no ({0})", "dxTagBox-moreSelected": "{0} nav\xedc", "vizExport-printingButtonText": "Tisk", "vizExport-titleMenuText": "Export/import", "vizExport-exportButtonText": "{0} soubor\u016f", "dxFilterBuilder-and": "A", "dxFilterBuilder-or": "NEBO", "dxFilterBuilder-notAnd": "NAND", "dxFilterBuilder-notOr": "NOR", "dxFilterBuilder-addCondition": "P\u0159idat podm\xednku", "dxFilterBuilder-addGroup": "P\u0159idat skupinu", "dxFilterBuilder-enterValueText": "<vlo\u017ete hodnotu>", "dxFilterBuilder-filterOperationEquals": "Rovn\xe1 se", "dxFilterBuilder-filterOperationNotEquals": "Nerovn\xe1 se", "dxFilterBuilder-filterOperationLess": "Men\u0161\xed ne\u017e", "dxFilterBuilder-filterOperationLessOrEquals": "Men\u0161\xed nebo rovno ne\u017e", "dxFilterBuilder-filterOperationGreater": "V\u011bt\u0161\xed ne\u017e", "dxFilterBuilder-filterOperationGreaterOrEquals": "V\u011bt\u0161\xed nebo rovno ne\u017e", "dxFilterBuilder-filterOperationStartsWith": "Za\u010d\xedn\xe1 na", "dxFilterBuilder-filterOperationContains": "Obsahuje", "dxFilterBuilder-filterOperationNotContains": "Neobsahuje", "dxFilterBuilder-filterOperationEndsWith": "Kon\u010d\xed na", "dxFilterBuilder-filterOperationIsBlank": "Je pr\xe1zdn\xe9", "dxFilterBuilder-filterOperationIsNotBlank": "Nen\xed pr\xe1zdn\xe9", "dxFilterBuilder-filterOperationBetween": "Mezi", "dxFilterBuilder-filterOperationAnyOf": "Libovoln\xfd z", "dxFilterBuilder-filterOperationNoneOf": "\u017d\xe1dn\xfd z", "dxHtmlEditor-dialogColorCaption": "!TODO!", "dxHtmlEditor-dialogBackgroundCaption": "!TODO!", "dxHtmlEditor-dialogLinkCaption": "!TODO!", "dxHtmlEditor-dialogLinkUrlField": "!TODO!", "dxHtmlEditor-dialogLinkTextField": "!TODO!", "dxHtmlEditor-dialogLinkTargetField": "!TODO!", "dxHtmlEditor-dialogImageCaption": "!TODO!", "dxHtmlEditor-dialogImageUrlField": "!TODO!", "dxHtmlEditor-dialogImageAltField": "!TODO!", "dxHtmlEditor-dialogImageWidthField": "!TODO!", "dxHtmlEditor-dialogImageHeightField": "!TODO!", "dxHtmlEditor-heading": "!TODO!", "dxHtmlEditor-normalText": "!TODO!", "dxFileManager-newDirectoryName": "TODO", "dxFileManager-rootDirectoryName": "TODO", "dxFileManager-errorNoAccess": "TODO", "dxFileManager-errorDirectoryExistsFormat": "TODO", "dxFileManager-errorFileExistsFormat": "TODO", "dxFileManager-errorFileNotFoundFormat": "TODO", "dxFileManager-errorDirectoryNotFoundFormat": "TODO", "dxFileManager-errorWrongFileExtension": "TODO", "dxFileManager-errorMaxFileSizeExceeded": "TODO", "dxFileManager-errorInvalidSymbols": "TODO", "dxFileManager-errorDefault": "TODO", "dxDiagram-categoryGeneral": "TODO", "dxDiagram-categoryFlowchart": "TODO", "dxDiagram-categoryOrgChart": "TODO", "dxDiagram-categoryContainers": "TODO", "dxDiagram-categoryCustom": "TODO", "dxDiagram-commandProperties": "TODO", "dxDiagram-commandExport": "TODO", "dxDiagram-commandExportToSvg": "TODO", "dxDiagram-commandExportToPng": "TODO", "dxDiagram-commandExportToJpg": "TODO", "dxDiagram-commandUndo": "TODO", "dxDiagram-commandRedo": "TODO", "dxDiagram-commandFontName": "TODO", "dxDiagram-commandFontSize": "TODO", "dxDiagram-commandBold": "TODO", "dxDiagram-commandItalic": "TODO", "dxDiagram-commandUnderline": "TODO", "dxDiagram-commandTextColor": "TODO", "dxDiagram-commandLineColor": "TODO", "dxDiagram-commandFillColor": "TODO", "dxDiagram-commandAlignLeft": "TODO", "dxDiagram-commandAlignCenter": "TODO", "dxDiagram-commandAlignRight": "TODO", "dxDiagram-commandConnectorLineType": "TODO", "dxDiagram-commandConnectorLineStraight": "TODO", "dxDiagram-commandConnectorLineOrthogonal": "TODO", "dxDiagram-commandConnectorLineStart": "TODO", "dxDiagram-commandConnectorLineEnd": "TODO", "dxDiagram-commandConnectorLineNone": "TODO", "dxDiagram-commandConnectorLineArrow": "TODO", "dxDiagram-commandAutoLayout": "TODO", "dxDiagram-commandAutoLayoutTree": "TODO", "dxDiagram-commandAutoLayoutLayered": "TODO", "dxDiagram-commandAutoLayoutHorizontal": "TODO", "dxDiagram-commandAutoLayoutVertical": "TODO", "dxDiagram-commandFullscreen": "TODO", "dxDiagram-commandUnits": "TODO", "dxDiagram-commandPageSize": "TODO", "dxDiagram-commandPageOrientation": "TODO", "dxDiagram-commandPageOrientationLandscape": "TODO", "dxDiagram-commandPageOrientationPortrait": "TODO", "dxDiagram-commandPageColor": "TODO", "dxDiagram-commandShowGrid": "TODO", "dxDiagram-commandSnapToGrid": "TODO", "dxDiagram-commandGridSize": "TODO", "dxDiagram-commandZoomLevel": "TODO", "dxDiagram-commandAutoZoom": "TODO", "dxDiagram-commandSimpleView": "TODO", "dxDiagram-commandCut": "TODO", "dxDiagram-commandCopy": "TODO", "dxDiagram-commandPaste": "TODO", "dxDiagram-commandSelectAll": "TODO", "dxDiagram-commandDelete": "TODO", "dxDiagram-commandBringToFront": "TODO", "dxDiagram-commandSendToBack": "TODO", "dxDiagram-commandLock": "TODO", "dxDiagram-commandUnlock": "TODO", "dxDiagram-commandInsertShapeImage": "TODO", "dxDiagram-commandEditShapeImage": "TODO", "dxDiagram-commandDeleteShapeImage": "TODO", "dxDiagram-unitIn": "TODO", "dxDiagram-unitCm": "TODO", "dxDiagram-unitPx": "TODO", "dxDiagram-dialogButtonOK": "TODO", "dxDiagram-dialogButtonCancel": "TODO", "dxDiagram-dialogInsertShapeImageTitle": "TODO", "dxDiagram-dialogEditShapeImageTitle": "TODO", "dxDiagram-dialogEditShapeImageSelectButton": "TODO", "dxDiagram-dialogEditShapeImageLabelText": "TODO" } }) });
'use strict'; var path = require('path'); var neatPaths = require('node-neat').includePaths; var neat; neatPaths.forEach(function(p) { neat += '&includePaths[]=' + p; }); module.exports = function(config) { config.set({ basePath: '', frameworks: ['jasmine'], files: [ 'test/helpers/pack/**/*.js', 'test/helpers/react/**/*.js', 'test/spec/components/**/*.js' //'test/spec/stores/**/*.js', //'test/spec/actions/**/*.js' ], preprocessors: { 'test/helpers/createComponent.js': ['webpack'], 'test/spec/components/**/*.js': ['webpack'], 'test/spec/components/**/*.jsx': ['webpack'], 'test/spec/stores/**/*.js': ['webpack'], 'test/spec/actions/**/*.js': ['webpack'] }, webpack: { cache: true, module: { loaders: [{ test: /\.gif/, loader: 'url-loader?limit=10000&mimetype=image/gif' }, { test: /\.jpg/, loader: 'url-loader?limit=10000&mimetype=image/jpg' }, { test: /\.png/, loader: 'url-loader?limit=10000&mimetype=image/png' }, { test: /\.(js|jsx)$/, loader: 'babel-loader', exclude: /node_modules/ }, { test: /\.scss/, loader: 'style-loader!css-loader!sass-loader?outputStyle=expanded' + neat }, { test: /\.css$/, loader: 'style-loader!css-loader' }, { test: /\.woff/, loader: 'url-loader?limit=10000&mimetype=application/font-woff' }, { test: /\.woff2/, loader: 'url-loader?limit=10000&mimetype=application/font-woff2' }] }, resolve: { alias: { 'styles': path.join(process.cwd(), './src/styles/'), 'components': path.join(process.cwd(), './src/components/'), 'stores': '../../../src/stores/', 'actions': '../../../src/actions/', 'helpers': path.join(process.cwd(), './test/helpers/') } } }, webpackMiddleware: { noInfo: true, stats: { colors: true } }, exclude: [], port: 8080, logLevel: config.LOG_INFO, colors: true, autoWatch: false, browsers: ['PhantomJS'], reporters: ['dots'], captureTimeout: 60000, singleRun: true, plugins: [ require('karma-webpack'), require('karma-jasmine'), require('karma-phantomjs-launcher') ] }); };
function ff1(ctx) { ctx.fillStyle='#f2cc99'; ctx.beginPath(); ctx.moveTo(69.000000,18.000000); ctx.lineTo(82.000000,8.000000); ctx.lineTo(99.000000,3.000000); ctx.lineTo(118.000000,5.000000); ctx.lineTo(135.000000,12.000000); ctx.lineTo(149.000000,21.000000); ctx.lineTo(156.000000,13.000000); ctx.lineTo(165.000000,9.000000); ctx.lineTo(177.000000,13.000000); ctx.lineTo(183.000000,28.000000); ctx.lineTo(180.000000,50.000000); ctx.lineTo(164.000000,91.000000); ctx.lineTo(155.000000,107.000000); ctx.lineTo(154.000000,114.000000); ctx.lineTo(151.000000,121.000000); ctx.lineTo(141.000000,127.000000); ctx.lineTo(139.000000,136.000000); ctx.lineTo(155.000000,206.000000); ctx.lineTo(157.000000,251.000000); ctx.lineTo(126.000000,342.000000); ctx.lineTo(133.000000,357.000000); ctx.lineTo(128.000000,376.000000); ctx.lineTo(83.000000,376.000000); ctx.lineTo(75.000000,368.000000); ctx.lineTo(67.000000,350.000000); ctx.lineTo(61.000000,350.000000); ctx.lineTo(53.000000,369.000000); ctx.lineTo(4.000000,369.000000); ctx.lineTo(2.000000,361.000000); ctx.lineTo(5.000000,354.000000); ctx.lineTo(12.000000,342.000000); ctx.lineTo(16.000000,321.000000); ctx.lineTo(4.000000,257.000000); ctx.lineTo(4.000000,244.000000); ctx.lineTo(7.000000,218.000000); ctx.lineTo(9.000000,179.000000); ctx.lineTo(26.000000,127.000000); ctx.lineTo(43.000000,93.000000); ctx.lineTo(32.000000,77.000000); ctx.lineTo(30.000000,70.000000); ctx.lineTo(24.000000,67.000000); ctx.lineTo(16.000000,49.000000); ctx.lineTo(17.000000,35.000000); ctx.lineTo(18.000000,23.000000); ctx.lineTo(30.000000,12.000000); ctx.lineTo(40.000000,7.000000); ctx.lineTo(53.000000,7.000000); ctx.lineTo(62.000000,12.000000); ctx.lineTo(69.000000,18.000000); ctx.fill(); ctx.fillStyle='#e5b27f'; ctx.beginPath(); ctx.moveTo(142.000000,79.000000); ctx.lineTo(136.000000,74.000000); ctx.lineTo(138.000000,82.000000); ctx.lineTo(133.000000,78.000000); ctx.lineTo(133.000000,84.000000); ctx.lineTo(127.000000,78.000000); ctx.lineTo(128.000000,85.000000); ctx.lineTo(124.000000,80.000000); ctx.lineTo(125.000000,87.000000); ctx.lineTo(119.000000,82.000000); ctx.lineTo(119.000000,90.000000); ctx.lineTo(125.000000,99.000000); ctx.lineTo(125.000000,96.000000); ctx.lineTo(128.000000,100.000000); ctx.lineTo(128.000000,94.000000); ctx.lineTo(131.000000,98.000000); ctx.lineTo(132.000000,93.000000); ctx.lineTo(135.000000,97.000000); ctx.lineTo(136.000000,93.000000); ctx.lineTo(138.000000,97.000000); ctx.lineTo(139.000000,94.000000); ctx.lineTo(141.000000,98.000000); ctx.lineTo(143.000000,94.000000); ctx.lineTo(144.000000,85.000000); ctx.lineTo(142.000000,79.000000); ctx.fill(); ctx.fillStyle='#eb8080'; ctx.beginPath(); ctx.moveTo(127.000000,101.000000); ctx.lineTo(132.000000,100.000000); ctx.lineTo(137.000000,99.000000); ctx.lineTo(144.000000,101.000000); ctx.lineTo(143.000000,105.000000); ctx.lineTo(135.000000,110.000000); ctx.lineTo(127.000000,101.000000); ctx.fill(); ctx.fillStyle='#f2cc99'; ctx.beginPath(); ctx.moveTo(178.000000,229.000000); ctx.lineTo(157.000000,248.000000); ctx.lineTo(139.000000,296.000000); ctx.lineTo(126.000000,349.000000); ctx.lineTo(137.000000,356.000000); ctx.lineTo(158.000000,357.000000); ctx.lineTo(183.000000,342.000000); ctx.lineTo(212.000000,332.000000); ctx.lineTo(235.000000,288.000000); ctx.lineTo(235.000000,261.000000); ctx.lineTo(228.000000,252.000000); ctx.lineTo(212.000000,250.000000); ctx.lineTo(188.000000,251.000000); ctx.lineTo(178.000000,229.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(56.000000,229.000000); ctx.lineTo(48.000000,241.000000); ctx.lineTo(48.000000,250.000000); ctx.lineTo(57.000000,281.000000); ctx.lineTo(63.000000,325.000000); ctx.lineTo(71.000000,338.000000); ctx.lineTo(81.000000,315.000000); ctx.lineTo(76.000000,321.000000); ctx.lineTo(79.000000,311.000000); ctx.lineTo(83.000000,301.000000); ctx.lineTo(75.000000,308.000000); ctx.lineTo(80.000000,298.000000); ctx.lineTo(73.000000,303.000000); ctx.lineTo(76.000000,296.000000); ctx.lineTo(71.000000,298.000000); ctx.lineTo(74.000000,292.000000); ctx.lineTo(69.000000,293.000000); ctx.lineTo(74.000000,284.000000); ctx.lineTo(78.000000,278.000000); ctx.lineTo(71.000000,278.000000); ctx.lineTo(74.000000,274.000000); ctx.lineTo(68.000000,273.000000); ctx.lineTo(70.000000,268.000000); ctx.lineTo(66.000000,267.000000); ctx.lineTo(68.000000,261.000000); ctx.lineTo(60.000000,266.000000); ctx.lineTo(62.000000,259.000000); ctx.lineTo(65.000000,253.000000); ctx.lineTo(57.000000,258.000000); ctx.lineTo(59.000000,251.000000); ctx.lineTo(55.000000,254.000000); ctx.lineTo(55.000000,248.000000); ctx.lineTo(60.000000,237.000000); ctx.lineTo(54.000000,240.000000); ctx.lineTo(58.000000,234.000000); ctx.lineTo(54.000000,236.000000); ctx.lineTo(56.000000,229.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(74.000000,363.000000); ctx.lineTo(79.000000,368.000000); ctx.lineTo(81.000000,368.000000); ctx.lineTo(85.000000,362.000000); ctx.lineTo(89.000000,363.000000); ctx.lineTo(92.000000,370.000000); ctx.lineTo(96.000000,373.000000); ctx.lineTo(101.000000,372.000000); ctx.lineTo(108.000000,361.000000); ctx.lineTo(110.000000,371.000000); ctx.lineTo(113.000000,373.000000); ctx.lineTo(116.000000,371.000000); ctx.lineTo(120.000000,358.000000); ctx.lineTo(122.000000,363.000000); ctx.lineTo(123.000000,371.000000); ctx.lineTo(126.000000,371.000000); ctx.lineTo(129.000000,367.000000); ctx.lineTo(132.000000,357.000000); ctx.lineTo(135.000000,361.000000); ctx.lineTo(130.000000,376.000000); ctx.lineTo(127.000000,377.000000); ctx.lineTo(94.000000,378.000000); ctx.lineTo(84.000000,376.000000); ctx.lineTo(76.000000,371.000000); ctx.lineTo(74.000000,363.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(212.000000,250.000000); ctx.lineTo(219.000000,251.000000); ctx.lineTo(228.000000,258.000000); ctx.lineTo(236.000000,270.000000); ctx.lineTo(235.000000,287.000000); ctx.lineTo(225.000000,304.000000); ctx.lineTo(205.000000,332.000000); ctx.lineTo(177.000000,343.000000); ctx.lineTo(171.000000,352.000000); ctx.lineTo(158.000000,357.000000); ctx.lineTo(166.000000,352.000000); ctx.lineTo(168.000000,346.000000); ctx.lineTo(168.000000,339.000000); ctx.lineTo(165.000000,333.000000); ctx.lineTo(155.000000,327.000000); ctx.lineTo(155.000000,323.000000); ctx.lineTo(161.000000,320.000000); ctx.lineTo(165.000000,316.000000); ctx.lineTo(169.000000,316.000000); ctx.lineTo(167.000000,312.000000); ctx.lineTo(171.000000,313.000000); ctx.lineTo(168.000000,308.000000); ctx.lineTo(173.000000,309.000000); ctx.lineTo(170.000000,306.000000); ctx.lineTo(177.000000,306.000000); ctx.lineTo(175.000000,308.000000); ctx.lineTo(177.000000,311.000000); ctx.lineTo(174.000000,311.000000); ctx.lineTo(176.000000,316.000000); ctx.lineTo(171.000000,315.000000); ctx.lineTo(174.000000,319.000000); ctx.lineTo(168.000000,320.000000); ctx.lineTo(168.000000,323.000000); ctx.lineTo(175.000000,327.000000); ctx.lineTo(179.000000,332.000000); ctx.lineTo(183.000000,326.000000); ctx.lineTo(184.000000,332.000000); ctx.lineTo(189.000000,323.000000); ctx.lineTo(190.000000,328.000000); ctx.lineTo(194.000000,320.000000); ctx.lineTo(194.000000,325.000000); ctx.lineTo(199.000000,316.000000); ctx.lineTo(201.000000,320.000000); ctx.lineTo(204.000000,313.000000); ctx.lineTo(206.000000,316.000000); ctx.lineTo(208.000000,310.000000); ctx.lineTo(211.000000,305.000000); ctx.lineTo(219.000000,298.000000); ctx.lineTo(226.000000,288.000000); ctx.lineTo(229.000000,279.000000); ctx.lineTo(228.000000,266.000000); ctx.lineTo(224.000000,259.000000); ctx.lineTo(217.000000,253.000000); ctx.lineTo(212.000000,250.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(151.000000,205.000000); ctx.lineTo(151.000000,238.000000); ctx.lineTo(149.000000,252.000000); ctx.lineTo(141.000000,268.000000); ctx.lineTo(128.000000,282.000000); ctx.lineTo(121.000000,301.000000); ctx.lineTo(130.000000,300.000000); ctx.lineTo(126.000000,313.000000); ctx.lineTo(118.000000,324.000000); ctx.lineTo(116.000000,337.000000); ctx.lineTo(120.000000,346.000000); ctx.lineTo(133.000000,352.000000); ctx.lineTo(133.000000,340.000000); ctx.lineTo(137.000000,333.000000); ctx.lineTo(145.000000,329.000000); ctx.lineTo(156.000000,327.000000); ctx.lineTo(153.000000,319.000000); ctx.lineTo(153.000000,291.000000); ctx.lineTo(157.000000,271.000000); ctx.lineTo(170.000000,259.000000); ctx.lineTo(178.000000,277.000000); ctx.lineTo(193.000000,250.000000); ctx.lineTo(174.000000,216.000000); ctx.lineTo(151.000000,205.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(78.000000,127.000000); ctx.lineTo(90.000000,142.000000); ctx.lineTo(95.000000,155.000000); ctx.lineTo(108.000000,164.000000); ctx.lineTo(125.000000,167.000000); ctx.lineTo(139.000000,175.000000); ctx.lineTo(150.000000,206.000000); ctx.lineTo(152.000000,191.000000); ctx.lineTo(141.000000,140.000000); ctx.lineTo(121.000000,148.000000); ctx.lineTo(100.000000,136.000000); ctx.lineTo(78.000000,127.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(21.000000,58.000000); ctx.lineTo(35.000000,63.000000); ctx.lineTo(38.000000,68.000000); ctx.lineTo(32.000000,69.000000); ctx.lineTo(42.000000,74.000000); ctx.lineTo(40.000000,79.000000); ctx.lineTo(47.000000,80.000000); ctx.lineTo(54.000000,83.000000); ctx.lineTo(45.000000,94.000000); ctx.lineTo(34.000000,81.000000); ctx.lineTo(32.000000,73.000000); ctx.lineTo(24.000000,66.000000); ctx.lineTo(21.000000,58.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(71.000000,34.000000); ctx.lineTo(67.000000,34.000000); ctx.lineTo(66.000000,27.000000); ctx.lineTo(59.000000,24.000000); ctx.lineTo(54.000000,17.000000); ctx.lineTo(48.000000,17.000000); ctx.lineTo(39.000000,22.000000); ctx.lineTo(30.000000,26.000000); ctx.lineTo(28.000000,31.000000); ctx.lineTo(31.000000,39.000000); ctx.lineTo(38.000000,46.000000); ctx.lineTo(29.000000,45.000000); ctx.lineTo(36.000000,54.000000); ctx.lineTo(41.000000,61.000000); ctx.lineTo(41.000000,70.000000); ctx.lineTo(50.000000,69.000000); ctx.lineTo(54.000000,71.000000); ctx.lineTo(55.000000,58.000000); ctx.lineTo(67.000000,52.000000); ctx.lineTo(76.000000,43.000000); ctx.lineTo(76.000000,39.000000); ctx.lineTo(68.000000,44.000000); ctx.lineTo(71.000000,34.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(139.000000,74.000000); ctx.lineTo(141.000000,83.000000); ctx.lineTo(143.000000,89.000000); ctx.lineTo(144.000000,104.000000); ctx.lineTo(148.000000,104.000000); ctx.lineTo(155.000000,106.000000); ctx.lineTo(154.000000,86.000000); ctx.lineTo(157.000000,77.000000); ctx.lineTo(155.000000,72.000000); ctx.lineTo(150.000000,77.000000); ctx.lineTo(144.000000,77.000000); ctx.lineTo(139.000000,74.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(105.000000,44.000000); ctx.lineTo(102.000000,53.000000); ctx.lineTo(108.000000,58.000000); ctx.lineTo(111.000000,62.000000); ctx.lineTo(112.000000,55.000000); ctx.lineTo(105.000000,44.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(141.000000,48.000000); ctx.lineTo(141.000000,54.000000); ctx.lineTo(144.000000,58.000000); ctx.lineTo(139.000000,62.000000); ctx.lineTo(137.000000,66.000000); ctx.lineTo(136.000000,59.000000); ctx.lineTo(137.000000,52.000000); ctx.lineTo(141.000000,48.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(98.000000,135.000000); ctx.lineTo(104.000000,130.000000); ctx.lineTo(105.000000,134.000000); ctx.lineTo(108.000000,132.000000); ctx.lineTo(108.000000,135.000000); ctx.lineTo(112.000000,134.000000); ctx.lineTo(113.000000,137.000000); ctx.lineTo(116.000000,136.000000); ctx.lineTo(116.000000,139.000000); ctx.lineTo(119.000000,139.000000); ctx.lineTo(124.000000,141.000000); ctx.lineTo(128.000000,140.000000); ctx.lineTo(133.000000,138.000000); ctx.lineTo(140.000000,133.000000); ctx.lineTo(139.000000,140.000000); ctx.lineTo(126.000000,146.000000); ctx.lineTo(104.000000,144.000000); ctx.lineTo(98.000000,135.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(97.000000,116.000000); ctx.lineTo(103.000000,119.000000); ctx.lineTo(103.000000,116.000000); ctx.lineTo(111.000000,118.000000); ctx.lineTo(116.000000,117.000000); ctx.lineTo(122.000000,114.000000); ctx.lineTo(127.000000,107.000000); ctx.lineTo(135.000000,111.000000); ctx.lineTo(142.000000,107.000000); ctx.lineTo(141.000000,114.000000); ctx.lineTo(145.000000,118.000000); ctx.lineTo(149.000000,121.000000); ctx.lineTo(145.000000,125.000000); ctx.lineTo(140.000000,124.000000); ctx.lineTo(127.000000,121.000000); ctx.lineTo(113.000000,125.000000); ctx.lineTo(100.000000,124.000000); ctx.lineTo(97.000000,116.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(147.000000,33.000000); ctx.lineTo(152.000000,35.000000); ctx.lineTo(157.000000,34.000000); ctx.lineTo(153.000000,31.000000); ctx.lineTo(160.000000,31.000000); ctx.lineTo(156.000000,28.000000); ctx.lineTo(161.000000,28.000000); ctx.lineTo(159.000000,24.000000); ctx.lineTo(163.000000,25.000000); ctx.lineTo(163.000000,21.000000); ctx.lineTo(165.000000,22.000000); ctx.lineTo(170.000000,23.000000); ctx.lineTo(167.000000,17.000000); ctx.lineTo(172.000000,21.000000); ctx.lineTo(174.000000,18.000000); ctx.lineTo(175.000000,23.000000); ctx.lineTo(176.000000,22.000000); ctx.lineTo(177.000000,28.000000); ctx.lineTo(177.000000,33.000000); ctx.lineTo(174.000000,37.000000); ctx.lineTo(176.000000,39.000000); ctx.lineTo(174.000000,44.000000); ctx.lineTo(171.000000,49.000000); ctx.lineTo(168.000000,53.000000); ctx.lineTo(164.000000,57.000000); ctx.lineTo(159.000000,68.000000); ctx.lineTo(156.000000,70.000000); ctx.lineTo(154.000000,60.000000); ctx.lineTo(150.000000,51.000000); ctx.lineTo(146.000000,43.000000); ctx.lineTo(144.000000,35.000000); ctx.lineTo(147.000000,33.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(85.000000,72.000000); ctx.lineTo(89.000000,74.000000); ctx.lineTo(93.000000,75.000000); ctx.lineTo(100.000000,76.000000); ctx.lineTo(105.000000,75.000000); ctx.lineTo(102.000000,79.000000); ctx.lineTo(94.000000,79.000000); ctx.lineTo(88.000000,76.000000); ctx.lineTo(85.000000,72.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(86.000000,214.000000); ctx.lineTo(79.000000,221.000000); ctx.lineTo(76.000000,232.000000); ctx.lineTo(82.000000,225.000000); ctx.lineTo(78.000000,239.000000); ctx.lineTo(82.000000,234.000000); ctx.lineTo(78.000000,245.000000); ctx.lineTo(81.000000,243.000000); ctx.lineTo(79.000000,255.000000); ctx.lineTo(84.000000,250.000000); ctx.lineTo(84.000000,267.000000); ctx.lineTo(87.000000,254.000000); ctx.lineTo(90.000000,271.000000); ctx.lineTo(90.000000,257.000000); ctx.lineTo(95.000000,271.000000); ctx.lineTo(93.000000,256.000000); ctx.lineTo(95.000000,249.000000); ctx.lineTo(92.000000,252.000000); ctx.lineTo(93.000000,243.000000); ctx.lineTo(89.000000,253.000000); ctx.lineTo(89.000000,241.000000); ctx.lineTo(86.000000,250.000000); ctx.lineTo(87.000000,236.000000); ctx.lineTo(83.000000,245.000000); ctx.lineTo(87.000000,231.000000); ctx.lineTo(82.000000,231.000000); ctx.lineTo(90.000000,219.000000); ctx.lineTo(84.000000,221.000000); ctx.lineTo(86.000000,214.000000); ctx.fill(); ctx.fillStyle='#ffcc7f'; ctx.beginPath(); ctx.moveTo(93.000000,68.000000); ctx.lineTo(96.000000,72.000000); ctx.lineTo(100.000000,73.000000); ctx.lineTo(106.000000,72.000000); ctx.lineTo(108.000000,66.000000); ctx.lineTo(105.000000,63.000000); ctx.lineTo(100.000000,62.000000); ctx.lineTo(93.000000,68.000000); ctx.fill(); ctx.fillStyle='#ffcc7f'; ctx.beginPath(); ctx.moveTo(144.000000,64.000000); ctx.lineTo(142.000000,68.000000); ctx.lineTo(142.000000,73.000000); ctx.lineTo(146.000000,74.000000); ctx.lineTo(150.000000,73.000000); ctx.lineTo(154.000000,64.000000); ctx.lineTo(149.000000,62.000000); ctx.lineTo(144.000000,64.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(57.000000,91.000000); ctx.lineTo(42.000000,111.000000); ctx.lineTo(52.000000,105.000000); ctx.lineTo(41.000000,117.000000); ctx.lineTo(53.000000,112.000000); ctx.lineTo(46.000000,120.000000); ctx.lineTo(53.000000,116.000000); ctx.lineTo(50.000000,124.000000); ctx.lineTo(57.000000,119.000000); ctx.lineTo(55.000000,127.000000); ctx.lineTo(61.000000,122.000000); ctx.lineTo(60.000000,130.000000); ctx.lineTo(67.000000,126.000000); ctx.lineTo(66.000000,134.000000); ctx.lineTo(71.000000,129.000000); ctx.lineTo(72.000000,136.000000); ctx.lineTo(77.000000,130.000000); ctx.lineTo(76.000000,137.000000); ctx.lineTo(80.000000,133.000000); ctx.lineTo(82.000000,138.000000); ctx.lineTo(86.000000,135.000000); ctx.lineTo(96.000000,135.000000); ctx.lineTo(94.000000,129.000000); ctx.lineTo(86.000000,124.000000); ctx.lineTo(83.000000,117.000000); ctx.lineTo(77.000000,123.000000); ctx.lineTo(79.000000,117.000000); ctx.lineTo(73.000000,120.000000); ctx.lineTo(75.000000,112.000000); ctx.lineTo(68.000000,116.000000); ctx.lineTo(71.000000,111.000000); ctx.lineTo(65.000000,114.000000); ctx.lineTo(69.000000,107.000000); ctx.lineTo(63.000000,110.000000); ctx.lineTo(68.000000,102.000000); ctx.lineTo(61.000000,107.000000); ctx.lineTo(66.000000,98.000000); ctx.lineTo(61.000000,103.000000); ctx.lineTo(63.000000,97.000000); ctx.lineTo(57.000000,99.000000); ctx.lineTo(57.000000,91.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(83.000000,79.000000); ctx.lineTo(76.000000,79.000000); ctx.lineTo(67.000000,82.000000); ctx.lineTo(75.000000,83.000000); ctx.lineTo(65.000000,88.000000); ctx.lineTo(76.000000,87.000000); ctx.lineTo(65.000000,92.000000); ctx.lineTo(76.000000,91.000000); ctx.lineTo(68.000000,96.000000); ctx.lineTo(77.000000,95.000000); ctx.lineTo(70.000000,99.000000); ctx.lineTo(80.000000,98.000000); ctx.lineTo(72.000000,104.000000); ctx.lineTo(80.000000,102.000000); ctx.lineTo(76.000000,108.000000); ctx.lineTo(85.000000,103.000000); ctx.lineTo(92.000000,101.000000); ctx.lineTo(87.000000,98.000000); ctx.lineTo(93.000000,96.000000); ctx.lineTo(86.000000,94.000000); ctx.lineTo(91.000000,93.000000); ctx.lineTo(85.000000,91.000000); ctx.lineTo(93.000000,89.000000); ctx.lineTo(99.000000,89.000000); ctx.lineTo(105.000000,93.000000); ctx.lineTo(107.000000,85.000000); ctx.lineTo(102.000000,82.000000); ctx.lineTo(92.000000,80.000000); ctx.lineTo(83.000000,79.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(109.000000,77.000000); ctx.lineTo(111.000000,83.000000); ctx.lineTo(109.000000,89.000000); ctx.lineTo(113.000000,94.000000); ctx.lineTo(117.000000,90.000000); ctx.lineTo(117.000000,81.000000); ctx.lineTo(114.000000,78.000000); ctx.lineTo(109.000000,77.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(122.000000,128.000000); ctx.lineTo(127.000000,126.000000); ctx.lineTo(134.000000,127.000000); ctx.lineTo(136.000000,129.000000); ctx.lineTo(134.000000,130.000000); ctx.lineTo(130.000000,128.000000); ctx.lineTo(124.000000,129.000000); ctx.lineTo(122.000000,128.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(78.000000,27.000000); ctx.lineTo(82.000000,32.000000); ctx.lineTo(80.000000,33.000000); ctx.lineTo(82.000000,36.000000); ctx.lineTo(78.000000,37.000000); ctx.lineTo(82.000000,40.000000); ctx.lineTo(78.000000,42.000000); ctx.lineTo(81.000000,46.000000); ctx.lineTo(76.000000,47.000000); ctx.lineTo(78.000000,49.000000); ctx.lineTo(74.000000,50.000000); ctx.lineTo(82.000000,52.000000); ctx.lineTo(87.000000,50.000000); ctx.lineTo(83.000000,48.000000); ctx.lineTo(91.000000,46.000000); ctx.lineTo(86.000000,45.000000); ctx.lineTo(91.000000,42.000000); ctx.lineTo(88.000000,40.000000); ctx.lineTo(92.000000,37.000000); ctx.lineTo(86.000000,34.000000); ctx.lineTo(90.000000,31.000000); ctx.lineTo(86.000000,29.000000); ctx.lineTo(89.000000,26.000000); ctx.lineTo(78.000000,27.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(82.000000,17.000000); ctx.lineTo(92.000000,20.000000); ctx.lineTo(79.000000,21.000000); ctx.lineTo(90.000000,25.000000); ctx.lineTo(81.000000,25.000000); ctx.lineTo(94.000000,28.000000); ctx.lineTo(93.000000,26.000000); ctx.lineTo(101.000000,30.000000); ctx.lineTo(101.000000,26.000000); ctx.lineTo(107.000000,33.000000); ctx.lineTo(108.000000,28.000000); ctx.lineTo(111.000000,40.000000); ctx.lineTo(113.000000,34.000000); ctx.lineTo(115.000000,45.000000); ctx.lineTo(117.000000,39.000000); ctx.lineTo(119.000000,54.000000); ctx.lineTo(121.000000,46.000000); ctx.lineTo(124.000000,58.000000); ctx.lineTo(126.000000,47.000000); ctx.lineTo(129.000000,59.000000); ctx.lineTo(130.000000,49.000000); ctx.lineTo(134.000000,58.000000); ctx.lineTo(133.000000,44.000000); ctx.lineTo(137.000000,48.000000); ctx.lineTo(133.000000,37.000000); ctx.lineTo(137.000000,40.000000); ctx.lineTo(133.000000,32.000000); ctx.lineTo(126.000000,20.000000); ctx.lineTo(135.000000,26.000000); ctx.lineTo(132.000000,19.000000); ctx.lineTo(138.000000,23.000000); ctx.lineTo(135.000000,17.000000); ctx.lineTo(142.000000,18.000000); ctx.lineTo(132.000000,11.000000); ctx.lineTo(116.000000,6.000000); ctx.lineTo(94.000000,6.000000); ctx.lineTo(78.000000,11.000000); ctx.lineTo(92.000000,12.000000); ctx.lineTo(80.000000,14.000000); ctx.lineTo(90.000000,16.000000); ctx.lineTo(82.000000,17.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(142.000000,234.000000); ctx.lineTo(132.000000,227.000000); ctx.lineTo(124.000000,223.000000); ctx.lineTo(115.000000,220.000000); ctx.lineTo(110.000000,225.000000); ctx.lineTo(118.000000,224.000000); ctx.lineTo(127.000000,229.000000); ctx.lineTo(135.000000,236.000000); ctx.lineTo(122.000000,234.000000); ctx.lineTo(115.000000,237.000000); ctx.lineTo(113.000000,242.000000); ctx.lineTo(121.000000,238.000000); ctx.lineTo(139.000000,243.000000); ctx.lineTo(121.000000,245.000000); ctx.lineTo(111.000000,254.000000); ctx.lineTo(95.000000,254.000000); ctx.lineTo(102.000000,244.000000); ctx.lineTo(104.000000,235.000000); ctx.lineTo(110.000000,229.000000); ctx.lineTo(100.000000,231.000000); ctx.lineTo(104.000000,224.000000); ctx.lineTo(113.000000,216.000000); ctx.lineTo(122.000000,215.000000); ctx.lineTo(132.000000,217.000000); ctx.lineTo(141.000000,224.000000); ctx.lineTo(145.000000,230.000000); ctx.lineTo(149.000000,240.000000); ctx.lineTo(142.000000,234.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(115.000000,252.000000); ctx.lineTo(125.000000,248.000000); ctx.lineTo(137.000000,249.000000); ctx.lineTo(143.000000,258.000000); ctx.lineTo(134.000000,255.000000); ctx.lineTo(125.000000,254.000000); ctx.lineTo(115.000000,252.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(114.000000,212.000000); ctx.lineTo(130.000000,213.000000); ctx.lineTo(140.000000,219.000000); ctx.lineTo(147.000000,225.000000); ctx.lineTo(144.000000,214.000000); ctx.lineTo(137.000000,209.000000); ctx.lineTo(128.000000,207.000000); ctx.lineTo(114.000000,212.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(102.000000,263.000000); ctx.lineTo(108.000000,258.000000); ctx.lineTo(117.000000,257.000000); ctx.lineTo(131.000000,258.000000); ctx.lineTo(116.000000,260.000000); ctx.lineTo(109.000000,265.000000); ctx.lineTo(102.000000,263.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(51.000000,241.000000); ctx.lineTo(35.000000,224.000000); ctx.lineTo(40.000000,238.000000); ctx.lineTo(23.000000,224.000000); ctx.lineTo(31.000000,242.000000); ctx.lineTo(19.000000,239.000000); ctx.lineTo(28.000000,247.000000); ctx.lineTo(17.000000,246.000000); ctx.lineTo(25.000000,250.000000); ctx.lineTo(37.000000,254.000000); ctx.lineTo(39.000000,263.000000); ctx.lineTo(44.000000,271.000000); ctx.lineTo(47.000000,294.000000); ctx.lineTo(48.000000,317.000000); ctx.lineTo(51.000000,328.000000); ctx.lineTo(60.000000,351.000000); ctx.lineTo(60.000000,323.000000); ctx.lineTo(53.000000,262.000000); ctx.lineTo(47.000000,246.000000); ctx.lineTo(51.000000,241.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(2.000000,364.000000); ctx.lineTo(9.000000,367.000000); ctx.lineTo(14.000000,366.000000); ctx.lineTo(18.000000,355.000000); ctx.lineTo(20.000000,364.000000); ctx.lineTo(26.000000,366.000000); ctx.lineTo(31.000000,357.000000); ctx.lineTo(35.000000,364.000000); ctx.lineTo(39.000000,364.000000); ctx.lineTo(42.000000,357.000000); ctx.lineTo(47.000000,363.000000); ctx.lineTo(53.000000,360.000000); ctx.lineTo(59.000000,357.000000); ctx.lineTo(54.000000,369.000000); ctx.lineTo(7.000000,373.000000); ctx.lineTo(2.000000,364.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(7.000000,349.000000); ctx.lineTo(19.000000,345.000000); ctx.lineTo(25.000000,339.000000); ctx.lineTo(18.000000,341.000000); ctx.lineTo(23.000000,333.000000); ctx.lineTo(28.000000,326.000000); ctx.lineTo(23.000000,326.000000); ctx.lineTo(27.000000,320.000000); ctx.lineTo(23.000000,316.000000); ctx.lineTo(25.000000,311.000000); ctx.lineTo(20.000000,298.000000); ctx.lineTo(15.000000,277.000000); ctx.lineTo(12.000000,264.000000); ctx.lineTo(9.000000,249.000000); ctx.lineTo(10.000000,223.000000); ctx.lineTo(3.000000,248.000000); ctx.lineTo(5.000000,261.000000); ctx.lineTo(15.000000,307.000000); ctx.lineTo(17.000000,326.000000); ctx.lineTo(11.000000,343.000000); ctx.lineTo(7.000000,349.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(11.000000,226.000000); ctx.lineTo(15.000000,231.000000); ctx.lineTo(25.000000,236.000000); ctx.lineTo(18.000000,227.000000); ctx.lineTo(11.000000,226.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(13.000000,214.000000); ctx.lineTo(19.000000,217.000000); ctx.lineTo(32.000000,227.000000); ctx.lineTo(23.000000,214.000000); ctx.lineTo(16.000000,208.000000); ctx.lineTo(15.000000,190.000000); ctx.lineTo(24.000000,148.000000); ctx.lineTo(31.000000,121.000000); ctx.lineTo(24.000000,137.000000); ctx.lineTo(14.000000,170.000000); ctx.lineTo(8.000000,189.000000); ctx.lineTo(13.000000,214.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(202.000000,254.000000); ctx.lineTo(195.000000,258.000000); ctx.lineTo(199.000000,260.000000); ctx.lineTo(193.000000,263.000000); ctx.lineTo(197.000000,263.000000); ctx.lineTo(190.000000,268.000000); ctx.lineTo(196.000000,268.000000); ctx.lineTo(191.000000,273.000000); ctx.lineTo(188.000000,282.000000); ctx.lineTo(200.000000,272.000000); ctx.lineTo(194.000000,272.000000); ctx.lineTo(201.000000,266.000000); ctx.lineTo(197.000000,265.000000); ctx.lineTo(204.000000,262.000000); ctx.lineTo(200.000000,258.000000); ctx.lineTo(204.000000,256.000000); ctx.lineTo(202.000000,254.000000); ctx.fill(); ctx.fillStyle='#845433'; ctx.beginPath(); ctx.moveTo(151.000000,213.000000); ctx.lineTo(165.000000,212.000000); ctx.lineTo(179.000000,225.000000); ctx.lineTo(189.000000,246.000000); ctx.lineTo(187.000000,262.000000); ctx.lineTo(179.000000,275.000000); ctx.lineTo(176.000000,263.000000); ctx.lineTo(177.000000,247.000000); ctx.lineTo(171.000000,233.000000); ctx.lineTo(163.000000,230.000000); ctx.lineTo(165.000000,251.000000); ctx.lineTo(157.000000,264.000000); ctx.lineTo(146.000000,298.000000); ctx.lineTo(145.000000,321.000000); ctx.lineTo(133.000000,326.000000); ctx.lineTo(143.000000,285.000000); ctx.lineTo(154.000000,260.000000); ctx.lineTo(153.000000,240.000000); ctx.lineTo(151.000000,213.000000); ctx.fill(); ctx.fillStyle='#845433'; ctx.beginPath(); ctx.moveTo(91.000000,132.000000); ctx.lineTo(95.000000,145.000000); ctx.lineTo(97.000000,154.000000); ctx.lineTo(104.000000,148.000000); ctx.lineTo(107.000000,155.000000); ctx.lineTo(109.000000,150.000000); ctx.lineTo(111.000000,158.000000); ctx.lineTo(115.000000,152.000000); ctx.lineTo(118.000000,159.000000); ctx.lineTo(120.000000,153.000000); ctx.lineTo(125.000000,161.000000); ctx.lineTo(126.000000,155.000000); ctx.lineTo(133.000000,164.000000); ctx.lineTo(132.000000,154.000000); ctx.lineTo(137.000000,163.000000); ctx.lineTo(137.000000,152.000000); ctx.lineTo(142.000000,163.000000); ctx.lineTo(147.000000,186.000000); ctx.lineTo(152.000000,192.000000); ctx.lineTo(148.000000,167.000000); ctx.lineTo(141.000000,143.000000); ctx.lineTo(124.000000,145.000000); ctx.lineTo(105.000000,143.000000); ctx.lineTo(91.000000,132.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(31.000000,57.000000); ctx.lineTo(23.000000,52.000000); ctx.lineTo(26.000000,51.000000); ctx.lineTo(20.000000,44.000000); ctx.lineTo(23.000000,42.000000); ctx.lineTo(21.000000,36.000000); ctx.lineTo(22.000000,29.000000); ctx.lineTo(25.000000,23.000000); ctx.lineTo(24.000000,32.000000); ctx.lineTo(30.000000,43.000000); ctx.lineTo(26.000000,41.000000); ctx.lineTo(30.000000,50.000000); ctx.lineTo(26.000000,48.000000); ctx.lineTo(31.000000,57.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(147.000000,21.000000); ctx.lineTo(149.000000,28.000000); ctx.lineTo(155.000000,21.000000); ctx.lineTo(161.000000,16.000000); ctx.lineTo(167.000000,14.000000); ctx.lineTo(175.000000,15.000000); ctx.lineTo(173.000000,11.000000); ctx.lineTo(161.000000,9.000000); ctx.lineTo(147.000000,21.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(181.000000,39.000000); ctx.lineTo(175.000000,51.000000); ctx.lineTo(169.000000,57.000000); ctx.lineTo(171.000000,65.000000); ctx.lineTo(165.000000,68.000000); ctx.lineTo(165.000000,75.000000); ctx.lineTo(160.000000,76.000000); ctx.lineTo(162.000000,91.000000); ctx.lineTo(171.000000,71.000000); ctx.lineTo(180.000000,51.000000); ctx.lineTo(181.000000,39.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(132.000000,346.000000); ctx.lineTo(139.000000,348.000000); ctx.lineTo(141.000000,346.000000); ctx.lineTo(142.000000,341.000000); ctx.lineTo(147.000000,342.000000); ctx.lineTo(143.000000,355.000000); ctx.lineTo(133.000000,350.000000); ctx.lineTo(132.000000,346.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(146.000000,355.000000); ctx.lineTo(151.000000,352.000000); ctx.lineTo(155.000000,348.000000); ctx.lineTo(157.000000,343.000000); ctx.lineTo(160.000000,349.000000); ctx.lineTo(151.000000,356.000000); ctx.lineTo(147.000000,357.000000); ctx.lineTo(146.000000,355.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(99.000000,266.000000); ctx.lineTo(100.000000,281.000000); ctx.lineTo(94.000000,305.000000); ctx.lineTo(86.000000,322.000000); ctx.lineTo(78.000000,332.000000); ctx.lineTo(72.000000,346.000000); ctx.lineTo(73.000000,331.000000); ctx.lineTo(91.000000,291.000000); ctx.lineTo(99.000000,266.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(20.000000,347.000000); ctx.lineTo(32.000000,342.000000); ctx.lineTo(45.000000,340.000000); ctx.lineTo(54.000000,345.000000); ctx.lineTo(45.000000,350.000000); ctx.lineTo(42.000000,353.000000); ctx.lineTo(38.000000,350.000000); ctx.lineTo(31.000000,353.000000); ctx.lineTo(29.000000,356.000000); ctx.lineTo(23.000000,350.000000); ctx.lineTo(19.000000,353.000000); ctx.lineTo(15.000000,349.000000); ctx.lineTo(20.000000,347.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(78.000000,344.000000); ctx.lineTo(86.000000,344.000000); ctx.lineTo(92.000000,349.000000); ctx.lineTo(88.000000,358.000000); ctx.lineTo(84.000000,352.000000); ctx.lineTo(78.000000,344.000000); ctx.fill(); ctx.fillStyle='#9c826b'; ctx.beginPath(); ctx.moveTo(93.000000,347.000000); ctx.lineTo(104.000000,344.000000); ctx.lineTo(117.000000,345.000000); ctx.lineTo(124.000000,354.000000); ctx.lineTo(121.000000,357.000000); ctx.lineTo(116.000000,351.000000); ctx.lineTo(112.000000,351.000000); ctx.lineTo(108.000000,355.000000); ctx.lineTo(102.000000,351.000000); ctx.lineTo(93.000000,347.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(105.000000,12.000000); ctx.lineTo(111.000000,18.000000); ctx.lineTo(113.000000,24.000000); ctx.lineTo(113.000000,29.000000); ctx.lineTo(119.000000,34.000000); ctx.lineTo(116.000000,23.000000); ctx.lineTo(112.000000,16.000000); ctx.lineTo(105.000000,12.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(122.000000,27.000000); ctx.lineTo(125.000000,34.000000); ctx.lineTo(127.000000,43.000000); ctx.lineTo(128.000000,34.000000); ctx.lineTo(125.000000,29.000000); ctx.lineTo(122.000000,27.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(115.000000,13.000000); ctx.lineTo(122.000000,19.000000); ctx.lineTo(122.000000,15.000000); ctx.lineTo(113.000000,10.000000); ctx.lineTo(115.000000,13.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(116.000000,172.000000); ctx.lineTo(107.000000,182.000000); ctx.lineTo(98.000000,193.000000); ctx.lineTo(98.000000,183.000000); ctx.lineTo(90.000000,199.000000); ctx.lineTo(89.000000,189.000000); ctx.lineTo(84.000000,207.000000); ctx.lineTo(88.000000,206.000000); ctx.lineTo(87.000000,215.000000); ctx.lineTo(95.000000,206.000000); ctx.lineTo(93.000000,219.000000); ctx.lineTo(91.000000,230.000000); ctx.lineTo(98.000000,216.000000); ctx.lineTo(97.000000,226.000000); ctx.lineTo(104.000000,214.000000); ctx.lineTo(112.000000,209.000000); ctx.lineTo(104.000000,208.000000); ctx.lineTo(113.000000,202.000000); ctx.lineTo(126.000000,200.000000); ctx.lineTo(139.000000,207.000000); ctx.lineTo(132.000000,198.000000); ctx.lineTo(142.000000,203.000000); ctx.lineTo(134.000000,192.000000); ctx.lineTo(142.000000,195.000000); ctx.lineTo(134.000000,187.000000); ctx.lineTo(140.000000,185.000000); ctx.lineTo(130.000000,181.000000); ctx.lineTo(136.000000,177.000000); ctx.lineTo(126.000000,177.000000); ctx.lineTo(125.000000,171.000000); ctx.lineTo(116.000000,180.000000); ctx.lineTo(116.000000,172.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(74.000000,220.000000); ctx.lineTo(67.000000,230.000000); ctx.lineTo(67.000000,221.000000); ctx.lineTo(59.000000,235.000000); ctx.lineTo(63.000000,233.000000); ctx.lineTo(60.000000,248.000000); ctx.lineTo(70.000000,232.000000); ctx.lineTo(65.000000,249.000000); ctx.lineTo(71.000000,243.000000); ctx.lineTo(67.000000,256.000000); ctx.lineTo(73.000000,250.000000); ctx.lineTo(69.000000,262.000000); ctx.lineTo(73.000000,259.000000); ctx.lineTo(71.000000,267.000000); ctx.lineTo(76.000000,262.000000); ctx.lineTo(72.000000,271.000000); ctx.lineTo(78.000000,270.000000); ctx.lineTo(76.000000,275.000000); ctx.lineTo(82.000000,274.000000); ctx.lineTo(78.000000,290.000000); ctx.lineTo(86.000000,279.000000); ctx.lineTo(86.000000,289.000000); ctx.lineTo(92.000000,274.000000); ctx.lineTo(88.000000,275.000000); ctx.lineTo(87.000000,264.000000); ctx.lineTo(82.000000,270.000000); ctx.lineTo(82.000000,258.000000); ctx.lineTo(77.000000,257.000000); ctx.lineTo(78.000000,247.000000); ctx.lineTo(73.000000,246.000000); ctx.lineTo(77.000000,233.000000); ctx.lineTo(72.000000,236.000000); ctx.lineTo(74.000000,220.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(133.000000,230.000000); ctx.lineTo(147.000000,242.000000); ctx.lineTo(148.000000,250.000000); ctx.lineTo(145.000000,254.000000); ctx.lineTo(138.000000,247.000000); ctx.lineTo(129.000000,246.000000); ctx.lineTo(142.000000,245.000000); ctx.lineTo(138.000000,241.000000); ctx.lineTo(128.000000,237.000000); ctx.lineTo(137.000000,238.000000); ctx.lineTo(133.000000,230.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(133.000000,261.000000); ctx.lineTo(125.000000,261.000000); ctx.lineTo(116.000000,263.000000); ctx.lineTo(111.000000,267.000000); ctx.lineTo(125.000000,265.000000); ctx.lineTo(133.000000,261.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(121.000000,271.000000); ctx.lineTo(109.000000,273.000000); ctx.lineTo(103.000000,279.000000); ctx.lineTo(99.000000,305.000000); ctx.lineTo(92.000000,316.000000); ctx.lineTo(85.000000,327.000000); ctx.lineTo(83.000000,335.000000); ctx.lineTo(89.000000,340.000000); ctx.lineTo(97.000000,341.000000); ctx.lineTo(94.000000,336.000000); ctx.lineTo(101.000000,336.000000); ctx.lineTo(96.000000,331.000000); ctx.lineTo(103.000000,330.000000); ctx.lineTo(97.000000,327.000000); ctx.lineTo(108.000000,325.000000); ctx.lineTo(99.000000,322.000000); ctx.lineTo(109.000000,321.000000); ctx.lineTo(100.000000,318.000000); ctx.lineTo(110.000000,317.000000); ctx.lineTo(105.000000,314.000000); ctx.lineTo(110.000000,312.000000); ctx.lineTo(107.000000,310.000000); ctx.lineTo(113.000000,308.000000); ctx.lineTo(105.000000,306.000000); ctx.lineTo(114.000000,303.000000); ctx.lineTo(105.000000,301.000000); ctx.lineTo(115.000000,298.000000); ctx.lineTo(107.000000,295.000000); ctx.lineTo(115.000000,294.000000); ctx.lineTo(108.000000,293.000000); ctx.lineTo(117.000000,291.000000); ctx.lineTo(109.000000,289.000000); ctx.lineTo(117.000000,286.000000); ctx.lineTo(109.000000,286.000000); ctx.lineTo(118.000000,283.000000); ctx.lineTo(112.000000,281.000000); ctx.lineTo(118.000000,279.000000); ctx.lineTo(114.000000,278.000000); ctx.lineTo(119.000000,276.000000); ctx.lineTo(115.000000,274.000000); ctx.lineTo(121.000000,271.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(79.000000,364.000000); ctx.lineTo(74.000000,359.000000); ctx.lineTo(74.000000,353.000000); ctx.lineTo(76.000000,347.000000); ctx.lineTo(80.000000,351.000000); ctx.lineTo(83.000000,356.000000); ctx.lineTo(82.000000,360.000000); ctx.lineTo(79.000000,364.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(91.000000,363.000000); ctx.lineTo(93.000000,356.000000); ctx.lineTo(97.000000,353.000000); ctx.lineTo(103.000000,355.000000); ctx.lineTo(105.000000,360.000000); ctx.lineTo(103.000000,366.000000); ctx.lineTo(99.000000,371.000000); ctx.lineTo(94.000000,368.000000); ctx.lineTo(91.000000,363.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(110.000000,355.000000); ctx.lineTo(114.000000,353.000000); ctx.lineTo(118.000000,357.000000); ctx.lineTo(117.000000,363.000000); ctx.lineTo(113.000000,369.000000); ctx.lineTo(111.000000,362.000000); ctx.lineTo(110.000000,355.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(126.000000,354.000000); ctx.lineTo(123.000000,358.000000); ctx.lineTo(124.000000,367.000000); ctx.lineTo(126.000000,369.000000); ctx.lineTo(129.000000,361.000000); ctx.lineTo(129.000000,357.000000); ctx.lineTo(126.000000,354.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(30.000000,154.000000); ctx.lineTo(24.000000,166.000000); ctx.lineTo(20.000000,182.000000); ctx.lineTo(23.000000,194.000000); ctx.lineTo(29.000000,208.000000); ctx.lineTo(37.000000,218.000000); ctx.lineTo(41.000000,210.000000); ctx.lineTo(41.000000,223.000000); ctx.lineTo(46.000000,214.000000); ctx.lineTo(46.000000,227.000000); ctx.lineTo(52.000000,216.000000); ctx.lineTo(52.000000,227.000000); ctx.lineTo(61.000000,216.000000); ctx.lineTo(59.000000,225.000000); ctx.lineTo(68.000000,213.000000); ctx.lineTo(73.000000,219.000000); ctx.lineTo(70.000000,207.000000); ctx.lineTo(77.000000,212.000000); ctx.lineTo(69.000000,200.000000); ctx.lineTo(77.000000,202.000000); ctx.lineTo(70.000000,194.000000); ctx.lineTo(78.000000,197.000000); ctx.lineTo(68.000000,187.000000); ctx.lineTo(76.000000,182.000000); ctx.lineTo(64.000000,182.000000); ctx.lineTo(58.000000,175.000000); ctx.lineTo(58.000000,185.000000); ctx.lineTo(53.000000,177.000000); ctx.lineTo(50.000000,186.000000); ctx.lineTo(46.000000,171.000000); ctx.lineTo(44.000000,182.000000); ctx.lineTo(39.000000,167.000000); ctx.lineTo(36.000000,172.000000); ctx.lineTo(36.000000,162.000000); ctx.lineTo(30.000000,166.000000); ctx.lineTo(30.000000,154.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(44.000000,130.000000); ctx.lineTo(41.000000,137.000000); ctx.lineTo(45.000000,136.000000); ctx.lineTo(43.000000,150.000000); ctx.lineTo(48.000000,142.000000); ctx.lineTo(48.000000,157.000000); ctx.lineTo(53.000000,150.000000); ctx.lineTo(52.000000,164.000000); ctx.lineTo(60.000000,156.000000); ctx.lineTo(61.000000,169.000000); ctx.lineTo(64.000000,165.000000); ctx.lineTo(66.000000,175.000000); ctx.lineTo(70.000000,167.000000); ctx.lineTo(74.000000,176.000000); ctx.lineTo(77.000000,168.000000); ctx.lineTo(80.000000,183.000000); ctx.lineTo(85.000000,172.000000); ctx.lineTo(90.000000,182.000000); ctx.lineTo(93.000000,174.000000); ctx.lineTo(98.000000,181.000000); ctx.lineTo(99.000000,173.000000); ctx.lineTo(104.000000,175.000000); ctx.lineTo(105.000000,169.000000); ctx.lineTo(114.000000,168.000000); ctx.lineTo(102.000000,163.000000); ctx.lineTo(95.000000,157.000000); ctx.lineTo(94.000000,166.000000); ctx.lineTo(90.000000,154.000000); ctx.lineTo(87.000000,162.000000); ctx.lineTo(82.000000,149.000000); ctx.lineTo(75.000000,159.000000); ctx.lineTo(72.000000,148.000000); ctx.lineTo(68.000000,155.000000); ctx.lineTo(67.000000,143.000000); ctx.lineTo(62.000000,148.000000); ctx.lineTo(62.000000,138.000000); ctx.lineTo(58.000000,145.000000); ctx.lineTo(56.000000,133.000000); ctx.lineTo(52.000000,142.000000); ctx.lineTo(52.000000,128.000000); ctx.lineTo(49.000000,134.000000); ctx.lineTo(47.000000,125.000000); ctx.lineTo(44.000000,130.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(13.000000,216.000000); ctx.lineTo(19.000000,219.000000); ctx.lineTo(36.000000,231.000000); ctx.lineTo(22.000000,223.000000); ctx.lineTo(16.000000,222.000000); ctx.lineTo(22.000000,227.000000); ctx.lineTo(12.000000,224.000000); ctx.lineTo(13.000000,220.000000); ctx.lineTo(16.000000,220.000000); ctx.lineTo(13.000000,216.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(10.000000,231.000000); ctx.lineTo(14.000000,236.000000); ctx.lineTo(25.000000,239.000000); ctx.lineTo(27.000000,237.000000); ctx.lineTo(19.000000,234.000000); ctx.lineTo(10.000000,231.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(9.000000,245.000000); ctx.lineTo(14.000000,242.000000); ctx.lineTo(25.000000,245.000000); ctx.lineTo(13.000000,245.000000); ctx.lineTo(9.000000,245.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(33.000000,255.000000); ctx.lineTo(26.000000,253.000000); ctx.lineTo(18.000000,254.000000); ctx.lineTo(25.000000,256.000000); ctx.lineTo(18.000000,258.000000); ctx.lineTo(27.000000,260.000000); ctx.lineTo(18.000000,263.000000); ctx.lineTo(27.000000,265.000000); ctx.lineTo(19.000000,267.000000); ctx.lineTo(29.000000,270.000000); ctx.lineTo(21.000000,272.000000); ctx.lineTo(29.000000,276.000000); ctx.lineTo(21.000000,278.000000); ctx.lineTo(30.000000,281.000000); ctx.lineTo(22.000000,283.000000); ctx.lineTo(31.000000,287.000000); ctx.lineTo(24.000000,288.000000); ctx.lineTo(32.000000,292.000000); ctx.lineTo(23.000000,293.000000); ctx.lineTo(34.000000,298.000000); ctx.lineTo(26.000000,299.000000); ctx.lineTo(37.000000,303.000000); ctx.lineTo(32.000000,305.000000); ctx.lineTo(39.000000,309.000000); ctx.lineTo(33.000000,309.000000); ctx.lineTo(39.000000,314.000000); ctx.lineTo(34.000000,314.000000); ctx.lineTo(40.000000,318.000000); ctx.lineTo(34.000000,317.000000); ctx.lineTo(40.000000,321.000000); ctx.lineTo(34.000000,321.000000); ctx.lineTo(41.000000,326.000000); ctx.lineTo(33.000000,326.000000); ctx.lineTo(40.000000,330.000000); ctx.lineTo(33.000000,332.000000); ctx.lineTo(39.000000,333.000000); ctx.lineTo(33.000000,337.000000); ctx.lineTo(42.000000,337.000000); ctx.lineTo(54.000000,341.000000); ctx.lineTo(49.000000,337.000000); ctx.lineTo(52.000000,335.000000); ctx.lineTo(47.000000,330.000000); ctx.lineTo(50.000000,330.000000); ctx.lineTo(45.000000,325.000000); ctx.lineTo(49.000000,325.000000); ctx.lineTo(45.000000,321.000000); ctx.lineTo(48.000000,321.000000); ctx.lineTo(45.000000,316.000000); ctx.lineTo(46.000000,306.000000); ctx.lineTo(45.000000,286.000000); ctx.lineTo(43.000000,274.000000); ctx.lineTo(36.000000,261.000000); ctx.lineTo(33.000000,255.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(7.000000,358.000000); ctx.lineTo(9.000000,351.000000); ctx.lineTo(14.000000,351.000000); ctx.lineTo(17.000000,359.000000); ctx.lineTo(11.000000,364.000000); ctx.lineTo(7.000000,358.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(44.000000,354.000000); ctx.lineTo(49.000000,351.000000); ctx.lineTo(52.000000,355.000000); ctx.lineTo(49.000000,361.000000); ctx.lineTo(44.000000,354.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(32.000000,357.000000); ctx.lineTo(37.000000,353.000000); ctx.lineTo(40.000000,358.000000); ctx.lineTo(36.000000,361.000000); ctx.lineTo(32.000000,357.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(139.000000,334.000000); ctx.lineTo(145.000000,330.000000); ctx.lineTo(154.000000,330.000000); ctx.lineTo(158.000000,334.000000); ctx.lineTo(154.000000,341.000000); ctx.lineTo(152.000000,348.000000); ctx.lineTo(145.000000,350.000000); ctx.lineTo(149.000000,340.000000); ctx.lineTo(147.000000,336.000000); ctx.lineTo(141.000000,339.000000); ctx.lineTo(139.000000,345.000000); ctx.lineTo(136.000000,342.000000); ctx.lineTo(136.000000,339.000000); ctx.lineTo(139.000000,334.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(208.000000,259.000000); ctx.lineTo(215.000000,259.000000); ctx.lineTo(212.000000,255.000000); ctx.lineTo(220.000000,259.000000); ctx.lineTo(224.000000,263.000000); ctx.lineTo(225.000000,274.000000); ctx.lineTo(224.000000,283.000000); ctx.lineTo(220.000000,292.000000); ctx.lineTo(208.000000,300.000000); ctx.lineTo(206.000000,308.000000); ctx.lineTo(203.000000,304.000000); ctx.lineTo(199.000000,315.000000); ctx.lineTo(197.000000,309.000000); ctx.lineTo(195.000000,318.000000); ctx.lineTo(193.000000,313.000000); ctx.lineTo(190.000000,322.000000); ctx.lineTo(190.000000,316.000000); ctx.lineTo(185.000000,325.000000); ctx.lineTo(182.000000,318.000000); ctx.lineTo(180.000000,325.000000); ctx.lineTo(172.000000,321.000000); ctx.lineTo(178.000000,320.000000); ctx.lineTo(176.000000,313.000000); ctx.lineTo(186.000000,312.000000); ctx.lineTo(180.000000,307.000000); ctx.lineTo(188.000000,307.000000); ctx.lineTo(184.000000,303.000000); ctx.lineTo(191.000000,302.000000); ctx.lineTo(186.000000,299.000000); ctx.lineTo(195.000000,294.000000); ctx.lineTo(187.000000,290.000000); ctx.lineTo(197.000000,288.000000); ctx.lineTo(192.000000,286.000000); ctx.lineTo(201.000000,283.000000); ctx.lineTo(194.000000,280.000000); ctx.lineTo(203.000000,277.000000); ctx.lineTo(198.000000,275.000000); ctx.lineTo(207.000000,271.000000); ctx.lineTo(200.000000,269.000000); ctx.lineTo(209.000000,265.000000); ctx.lineTo(204.000000,265.000000); ctx.lineTo(212.000000,262.000000); ctx.lineTo(208.000000,259.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(106.000000,126.000000); ctx.lineTo(106.000000,131.000000); ctx.lineTo(109.000000,132.000000); ctx.lineTo(111.000000,134.000000); ctx.lineTo(115.000000,132.000000); ctx.lineTo(115.000000,135.000000); ctx.lineTo(119.000000,133.000000); ctx.lineTo(118.000000,137.000000); ctx.lineTo(123.000000,137.000000); ctx.lineTo(128.000000,137.000000); ctx.lineTo(133.000000,134.000000); ctx.lineTo(136.000000,130.000000); ctx.lineTo(136.000000,127.000000); ctx.lineTo(132.000000,124.000000); ctx.lineTo(118.000000,128.000000); ctx.lineTo(112.000000,128.000000); ctx.lineTo(106.000000,126.000000); ctx.lineTo(106.000000,126.000000); ctx.lineTo(106.000000,126.000000); ctx.lineTo(106.000000,126.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(107.000000,114.000000); ctx.lineTo(101.000000,110.000000); ctx.lineTo(98.000000,102.000000); ctx.lineTo(105.000000,97.000000); ctx.lineTo(111.000000,98.000000); ctx.lineTo(119.000000,102.000000); ctx.lineTo(121.000000,108.000000); ctx.lineTo(118.000000,112.000000); ctx.lineTo(113.000000,115.000000); ctx.lineTo(107.000000,114.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(148.000000,106.000000); ctx.lineTo(145.000000,110.000000); ctx.lineTo(146.000000,116.000000); ctx.lineTo(150.000000,118.000000); ctx.lineTo(152.000000,111.000000); ctx.lineTo(151.000000,107.000000); ctx.lineTo(148.000000,106.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(80.000000,55.000000); ctx.lineTo(70.000000,52.000000); ctx.lineTo(75.000000,58.000000); ctx.lineTo(63.000000,57.000000); ctx.lineTo(72.000000,61.000000); ctx.lineTo(57.000000,61.000000); ctx.lineTo(67.000000,66.000000); ctx.lineTo(57.000000,67.000000); ctx.lineTo(62.000000,69.000000); ctx.lineTo(54.000000,71.000000); ctx.lineTo(61.000000,73.000000); ctx.lineTo(54.000000,77.000000); ctx.lineTo(63.000000,78.000000); ctx.lineTo(53.000000,85.000000); ctx.lineTo(60.000000,84.000000); ctx.lineTo(56.000000,90.000000); ctx.lineTo(69.000000,84.000000); ctx.lineTo(63.000000,82.000000); ctx.lineTo(75.000000,76.000000); ctx.lineTo(70.000000,75.000000); ctx.lineTo(77.000000,72.000000); ctx.lineTo(72.000000,71.000000); ctx.lineTo(78.000000,69.000000); ctx.lineTo(72.000000,66.000000); ctx.lineTo(81.000000,67.000000); ctx.lineTo(78.000000,64.000000); ctx.lineTo(82.000000,63.000000); ctx.lineTo(80.000000,60.000000); ctx.lineTo(86.000000,62.000000); ctx.lineTo(80.000000,55.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(87.000000,56.000000); ctx.lineTo(91.000000,52.000000); ctx.lineTo(96.000000,50.000000); ctx.lineTo(102.000000,56.000000); ctx.lineTo(98.000000,56.000000); ctx.lineTo(92.000000,60.000000); ctx.lineTo(87.000000,56.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(85.000000,68.000000); ctx.lineTo(89.000000,73.000000); ctx.lineTo(98.000000,76.000000); ctx.lineTo(106.000000,74.000000); ctx.lineTo(96.000000,73.000000); ctx.lineTo(91.000000,70.000000); ctx.lineTo(85.000000,68.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(115.000000,57.000000); ctx.lineTo(114.000000,64.000000); ctx.lineTo(111.000000,64.000000); ctx.lineTo(115.000000,75.000000); ctx.lineTo(122.000000,81.000000); ctx.lineTo(122.000000,74.000000); ctx.lineTo(126.000000,79.000000); ctx.lineTo(126.000000,74.000000); ctx.lineTo(131.000000,78.000000); ctx.lineTo(130.000000,72.000000); ctx.lineTo(133.000000,77.000000); ctx.lineTo(131.000000,68.000000); ctx.lineTo(126.000000,61.000000); ctx.lineTo(119.000000,57.000000); ctx.lineTo(115.000000,57.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(145.000000,48.000000); ctx.lineTo(143.000000,53.000000); ctx.lineTo(147.000000,59.000000); ctx.lineTo(151.000000,59.000000); ctx.lineTo(150.000000,55.000000); ctx.lineTo(145.000000,48.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(26.000000,22.000000); ctx.lineTo(34.000000,15.000000); ctx.lineTo(43.000000,10.000000); ctx.lineTo(52.000000,10.000000); ctx.lineTo(59.000000,16.000000); ctx.lineTo(47.000000,15.000000); ctx.lineTo(32.000000,22.000000); ctx.lineTo(26.000000,22.000000); ctx.fill(); ctx.fillStyle='#ffe5b2'; ctx.beginPath(); ctx.moveTo(160.000000,19.000000); ctx.lineTo(152.000000,26.000000); ctx.lineTo(149.000000,34.000000); ctx.lineTo(154.000000,33.000000); ctx.lineTo(152.000000,30.000000); ctx.lineTo(157.000000,30.000000); ctx.lineTo(155.000000,26.000000); ctx.lineTo(158.000000,27.000000); ctx.lineTo(157.000000,23.000000); ctx.lineTo(161.000000,23.000000); ctx.lineTo(160.000000,19.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(98.000000,117.000000); ctx.lineTo(105.000000,122.000000); ctx.lineTo(109.000000,122.000000); ctx.lineTo(105.000000,117.000000); ctx.lineTo(113.000000,120.000000); ctx.lineTo(121.000000,120.000000); ctx.lineTo(130.000000,112.000000); ctx.lineTo(128.000000,108.000000); ctx.lineTo(123.000000,103.000000); ctx.lineTo(123.000000,99.000000); ctx.lineTo(128.000000,101.000000); ctx.lineTo(132.000000,106.000000); ctx.lineTo(135.000000,109.000000); ctx.lineTo(142.000000,105.000000); ctx.lineTo(142.000000,101.000000); ctx.lineTo(145.000000,101.000000); ctx.lineTo(145.000000,91.000000); ctx.lineTo(148.000000,101.000000); ctx.lineTo(145.000000,105.000000); ctx.lineTo(136.000000,112.000000); ctx.lineTo(135.000000,116.000000); ctx.lineTo(143.000000,124.000000); ctx.lineTo(148.000000,120.000000); ctx.lineTo(150.000000,122.000000); ctx.lineTo(142.000000,128.000000); ctx.lineTo(133.000000,122.000000); ctx.lineTo(121.000000,125.000000); ctx.lineTo(112.000000,126.000000); ctx.lineTo(103.000000,125.000000); ctx.lineTo(100.000000,129.000000); ctx.lineTo(96.000000,124.000000); ctx.lineTo(98.000000,117.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(146.000000,118.000000); ctx.lineTo(152.000000,118.000000); ctx.lineTo(152.000000,115.000000); ctx.lineTo(149.000000,115.000000); ctx.lineTo(146.000000,118.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(148.000000,112.000000); ctx.lineTo(154.000000,111.000000); ctx.lineTo(154.000000,109.000000); ctx.lineTo(149.000000,109.000000); ctx.lineTo(148.000000,112.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(106.000000,112.000000); ctx.lineTo(108.000000,115.000000); ctx.lineTo(114.000000,116.000000); ctx.lineTo(118.000000,114.000000); ctx.lineTo(106.000000,112.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(108.000000,108.000000); ctx.lineTo(111.000000,110.000000); ctx.lineTo(116.000000,110.000000); ctx.lineTo(119.000000,108.000000); ctx.lineTo(108.000000,108.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(106.000000,104.000000); ctx.lineTo(109.000000,105.000000); ctx.lineTo(117.000000,106.000000); ctx.lineTo(115.000000,104.000000); ctx.lineTo(106.000000,104.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(50.000000,25.000000); ctx.lineTo(41.000000,26.000000); ctx.lineTo(34.000000,33.000000); ctx.lineTo(39.000000,43.000000); ctx.lineTo(49.000000,58.000000); ctx.lineTo(36.000000,51.000000); ctx.lineTo(47.000000,68.000000); ctx.lineTo(55.000000,69.000000); ctx.lineTo(54.000000,59.000000); ctx.lineTo(61.000000,57.000000); ctx.lineTo(74.000000,46.000000); ctx.lineTo(60.000000,52.000000); ctx.lineTo(67.000000,42.000000); ctx.lineTo(57.000000,48.000000); ctx.lineTo(61.000000,40.000000); ctx.lineTo(54.000000,45.000000); ctx.lineTo(60.000000,36.000000); ctx.lineTo(59.000000,29.000000); ctx.lineTo(48.000000,38.000000); ctx.lineTo(52.000000,30.000000); ctx.lineTo(47.000000,32.000000); ctx.lineTo(50.000000,25.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(147.000000,34.000000); ctx.lineTo(152.000000,41.000000); ctx.lineTo(155.000000,49.000000); ctx.lineTo(161.000000,53.000000); ctx.lineTo(157.000000,47.000000); ctx.lineTo(164.000000,47.000000); ctx.lineTo(158.000000,43.000000); ctx.lineTo(168.000000,44.000000); ctx.lineTo(159.000000,40.000000); ctx.lineTo(164.000000,37.000000); ctx.lineTo(169.000000,37.000000); ctx.lineTo(164.000000,33.000000); ctx.lineTo(169.000000,34.000000); ctx.lineTo(165.000000,28.000000); ctx.lineTo(170.000000,30.000000); ctx.lineTo(170.000000,25.000000); ctx.lineTo(173.000000,29.000000); ctx.lineTo(175.000000,27.000000); ctx.lineTo(176.000000,32.000000); ctx.lineTo(173.000000,36.000000); ctx.lineTo(175.000000,39.000000); ctx.lineTo(172.000000,42.000000); ctx.lineTo(172.000000,46.000000); ctx.lineTo(168.000000,49.000000); ctx.lineTo(170.000000,55.000000); ctx.lineTo(162.000000,57.000000); ctx.lineTo(158.000000,63.000000); ctx.lineTo(155.000000,58.000000); ctx.lineTo(153.000000,50.000000); ctx.lineTo(149.000000,46.000000); ctx.lineTo(147.000000,34.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(155.000000,71.000000); ctx.lineTo(159.000000,80.000000); ctx.lineTo(157.000000,93.000000); ctx.lineTo(157.000000,102.000000); ctx.lineTo(155.000000,108.000000); ctx.lineTo(150.000000,101.000000); ctx.lineTo(149.000000,93.000000); ctx.lineTo(154.000000,101.000000); ctx.lineTo(152.000000,91.000000); ctx.lineTo(151.000000,83.000000); ctx.lineTo(155.000000,79.000000); ctx.lineTo(155.000000,71.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(112.000000,78.000000); ctx.lineTo(115.000000,81.000000); ctx.lineTo(114.000000,91.000000); ctx.lineTo(112.000000,87.000000); ctx.lineTo(113.000000,82.000000); ctx.lineTo(112.000000,78.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(78.000000,28.000000); ctx.lineTo(64.000000,17.000000); ctx.lineTo(58.000000,11.000000); ctx.lineTo(47.000000,9.000000); ctx.lineTo(36.000000,10.000000); ctx.lineTo(28.000000,16.000000); ctx.lineTo(21.000000,26.000000); ctx.lineTo(18.000000,41.000000); ctx.lineTo(20.000000,51.000000); ctx.lineTo(23.000000,61.000000); ctx.lineTo(33.000000,65.000000); ctx.lineTo(28.000000,68.000000); ctx.lineTo(37.000000,74.000000); ctx.lineTo(36.000000,81.000000); ctx.lineTo(43.000000,87.000000); ctx.lineTo(48.000000,90.000000); ctx.lineTo(43.000000,100.000000); ctx.lineTo(40.000000,98.000000); ctx.lineTo(39.000000,90.000000); ctx.lineTo(31.000000,80.000000); ctx.lineTo(30.000000,72.000000); ctx.lineTo(22.000000,71.000000); ctx.lineTo(17.000000,61.000000); ctx.lineTo(14.000000,46.000000); ctx.lineTo(16.000000,28.000000); ctx.lineTo(23.000000,17.000000); ctx.lineTo(33.000000,9.000000); ctx.lineTo(45.000000,6.000000); ctx.lineTo(54.000000,6.000000); ctx.lineTo(65.000000,12.000000); ctx.lineTo(78.000000,28.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(67.000000,18.000000); ctx.lineTo(76.000000,9.000000); ctx.lineTo(87.000000,5.000000); ctx.lineTo(101.000000,2.000000); ctx.lineTo(118.000000,3.000000); ctx.lineTo(135.000000,8.000000); ctx.lineTo(149.000000,20.000000); ctx.lineTo(149.000000,26.000000); ctx.lineTo(144.000000,19.000000); ctx.lineTo(132.000000,12.000000); ctx.lineTo(121.000000,9.000000); ctx.lineTo(105.000000,7.000000); ctx.lineTo(89.000000,8.000000); ctx.lineTo(76.000000,14.000000); ctx.lineTo(70.000000,20.000000); ctx.lineTo(67.000000,18.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(56.000000,98.000000); ctx.lineTo(48.000000,106.000000); ctx.lineTo(56.000000,103.000000); ctx.lineTo(47.000000,112.000000); ctx.lineTo(56.000000,110.000000); ctx.lineTo(52.000000,115.000000); ctx.lineTo(57.000000,113.000000); ctx.lineTo(52.000000,121.000000); ctx.lineTo(62.000000,115.000000); ctx.lineTo(58.000000,123.000000); ctx.lineTo(65.000000,119.000000); ctx.lineTo(63.000000,125.000000); ctx.lineTo(69.000000,121.000000); ctx.lineTo(68.000000,127.000000); ctx.lineTo(74.000000,125.000000); ctx.lineTo(74.000000,129.000000); ctx.lineTo(79.000000,128.000000); ctx.lineTo(83.000000,132.000000); ctx.lineTo(94.000000,135.000000); ctx.lineTo(93.000000,129.000000); ctx.lineTo(85.000000,127.000000); ctx.lineTo(81.000000,122.000000); ctx.lineTo(76.000000,126.000000); ctx.lineTo(75.000000,121.000000); ctx.lineTo(71.000000,124.000000); ctx.lineTo(71.000000,117.000000); ctx.lineTo(66.000000,121.000000); ctx.lineTo(66.000000,117.000000); ctx.lineTo(62.000000,117.000000); ctx.lineTo(64.000000,112.000000); ctx.lineTo(60.000000,113.000000); ctx.lineTo(60.000000,110.000000); ctx.lineTo(57.000000,111.000000); ctx.lineTo(61.000000,105.000000); ctx.lineTo(57.000000,107.000000); ctx.lineTo(60.000000,101.000000); ctx.lineTo(55.000000,102.000000); ctx.lineTo(56.000000,98.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(101.000000,132.000000); ctx.lineTo(103.000000,138.000000); ctx.lineTo(106.000000,134.000000); ctx.lineTo(106.000000,139.000000); ctx.lineTo(112.000000,136.000000); ctx.lineTo(111.000000,142.000000); ctx.lineTo(115.000000,139.000000); ctx.lineTo(114.000000,143.000000); ctx.lineTo(119.000000,142.000000); ctx.lineTo(125.000000,145.000000); ctx.lineTo(131.000000,142.000000); ctx.lineTo(135.000000,138.000000); ctx.lineTo(140.000000,134.000000); ctx.lineTo(140.000000,129.000000); ctx.lineTo(143.000000,135.000000); ctx.lineTo(145.000000,149.000000); ctx.lineTo(150.000000,171.000000); ctx.lineTo(149.000000,184.000000); ctx.lineTo(145.000000,165.000000); ctx.lineTo(141.000000,150.000000); ctx.lineTo(136.000000,147.000000); ctx.lineTo(132.000000,151.000000); ctx.lineTo(131.000000,149.000000); ctx.lineTo(126.000000,152.000000); ctx.lineTo(125.000000,150.000000); ctx.lineTo(121.000000,152.000000); ctx.lineTo(117.000000,148.000000); ctx.lineTo(111.000000,152.000000); ctx.lineTo(110.000000,148.000000); ctx.lineTo(105.000000,149.000000); ctx.lineTo(104.000000,145.000000); ctx.lineTo(98.000000,150.000000); ctx.lineTo(96.000000,138.000000); ctx.lineTo(94.000000,132.000000); ctx.lineTo(94.000000,130.000000); ctx.lineTo(98.000000,132.000000); ctx.lineTo(101.000000,132.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(41.000000,94.000000); ctx.lineTo(32.000000,110.000000); ctx.lineTo(23.000000,132.000000); ctx.lineTo(12.000000,163.000000); ctx.lineTo(6.000000,190.000000); ctx.lineTo(7.000000,217.000000); ctx.lineTo(5.000000,236.000000); ctx.lineTo(3.000000,247.000000); ctx.lineTo(9.000000,230.000000); ctx.lineTo(12.000000,211.000000); ctx.lineTo(12.000000,185.000000); ctx.lineTo(18.000000,160.000000); ctx.lineTo(26.000000,134.000000); ctx.lineTo(35.000000,110.000000); ctx.lineTo(43.000000,99.000000); ctx.lineTo(41.000000,94.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(32.000000,246.000000); ctx.lineTo(41.000000,250.000000); ctx.lineTo(50.000000,257.000000); ctx.lineTo(52.000000,267.000000); ctx.lineTo(53.000000,295.000000); ctx.lineTo(53.000000,323.000000); ctx.lineTo(59.000000,350.000000); ctx.lineTo(54.000000,363.000000); ctx.lineTo(51.000000,365.000000); ctx.lineTo(44.000000,366.000000); ctx.lineTo(42.000000,360.000000); ctx.lineTo(40.000000,372.000000); ctx.lineTo(54.000000,372.000000); ctx.lineTo(59.000000,366.000000); ctx.lineTo(62.000000,353.000000); ctx.lineTo(71.000000,352.000000); ctx.lineTo(75.000000,335.000000); ctx.lineTo(73.000000,330.000000); ctx.lineTo(66.000000,318.000000); ctx.lineTo(68.000000,302.000000); ctx.lineTo(64.000000,294.000000); ctx.lineTo(67.000000,288.000000); ctx.lineTo(63.000000,286.000000); ctx.lineTo(63.000000,279.000000); ctx.lineTo(59.000000,275.000000); ctx.lineTo(58.000000,267.000000); ctx.lineTo(56.000000,262.000000); ctx.lineTo(50.000000,247.000000); ctx.lineTo(42.000000,235.000000); ctx.lineTo(44.000000,246.000000); ctx.lineTo(32.000000,236.000000); ctx.lineTo(35.000000,244.000000); ctx.lineTo(32.000000,246.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(134.000000,324.000000); ctx.lineTo(146.000000,320.000000); ctx.lineTo(159.000000,322.000000); ctx.lineTo(173.000000,327.000000); ctx.lineTo(179.000000,337.000000); ctx.lineTo(179.000000,349.000000); ctx.lineTo(172.000000,355.000000); ctx.lineTo(158.000000,357.000000); ctx.lineTo(170.000000,350.000000); ctx.lineTo(174.000000,343.000000); ctx.lineTo(170.000000,333.000000); ctx.lineTo(163.000000,328.000000); ctx.lineTo(152.000000,326.000000); ctx.lineTo(134.000000,329.000000); ctx.lineTo(134.000000,324.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(173.000000,339.000000); ctx.lineTo(183.000000,334.000000); ctx.lineTo(184.000000,338.000000); ctx.lineTo(191.000000,329.000000); ctx.lineTo(194.000000,332.000000); ctx.lineTo(199.000000,323.000000); ctx.lineTo(202.000000,325.000000); ctx.lineTo(206.000000,318.000000); ctx.lineTo(209.000000,320.000000); ctx.lineTo(213.000000,309.000000); ctx.lineTo(221.000000,303.000000); ctx.lineTo(228.000000,296.000000); ctx.lineTo(232.000000,289.000000); ctx.lineTo(234.000000,279.000000); ctx.lineTo(233.000000,269.000000); ctx.lineTo(230.000000,262.000000); ctx.lineTo(225.000000,256.000000); ctx.lineTo(219.000000,253.000000); ctx.lineTo(208.000000,252.000000); ctx.lineTo(198.000000,252.000000); ctx.lineTo(210.000000,249.000000); ctx.lineTo(223.000000,250.000000); ctx.lineTo(232.000000,257.000000); ctx.lineTo(237.000000,265.000000); ctx.lineTo(238.000000,277.000000); ctx.lineTo(238.000000,291.000000); ctx.lineTo(232.000000,305.000000); ctx.lineTo(221.000000,323.000000); ctx.lineTo(218.000000,335.000000); ctx.lineTo(212.000000,342.000000); ctx.lineTo(200.000000,349.000000); ctx.lineTo(178.000000,348.000000); ctx.lineTo(173.000000,339.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(165.000000,296.000000); ctx.lineTo(158.000000,301.000000); ctx.lineTo(156.000000,310.000000); ctx.lineTo(156.000000,323.000000); ctx.lineTo(162.000000,324.000000); ctx.lineTo(159.000000,318.000000); ctx.lineTo(162.000000,308.000000); ctx.lineTo(162.000000,304.000000); ctx.lineTo(165.000000,296.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(99.000000,252.000000); ctx.lineTo(105.000000,244.000000); ctx.lineTo(107.000000,234.000000); ctx.lineTo(115.000000,228.000000); ctx.lineTo(121.000000,228.000000); ctx.lineTo(131.000000,235.000000); ctx.lineTo(122.000000,233.000000); ctx.lineTo(113.000000,235.000000); ctx.lineTo(109.000000,246.000000); ctx.lineTo(121.000000,239.000000); ctx.lineTo(133.000000,243.000000); ctx.lineTo(121.000000,243.000000); ctx.lineTo(110.000000,251.000000); ctx.lineTo(99.000000,252.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(117.000000,252.000000); ctx.lineTo(124.000000,247.000000); ctx.lineTo(134.000000,249.000000); ctx.lineTo(136.000000,253.000000); ctx.lineTo(126.000000,252.000000); ctx.lineTo(117.000000,252.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(117.000000,218.000000); ctx.lineTo(132.000000,224.000000); ctx.lineTo(144.000000,233.000000); ctx.lineTo(140.000000,225.000000); ctx.lineTo(132.000000,219.000000); ctx.lineTo(117.000000,218.000000); ctx.lineTo(117.000000,218.000000); ctx.lineTo(117.000000,218.000000); ctx.lineTo(117.000000,218.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(122.000000,212.000000); ctx.lineTo(134.000000,214.000000); ctx.lineTo(143.000000,221.000000); ctx.lineTo(141.000000,213.000000); ctx.lineTo(132.000000,210.000000); ctx.lineTo(122.000000,212.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(69.000000,352.000000); ctx.lineTo(70.000000,363.000000); ctx.lineTo(76.000000,373.000000); ctx.lineTo(86.000000,378.000000); ctx.lineTo(97.000000,379.000000); ctx.lineTo(108.000000,379.000000); ctx.lineTo(120.000000,377.000000); ctx.lineTo(128.000000,378.000000); ctx.lineTo(132.000000,373.000000); ctx.lineTo(135.000000,361.000000); ctx.lineTo(133.000000,358.000000); ctx.lineTo(132.000000,366.000000); ctx.lineTo(127.000000,375.000000); ctx.lineTo(121.000000,374.000000); ctx.lineTo(121.000000,362.000000); ctx.lineTo(119.000000,367.000000); ctx.lineTo(117.000000,374.000000); ctx.lineTo(110.000000,376.000000); ctx.lineTo(110.000000,362.000000); ctx.lineTo(107.000000,357.000000); ctx.lineTo(106.000000,371.000000); ctx.lineTo(104.000000,375.000000); ctx.lineTo(97.000000,376.000000); ctx.lineTo(90.000000,375.000000); ctx.lineTo(90.000000,368.000000); ctx.lineTo(86.000000,362.000000); ctx.lineTo(83.000000,364.000000); ctx.lineTo(86.000000,369.000000); ctx.lineTo(85.000000,373.000000); ctx.lineTo(78.000000,370.000000); ctx.lineTo(73.000000,362.000000); ctx.lineTo(71.000000,351.000000); ctx.lineTo(69.000000,352.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(100.000000,360.000000); ctx.lineTo(96.000000,363.000000); ctx.lineTo(99.000000,369.000000); ctx.lineTo(102.000000,364.000000); ctx.lineTo(100.000000,360.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(115.000000,360.000000); ctx.lineTo(112.000000,363.000000); ctx.lineTo(114.000000,369.000000); ctx.lineTo(117.000000,364.000000); ctx.lineTo(115.000000,360.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(127.000000,362.000000); ctx.lineTo(125.000000,364.000000); ctx.lineTo(126.000000,369.000000); ctx.lineTo(128.000000,365.000000); ctx.lineTo(127.000000,362.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(5.000000,255.000000); ctx.lineTo(7.000000,276.000000); ctx.lineTo(11.000000,304.000000); ctx.lineTo(15.000000,320.000000); ctx.lineTo(13.000000,334.000000); ctx.lineTo(6.000000,348.000000); ctx.lineTo(2.000000,353.000000); ctx.lineTo(0.000000,363.000000); ctx.lineTo(5.000000,372.000000); ctx.lineTo(12.000000,374.000000); ctx.lineTo(25.000000,372.000000); ctx.lineTo(38.000000,372.000000); ctx.lineTo(44.000000,369.000000); ctx.lineTo(42.000000,367.000000); ctx.lineTo(36.000000,368.000000); ctx.lineTo(31.000000,369.000000); ctx.lineTo(30.000000,360.000000); ctx.lineTo(27.000000,368.000000); ctx.lineTo(20.000000,370.000000); ctx.lineTo(16.000000,361.000000); ctx.lineTo(15.000000,368.000000); ctx.lineTo(10.000000,369.000000); ctx.lineTo(3.000000,366.000000); ctx.lineTo(3.000000,359.000000); ctx.lineTo(6.000000,352.000000); ctx.lineTo(11.000000,348.000000); ctx.lineTo(17.000000,331.000000); ctx.lineTo(19.000000,316.000000); ctx.lineTo(12.000000,291.000000); ctx.lineTo(9.000000,274.000000); ctx.lineTo(5.000000,255.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(10.000000,358.000000); ctx.lineTo(7.000000,362.000000); ctx.lineTo(10.000000,366.000000); ctx.lineTo(11.000000,362.000000); ctx.lineTo(10.000000,358.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(25.000000,357.000000); ctx.lineTo(22.000000,360.000000); ctx.lineTo(24.000000,366.000000); ctx.lineTo(27.000000,360.000000); ctx.lineTo(25.000000,357.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(37.000000,357.000000); ctx.lineTo(34.000000,361.000000); ctx.lineTo(36.000000,365.000000); ctx.lineTo(38.000000,361.000000); ctx.lineTo(37.000000,357.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(49.000000,356.000000); ctx.lineTo(46.000000,359.000000); ctx.lineTo(47.000000,364.000000); ctx.lineTo(50.000000,360.000000); ctx.lineTo(49.000000,356.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(130.000000,101.000000); ctx.lineTo(132.000000,102.000000); ctx.lineTo(135.000000,101.000000); ctx.lineTo(139.000000,102.000000); ctx.lineTo(143.000000,103.000000); ctx.lineTo(142.000000,101.000000); ctx.lineTo(137.000000,100.000000); ctx.lineTo(133.000000,100.000000); ctx.lineTo(130.000000,101.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(106.000000,48.000000); ctx.lineTo(105.000000,52.000000); ctx.lineTo(108.000000,56.000000); ctx.lineTo(109.000000,52.000000); ctx.lineTo(106.000000,48.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(139.000000,52.000000); ctx.lineTo(139.000000,56.000000); ctx.lineTo(140.000000,60.000000); ctx.lineTo(142.000000,58.000000); ctx.lineTo(141.000000,56.000000); ctx.lineTo(139.000000,52.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(25.000000,349.000000); ctx.lineTo(29.000000,351.000000); ctx.lineTo(30.000000,355.000000); ctx.lineTo(33.000000,350.000000); ctx.lineTo(37.000000,348.000000); ctx.lineTo(42.000000,351.000000); ctx.lineTo(45.000000,347.000000); ctx.lineTo(49.000000,345.000000); ctx.lineTo(44.000000,343.000000); ctx.lineTo(36.000000,345.000000); ctx.lineTo(25.000000,349.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(98.000000,347.000000); ctx.lineTo(105.000000,351.000000); ctx.lineTo(107.000000,354.000000); ctx.lineTo(109.000000,349.000000); ctx.lineTo(115.000000,349.000000); ctx.lineTo(120.000000,353.000000); ctx.lineTo(118.000000,349.000000); ctx.lineTo(113.000000,346.000000); ctx.lineTo(104.000000,346.000000); ctx.lineTo(98.000000,347.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(83.000000,348.000000); ctx.lineTo(87.000000,352.000000); ctx.lineTo(87.000000,357.000000); ctx.lineTo(89.000000,351.000000); ctx.lineTo(87.000000,348.000000); ctx.lineTo(83.000000,348.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(155.000000,107.000000); ctx.lineTo(163.000000,107.000000); ctx.lineTo(170.000000,107.000000); ctx.lineTo(186.000000,108.000000); ctx.lineTo(175.000000,109.000000); ctx.lineTo(155.000000,109.000000); ctx.lineTo(155.000000,107.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(153.000000,114.000000); ctx.lineTo(162.000000,113.000000); ctx.lineTo(175.000000,112.000000); ctx.lineTo(192.000000,114.000000); ctx.lineTo(173.000000,114.000000); ctx.lineTo(154.000000,115.000000); ctx.lineTo(153.000000,114.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(152.000000,118.000000); ctx.lineTo(164.000000,120.000000); ctx.lineTo(180.000000,123.000000); ctx.lineTo(197.000000,129.000000); ctx.lineTo(169.000000,123.000000); ctx.lineTo(151.000000,120.000000); ctx.lineTo(152.000000,118.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(68.000000,109.000000); ctx.lineTo(87.000000,106.000000); ctx.lineTo(107.000000,106.000000); ctx.lineTo(106.000000,108.000000); ctx.lineTo(88.000000,108.000000); ctx.lineTo(68.000000,109.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(105.000000,111.000000); ctx.lineTo(95.000000,112.000000); ctx.lineTo(79.000000,114.000000); ctx.lineTo(71.000000,116.000000); ctx.lineTo(85.000000,115.000000); ctx.lineTo(102.000000,113.000000); ctx.lineTo(105.000000,111.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(108.000000,101.000000); ctx.lineTo(98.000000,99.000000); ctx.lineTo(87.000000,99.000000); ctx.lineTo(78.000000,99.000000); ctx.lineTo(93.000000,100.000000); ctx.lineTo(105.000000,102.000000); ctx.lineTo(108.000000,101.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(85.000000,63.000000); ctx.lineTo(91.000000,63.000000); ctx.lineTo(97.000000,60.000000); ctx.lineTo(104.000000,60.000000); ctx.lineTo(108.000000,62.000000); ctx.lineTo(111.000000,69.000000); ctx.lineTo(112.000000,75.000000); ctx.lineTo(110.000000,74.000000); ctx.lineTo(108.000000,71.000000); ctx.lineTo(103.000000,73.000000); ctx.lineTo(106.000000,69.000000); ctx.lineTo(105.000000,65.000000); ctx.lineTo(103.000000,64.000000); ctx.lineTo(103.000000,67.000000); ctx.lineTo(102.000000,70.000000); ctx.lineTo(99.000000,70.000000); ctx.lineTo(97.000000,66.000000); ctx.lineTo(94.000000,67.000000); ctx.lineTo(97.000000,72.000000); ctx.lineTo(88.000000,67.000000); ctx.lineTo(84.000000,66.000000); ctx.lineTo(85.000000,63.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(140.000000,74.000000); ctx.lineTo(141.000000,66.000000); ctx.lineTo(144.000000,61.000000); ctx.lineTo(150.000000,61.000000); ctx.lineTo(156.000000,62.000000); ctx.lineTo(153.000000,70.000000); ctx.lineTo(150.000000,73.000000); ctx.lineTo(152.000000,65.000000); ctx.lineTo(150.000000,65.000000); ctx.lineTo(151.000000,68.000000); ctx.lineTo(149.000000,71.000000); ctx.lineTo(146.000000,71.000000); ctx.lineTo(144.000000,66.000000); ctx.lineTo(143.000000,70.000000); ctx.lineTo(143.000000,74.000000); ctx.lineTo(140.000000,74.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(146.000000,20.000000); ctx.lineTo(156.000000,11.000000); ctx.lineTo(163.000000,9.000000); ctx.lineTo(172.000000,9.000000); ctx.lineTo(178.000000,14.000000); ctx.lineTo(182.000000,18.000000); ctx.lineTo(184.000000,32.000000); ctx.lineTo(182.000000,42.000000); ctx.lineTo(182.000000,52.000000); ctx.lineTo(177.000000,58.000000); ctx.lineTo(176.000000,67.000000); ctx.lineTo(171.000000,76.000000); ctx.lineTo(165.000000,90.000000); ctx.lineTo(157.000000,105.000000); ctx.lineTo(160.000000,92.000000); ctx.lineTo(164.000000,85.000000); ctx.lineTo(168.000000,78.000000); ctx.lineTo(167.000000,73.000000); ctx.lineTo(173.000000,66.000000); ctx.lineTo(172.000000,62.000000); ctx.lineTo(175.000000,59.000000); ctx.lineTo(174.000000,55.000000); ctx.lineTo(177.000000,53.000000); ctx.lineTo(180.000000,46.000000); ctx.lineTo(181.000000,29.000000); ctx.lineTo(179.000000,21.000000); ctx.lineTo(173.000000,13.000000); ctx.lineTo(166.000000,11.000000); ctx.lineTo(159.000000,13.000000); ctx.lineTo(153.000000,18.000000); ctx.lineTo(148.000000,23.000000); ctx.lineTo(146.000000,20.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(150.000000,187.000000); ctx.lineTo(148.000000,211.000000); ctx.lineTo(150.000000,233.000000); ctx.lineTo(153.000000,247.000000); ctx.lineTo(148.000000,267.000000); ctx.lineTo(135.000000,283.000000); ctx.lineTo(125.000000,299.000000); ctx.lineTo(136.000000,292.000000); ctx.lineTo(131.000000,313.000000); ctx.lineTo(122.000000,328.000000); ctx.lineTo(122.000000,345.000000); ctx.lineTo(129.000000,352.000000); ctx.lineTo(133.000000,359.000000); ctx.lineTo(133.000000,367.000000); ctx.lineTo(137.000000,359.000000); ctx.lineTo(148.000000,356.000000); ctx.lineTo(140.000000,350.000000); ctx.lineTo(131.000000,347.000000); ctx.lineTo(129.000000,340.000000); ctx.lineTo(132.000000,332.000000); ctx.lineTo(140.000000,328.000000); ctx.lineTo(137.000000,322.000000); ctx.lineTo(140.000000,304.000000); ctx.lineTo(154.000000,265.000000); ctx.lineTo(157.000000,244.000000); ctx.lineTo(155.000000,223.000000); ctx.lineTo(161.000000,220.000000); ctx.lineTo(175.000000,229.000000); ctx.lineTo(186.000000,247.000000); ctx.lineTo(185.000000,260.000000); ctx.lineTo(176.000000,275.000000); ctx.lineTo(178.000000,287.000000); ctx.lineTo(185.000000,277.000000); ctx.lineTo(188.000000,261.000000); ctx.lineTo(196.000000,253.000000); ctx.lineTo(189.000000,236.000000); ctx.lineTo(174.000000,213.000000); ctx.lineTo(150.000000,187.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(147.000000,338.000000); ctx.lineTo(142.000000,341.000000); ctx.lineTo(143.000000,345.000000); ctx.lineTo(141.000000,354.000000); ctx.lineTo(147.000000,343.000000); ctx.lineTo(147.000000,338.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(157.000000,342.000000); ctx.lineTo(156.000000,349.000000); ctx.lineTo(150.000000,356.000000); ctx.lineTo(157.000000,353.000000); ctx.lineTo(163.000000,346.000000); ctx.lineTo(162.000000,342.000000); ctx.lineTo(157.000000,342.000000); ctx.fill(); ctx.fillStyle='#000000'; ctx.beginPath(); ctx.moveTo(99.000000,265.000000); ctx.lineTo(96.000000,284.000000); ctx.lineTo(92.000000,299.000000); ctx.lineTo(73.000000,339.000000); ctx.lineTo(73.000000,333.000000); ctx.lineTo(87.000000,300.000000); ctx.lineTo(99.000000,265.000000); ctx.fill(); }
(function($) { var cultures = $.cultures, en = cultures.en, standard = en.calendars.standard, culture = cultures["kl-GL"] = $.extend(true, {}, en, { name: "kl-GL", englishName: "Greenlandic (Greenland)", nativeName: "kalaallisut (Kalaallit Nunaat)", language: "kl", numberFormat: { ',': ".", '.': ",", groupSizes: [3,0], percent: { groupSizes: [3,0], ',': ".", '.': "," }, currency: { pattern: ["$ -n","$ n"], groupSizes: [3,0], ',': ".", '.': ",", symbol: "kr." } }, calendars: { standard: $.extend(true, {}, standard, { '/': "-", firstDay: 1, days: { names: ["sapaat","ataasinngorneq","marlunngorneq","pingasunngorneq","sisamanngorneq","tallimanngorneq","arfininngorneq"], namesAbbr: ["sap","ata","mar","ping","sis","tal","arf"], namesShort: ["sa","at","ma","pi","si","ta","ar"] }, months: { names: ["januari","februari","martsi","apriili","maaji","juni","juli","aggusti","septembari","oktobari","novembari","decembari",""], namesAbbr: ["jan","feb","mar","apr","mai","jun","jul","aug","sep","okt","nov","dec",""] }, AM: null, PM: null, patterns: { d: "dd-MM-yyyy", D: "d. MMMM yyyy", t: "HH:mm", T: "HH:mm:ss", f: "d. MMMM yyyy HH:mm", F: "d. MMMM yyyy HH:mm:ss", M: "d. MMMM", Y: "MMMM yyyy" } }) } }, cultures["kl-GL"]); culture.calendar = culture.calendars.standard; })(jQuery);
$(function() { "use strict"; $('.year-calendar').pignoseCalendar({ theme: 'blue' // light, dark, blue }); $('input.calendar').pignoseCalendar({ format: 'YYYY-MM-DD' // date format string. (2017-02-02) }); });
define({ "_widgetLabel": "Geo-søgning", "description": "Gå til eller træk et <a href='./widgets/GeoLookup/data/sample.csv' tooltip='Download an example sheet' target='_blank'> regneark </a> herhen for at visualisere, og knyt kortdata til det.", "selectCSV": "Vælg en CSV", "loadingCSV": "Indlæser CSV", "savingCSV": "CSVExport", "clearResults": "Ryd", "downloadResults": "Download", "plotOnly": "Kun kortpunkter", "plottingRows": "Tegner rækker", "projectionChoice": "CSV i", "projectionLat": "Bredde-/længdegrad", "projectionMap": "Kortprojektion", "messages": "Meddelelser", "error": { "fetchingCSV": "Fejl ved hentning af elementer fra CSV-lager: ${0}", "fileIssue": "Filen kunne ikke behandles.", "notCSVFile": "Kun kommaseparerede filer (.csv) understøttes på nuværende tidspunkt.", "invalidCoord": "Positionsfelter er ugyldige. Kontrollér CSV-filen.", "tooManyRecords": "Beklager, ikke mere end ${0} poster på nuværende tidspunkt.", "CSVNoRecords": "Filen indeholder ikke nogen poster.", "CSVEmptyFile": "Intet indhold i filen." }, "results": { "csvLoaded": "${0} poster fra CSV-filen er blevet indlæst", "recordsPlotted": "${0}/${1} poster er blevet lokaliseret på kortet", "recordsEnriched": "${0}/${1} behandlet, ${2} beriget op imod ${3}", "recordsError": "${0} poster indeholdt fejl", "recordsErrorList": "Række ${0} har et problem", "label": "CSV-resultater" } });
/* jshint unused:vars, undef:true, browser:true, jquery:true */ /* global _, ccmi18n, ccmi18n_sitemap, CCM_DISPATCHER_FILENAME, CCM_TOOLS_PATH, Concrete, ConcreteAjaxSearch, ConcreteAlert, ConcreteEvent */ ;(function(global, $) { 'use strict'; function ConcretePageAjaxSearch($element, options) { var my = this; options = $.extend({ 'mode': 'menu', 'searchMethod': 'get' }, options); my.options = options; my._templateSearchResultsMenu = _.template(ConcretePageAjaxSearchMenu.get()); ConcreteAjaxSearch.call(my, $element, options); my.setupEvents(); } ConcretePageAjaxSearch.prototype = Object.create(ConcreteAjaxSearch.prototype); ConcretePageAjaxSearch.prototype.setupEvents = function () { var my = this; ConcreteEvent.subscribe('SitemapDeleteRequestComplete', function (e) { my.refreshResults(); }); ConcreteEvent.fire('ConcreteSitemapPageSearch', my); }; ConcretePageAjaxSearch.prototype.updateResults = function (result) { var my = this, $e = my.$element; ConcreteAjaxSearch.prototype.updateResults.call(my, result); if (my.options.mode == 'choose') { // hide the checkbox since they're pointless here. $e.find('.ccm-search-results-checkbox').parent().remove(); // hide the bulk item selector. $e.find('select[data-bulk-action]').parent().remove(); $e.unbind('.concretePageSearchHoverPage'); $e.on('mouseover.concretePageSearchHoverPage', 'tr[data-launch-search-menu]', function () { $(this).addClass('ccm-search-select-hover'); }); $e.on('mouseout.concretePageSearchHoverPage', 'tr[data-launch-search-menu]', function () { $(this).removeClass('ccm-search-select-hover'); }); $e.unbind('.concretePageSearchChoosePage').on('click.concretePageSearchChoosePage', 'tr[data-launch-search-menu]', function () { ConcreteEvent.publish('SitemapSelectPage', { instance: my, cID: $(this).attr('data-page-id'), title: $(this).attr('data-page-name') }); return false; }); } }; ConcretePageAjaxSearch.prototype.handleSelectedBulkAction = function (value, type, $option, $items) { if (value == 'movecopy' || value == 'Move/Copy') { var url, itemIDs = []; $.each($items, function (i, checkbox) { itemIDs.push($(checkbox).val()); }); ConcreteEvent.unsubscribe('SitemapSelectPage.search'); var subscription = function (e, data) { Concrete.event.unsubscribe(e); url = CCM_TOOLS_PATH + '/dashboard/sitemap_drag_request?origCID=' + itemIDs.join(',') + '&destCID=' + data.cID; $.fn.dialog.open({ width: 350, height: 350, href: url, title: ccmi18n_sitemap.moveCopyPage, onDirectClose: function() { ConcreteEvent.subscribe('SitemapSelectPage.search', subscription); } }); }; ConcreteEvent.subscribe('SitemapSelectPage.search', subscription); } ConcreteAjaxSearch.prototype.handleSelectedBulkAction.call(this, value, type, $option, $items); }; ConcreteAjaxSearch.prototype.createMenu = function ($selector) { var my = this; $selector.concretePageMenu({ 'container': my, 'menu': $('[data-search-menu=' + $selector.attr('data-launch-search-menu') + ']') }); }; /** * Static Methods */ ConcretePageAjaxSearch.launchDialog = function(callback) { var w = $(window).width() - 53; $.fn.dialog.open({ width: w, height: '100%', href: CCM_TOOLS_PATH + '/sitemap_search_selector', modal: true, title: ccmi18n_sitemap.pageLocationTitle, onClose: function() { ConcreteEvent.fire('PageSelectorClose'); }, onOpen: function() { ConcreteEvent.unsubscribe('SitemapSelectPage'); ConcreteEvent.subscribe('SitemapSelectPage', function(e, data) { jQuery.fn.dialog.closeTop(); callback(data); }); } }); }; ConcretePageAjaxSearch.getPageDetails = function(cID, callback) { $.ajax({ type: 'post', dataType: 'json', url: CCM_DISPATCHER_FILENAME + '/ccm/system/page/get_json', data: {'cID': cID}, error: function(r) { ConcreteAlert.dialog(ccmi18n.error, r.responseText); }, success: function(r) { callback(r); } }); }; var ConcretePageAjaxSearchMenu = { get: function () { return '<div class="popover fade" data-search-page-menu="<%=item.cID%>" data-search-menu="<%=item.cID%>">' + '<div class="arrow"></div><div class="popover-inner"><ul class="dropdown-menu">' + '<% if (item.isTrash) { %>' + '<li><a data-action="empty-trash" href="javascript:void(0)">' + ccmi18n_sitemap.emptyTrash + '</a></li>' + '<% } else if (item.isInTrash) { %>' + '<li><a data-action="delete-forever" href="javascript:void(0)">' + ccmi18n_sitemap.deletePageForever + '</a></li>' + '<% } else if (item.cAlias == \'LINK\' || item.cAlias == \'POINTER\') { %>' + '<li><a href="<%- item.link %>">' + ccmi18n_sitemap.visitExternalLink + '</a></li>' + '<% if (item.cAlias == \'LINK\' && item.canEditPageProperties) { %>' + '<li><a class="dialog-launch" dialog-width="350" dialog-height="260" dialog-title="' + ccmi18n_sitemap.editExternalLink + '" dialog-modal="false" dialog-append-buttons="true" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/dialogs/page/edit_external?cID=<%=item.cID%>">' + ccmi18n_sitemap.editExternalLink + '</a></li>' + '<li><a class="dialog-launch" dialog-on-close="ConcreteSitemap.exitEditMode(<%=item.cID%>)" dialog-width="90%" dialog-height="70%" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.pageAttributesTitle + '" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/dialogs/page/attributes?cID=<%=item.cID%>">' + ccmi18n_sitemap.pageAttributes + '</a></li>' + '<li><a class="dialog-launch" dialog-on-close="ConcreteSitemap.exitEditMode(<%=item.cID%>)" dialog-width="500" dialog-height="630" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.setPagePermissions + '" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/panels/details/page/permissions?cID=<%=item.cID%>">' + ccmi18n_sitemap.setPagePermissions + '</a></li>' + '<% } %>' + '<% if (item.canDeletePage) { %>' + '<li><a class="dialog-launch" dialog-width="360" dialog-height="150" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.deleteExternalLink + '" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/dialogs/page/delete_alias?cID=<%=item.cID%>">' + ccmi18n_sitemap.deleteExternalLink + '</a></li>' + '<% } %>' + '<% } else { %>' + '<li><a href="<%- item.link %>">' + ccmi18n_sitemap.visitPage + '</a></li>' + '<% if (item.canEditPageProperties || item.canEditPageSpeedSettings || item.canEditPagePermissions || item.canEditPageDesign || item.canViewPageVersions || item.canDeletePage) { %>' + '<li class="divider"></li>' + '<% } %>' + '<% if (item.canEditPageProperties) { %>' + '<li><a class="dialog-launch" dialog-on-close="ConcreteSitemap.exitEditMode(<%=item.cID%>)" dialog-width="640" dialog-height="360" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.seo + '" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/dialogs/page/seo?cID=<%=item.cID%>">' + ccmi18n_sitemap.seo + '</a></li>' + '<li><a class="dialog-launch" dialog-on-close="ConcreteSitemap.exitEditMode(<%=item.cID%>)" dialog-width="500" dialog-height="500" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.pageLocationTitle + '" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/dialogs/page/location?cID=<%=item.cID%>">' + ccmi18n_sitemap.pageLocation + '</a></li>' + '<li class="divider"></li>' + '<li><a class="dialog-launch" dialog-on-close="ConcreteSitemap.exitEditMode(<%=item.cID%>)" dialog-width="90%" dialog-height="70%" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.pageAttributesTitle + '" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/dialogs/page/attributes?cID=<%=item.cID%>">' + ccmi18n_sitemap.pageAttributes + '</a></li>' + '<% } %>' + '<% if (item.canEditPageSpeedSettings) { %>' + '<li><a class="dialog-launch" dialog-on-close="ConcreteSitemap.exitEditMode(<%=item.cID%>)" dialog-width="550" dialog-height="280" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.speedSettingsTitle + '" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/panels/details/page/caching?cID=<%=item.cID%>">' + ccmi18n_sitemap.speedSettings + '</a></li>' + '<% } %>' + '<% if (item.canEditPagePermissions) { %>' + '<li><a class="dialog-launch" dialog-on-close="ConcreteSitemap.exitEditMode(<%=item.cID%>)" dialog-width="500" dialog-height="630" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.setPagePermissions + '" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/panels/details/page/permissions?cID=<%=item.cID%>">' + ccmi18n_sitemap.setPagePermissions + '</a></li>' + '<% } %>' + '<% if (item.canEditPageDesign || item.canEditPageType) { %>' + '<li><a class="dialog-launch" dialog-on-close="ConcreteSitemap.exitEditMode(<%=item.cID%>)" dialog-width="350" dialog-height="500" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.pageDesign + '" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/dialogs/page/design?cID=<%=item.cID%>">' + ccmi18n_sitemap.pageDesign + '</a></li>' + '<% } %>' + '<% if (item.canViewPageVersions) { %>' + '<li><a class="dialog-launch" dialog-on-close="ConcreteSitemap.exitEditMode(<%=item.cID%>)" dialog-width="640" dialog-height="340" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.pageVersions + '" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/panels/page/versions?cID=<%=item.cID%>">' + ccmi18n_sitemap.pageVersions + '</a></li>' + '<% } %>' + '<% if (item.canDeletePage) { %>' + '<li><a class="dialog-launch" dialog-on-close="ConcreteSitemap.exitEditMode(<%=item.cID%>)" dialog-width="360" dialog-height="250" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.deletePage + '" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/dialogs/page/delete_from_sitemap?cID=<%=item.cID%>">' + ccmi18n_sitemap.deletePage + '</a></li>' + '<% } %>' + '<li class="divider" data-sitemap-mode="explore"></li>' + '<li data-sitemap-mode="explore"><a class="dialog-launch" dialog-width="90%" dialog-height="70%" dialog-modal="false" dialog-title="' + ccmi18n_sitemap.moveCopyPage + '" href="' + CCM_TOOLS_PATH + '/sitemap_search_selector?sitemap_select_mode=move_copy_delete&cID=<%=item.cID%>">' + ccmi18n_sitemap.moveCopyPage + '</a></li>' + '<li data-sitemap-mode="explore"><a href="' + CCM_DISPATCHER_FILENAME + '/dashboard/sitemap/explore?cNodeID=<%=item.cID%>&task=send_to_top">' + ccmi18n_sitemap.sendToTop + '</a></li>' + '<li data-sitemap-mode="explore"><a href="' + CCM_DISPATCHER_FILENAME + '/dashboard/sitemap/explore?cNodeID=<%=item.cID%>&task=send_to_bottom">' + ccmi18n_sitemap.sendToBottom + '</a></li>' + '<% if (item.numSubpages > 0) { %>' + '<li class="divider"></li>' + '<li><a href="' + CCM_DISPATCHER_FILENAME + '/dashboard/sitemap/search/?submitSearch=1&field[]=parent_page&cParentAll=1&cParentIDSearchField=<%=item.cID%>">' + ccmi18n_sitemap.searchPages + '</a></li>' + '<li><a href="' + CCM_DISPATCHER_FILENAME + '/dashboard/sitemap/explore/-/<%=item.cID%>">' + ccmi18n_sitemap.explorePages + '</a></li>' + '<% } %>' + '<% if (item.canAddExternalLinks || item.canAddSubpages) { %>' + '<li class="divider"></li>' + '<% if (item.canAddSubpages > 0) { %>' + '<li><a class="dialog-launch" dialog-width="350" dialog-modal="false" dialog-height="350" dialog-title="' + ccmi18n_sitemap.addPage + '" dialog-modal="false" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/dialogs/page/add?cID=<%=item.cID%>">' + ccmi18n_sitemap.addPage + '</a></li>' + '<% } %>' + '<% if (item.canAddExternalLinks > 0) { %>' + '<li><a class="dialog-launch" dialog-width="350" dialog-modal="false" dialog-height="400" dialog-title="' + ccmi18n_sitemap.addExternalLink + '" dialog-modal="false" href="' + CCM_DISPATCHER_FILENAME + '/ccm/system/dialogs/page/add_external?cID=<%=item.cID%>">' + ccmi18n_sitemap.addExternalLink + '</a></li>' + '<% } %>' + '<% } %>' + '<% } %>' + '</ul></div></div>'; } }; // jQuery Plugin $.fn.concretePageAjaxSearch = function (options) { return $.each($(this), function (i, obj) { new ConcretePageAjaxSearch($(this), options); }); }; global.ConcretePageAjaxSearch = ConcretePageAjaxSearch; global.ConcretePageAjaxSearchMenu = ConcretePageAjaxSearchMenu; })(this, jQuery);
import { Template } from 'meteor/templating'; import managerSchema from './schema'; Template.addOrganizationManagerForm.helpers({ managerSchema () { return managerSchema; }, });
import chai from 'chai'; import { it, beforeEach } from 'arrow-mocha/es5'; import Look from '../../../src/abilities/Look'; chai.should(); describe('Look', () => { beforeEach((ctx) => { ctx.unit = { getPosition: ctx.sandbox.stub().returns({ getRelativeSpace: () => null }), say: () => null }; ctx.look = new Look(ctx.unit); }); it('should get 3 objects at position from offset', (ctx) => { const expectations = ctx.sandbox.mock(ctx.unit.getPosition()); expectations.expects('getRelativeSpace').withArgs(1, 0).returns(1); expectations.expects('getRelativeSpace').withArgs(2, 0).returns(2); expectations.expects('getRelativeSpace').withArgs(3, 0).returns(3); ctx.look.perform('forward').should.eql([1, 2, 3]); expectations.verify(); }); });
$(function () { //to fix collapse mode width issue $(".nav li,.nav li a,.nav li ul").removeAttr('style'); //for dropdown menu $(".dropdown-menu").parent().removeClass().addClass('dropdown'); $(".dropdown>a").removeClass().addClass('dropdown-toggle').append('<b class="caret"></b>').attr('data-toggle', 'dropdown'); //remove default click redirect effect $('.dropdown-toggle').attr('onclick', '').off('click'); });
const { Pool, Schema } = require('../..'); const assert = require('assert'); const { NString } = require('../../schemas'); describe('Schema', () => { it('define schemas by pool constructor', () => { const pool = new Pool({ name: 'foo', schemas: [ { name: 'bar', fields: [ new NString('baz').filter('default:baz'), ], }, ], }); assert.strictEqual(pool.getSchema('bar').name, 'bar'); assert.strictEqual(pool.getSchema('bar').fields[0].name, 'baz'); assert.strictEqual(pool.getSchema('bar').fields[0].filters.length, 1); }); it('store attributes', () => { const schema = new Schema({ name: 'foo' }); assert.strictEqual(schema.get('bar'), undefined); schema.set('bar', 'baz'); assert.strictEqual(schema.get('bar'), 'baz'); }); it('has observers', async () => { const schema = new Schema({ name: 'foo' }); const obs1 = { initialize () { this.ready = true; }, uninitialize () { this.ready = false; }, async insert (ctx, next) { ctx.logs.push(1); await next(); ctx.logs.push(2); }, }; schema.addObserver(obs1); assert.strictEqual(obs1.ready, true); { const ctx = { mode: 'insert', logs: [] }; await schema.observe(ctx, () => ctx.logs.push(3)); assert.deepStrictEqual(ctx.logs, [1, 3, 2]); } schema.addObserver({ async insert (ctx, next) { ctx.logs.push(4); await next(); ctx.logs.push(5); }, }); { const ctx = { mode: 'insert', logs: [] }; await schema.observe(ctx, () => ctx.logs.push(3)); assert.deepStrictEqual(ctx.logs, [1, 4, 3, 5, 2]); } schema.removeObserver(obs1); assert.strictEqual(obs1.ready, false); { const ctx = { mode: 'insert', logs: [] }; await schema.observe(ctx, () => ctx.logs.push(3)); assert.deepStrictEqual(ctx.logs, [4, 3, 5]); } }); describe('constructor', () => { it('require schema name', () => { assert.throws(() => new Schema({})); }); }); });
'use strict'; System.register(['aurelia-dependency-injection', 'aurelia-templating', './constants'], function (_export, _context) { "use strict"; var inject, customElement, bindable, noView, processContent, TargetInstruction, constants, _dec, _dec2, _dec3, _dec4, _class, _desc, _value, _class2, _descriptor, Template; function _initDefineProp(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object['ke' + 'ys'](descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object['define' + 'Property'](target, property, desc); desc = null; } return desc; } function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.'); } return { setters: [function (_aureliaDependencyInjection) { inject = _aureliaDependencyInjection.inject; }, function (_aureliaTemplating) { customElement = _aureliaTemplating.customElement; bindable = _aureliaTemplating.bindable; noView = _aureliaTemplating.noView; processContent = _aureliaTemplating.processContent; TargetInstruction = _aureliaTemplating.TargetInstruction; }, function (_constants) { constants = _constants.constants; }], execute: function () { _export('Template', Template = (_dec = customElement(constants.elementPrefix + 'template'), _dec2 = noView(), _dec3 = processContent(function (compiler, resources, element, instruction) { var html = element.innerHTML; if (html !== '') { instruction.template = html; } element.innerHTML = ''; }), _dec4 = inject(TargetInstruction), _dec(_class = _dec2(_class = _dec3(_class = _dec4(_class = (_class2 = function Template(target) { _classCallCheck(this, Template); _initDefineProp(this, 'template', _descriptor, this); this.template = target.elementInstruction.template; }, (_descriptor = _applyDecoratedDescriptor(_class2.prototype, 'template', [bindable], { enumerable: true, initializer: null })), _class2)) || _class) || _class) || _class) || _class)); _export('Template', Template); } }; });
export function square(num) { return num ** 2; }
import { extend } from './utils'; var Observable = Rx.Observable; var Subject = Rx.Subject; /** Creates a function that will create a child observable from the RxSocketSubject Usage is as follows: // set up an RxSocketSubject var endpoints = Observable.just('ws://mysocketserver'); var socket = RxSocketSubject.create(endpoints); // create a n observable factory var fromTickerRequest = socket.multiplex(function(request) { return function(data) { return data.requestId === request.requestId; } }); // create a observables of multiplexed ticker data var subNflx = { requestId: 1, subscribeTo: 'NFLX' }; var unsubNflx = { requestId: 1, unsubscribeFrom: 'NFLX' }; var netflixTickerData = fromTickerRequest(subNflx, unsubNflx); var subGoog = { requestId: 2, subscribeTo: 'GOOG' }; var unsubGoog = { requestId: 2, unsubscribeFrom: 'GOOG' }; var googleTickerData = fromTickerRequest(subGoog, unsubGoog); // subscribe to the ticker data netflixTickerData.subscribe(function(responseData) { console.log(responseData); }); googleTickerData.subscribe(function(responseData) { console.log(responseData); }); @method multiplex @param {RxSocketSubject} socket the RxSocketSubject to multiplex over @param {Object} a hash of configuration options for the multiplexer. This includes configuration for serializing outbound messages and deserializing inbound messages. Defaults are as follows: { responseFilter: null, serializer: function(data) { return JSON.stringify(data); }, deserializer: function(e) { return JSON.parse(e.data); } } @return {Function} a function to create an multiplexed socket observable from the current socket. This function accepts arguments for `subscriptionData` and `unsubscriptionData`. */ export default function multiplex(socket, options) { var config = { serializer: function(data) { return JSON.stringify(data); }, deserializer: function(e) { return JSON.parse(e.data); }, subscriberProxy: null, messageProxy: null }; if(options) { extend(config, options); } var subscriptions; var unsubscriptions; var count = 0; var socketSubDisp; var subscribeSocket = function() { if(++count === 1) { subscriptions = new Subject(); unsubscriptions = new Subject(); var outgoing; if(config.subscriberProxy) { outgoing = config.subscriberProxy(Observable.merge(subscriptions.map(function(x) { return { type: 'sub', value: x }; }), unsubscriptions.map(function(x) { return { type: 'unsub', value: x }; }))); } else { outgoing = Observable.merge(subscriptions, unsubscriptions); } socketSubDisp = outgoing.map(config.serializer).subscribe(socket); } }; var unsubscribeSocket = function(){ if(--count === 0) { socketSubDisp.dispose(); } }; return function multiplex(subscriptionData, unsubscriptionData, responseFilter) { if(!responseFilter && !config.responseFilter) { throw 'no response filter provided'; } responseFilter = responseFilter || config.responseFilter(subscriptionData); return Observable.create(function(obs) { subscribeSocket(); subscriptions.onNext(subscriptionData); var incoming = config.messageProxy ? config.messageProxy(socket) : socket; var disposable = incoming.map(config.deserializer). filter(responseFilter). subscribe(obs); var multiplexUnsub = function() { unsubscriptions.onNext(unsubscriptionData); }; return function() { multiplexUnsub(); unsubscribeSocket(); disposable.dispose(); }; }); }; };
// Create a new YUI instance and populate it with the required modules. YUI().use("test", "node-event-simulate", "gallery-form", function (Y) { var suite = new Y.Test.Suite("textarea-field"); suite.add(new Y.Test.Case({ name: "TextareaFieldTest", setUp: function() { var boundingBox = Y.Node.create("<div></div>"); var scaffolding = Y.one("#scaffolding"); scaffolding.setContent(boundingBox); this.field = new Y.TextareaField({boundingBox: boundingBox}); this.field.render(); }, // The TextareaField widget renders a textarea element. testRenderUI: function() { var contentBox = this.field.get("contentBox"); Y.Assert.isNotNull(contentBox.one("textarea")); } })); Y.Test.Runner.add(suite); Y.Test.Runner.run(); });
game.PlayerEntity = me.Entity.extend({ init: function(x, y, settings) { this.setSuper(x,y); this.setPlayerTimers(); this.setAttributes(); this.type = "PlayerEntity"; this.setFlags(); me.game.viewport.follow(this.pos, me.game.viewport.AXIS.BOTH); this.addAnimation(); this.renderable.setCurrentAnimation("idle"); }, //this function tells us that setSuper works for the player and how it looks setSuper: function(x,y){ this._super(me.Entity, 'init', [x, y, { image: "player", width: 64, height: 64, spritewidth: "64", spriteheight: "64", getShape: function(){ return(new me.Rect(0, 0, 64, 64)).toPolygon(); } }]); }, //setPayerTimer make shows how the player moves setPlayerTimers: function(){ this.now = new Date().getTime(); this.lastHit = this.now; this.lastSpear = this.now; this.lastAttack = new Date().getTime(); //Haven't used this }, //set setAttributes: function(){ this.health = game.data.playerHealth; this.body.setVelocity(game.data.playerMoveSpeed, 20); this.attack = game.data.playerAttack; }, setFlags: function(){ //Keeps track of which direction your character is going this.facing = "right"; this.dead = false; this.attacking = false; }, addAnimation: function(){ this.renderable.addAnimation("idle", [78]); this.renderable.addAnimation("walk", [117, 118, 119, 120, 121, 122, 123, 124, 125], 80); this.renderable.addAnimation("attack", [65, 66, 67, 68, 69, 70, 71, 72], 80); }, update: function(delta){ this.now = new Date().getTime(); this.dead = this.checkIfDead(); this.checkKeyPressesAndMove(); this.checkAbilityKeys(); this.setAnimation(); me.collision.check(this, true, this.collideHandler.bind(this), true); this.body.update(delta); this._super(me.Entity, "update", [delta]); return true; }, checkIfDead: function(){ if (this.health <= 0){ return true; } return false; }, checkKeyPressesAndMove: function(){ if (me.input.isKeyPressed("right")){ this.moveRight(); }else if (me.input.isKeyPressed("left")){ this.moveLeft(); }else { this.body.vel.x = 0; } if (me.input.isKeyPressed("up")){ this.up(); } this.attacking = me.input.isKeyPressed("attack"); }, moveRight: function(){ //sets the position of my x by adding the velocity defined above in //setVelocity() and multiplying it by me.timer.tick. //me.timer.tickmakes the movement look smooth this.body.vel.x += this.body.accel.x * me.timer.tick; this.facing = "right"; this.flipX(true); }, moveLeft: function(){ this.facing = "left"; this.body.vel.x -= this.body.accel.x / me.timer.tick; this.flipX(false); }, up: function(){ this.body.vel.y -= this.body.accel.y * me.timer.tick; }, checkAbilityKeys: function(){ if(me.input.isKeyPressed("skill1")){ //this.speedBurst(); }else if(me.input.isKeyPressed("skill2")){ //this.eatCreep(); } else if(me.input.isKeyPressed("skill3")){ this.throwSpear(); } }, throwSpear: function(){ if((this.now-this.lastSpear) >= game.data.spearTimer*1000 && game.data.ability3 > 0){ this.lastSpear = this.now; var spear = me.pool.pull("spear", this.pos.x, this.pos.y, {}, this.facing); me.game.world.addChild(spear, 10); } }, setAnimation: function(){ if (this.attacking){ if (!this.renderable.isCurrentAnimation("attack")){ //Sets the current animation to attack and once that is over //goes back to the idle animation this.renderable.setCurrentAnimation("attack", "idle"); //Makes it so that the next time we start this sequence we begin //from the first animation, not wherever we left off when we //switched to another animation this.renderable.setAnimationFrame(); } } else if (this.body.vel.x !== 0){ if(!this.renderable.isCurrentAnimation("walk")){ this.renderable.setCurrentAnimation("walk"); } } else{ this.renderable.setCurrentAnimation("idle"); } }, loseHealth: function(damage){ this.health = this.health - damage; }, collideHandler: function(response){ if (response.b.type === 'EnemyBaseEntity'){ this.collideWithEnemyBase(response); }else if(response.b.type==='EnemyCreep'){ this.collideWithEnemyCreep(response); } }, collideWithEnemyBase: function(response){ var ydif = this.pos.y - response.b.pos.y; var xdif = this.pos.x - response.b.pos.x; if (ydif <-40 && xdif < 70 && xdif >-35){ this.body.falling.false; this.body.vel.y = -1; } else if (xdif >-35 && this.facing==='right' && (xdif<0)){ this.body.vel.x = 0; this.pos.x = this.pos.x - 1; } else if (xdif<70 && this.facing==='left' && xdif>0){ this.body.vel.x = 0; } if(this.renderable.isCurrentAnimation("attack") && this.now-this.lastHit >= game.data.playerAttackTimer){ this.lastHit = this.now; response.b.loseHealth(game.data.playerAttack); } }, collideWithEnemyCreep: function(response){ var xdif = this.pos.x - response.b.pos.x; var ydif = this.pos.y - response.b.pos.y; this.stopMovement(xdif); if(this.checkAttack(xdif, ydif)){ this.hitCreep(response); }; }, stopMovement: function(xdif){ if (xdif>0){ if(this.facing==="left"){ this.body.vel.x = 0; } }else{ if(this.facing==="right"){ this.body.vel.x = 0; } } }, checkAttack: function(xdif, ydif){ if(this.renderable.isCurrentAnimation("attack") && this.now-this.lastHit >= game.data.playerAttackTimer && (Math.abs(ydif) <=40) && (((xdif>0) && this.facing==="left") || ((xdif<0) && this.facing==="right")) ){ this.lastHit = this.now; //if the creeps health is less than our attack, execute code in if satement return true; } return false; }, hitCreep: function(response){ if(response.b.health <= game.data.playerAttack){ //adds one gold for a creep kill game.data.gold += 1; console.log("Current gold: " + game.data.gold); } response.b.loseHealth(game.data.playerAttack); }, });
/* istanbul ignore next */ (function() { (function() { 'use strict'; var cancel, i, isOldBrowser, lastTime, vendors, vp, w; vendors = ['webkit', 'moz']; i = 0; w = window; while (i < vendors.length && !w.requestAnimationFrame) { vp = vendors[i]; w.requestAnimationFrame = w[vp + 'RequestAnimationFrame']; cancel = w[vp + 'CancelAnimationFrame']; w.cancelAnimationFrame = cancel || w[vp + 'CancelRequestAnimationFrame']; ++i; } isOldBrowser = !w.requestAnimationFrame || !w.cancelAnimationFrame; if (/iP(ad|hone|od).*OS 6/.test(w.navigator.userAgent) || isOldBrowser) { lastTime = 0; w.requestAnimationFrame = function(callback) { var nextTime, now; now = Date.now(); nextTime = Math.max(lastTime + 16, now); return setTimeout((function() { callback(lastTime = nextTime); }), nextTime - now); }; w.cancelAnimationFrame = clearTimeout; } })(); }).call(this);
import React, { Component } from 'react' import { Alert } from 'antd' import PropTypes from 'prop-types' import Text from './Text' import styles from './Messages.scss' class Messages extends Component { static propTypes = { messages: PropTypes.array.isRequired, username: PropTypes.string.isRequired, } saveMessageList = div => { this.messageList = div } scrollToBottom() { if (!this.messageList) return const { scrollHeight } = this.messageList const height = this.messageList.clientHeight const maxScrollTop = scrollHeight - height this.messageList.scrollTop = maxScrollTop > 0 ? maxScrollTop : 0 } componentDidMount() { this.scrollToBottom() } componentDidUpdate() { this.scrollToBottom() } shouldComponentUpdate(nextProps) { return this.props.messages.length !== nextProps.messages.length } render() { const { messages, username } = this.props return ( <div className={styles.messages} ref={this.saveMessageList}> {messages.map(msg => { const props = { key: msg.uid } if (msg.alert) { const { message, description, alert } = msg return ( <Alert className={styles.alert} message={message} description={description} type={alert} showIcon {...props} /> ) } if (msg.text) { props.myName = username return <Text {...msg} {...props} /> } return null })} </div> ) } } export default Messages
/** * Simple accordion using an html list * * @author alejandro soto * */ YUI.add('gallery-simple-accordion', function (Y) { function SimpleAccordion(config) { SimpleAccordion.superclass.constructor.apply(this, arguments); } SimpleAccordion.NAME = 'simple-accordion'; SimpleAccordion.ATTRS = {}; Y.extend(SimpleAccordion, Y.Base, { config: null, _ACCORDION_ITEM: '.accordion-item', _ACCORDION_ITEM_LINK: '.accordion-item-link', _ACCORDION_ITEM_CONTENT: '.accordion-item-content', _HIDE: 'hide', _SHOW: 'show', _SELECTED: 'selected', /** * This constructor method initializes the object and start rendering the carousel * * @param cfg Module external configuration */ initializer: function (cfg) { this.config = cfg; this._initializesItemClicked(); }, /** * Initializes the carousel * */ _initializesItemClicked: function() { var cfg = this.config; var me = this; if (me.hasItems()) { cfg.mainNode.delegate('click', function(e) { e.preventDefault(); me._deselectAllItems(); var li = e.target.get('parentNode'); var itemContent = li.one(me._ACCORDION_ITEM_CONTENT); li.addClass(me._SELECTED); if (itemContent) { itemContent.removeClass(me._HIDE); itemContent.addClass(me._SHOW); } console.info('event clicked'); }, me._ACCORDION_ITEM_LINK); } }, /** * Deselects all the items in the list * */ _deselectAllItems: function() { var cfg = this.config; cfg.mainNode.all(this._ACCORDION_ITEM).removeClass(this._SELECTED); cfg.mainNode.all(this._ACCORDION_ITEM_CONTENT).removeClass(this._SHOW); cfg.mainNode.all(this._ACCORDION_ITEM_CONTENT).addClass(this._HIDE); }, /** * Validates if the list has items * */ hasItems: function () { var cfg = this.config; return cfg.mainNode && cfg.mainNode.all(this._ACCORDION_ITEM_LINK).size() > 0; }, /** * Destructor * */ destructor: function () { } }); Y.SimpleAccordion = SimpleAccordion; }, '0.0.1', { requires: ['base', 'node', 'node-event-delegate'] });
var fs = require('fs'), _path = require('path'); module.exports = { collect: function (path) { var files = []; (function collect(p) { if (fs.statSync(p).isDirectory()) { fs.readdirSync(p).forEach(function (item) { collect(_path.join(p, item)); }); } else if (p.match(/\.js$/)) { files.push(p); } }(path)); return files; } };
"use strict"; var url = require('url'); var stripURLHash = require('./stripURLHash'); var isURLAnExpression = require('../expressionDomain/isURLAnExpression'); /* urls is an Array<string> these strings can be any string, but want to be urls */ module.exports = function(urls){ return urls .map(function(u){ return u.trim(); }) .filter(function(u){ var parsed = url.parse(u); // keep only absolute URLs if(!parsed.protocol || !parsed.hostname) return false; // remove non-http links, like javascript: and mailto: links return parsed.protocol === 'http:' || parsed.protocol === 'https:'; }) .map(stripURLHash) // exclude URLs that are likely to end up being resources that we cannot process .filter(function(u){ // the url doesn't end with any of the excluded file extensions // equivalent to: none of the extension terminates the url return isURLAnExpression(u); }); };
import can from 'can/util/library'; import CanMap from 'can/map/'; import 'can/map/define/'; import List from 'can/list/'; import Component from 'can/component/'; import Route from 'can/route/'; import template from './template.stache!'; import './widget.less!'; import '../list-table/'; import '../property-table/'; import '../form-widget/'; import '../filter-widget/'; import '../paginate-widget/'; import 'can-ui/modal-container/'; import 'can-ui/tab-container/'; import 'can-ui/panel-container/'; import { FilterList } from '../filter-widget/Filter'; import { mapToFields, parseFieldArray } from '../util/field'; import PubSub from 'pubsub-js'; import { ViewMap } from './ViewMap'; export const TOPICS = { /** * Topic to add a new message when an object is modified or deleted. The topic * published is `addMessage` * @property {String} crud-manager.ViewModel.topics.ADD_MESSAGE * @parent crud-manager.ViewModel.topics */ ADD_MESSAGE: 'addMessage', /** * topic to clear existing messages. The topic * published is `clearMessages` * @property {String} crud-manager.ViewModel.topics.CLEAR_MESSAGES * @parent crud-manager.ViewModel.topics */ CLEAR_MESSAGES: 'clearMessages' }; const DEFAULT_BUTTONS = [{ iconClass: 'fa fa-list-ul', eventName: 'view', title: 'View Row Details' }]; const EDIT_BUTTONS = DEFAULT_BUTTONS.concat([{ iconClass: 'fa fa-pencil', eventName: 'edit', title: 'Edit Row' }, { iconClass: 'fa fa-trash', eventName: 'delete', title: 'Remove Row' }]); export const SortMap = CanMap.extend({ fieldName: null, type: 'asc' }); /** * @module crud-manager */ /** * @constructor crud-manager.ViewModel ViewModel * @parent crud-manager * @group crud-manager.ViewModel.props Properties * @group crud-manager.ViewModel.topics Topics * * @description A `<crud-manager />` component's ViewModel */ export let ViewModel = CanMap.extend({ /** * @prototype */ define: { /** * The view object that controls the entire setup of the crud-manager. * Properties on the view control how each field is formatted, default values, * interactions, etc. * @property {crud.types.viewMap} crud-manager.ViewModel.props.view * @parent crud-manager.ViewModel.props */ view: { Type: ViewMap, set(view) { //if parameters are in the view, mix them in to the crud parameters if (view.attr('parameters')) { this.attr('parameters').attr(view.attr('parameters').serialize()); } return view; } }, /** * The current page to display in this view. Options include: * * `list`: The list table page that displays all records * * `details`: The individual view page that shows one detailed record * * `edit`: The editing view that allows editing of an individual record using a form * @property {String} crud-manager.ViewModel.props.page * @parent crud-manager.ViewModel.props */ page: { value: 'list', type: 'string' }, /** * A virtual property that calculates the number of total pages to show * on the list page. This controls the paginator widget. It uses the property * `view.connectionProperties.total` and `queryPerPage` to perform this calculation. * @property {String} crud-manager.ViewModel.props.totalPages * @parent crud-manager.ViewModel.props */ totalPages: { get() { let total = this.attr('view.connection.metadata.total'); if (!total) { return 0; } //round up to the nearest integer return Math.ceil(total / this.attr('parameters.perPage')); } }, /** * The array of per page counts to display in the per page switcher. This * list is automatically filtered to include options provided where one * step below is less than the total count. Example, if there are * 30 total items, the default list returned will be 10, 20, and 50. * If no options are returned the per page switcher is hidden. * @property {Array<Number>} crud-manager.ViewModel.props.perPageOptions * @parent crud-manager.ViewModel.props */ perPageOptions: { Value() { return [10, 20, 50, 100]; }, get(counts) { return counts.filter((c, index) => { return counts[index ? index - 1 : index] < this.attr('view.connection.metadata.total'); }); } }, /** * A helper to show or hide the paginate-widget. If totalPages is less than * 2, the paginate widget will not be shown. * @property {Boolean} crud-manager.ViewModel.props.showPaginate * @parent crud-manager.ViewModel.props */ showPaginate: { type: 'boolean', get() { return this.attr('totalPages') > 1; } }, /** * the internal parameters object. This is prepopulated when view is set. * @type {Object} */ parameters: { Value: CanMap.extend({ define: { filters: { Type: FilterList, Value: FilterList }, perPage: { type: 'number', value: 10 }, page: { type: 'number', value: 0 }, sort: { Type: SortMap, Value: SortMap } } }) }, /** * A promise that resolves to the objects retrieved from a can-connect.getList call * @property {can.Deferred} crud-manager.ViewModel.props.objects * @parent crud-manager.ViewModel.props */ objects: { get(prev, setAttr) { let params = this.attr('parameters') ? this.attr('parameters').serialize() : {}; let promise = this.attr('view.connection').getList(params); //handle promise.fail for deferreds let dummy = promise.fail ? promise.fail(err => { console.error('unable to complete objects request', err); }) : //and handle promise.catch for local-storage deferreds... promise.catch(err => { console.error('unable to complete objects request', err); }); return promise; } }, /** * A promise that resolves to the object retreived from a `can-connect.get` call * @property {can.Map} crud-manager.ViewModel.props.focusObject * @parent crud-manager.ViewModel.props */ focusObject: { get(prev, setAttr) { if (this.attr('viewId')) { let params = {}; params[this.attr('view.connection').idProp] = this.attr('viewId'); let promise = this.attr('view.connection').get(params); let dummy = promise.fail ? promise.fail(function(err) { console.error('unable to complete focusObject request', err); }) : promise.catch(function(err) { console.error('unable to complete focusObject request', err); }); return promise; } return null; } }, /** * Buttons to use for the list table actions. If `view.disableEdit` is falsey * the buttons will include an edit and delete button. Otherwise, it will be * a simple view details button. * @property {Array<crud.types.TableButtonObject>} crud-manager.ViewModel.props.buttons * @parent crud-manager.ViewModel.props */ buttons: { type: '*', get() { return this.attr('view.disableEdit') ? DEFAULT_BUTTONS : EDIT_BUTTONS; } }, /** * The page number, this is calculated by incrementing the queryPage by one. * @property {Number} crud-manager.ViewModel.props.pageNumber * @parent crud-manager.ViewModel.props */ pageNumber: { get() { return this.attr('parameters.page') + 1; } }, /** * The current id number of the object that is being viewed in the property * table or edited in the form widget. * @property {Number} crud-manager.ViewModel.props.buttons * @parent crud-manager.ViewModel.props */ viewId: { type: 'number', value: 0 }, /** * Current loading progress. NOT IMPLEMENTED * TODO: implement loading progress on lengthy processes like multi delete * @property {Number} crud-manager.ViewModel.props.progress * @parent crud-manager.ViewModel.props */ progress: { type: 'number', value: 100 }, /** * Whether or not the filter popup is visible * @property {Boolean} crud-manager.ViewModel.props.buttons * @parent crud-manager.ViewModel.props */ filterVisible: { type: 'boolean', value: false }, /** * The internal field array that define the display of data and field types * for editing and filtering * @property {Array<Field>} crud-manager.ViewModel.props._fields * @parent crud-manager.ViewModel.props */ _fields: { get() { //try a fields propety first if (this.attr('view.fields')) { return parseFieldArray(this.attr('view.fields')); } //if that doesn't exist, use the objectTemplate or Map to create fields let template = this.attr('view.objectTemplate') || this.attr('view.connection.Map'); return mapToFields(template); } }, /** * An array of currently selected objects in the list-table * @property {Array<can.Map>} crud-manager.ViewModel.props.selectedObjects * @parent crud-manager.ViewModel.props */ selectedObjects: { Value: List } }, /** * @function init * Initializes filters and other parameters */ init() { //set up related filters which are typically numbers if (this.attr('relatedField')) { let val = parseFloat(this.attr('relatedValue')); if (!val) { //if we can't force numeric type, just use default value val = this.attr('relatedValue'); } this.attr('parameters.filters').push({ name: this.attr('relatedField'), operator: 'equals', value: this.attr('relatedValue') }); } }, /** * @function setPage * Changes the page and resets the viewId to 0 * @signature * @param {String} page The name of the page to switch to */ setPage(page) { this.attr({ 'viewId': 0, 'page': page }); }, /** * @function editObject * Sets the current viewId to the object's id and sets the page to edit * to start editing the object provided. * @signature * @param {can.Map} scope The stache scope (not used) * @param {domNode} dom The domNode that triggered the event (not used) * @param {Event} event The event that was triggered (not used) * @param {can.Map} obj The object to start editing */ editObject(scope, dom, event, obj) { this.attr({ 'viewId': this.attr('view.connection').id(obj), 'page': 'edit' }); }, /** * @function viewObject * Sets the current viewId to the object's id and sets the page to details * to display a detailed view of the object provided. * @signature * @param {can.Map} scope The stache scope (not used) * @param {domNode} dom The domNode that triggered the event (not used) * @param {Event} event The event that was triggered (not used) * @param {can.Map} obj The object to view */ viewObject(scope, dom, event, obj) { this.attr({ 'viewId': this.attr('view.connection').id(obj), 'page': 'details' }); }, /** * @function saveObject * Saves the provided object and sets the current viewId to the object's * id once it is returned. We then switch the page to the detail view to * display the created or updated object. * * This method also adds notifications once the object is saved using PubSub. * * @signature `saveObject(obj)` * @param {can.Map} obj The object to save * * @signature `saveObject(scope, dom, event, obj)` * @param {can.Map} scope The stache scope (not used) * @param {domNode} dom The domNode that triggered the event (not used) * @param {Event} event The event that was triggered (not used) * @param {can.Map} obj The object to save */ saveObject() { let obj; //accept 4 params from the template or just one if (arguments.length === 4) { obj = arguments[3]; } else { obj = arguments[0]; } let page = this.attr('page'); // trigger events beforeCreate/beforeSave depending on if we're adding or // updating an object let val = true; if (page === 'add') { val = this.onEvent(obj, 'beforeCreate'); } else { val = this.onEvent(obj, 'beforeSave'); } // halt save or create if the value returned is falsey if (!val) { return; } //display a loader //TODO: add loading progress? this.attr('progress', 100); this.attr('page', 'loading'); //save the object var deferred = this.attr('view.connection').save(obj); deferred.then(result => { //add a message PubSub.publish(TOPICS.ADD_MESSAGE, { message: this.attr('view.saveSuccessMessage'), detail: 'ID: ' + this.attr('view.connection').id(result) }); if (page === 'add') { this.onEvent(obj, 'afterCreate'); } else { this.onEvent(obj, 'afterSave'); } //update the view id //set page to the details view by default this.attr({ viewId: result.attr('id'), page: 'details' }); }).fail(e => { console.warn(e); PubSub.publish(TOPICS.ADD_MESSAGE, { message: this.attr('view.saveFailMessage'), detail: e.statusText + ' : <small>' + e.responseText + '</small>', level: 'danger', timeout: 20000 }); this.attr('page', page); }); return deferred; }, /** * @function getNewObject * Creates and returns a new object from the view's objectTemplate * @signature * @return {can.map} A new object created from the `view.objectTemplate` */ getNewObject() { //create a new empty object with the defaults provided //from the objectTemplate property which is a map let props = {}; if (this.attr('relatedField')) { props[this.attr('relatedField')] = this.attr('relatedValue'); } return new(this.attr('view.objectTemplate'))(props); }, /** * @function deleteObject * Displays a confirm dialog box and if confirmed, deletes the object provided. * Once the object is deleted, a message is published using PubSub. * * @signature `deleteObject(obj, skipConfirm)` * @param {can.Map} obj The object to delete * @param {Boolean} skipConfirm If true, the method will not display a confirm dialog * * @signature `deleteObject( scope, dom, event, obj, skipConfirm )` * @param {can.Map} scope The stache scope (not used) * @param {domNode} dom The domNode that triggered the event (not used) * @param {Event} event The event that was triggered (not used) * @param {can.Map} obj The object to delete * @param {Boolean} skipConfirm If true, the method will not display a confirm dialog * and will immediately attempt to remove the object */ deleteObject() { let obj, skipConfirm; //arguments can be ( scope, dom, event, obj, skipConfirm ) //OR (obj, skipConfirm) if (arguments.length > 2) { obj = arguments[3]; skipConfirm = arguments[4]; } else { obj = arguments[0]; skipConfirm = arguments[1]; } if (obj && (skipConfirm || confirm('Are you sure you want to delete this record?'))) { // beforeDelete handler // if return value is falsey, stop execution and don't delete if (!this.onEvent(obj, 'beforeDelete')) { return; } //destroy the object using the connection let deferred = this.attr('view.connection').destroy(obj); deferred.then(result => { //add a message PubSub.publish(TOPICS.ADD_MESSAGE, { message: this.attr('view.deleteSuccessMessage'), detail: 'ID: ' + this.attr('view.connection').id(result) }); //afterDelete handler this.onEvent(obj, 'afterDelete'); }); deferred.fail(result => { //add a message PubSub.publish(TOPICS.ADD_MESSAGE, { message: this.attr('view.deleteFailMessage'), detail: result.statusText + ' : <small>' + result.responseText + '</small>', level: 'danger', timeout: 20000 }); }); return deferred; } }, /** * @function deleteMultiple * Iterates through the objects in the `selectedObjects` array * and deletes each one individually. * //TODO implement batch deleting to avoid many ajax calls * @signature * @param {Boolean} skipConfirm If true, the method will not display a confirm dialog * and will immediately attempt to remove the selected objects */ deleteMultiple(skipConfirm) { let selected = this.attr('selectedObjects'); let defs = []; if (skipConfirm || confirm(`Are you sure you want to delete the ${selected.length} selected records?`)) { selected.forEach((obj) => { defs.push(this.deleteObject(null, null, null, obj, true)); }); selected.replace([]); } return defs; }, /** * @function clearSelection * empties the currently selected objects array */ clearSelection() { this.attr('selectedObjects').replace([]); }, /** * @function toggleFilter * Toggles the display of the filter dialog * @signature * @param {Boolean} val (Optional) whether or not to display the dialog */ toggleFilter(val) { if (typeof val !== 'undefined') { this.attr('filterVisible', val); } else { this.attr('filterVisible', !this.attr('filterVisible')); } }, /** * @function getRelatedValue * Retrieves a value from an object based on the key provided * @signature * @param {String} foreignKey The name of the field to retrieve from the object * @param {can.Map} focusObject The object to retrieve the property from * @return {*} The object's property */ getRelatedValue(foreignKey, focusObject) { return focusObject.attr(foreignKey); }, /** * @function onEvent * A helper function to trigger beforeSave, afterSave, etc events. * @signature * @param {can.Map} obj The object to dispatch with the event * @param {String} eventName The name of the event to dispatch */ onEvent(obj, eventName) { //get the view method let prop = this.attr(['view', eventName].join('.')); //if it is a function, call it passing the object let returnVal = true; if (typeof prop === 'function') { returnVal = prop(obj); // Only return falsey value if a value is returned. // Otherwise the execution of the event will be halted unintentionally if (typeof returnVal === 'undefined') { returnVal = true; } } //dispatch an event this.dispatch(eventName, [obj]); return returnVal; } }); Component.extend({ tag: 'crud-manager', viewModel: ViewModel, template: template, //since this is a recursive component, don't leak the scope. //this prevents infinite nesting of the components. leakScope: false, events: { '{viewModel.parameters.filters} change' () { this.viewModel.attr('parameters.page', 0); }, '{viewModel.parameters.perPage} change' () { this.viewModel.attr('parameters.page', 0); } } });
'use strict'; var itemsapi = require('./server') var app = itemsapi.get('express'); var config = require('./config/index').get(); var statusHelper = require('./src/helpers/status'); var fs = require('fs'); var Promise = require('bluebird') Promise.config({ warnings: false }) var fs = Promise.promisifyAll(require('fs-extra')) var redis_client = require('./config/redis') var mongoose_conn = require('./config/mongoose') var printed = false; redis_client.on("error", function (err) { if (!printed) { itemsapi.get('logger').info('Redis is required for authentication and nice URLs..'.red) itemsapi.get('logger').info('Without Redis application might not work properly'.red) printed = true } }) var mongo_error = false mongoose_conn.on('error', err => { mongo_error = true itemsapi.get('logger').info('MongoDB is required..'.red) itemsapi.get('logger').info('Please run MongoDB and restart application'.red) }) /** * express js listen */ app.listen(config.server.port, function afterListen() { var host = this.address().address; var port = this.address().port; if (!host || host === '::') { host = '127.0.0.1' } return statusHelper.elasticsearch(config.elasticsearch.host) .then(function(result) { itemsapi.get('logger').info('ItemsAPI started!'.green) if (result.elasticsearch_status === 200) { itemsapi.get('logger').info('Elasticsearch status -', 'OK'.green) } else { itemsapi.get('logger').info('Elasticsearch status -', config.elasticsearch.host.red + ' is unavailable.'.red) itemsapi.get('logger').info('Your application might not work properly'.red) itemsapi.get('logger').info('Instructions about how to run Elasticsearch - https://github.com/itemsapi/itemsapi/blob/master/ELASTICSEARCH.md'.red) itemsapi.get('logger').info('To start app with your custom elasticsearch url:'.red) itemsapi.get('logger').info('ELASTICSEARCH_URL=http://localhost:9200 npm start'.red) } if (!mongo_error) { itemsapi.get('logger').info('Open http://%s:%s in your browser to continue!'.green, host, port) } else { //itemsapi.get('logger').info('Open http://%s:%s in your browser to continue!'.red) } }) }).on('error', function(err){ console.log('Cannot start with port %s'.red, config.server.port); console.log('Try again with another port i.e. `PORT=4000 npm start`'.red); process.exit() });
'use strict'; app.service('PortService', function () { this.canMinimize = false; this.minimizeWindow = function () {}; this.canClose = true; this.closeWindow = function () { window.close(); }; this.saveSettings = function (obj, callback) { for (var k in obj) { window.localStorage.setItem(k, JSON.stringify(obj[k])); callback(); } }; // Broken this.loadSettings = function (key, def, callback) { var obj = JSON.parse(window.localStorage.getItem(key)); callback(_.assign(obj, def)); }; this.clearSettings = function (key, callback) { if (key == null) { window.localStorage.clear(); } else { window.localStorage.removeItem(key); } callback(); }; this.notify = function (title, body) { humane.timeout = 2500; humane.timeoutAfterMove = 2500; humane.waitForMove = true; humane.log('<strong>%s:</strong> %s'.format(title, body)); }; // Load Notifications var notifyCss = document.createElement('link'); notifyCss.rel = 'stylesheet'; notifyCss.href = 'components/humane-js/themes/libnotify.css'; document.head.appendChild(notifyCss); var notifyScript = document.createElement('script'); notifyScript.src = 'components/humane-js/humane.min.js'; document.body.appendChild(notifyScript); }); app.factory('LineSocket', function () { function lineSocket () { this._lineBuffer = ''; }; lineSocket.prototype.connect = function (host, port, onConnect, onMessage, onDisconnect) { var self = this; this._onConnect = onConnect; this._onMessage = onMessage; this._onDisconnect = onDisconnect; this._socket = new WebSocket('ws://127.0.0.1:8080'); this._socket.onopen = function () { self._onConnect(); self.readLoop(); }; }; lineSocket.prototype.disconnect = function () { this._socket.close(); this._onDisconnect(); }; lineSocket.prototype.readLoop = function () { var self = this; this._socket.onmessage = function (ev) { self._lineBuffer += ev.data; var parts = self._lineBuffer.split('\r\n'); for (var i = 0; i < parts.length - 1; i++) { self._onMessage(parts[i]); } self._lineBuffer = parts[parts.length-1]; }; }; lineSocket.prototype.writeLine = function (line) { line += '\r\n'; this._socket.send(line); }; return function () { return new lineSocket(); }; });
/*global describe, it, beforeEach, expect, xit, jasmine */ /*jshint laxbreak:true */ describe("PlotLegend JSON parsing", function () { "use strict"; var PlotLegend = require('../../../src/core/plot_legend.js'), DataPlot = require('../../../src/core/data_plot.js'), Text = require('../../../src/core/text.js'), legend, visible = true, label = "curly", json; require('../../../src/parser/json/plot_legend.js'); beforeEach(function () { json = { "visible" : visible, "label" : label }; legend = PlotLegend.parseJSON(json, new DataPlot()); }); it("should be able to parse a legend from XML", function () { expect(legend).not.toBeUndefined(); expect(legend instanceof PlotLegend).toBe(true); }); it("should be able to parse a legend from XML and read its 'visible' attribute", function () { expect(legend.visible()).toEqual(visible); }); it("should be able to parse a legend from XML and read its 'label' attribute", function () { expect(legend.label().string()).toEqual((new Text(label)).string()); }); });
(function() { 'use strict'; var reinaController = function($scope) { $scope.labelsEstado = ["Pendientes", "Enviadas", "Fallidas"]; $scope.dataEstado = [300, 500, 100]; $scope.colors = ['#FDB45C','00a65a','#F70106']; }; angular.module('colmenapp.Controllers') .controller('reinaController', [ '$scope', reinaController ]); })();
import { moduleForComponent, test } from 'ember-qunit'; import Schema from 'ember-json-schema-document/models/schema'; import schemaFixture from '../../fixtures/default-nested-property-schema'; import arrayBaseObjectFixture from '../../fixtures/location-schema'; import refSchemaFixture from '../../fixtures/ref-schema'; import hbs from 'htmlbars-inline-precompile'; moduleForComponent('document observability', { integration: true, beforeEach() { this.schema = new Schema(schemaFixture); this.document = this.schema.buildDocument(); } }); test('can observe document properties', function(assert) { this.set('doc', this.document); this.document.set('address.city', 'Hope'); this.render(hbs`{{doc.values.address.city}}`); assert.equal(this.$().text(), 'Hope'); this.document.set('address.city', 'New York'); assert.equal(this.$().text(), 'New York'); }); test('can observe array based document properties', function(assert) { this.schema = new Schema(arrayBaseObjectFixture); this.document = this.schema.buildDocument(); let item; let expected1 = { 'description': 'stuff here', 'streetAddress': 'unknown st', 'city': 'hope', 'state': 'ri', 'zip': '02831' }; item = this.document.addItem(); for (let key in expected1) { item.set(key, expected1[key]); } this.set('doc', this.document); this.render(hbs`{{#each doc.values as |item|}}{{item.values.city}}{{/each}}`); assert.equal(this.$().text(), 'hope', 'includes the correct initial value'); let expected2 = { 'description': 'other stuff here', 'streetAddress': 'totally known st', 'city': 'providence', 'state': 'ri', 'zip': '02831' }; item = this.document.addItem(); for (let key in expected2) { item.set(key, expected2[key]); } assert.equal(this.$().text(), 'hopeprovidence', 'adds new item value'); }); test('can observe referenced document properties', function(assert) { this.schema = new Schema(refSchemaFixture); let expected1 = { 'str': 'test', 'nested': { 'value': { 'value': { 'key': 'depth3' } } } }; this.document = this.schema.buildDocument(expected1); this.set('doc', this.document); this.render(hbs`{{doc.values.nested.value.value.key}}`); assert.equal(this.$().text(), 'depth3', 'renders the correct initial value'); this.document.set('nested.value.value.key', 'DEPTH3'); assert.equal(this.$().text(), 'DEPTH3', 'updates the value'); });
'use strict' var Buffer = require('buffer').Buffer var strtok = require('strtok2') var common = require('./common') var findZero = common.findZero var decodeString = common.decodeString exports.readData = function readData (b, type, flags, major) { var encoding = getTextEncoding(b[0]) var length = b.length var offset = 0 var output = [] var nullTerminatorLength = getNullTerminatorLength(encoding) var fzero if (type[0] === 'T') { type = 'T*' } switch (type) { case 'T*': var text = decodeString(b.slice(1), encoding).replace(/\x00+$/, '') // id3v2.4 defines that multiple T* values are separated by 0x00 output = text.split(/\x00/g) break case 'PIC': case 'APIC': var pic = {} offset += 1 switch (major) { case 2: pic.format = decodeString(b.slice(offset, offset + 3), encoding) offset += 3 break case 3: case 4: var enc = 'iso-8859-1' fzero = findZero(b, offset, length, enc) pic.format = decodeString(b.slice(offset, fzero), enc) offset = fzero + 1 break } pic.type = common.PICTURE_TYPE[b[offset]] offset += 1 fzero = findZero(b, offset, length, encoding) pic.description = decodeString(b.slice(offset, fzero), encoding) offset = fzero + nullTerminatorLength pic.data = new Buffer(b.slice(offset, length)) output = [pic] break case 'CNT': case 'PCNT': output = [strtok.UINT32_BE.get(b, 0)] break case 'ULT': case 'USLT': case 'COM': case 'COMM': var out = {} offset += 1 out.language = decodeString(b.slice(offset, offset + 3), 'iso-8859-1') offset += 3 fzero = findZero(b, offset, length, encoding) out.description = decodeString(b.slice(offset, fzero), encoding) offset = fzero + nullTerminatorLength out.text = decodeString(b.slice(offset, length), encoding).replace(/\x00+$/, '') output = [out] break case 'UFID': var ufid = {} fzero = findZero(b, offset, length, encoding) ufid.owner_identifier = decodeString(b.slice(offset, fzero), encoding) offset = fzero + nullTerminatorLength ufid.identifier = b.slice(offset, length) output = [ufid] break } return output } function getTextEncoding (byte) { switch (byte) { case 0x00: return 'iso-8859-1' // binary case 0x01: case 0x02: return 'utf16' // 01 = with bom, 02 = without bom case 0x03: return 'utf8' default: return 'utf8' } } function getNullTerminatorLength (enc) { switch (enc) { case 'utf16': return 2 default: return 1 } }
var gulp = require('gulp'); var gutil = require('gulp-util'); var bower = require('bower'); var concat = require('gulp-concat'); var sass = require('gulp-sass'); var minifyCss = require('gulp-minify-css'); var rename = require('gulp-rename'); var sh = require('shelljs'); var karma = require('karma').server; var uglify = require('gulp-uglify'); var karmaConf = require('./karma.conf.js'); var paths = { sass: ['./scss/**/*.scss'], js: ['js/**/*.js'], dist: './dist' }; gulp.task('default', ['karma']); gulp.task('dist', ['karma', 'scripts']); gulp.task('scripts', function() { return gulp.src([ 'js/ionic.filter.bar.js', 'js/ionic.filter.bar.directive.js', 'js/ionic.filter.bar.config.js', 'js/ionic.filter.bar.service.js', 'js/ionic.filter.bar.modal.js' ]) .pipe(concat('ionic.filter.bar.js')) .pipe(gulp.dest(paths.dist)) .pipe(uglify()) .pipe(rename({ extname: '.min.js' })) .pipe(gulp.dest(paths.dist)); }); gulp.task('sass', function(done) { gulp.src('./scss/ionic.filter.bar.scss') /* Since this is a plugin, we dont want to include ionic scss in dist. Don't think there is a way to compile scss using ionic vars/mixins without including it in the compiled file. For now we need to manually add @import "../bower_components/ionic/scss/ionic"; to the scss file, run this gulp task, remove ionic css in css file (inlcuding minified version), then remove the import in scss */ .pipe(sass({ errLogToConsole: true })) .pipe(gulp.dest(paths.dist)) .pipe(minifyCss({ keepSpecialComments: 0 })) .pipe(rename({ extname: '.min.css' })) .pipe(gulp.dest(paths.dist)) .on('end', done); }); gulp.task('watch', function() { gulp.watch(paths.sass, ['sass']); }); gulp.task('karma', function(done) { karmaConf.singleRun = true; karma.start(karmaConf, done); }); gulp.task('karma-watch', function(done) { karmaConf.singleRun = false; karma.start(karmaConf, done); }); gulp.task('install', ['git-check'], function() { return bower.commands.install() .on('log', function(data) { gutil.log('bower', gutil.colors.cyan(data.id), data.message); }); }); gulp.task('git-check', function(done) { if (!sh.which('git')) { console.log( ' ' + gutil.colors.red('Git is not installed.'), '\n Git, the version control system, is required to download Ionic.', '\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.', '\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.' ); process.exit(1); } done(); });
import React from 'react' class Triangle extends React.Component { render() { return ( <div>Triangle</div> ) } } export default Triangle
const DrawCard = require('../../../drawcard.js'); class Ygritte extends DrawCard { setupCardAbilities(ability) { this.persistentEffect({ match: this, effect: ability.effects.cannotBeKneeled(context => context.stage === 'effect') }); this.persistentEffect({ condition: () => this.controlsAnotherWildling(), match: this, effect: ability.effects.addKeyword('stealth') }); } controlsAnotherWildling() { return this.controller.anyCardsInPlay(card => card !== this && card.getType() === 'character' && card.hasTrait('Wildling')); } } Ygritte.code = '06017'; module.exports = Ygritte;
var React = require('react'), log = require('loglevel'); var FeedMixin = { getDefaultProps: function() { return { children: { title: '', link: '', contentSnippet: '' } }; }, componentWillMount: function() { this.feed = this.props.children; this.titleLink = this.feed.title && this.feed.link ? <a dangerouslySetInnerHTML={{__html: this.feed.title}} href={this.feed.link} target='_new'/> : ''; this.contentSnippet = this.feed.contentSnippet ? <p dangerouslySetInnerHTML={{__html: this.feed.contentSnippet}} /> : ''; } }; module.exports = FeedMixin;
import createSvgIcon from './utils/createSvgIcon'; import { jsx as _jsx } from "react/jsx-runtime"; export default createSvgIcon([/*#__PURE__*/_jsx("path", { d: "M12.01 12.46c-.15.42-.15.82-.08 1.28.1.55.33 1.04.2 1.6-.13.59-.77 1.38-1.53 1.63 1.28 1.05 3.2.37 3.39-1.32.17-1.54-1.44-1.98-1.98-3.19z" }, "0"), /*#__PURE__*/_jsx("path", { d: "M2 2v20h20V2H2zm10 16c-1.58 0-2.97-1.88-3-3.06 0-.05-.01-.13-.01-.22-.13-1.73 1-3.2 2.47-4.37.47 1.01 1.27 2.03 2.57 2.92.58.42.97.86.97 1.73 0 1.65-1.35 3-3 3zm8 2h-2v-2h-2.02c.63-.84 1.02-1.87 1.02-3 0-1.89-1.09-2.85-1.85-3.37C12.2 9.61 13 7 13 7c-6.73 3.57-6.02 7.47-6 8 .03.96.49 2.07 1.23 3H6v2H4V4h16v16z" }, "1")], 'FireplaceOutlined');
module.exports = function(grunt) { // Project configuration. grunt.initConfig({ pkg: '<json:package.json>', test: { files: ['test/**/*.js'] }, lint: { files: ['grunt.js', 'lib/**/*.js', 'test/**/*.js'] }, watch: { files: '<config:lint.files>', tasks: 'default' }, jshint: { options: { curly: true, eqeqeq: true, immed: true, latedef: true, newcap: true, noarg: true, sub: true, undef: true, boss: true, eqnull: true, node: true }, globals: { exports: true } } }); // Default task. grunt.registerTask('default', 'lint'); };
'use strict'; /** * Import module dependencies form local/current directory */ const settings = require('../settings/webstack.config'); const path = require('path'); module.exports = { "src_folders" : `${settings.automation.source}`, "output_folder" : `${settings.automation.output}`, "globals_path" : "", "selenium" : { "start_process" : false, "server_path" : "", "log_path" : `${settings.automation.selenium.logs}`, "port" : `${settings.automation.selenium.port}`, "cli_args" : { "webdriver.chrome.driver" : `${settings.automation.selenium.args.driver.chrome}`, "webdriver.gecko.driver" : `${settings.automation.selenium.args.driver.gecko}`, "webdriver.edge.driver" : `${settings.automation.selenium.args.driver.edge}` } }, "test_settings" : { "default" : { "launch_url" : `${settings.automation.selenium.url}`, "selenium_port" : `${settings.automation.selenium.port}`, "selenium_host" : `${settings.automation.selenium.host}`, "silent": true, "screenshots" : { "enabled" : false, "path" : "" }, "desiredCapabilities": { "browserName": "chrome", "javascriptEnabled": true } }, "firefox" : { "desiredCapabilities": { "browserName": "gecko", "marionette": true, "javascriptEnabled": true } }, "edge" : { "desiredCapabilities": { "browserName": "MicrosoftEdge", "javascriptEnabled": true } } } }
'use strict'; var React = require('react'); var SvgIcon = require('../../svg-icon'); var MapsLocalLaundryService = React.createClass({ displayName: 'MapsLocalLaundryService', render: function render() { return React.createElement( SvgIcon, this.props, React.createElement('path', { d: 'M9.17 16.83c1.56 1.56 4.1 1.56 5.66 0 1.56-1.56 1.56-4.1 0-5.66l-5.66 5.66zM18 2.01L6 2c-1.11 0-2 .89-2 2v16c0 1.11.89 2 2 2h12c1.11 0 2-.89 2-2V4c0-1.11-.89-1.99-2-1.99zM10 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM7 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm5 16c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z' }) ); } }); module.exports = MapsLocalLaundryService;
const CACHE_NAME = (new Date()).toISOString(); // Eagerly cache everything when service worker is installed self.addEventListener('install', function (e) { e.waitUntil( caches.open(CACHE_NAME).then(function (cache) { return cache.addAll(global.serviceWorkerOption.assets); }) ); }); // Fetch from cache if it's there self.addEventListener('fetch', function (event) { event.respondWith( caches.match(event.request).then(function (response) { return response || fetch(event.request); }) ); });
/* * Copyright (c) 2017. MIT-license for Jari Van Melckebeke * Note that there was a lot of educational work in this project, * this project was (or is) used for an assignment from Realdolmen in Belgium. * Please just don't abuse my work */ define(function () { // European Portuguese return { errorLoading: function () { return 'Os resultados não puderam ser carregados.'; }, inputTooLong: function (args) { var overChars = args.input.length - args.maximum; var message = 'Por favor apague ' + overChars + ' '; message += overChars != 1 ? 'caracteres' : 'carácter'; return message; }, inputTooShort: function (args) { var remainingChars = args.minimum - args.input.length; var message = 'Introduza ' + remainingChars + ' ou mais caracteres'; return message; }, loadingMore: function () { return 'A carregar mais resultados…'; }, maximumSelected: function (args) { var message = 'Apenas pode seleccionar ' + args.maximum + ' '; message += args.maximum != 1 ? 'itens' : 'item'; return message; }, noResults: function () { return 'Sem resultados'; }, searching: function () { return 'A procurar…'; } }; });
/** * @fileOverview Disallow the use of anonymous functions passed to scheduleOnce and once. */ 'use strict'; const { getCaller, cleanCaller, isCallingWithApply, isCallingWithCall } = require('../utils/caller'); const { collectObjectPatternBindings } = require('../utils/destructed-binding'); const { getEmberImportBinding } = require('../utils/imports'); const { get } = require('../utils/get'); const MESSAGE = `The uniqueness once offers is based on function uniqueness, each invocation of this line will always create a new function instance, resulting in uniqueness checks, that will never be hit. Please replace with a named function. Reference: https://emberjs.com/api/ember/2.14/namespaces/Ember.run/methods/scheduleOnce?anchor=scheduleOnce`; const DISALLOWED_OBJECTS = ['Ember.run', 'run']; const SCHEDULE_ONCE = 'scheduleOnce'; const RUN_METHODS = [SCHEDULE_ONCE, 'once']; /** * Extracts the method that we are trying to run once from the list of arguments. * An optional target parameter can be passed in as the first parameter so we need * to check the length of the array to determine where our function is being passed in. */ function getMethodToRunOnce(args) { return args.length > 1 ? args[1] : args[0]; } /** * scheduleOnce takes in the queue name as the first parameter. In this function we will remove * that parameter from the array to make it look the same as the arguments to once and facilitate * extracting the method that we are trying to run once out of the args. */ function normalizeArguments(caller, args) { let mut = args.slice(); if (isCallingWithCall(caller)) { // Whenever the action was called .call we want to remove the context parameter mut.shift(); } else if (isCallingWithApply(caller)) { // Whenever the action was called with .apply we want to get the arguments with which the function // would actually get called mut = mut[1].elements.slice(); } // scheduleOnce takes in the queue name as the first parameter so we have to remove it have a similar // structure as "once" if (cleanCaller(caller).indexOf(SCHEDULE_ONCE) > -1) { mut.shift(); } return mut; } /** * Determines whether a function is anonymous based on whether it was a name * or if it is a method on the current context. * @param {ASTNode} fn * @return {Boolean} */ function isAnonymousFunction(fn) { return !(get(fn, 'name') || get(fn, 'object.type') === 'ThisExpression'); } function isString(node) { return node.type === 'Literal' && typeof node.value === 'string'; } function mergeDisallowedCalls(objects) { return objects .reduce((calls, obj) => { RUN_METHODS.forEach((method) => { calls.push(`${obj}.${method}`); }); return calls; }, []); } module.exports = { docs: { description: 'Disallow use of anonymous functions when use in scheduleOnce or once', category: 'Best Practices', recommended: true }, meta: { message: MESSAGE }, create(context) { let emberImportBinding; let disallowedCalls = mergeDisallowedCalls(DISALLOWED_OBJECTS); return { ImportDefaultSpecifier(node) { emberImportBinding = getEmberImportBinding(node); }, ObjectPattern(node) { if (!emberImportBinding) { return; } /** * Retrieves the deconstructed bindings from the Ember import, accounting for aliasing * of the import. */ disallowedCalls = disallowedCalls.concat( mergeDisallowedCalls( collectObjectPatternBindings(node, { [emberImportBinding]: ['run'] }) ) ); }, CallExpression(node) { const caller = getCaller(node); if (!disallowedCalls.includes(cleanCaller(caller))) { return; } const normalizedArguments = normalizeArguments(caller, node.arguments); const fnToRunOnce = getMethodToRunOnce(normalizedArguments); // The fnToRunceOnce is a string it means that it will be resolved on the target at the time once or // scheduleOnce is invoked. if (isAnonymousFunction(fnToRunOnce) && !isString(fnToRunOnce)) { context.report(node, MESSAGE); } } }; } };
import 'docs/src/modules/components/bootstrap'; // --- Post bootstrap ----- import React from 'react'; import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; import markdown from './typography.md'; function Page() { return <MarkdownDocs markdown={markdown} />; } export default Page;
import createSvgIcon from './utils/createSvgIcon'; import { jsx as _jsx } from "react/jsx-runtime"; export default createSvgIcon( /*#__PURE__*/_jsx("path", { d: "M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h18v14zM5 15h14v3H5z" }), 'CallToActionOutlined');
;(function(angular,moment) { "use strict"; var root = this var seneca = root.seneca var prefix = (seneca.config.admin ? seneca.config.admin.prefix : null ) || '/admin' var senecaAdminPluginsModule = angular.module('senecaAdminPluginsModule',[]) senecaAdminPluginsModule.directive('senecaAdminPlugins', ['$http',function($http) { var def = { restrict:'A', scope:{ }, link: function( scope, elem, attrs ){ scope.pluginrows = [] scope.load = function() { console.log('load',scope) $http({method: 'GET', url: prefix+'/stats?summary=false', cache: false}). success(function(data, status) { scope.pluginrows = [] var pluginrows = [] var actmap = data.actmap var pluginmap = {} _.each(actmap,function(meta,pattern){ var plugin = meta.plugin.full || 'system' meta.pattern = pattern; var entry = pluginmap[plugin] = (pluginmap[plugin]||{}) ;(entry.actions = (entry.actions||[])).push(meta) entry.meta = entry.meta||{agg:{count:0,sum_mean_time:0},calls:0,done:0,fails:0,time:{mean:0}} entry.meta.calls += meta.calls entry.meta.done += meta.done entry.meta.fails += meta.fails entry.meta.agg.count++ entry.meta.agg.sum_mean_time += meta.time.mean }) var index = 1 _.each(pluginmap, function(entry,plugin){ pluginrows.push( { type:'plugin',more:false,order:(10000*(index++)), plugin:plugin, //pattern:'('+(((index++))/10000).toPrecision(4).substring(2,6)+')', pattern:'-', calls:entry.meta.calls, done:entry.meta.done, fails:entry.meta.fails, mean:0<entry.meta.agg.count?(entry.meta.agg.sum_mean_time/entry.meta.agg.count).toPrecision(2):0 } ) }) scope.pluginmap = pluginmap console.log(pluginmap) scope.pluginrows = pluginrows }) } scope.showMore = function(row){ return 'plugin' == row.entity.type } scope.moreText = function(row){ return row.entity.more ? 'less' : 'more' } scope.toggleMore = function(row){ if( 'plugin' == row.entity.type ) { var entry = scope.pluginmap[row.entity.plugin] if( row.entity.more ) { //console.log(scope.pluginrows) scope.pluginrows = _.filter(scope.pluginrows,function(entry){ return !('action'==entry.type&&row.entity.plugin==entry.plugin) }) //console.log(scope.pluginrows) row.entity.more = false } else { var actions = [] var index = row.entity.order _.each(entry.actions,function(action){ action.type='action' action.pattern=action.pattern action.plugin=row.entity.plugin action.mean = action.time.mean.toPrecision(2) action.order = ++index actions.push(action) }) index = 0 _.find( scope.pluginrows, function(prow){ if( prow.plugin == row.entity.plugin ) return true; index++ }) var before = scope.pluginrows.slice(0,index+1) var after = scope.pluginrows.slice(index+1) var pluginrows = [] .concat(before) .concat(actions) .concat(after) scope.pluginrows = pluginrows row.entity.more = true } } } }, controller: function( $scope, $rootScope ) { console.log('ctrl',$scope) $scope.gridOptions = { data: 'pluginrows', enableColumnResize:true, columnDefs: [ {field:'order',displayName:'Order',width:100,maxWidth:100, cellTemplate: '<button ng-show="showMore(row)" ng-click="toggleMore(row)" class="btn btn-primary btn-small data-editor-cell-button" style="width:50px">{{moreText(row)}}</button>' }, { field: "plugin", displayName:'Plugin' }, { field: "pattern", displayName:'Pattern' }, { field: "calls", displayName:'# Call' }, { field: "done", displayName:'# Done' }, { field: "fails", displayName:'# Fail' }, { field: "mean", displayName:'Mean (ms)' }, ] } $rootScope.$on('seneca-admin/unit/admin-plugins/view',function(){ if( $scope.loaded ) return; $scope.load() $scope.loaded = true }) }, templateUrl: prefix+"/_admin_plugins_template.html" } return def }]) }.call(window,angular,moment));
var isArray = require('./isArray'), isFunction = require('./isFunction'); /** * Checks if `value` is a flattenable array and not a `_.matchesProperty` * iteratee shorthand. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ function isFlattenableIteratee(value) { return isArray(value) && !(value.length == 2 && !isFunction(value[0])); } module.exports = isFlattenableIteratee;
#!/usr/bin/env node // post-process CSS using PostCSS // (https://github.com/postcss/postcss) // // This adds vendor prefixes using autoprefixer // https://github.com/postcss/autoprefixer require('es6-promise').polyfill(); var autoprefixer = require('autoprefixer'); var postcss = require('postcss'); var inputCss = ''; process.stdin.on('data', function (chunk) { inputCss += chunk; }); process.stdin.on('end', function () { postcss([autoprefixer]) .process(inputCss) .then(function (result) { console.log(result.css); }); });
/* Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang("widget","lv",{move:"Klikšķina un velc, lai pārvietotu"});
// MarionetteJS (Backbone.Marionette) // ---------------------------------- // v1.6.2 // // Copyright (c)2014 Derick Bailey, Muted Solutions, LLC. // Distributed under MIT license // // http://marionettejs.com /*! * Includes BabySitter * https://github.com/marionettejs/backbone.babysitter/ * * Includes Wreqr * https://github.com/marionettejs/backbone.wreqr/ */ // Backbone.BabySitter // ------------------- // v0.0.6 // // Copyright (c)2013 Derick Bailey, Muted Solutions, LLC. // Distributed under MIT license // // http://github.com/babysitterjs/backbone.babysitter // Backbone.ChildViewContainer // --------------------------- // // Provide a container to store, retrieve and // shut down child views. Backbone.ChildViewContainer = (function(Backbone, _){ // Container Constructor // --------------------- var Container = function(views){ this._views = {}; this._indexByModel = {}; this._indexByCustom = {}; this._updateLength(); _.each(views, this.add, this); }; // Container Methods // ----------------- _.extend(Container.prototype, { // Add a view to this container. Stores the view // by `cid` and makes it searchable by the model // cid (and model itself). Optionally specify // a custom key to store an retrieve the view. add: function(view, customIndex){ var viewCid = view.cid; // store the view this._views[viewCid] = view; // index it by model if (view.model){ this._indexByModel[view.model.cid] = viewCid; } // index by custom if (customIndex){ this._indexByCustom[customIndex] = viewCid; } this._updateLength(); }, // Find a view by the model that was attached to // it. Uses the model's `cid` to find it. findByModel: function(model){ return this.findByModelCid(model.cid); }, // Find a view by the `cid` of the model that was attached to // it. Uses the model's `cid` to find the view `cid` and // retrieve the view using it. findByModelCid: function(modelCid){ var viewCid = this._indexByModel[modelCid]; return this.findByCid(viewCid); }, // Find a view by a custom indexer. findByCustom: function(index){ var viewCid = this._indexByCustom[index]; return this.findByCid(viewCid); }, // Find by index. This is not guaranteed to be a // stable index. findByIndex: function(index){ return _.values(this._views)[index]; }, // retrieve a view by it's `cid` directly findByCid: function(cid){ return this._views[cid]; }, // Remove a view remove: function(view){ var viewCid = view.cid; // delete model index if (view.model){ delete this._indexByModel[view.model.cid]; } // delete custom index _.any(this._indexByCustom, function(cid, key) { if (cid === viewCid) { delete this._indexByCustom[key]; return true; } }, this); // remove the view from the container delete this._views[viewCid]; // update the length this._updateLength(); }, // Call a method on every view in the container, // passing parameters to the call method one at a // time, like `function.call`. call: function(method){ this.apply(method, _.tail(arguments)); }, // Apply a method on every view in the container, // passing parameters to the call method one at a // time, like `function.apply`. apply: function(method, args){ _.each(this._views, function(view){ if (_.isFunction(view[method])){ view[method].apply(view, args || []); } }); }, // Update the `.length` attribute on this container _updateLength: function(){ this.length = _.size(this._views); } }); // Borrowing this code from Backbone.Collection: // http://backbonejs.org/docs/backbone.html#section-106 // // Mix in methods from Underscore, for iteration, and other // collection related features. var methods = ['forEach', 'each', 'map', 'find', 'detect', 'filter', 'select', 'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke', 'toArray', 'first', 'initial', 'rest', 'last', 'without', 'isEmpty', 'pluck']; _.each(methods, function(method) { Container.prototype[method] = function() { var views = _.values(this._views); var args = [views].concat(_.toArray(arguments)); return _[method].apply(_, args); }; }); // return the public API return Container; })(Backbone, _); // Backbone.Wreqr (Backbone.Marionette) // ---------------------------------- // v0.2.0 // // Copyright (c)2013 Derick Bailey, Muted Solutions, LLC. // Distributed under MIT license // // http://github.com/marionettejs/backbone.wreqr Backbone.Wreqr = (function(Backbone, Marionette, _){ "use strict"; var Wreqr = {}; // Handlers // -------- // A registry of functions to call, given a name Wreqr.Handlers = (function(Backbone, _){ "use strict"; // Constructor // ----------- var Handlers = function(options){ this.options = options; this._wreqrHandlers = {}; if (_.isFunction(this.initialize)){ this.initialize(options); } }; Handlers.extend = Backbone.Model.extend; // Instance Members // ---------------- _.extend(Handlers.prototype, Backbone.Events, { // Add multiple handlers using an object literal configuration setHandlers: function(handlers){ _.each(handlers, function(handler, name){ var context = null; if (_.isObject(handler) && !_.isFunction(handler)){ context = handler.context; handler = handler.callback; } this.setHandler(name, handler, context); }, this); }, // Add a handler for the given name, with an // optional context to run the handler within setHandler: function(name, handler, context){ var config = { callback: handler, context: context }; this._wreqrHandlers[name] = config; this.trigger("handler:add", name, handler, context); }, // Determine whether or not a handler is registered hasHandler: function(name){ return !! this._wreqrHandlers[name]; }, // Get the currently registered handler for // the specified name. Throws an exception if // no handler is found. getHandler: function(name){ var config = this._wreqrHandlers[name]; if (!config){ throw new Error("Handler not found for '" + name + "'"); } return function(){ var args = Array.prototype.slice.apply(arguments); return config.callback.apply(config.context, args); }; }, // Remove a handler for the specified name removeHandler: function(name){ delete this._wreqrHandlers[name]; }, // Remove all handlers from this registry removeAllHandlers: function(){ this._wreqrHandlers = {}; } }); return Handlers; })(Backbone, _); // Wreqr.CommandStorage // -------------------- // // Store and retrieve commands for execution. Wreqr.CommandStorage = (function(){ "use strict"; // Constructor function var CommandStorage = function(options){ this.options = options; this._commands = {}; if (_.isFunction(this.initialize)){ this.initialize(options); } }; // Instance methods _.extend(CommandStorage.prototype, Backbone.Events, { // Get an object literal by command name, that contains // the `commandName` and the `instances` of all commands // represented as an array of arguments to process getCommands: function(commandName){ var commands = this._commands[commandName]; // we don't have it, so add it if (!commands){ // build the configuration commands = { command: commandName, instances: [] }; // store it this._commands[commandName] = commands; } return commands; }, // Add a command by name, to the storage and store the // args for the command addCommand: function(commandName, args){ var command = this.getCommands(commandName); command.instances.push(args); }, // Clear all commands for the given `commandName` clearCommands: function(commandName){ var command = this.getCommands(commandName); command.instances = []; } }); return CommandStorage; })(); // Wreqr.Commands // -------------- // // A simple command pattern implementation. Register a command // handler and execute it. Wreqr.Commands = (function(Wreqr){ "use strict"; return Wreqr.Handlers.extend({ // default storage type storageType: Wreqr.CommandStorage, constructor: function(options){ this.options = options || {}; this._initializeStorage(this.options); this.on("handler:add", this._executeCommands, this); var args = Array.prototype.slice.call(arguments); Wreqr.Handlers.prototype.constructor.apply(this, args); }, // Execute a named command with the supplied args execute: function(name, args){ name = arguments[0]; args = Array.prototype.slice.call(arguments, 1); if (this.hasHandler(name)){ this.getHandler(name).apply(this, args); } else { this.storage.addCommand(name, args); } }, // Internal method to handle bulk execution of stored commands _executeCommands: function(name, handler, context){ var command = this.storage.getCommands(name); // loop through and execute all the stored command instances _.each(command.instances, function(args){ handler.apply(context, args); }); this.storage.clearCommands(name); }, // Internal method to initialize storage either from the type's // `storageType` or the instance `options.storageType`. _initializeStorage: function(options){ var storage; var StorageType = options.storageType || this.storageType; if (_.isFunction(StorageType)){ storage = new StorageType(); } else { storage = StorageType; } this.storage = storage; } }); })(Wreqr); // Wreqr.RequestResponse // --------------------- // // A simple request/response implementation. Register a // request handler, and return a response from it Wreqr.RequestResponse = (function(Wreqr){ "use strict"; return Wreqr.Handlers.extend({ request: function(){ var name = arguments[0]; var args = Array.prototype.slice.call(arguments, 1); return this.getHandler(name).apply(this, args); } }); })(Wreqr); // Event Aggregator // ---------------- // A pub-sub object that can be used to decouple various parts // of an application through event-driven architecture. Wreqr.EventAggregator = (function(Backbone, _){ "use strict"; var EA = function(){}; // Copy the `extend` function used by Backbone's classes EA.extend = Backbone.Model.extend; // Copy the basic Backbone.Events on to the event aggregator _.extend(EA.prototype, Backbone.Events); return EA; })(Backbone, _); return Wreqr; })(Backbone, Backbone.Marionette, _); var Marionette = (function(global, Backbone, _){ "use strict"; // Define and export the Marionette namespace var Marionette = {}; Backbone.Marionette = Marionette; // Get the DOM manipulator for later use Marionette.$ = Backbone.$; // Helpers // ------- // For slicing `arguments` in functions var protoSlice = Array.prototype.slice; function slice(args) { return protoSlice.call(args); } function throwError(message, name) { var error = new Error(message); error.name = name || 'Error'; throw error; } // Marionette.extend // ----------------- // Borrow the Backbone `extend` method so we can use it as needed Marionette.extend = Backbone.Model.extend; // Marionette.getOption // -------------------- // Retrieve an object, function or other value from a target // object or its `options`, with `options` taking precedence. Marionette.getOption = function(target, optionName){ if (!target || !optionName){ return; } var value; if (target.options && (optionName in target.options) && (target.options[optionName] !== undefined)){ value = target.options[optionName]; } else { value = target[optionName]; } return value; }; // Marionette.normalizeMethods // ---------------------- // Pass in a mapping of events => functions or function names // and return a mapping of events => functions Marionette.normalizeMethods = function(hash) { var normalizedHash = {}, method; _.each(hash, function(fn, name) { method = fn; if (!_.isFunction(method)) { method = this[method]; } if (!method) { return; } normalizedHash[name] = method; }, this); return normalizedHash; }; // Trigger an event and/or a corresponding method name. Examples: // // `this.triggerMethod("foo")` will trigger the "foo" event and // call the "onFoo" method. // // `this.triggerMethod("foo:bar")` will trigger the "foo:bar" event and // call the "onFooBar" method. Marionette.triggerMethod = (function(){ // split the event name on the ":" var splitter = /(^|:)(\w)/gi; // take the event section ("section1:section2:section3") // and turn it in to uppercase name function getEventName(match, prefix, eventName) { return eventName.toUpperCase(); } // actual triggerMethod implementation var triggerMethod = function(event) { // get the method name from the event name var methodName = 'on' + event.replace(splitter, getEventName); var method = this[methodName]; // trigger the event, if a trigger method exists if(_.isFunction(this.trigger)) { this.trigger.apply(this, arguments); } // call the onMethodName if it exists if (_.isFunction(method)) { // pass all arguments, except the event name return method.apply(this, _.tail(arguments)); } }; return triggerMethod; })(); // DOMRefresh // ---------- // // Monitor a view's state, and after it has been rendered and shown // in the DOM, trigger a "dom:refresh" event every time it is // re-rendered. Marionette.MonitorDOMRefresh = (function(documentElement){ // track when the view has been shown in the DOM, // using a Marionette.Region (or by other means of triggering "show") function handleShow(view){ view._isShown = true; triggerDOMRefresh(view); } // track when the view has been rendered function handleRender(view){ view._isRendered = true; triggerDOMRefresh(view); } // Trigger the "dom:refresh" event and corresponding "onDomRefresh" method function triggerDOMRefresh(view){ if (view._isShown && view._isRendered && isInDOM(view)){ if (_.isFunction(view.triggerMethod)){ view.triggerMethod("dom:refresh"); } } } function isInDOM(view) { return documentElement.contains(view.el); } // Export public API return function(view){ view.listenTo(view, "show", function(){ handleShow(view); }); view.listenTo(view, "render", function(){ handleRender(view); }); }; })(document.documentElement); // Marionette.bindEntityEvents & unbindEntityEvents // --------------------------- // // These methods are used to bind/unbind a backbone "entity" (collection/model) // to methods on a target object. // // The first parameter, `target`, must have a `listenTo` method from the // EventBinder object. // // The second parameter is the entity (Backbone.Model or Backbone.Collection) // to bind the events from. // // The third parameter is a hash of { "event:name": "eventHandler" } // configuration. Multiple handlers can be separated by a space. A // function can be supplied instead of a string handler name. (function(Marionette){ "use strict"; // Bind the event to handlers specified as a string of // handler names on the target object function bindFromStrings(target, entity, evt, methods){ var methodNames = methods.split(/\s+/); _.each(methodNames,function(methodName) { var method = target[methodName]; if(!method) { throwError("Method '"+ methodName +"' was configured as an event handler, but does not exist."); } target.listenTo(entity, evt, method, target); }); } // Bind the event to a supplied callback function function bindToFunction(target, entity, evt, method){ target.listenTo(entity, evt, method, target); } // Bind the event to handlers specified as a string of // handler names on the target object function unbindFromStrings(target, entity, evt, methods){ var methodNames = methods.split(/\s+/); _.each(methodNames,function(methodName) { var method = target[methodName]; target.stopListening(entity, evt, method, target); }); } // Bind the event to a supplied callback function function unbindToFunction(target, entity, evt, method){ target.stopListening(entity, evt, method, target); } // generic looping function function iterateEvents(target, entity, bindings, functionCallback, stringCallback){ if (!entity || !bindings) { return; } // allow the bindings to be a function if (_.isFunction(bindings)){ bindings = bindings.call(target); } // iterate the bindings and bind them _.each(bindings, function(methods, evt){ // allow for a function as the handler, // or a list of event names as a string if (_.isFunction(methods)){ functionCallback(target, entity, evt, methods); } else { stringCallback(target, entity, evt, methods); } }); } // Export Public API Marionette.bindEntityEvents = function(target, entity, bindings){ iterateEvents(target, entity, bindings, bindToFunction, bindFromStrings); }; Marionette.unbindEntityEvents = function(target, entity, bindings){ iterateEvents(target, entity, bindings, unbindToFunction, unbindFromStrings); }; })(Marionette); // Callbacks // --------- // A simple way of managing a collection of callbacks // and executing them at a later point in time, using jQuery's // `Deferred` object. Marionette.Callbacks = function(){ this._deferred = Marionette.$.Deferred(); this._callbacks = []; }; _.extend(Marionette.Callbacks.prototype, { // Add a callback to be executed. Callbacks added here are // guaranteed to execute, even if they are added after the // `run` method is called. add: function(callback, contextOverride){ this._callbacks.push({cb: callback, ctx: contextOverride}); this._deferred.done(function(context, options){ if (contextOverride){ context = contextOverride; } callback.call(context, options); }); }, // Run all registered callbacks with the context specified. // Additional callbacks can be added after this has been run // and they will still be executed. run: function(options, context){ this._deferred.resolve(context, options); }, // Resets the list of callbacks to be run, allowing the same list // to be run multiple times - whenever the `run` method is called. reset: function(){ var callbacks = this._callbacks; this._deferred = Marionette.$.Deferred(); this._callbacks = []; _.each(callbacks, function(cb){ this.add(cb.cb, cb.ctx); }, this); } }); // Marionette Controller // --------------------- // // A multi-purpose object to use as a controller for // modules and routers, and as a mediator for workflow // and coordination of other objects, views, and more. Marionette.Controller = function(options){ this.triggerMethod = Marionette.triggerMethod; this.options = options || {}; if (_.isFunction(this.initialize)){ this.initialize(this.options); } }; Marionette.Controller.extend = Marionette.extend; // Controller Methods // -------------- // Ensure it can trigger events with Backbone.Events _.extend(Marionette.Controller.prototype, Backbone.Events, { close: function(){ this.stopListening(); this.triggerMethod("close"); this.unbind(); } }); // Region // ------ // // Manage the visual regions of your composite application. See // http://lostechies.com/derickbailey/2011/12/12/composite-js-apps-regions-and-region-managers/ Marionette.Region = function(options){ this.options = options || {}; this.el = Marionette.getOption(this, "el"); if (!this.el){ var err = new Error("An 'el' must be specified for a region."); err.name = "NoElError"; throw err; } if (this.initialize){ var args = Array.prototype.slice.apply(arguments); this.initialize.apply(this, args); } }; // Region Type methods // ------------------- _.extend(Marionette.Region, { // Build an instance of a region by passing in a configuration object // and a default region type to use if none is specified in the config. // // The config object should either be a string as a jQuery DOM selector, // a Region type directly, or an object literal that specifies both // a selector and regionType: // // ```js // { // selector: "#foo", // regionType: MyCustomRegion // } // ``` // buildRegion: function(regionConfig, defaultRegionType){ var regionIsString = (typeof regionConfig === "string"); var regionSelectorIsString = (typeof regionConfig.selector === "string"); var regionTypeIsUndefined = (typeof regionConfig.regionType === "undefined"); var regionIsType = (typeof regionConfig === "function"); if (!regionIsType && !regionIsString && !regionSelectorIsString) { throw new Error("Region must be specified as a Region type, a selector string or an object with selector property"); } var selector, RegionType; // get the selector for the region if (regionIsString) { selector = regionConfig; } if (regionConfig.selector) { selector = regionConfig.selector; delete regionConfig.selector; } // get the type for the region if (regionIsType){ RegionType = regionConfig; } if (!regionIsType && regionTypeIsUndefined) { RegionType = defaultRegionType; } if (regionConfig.regionType) { RegionType = regionConfig.regionType; delete regionConfig.regionType; } if (regionIsString || regionIsType) { regionConfig = {}; } regionConfig.el = selector; // build the region instance var region = new RegionType(regionConfig); // override the `getEl` function if we have a parentEl // this must be overridden to ensure the selector is found // on the first use of the region. if we try to assign the // region's `el` to `parentEl.find(selector)` in the object // literal to build the region, the element will not be // guaranteed to be in the DOM already, and will cause problems if (regionConfig.parentEl){ region.getEl = function(selector) { var parentEl = regionConfig.parentEl; if (_.isFunction(parentEl)){ parentEl = parentEl(); } return parentEl.find(selector); }; } return region; } }); // Region Instance Methods // ----------------------- _.extend(Marionette.Region.prototype, Backbone.Events, { // Displays a backbone view instance inside of the region. // Handles calling the `render` method for you. Reads content // directly from the `el` attribute. Also calls an optional // `onShow` and `close` method on your view, just after showing // or just before closing the view, respectively. show: function(view){ this.ensureEl(); var isViewClosed = view.isClosed || _.isUndefined(view.$el); var isDifferentView = view !== this.currentView; if (isDifferentView) { this.close(); } view.render(); if (isDifferentView || isViewClosed) { this.open(view); } this.currentView = view; Marionette.triggerMethod.call(this, "show", view); Marionette.triggerMethod.call(view, "show"); }, ensureEl: function(){ if (!this.$el || this.$el.length === 0){ this.$el = this.getEl(this.el); } }, // Override this method to change how the region finds the // DOM element that it manages. Return a jQuery selector object. getEl: function(selector){ return Marionette.$(selector); }, // Override this method to change how the new view is // appended to the `$el` that the region is managing open: function(view){ this.$el.empty().append(view.el); }, // Close the current view, if there is one. If there is no // current view, it does nothing and returns immediately. close: function(){ var view = this.currentView; if (!view || view.isClosed){ return; } // call 'close' or 'remove', depending on which is found if (view.close) { view.close(); } else if (view.remove) { view.remove(); } Marionette.triggerMethod.call(this, "close", view); delete this.currentView; }, // Attach an existing view to the region. This // will not call `render` or `onShow` for the new view, // and will not replace the current HTML for the `el` // of the region. attachView: function(view){ this.currentView = view; }, // Reset the region by closing any existing view and // clearing out the cached `$el`. The next time a view // is shown via this region, the region will re-query the // DOM for the region's `el`. reset: function(){ this.close(); delete this.$el; } }); // Copy the `extend` function used by Backbone's classes Marionette.Region.extend = Marionette.extend; // Marionette.RegionManager // ------------------------ // // Manage one or more related `Marionette.Region` objects. Marionette.RegionManager = (function(Marionette){ var RegionManager = Marionette.Controller.extend({ constructor: function(options){ this._regions = {}; Marionette.Controller.prototype.constructor.call(this, options); }, // Add multiple regions using an object literal, where // each key becomes the region name, and each value is // the region definition. addRegions: function(regionDefinitions, defaults){ var regions = {}; _.each(regionDefinitions, function(definition, name){ if (typeof definition === "string"){ definition = { selector: definition }; } if (definition.selector){ definition = _.defaults({}, definition, defaults); } var region = this.addRegion(name, definition); regions[name] = region; }, this); return regions; }, // Add an individual region to the region manager, // and return the region instance addRegion: function(name, definition){ var region; var isObject = _.isObject(definition); var isString = _.isString(definition); var hasSelector = !!definition.selector; if (isString || (isObject && hasSelector)){ region = Marionette.Region.buildRegion(definition, Marionette.Region); } else if (_.isFunction(definition)){ region = Marionette.Region.buildRegion(definition, Marionette.Region); } else { region = definition; } this._store(name, region); this.triggerMethod("region:add", name, region); return region; }, // Get a region by name get: function(name){ return this._regions[name]; }, // Remove a region by name removeRegion: function(name){ var region = this._regions[name]; this._remove(name, region); }, // Close all regions in the region manager, and // remove them removeRegions: function(){ _.each(this._regions, function(region, name){ this._remove(name, region); }, this); }, // Close all regions in the region manager, but // leave them attached closeRegions: function(){ _.each(this._regions, function(region, name){ region.close(); }, this); }, // Close all regions and shut down the region // manager entirely close: function(){ this.removeRegions(); var args = Array.prototype.slice.call(arguments); Marionette.Controller.prototype.close.apply(this, args); }, // internal method to store regions _store: function(name, region){ this._regions[name] = region; this._setLength(); }, // internal method to remove a region _remove: function(name, region){ region.close(); delete this._regions[name]; this._setLength(); this.triggerMethod("region:remove", name, region); }, // set the number of regions current held _setLength: function(){ this.length = _.size(this._regions); } }); // Borrowing this code from Backbone.Collection: // http://backbonejs.org/docs/backbone.html#section-106 // // Mix in methods from Underscore, for iteration, and other // collection related features. var methods = ['forEach', 'each', 'map', 'find', 'detect', 'filter', 'select', 'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke', 'toArray', 'first', 'initial', 'rest', 'last', 'without', 'isEmpty', 'pluck']; _.each(methods, function(method) { RegionManager.prototype[method] = function() { var regions = _.values(this._regions); var args = [regions].concat(_.toArray(arguments)); return _[method].apply(_, args); }; }); return RegionManager; })(Marionette); // Template Cache // -------------- // Manage templates stored in `<script>` blocks, // caching them for faster access. Marionette.TemplateCache = function(templateId){ this.templateId = templateId; }; // TemplateCache object-level methods. Manage the template // caches from these method calls instead of creating // your own TemplateCache instances _.extend(Marionette.TemplateCache, { templateCaches: {}, // Get the specified template by id. Either // retrieves the cached version, or loads it // from the DOM. get: function(templateId){ var cachedTemplate = this.templateCaches[templateId]; if (!cachedTemplate){ cachedTemplate = new Marionette.TemplateCache(templateId); this.templateCaches[templateId] = cachedTemplate; } return cachedTemplate.load(); }, // Clear templates from the cache. If no arguments // are specified, clears all templates: // `clear()` // // If arguments are specified, clears each of the // specified templates from the cache: // `clear("#t1", "#t2", "...")` clear: function(){ var i; var args = slice(arguments); var length = args.length; if (length > 0){ for(i=0; i<length; i++){ delete this.templateCaches[args[i]]; } } else { this.templateCaches = {}; } } }); // TemplateCache instance methods, allowing each // template cache object to manage its own state // and know whether or not it has been loaded _.extend(Marionette.TemplateCache.prototype, { // Internal method to load the template load: function(){ // Guard clause to prevent loading this template more than once if (this.compiledTemplate){ return this.compiledTemplate; } // Load the template and compile it var template = this.loadTemplate(this.templateId); this.compiledTemplate = this.compileTemplate(template); return this.compiledTemplate; }, // Load a template from the DOM, by default. Override // this method to provide your own template retrieval // For asynchronous loading with AMD/RequireJS, consider // using a template-loader plugin as described here: // https://github.com/marionettejs/backbone.marionette/wiki/Using-marionette-with-requirejs loadTemplate: function(templateId){ var template = Marionette.$(templateId).html(); if (!template || template.length === 0){ throwError("Could not find template: '" + templateId + "'", "NoTemplateError"); } return template; }, // Pre-compile the template before caching it. Override // this method if you do not need to pre-compile a template // (JST / RequireJS for example) or if you want to change // the template engine used (Handebars, etc). compileTemplate: function(rawTemplate){ return _.template(rawTemplate); } }); // Renderer // -------- // Render a template with data by passing in the template // selector and the data to render. Marionette.Renderer = { // Render a template with data. The `template` parameter is // passed to the `TemplateCache` object to retrieve the // template function. Override this method to provide your own // custom rendering and template handling for all of Marionette. render: function(template, data){ if (!template) { var error = new Error("Cannot render the template since it's false, null or undefined."); error.name = "TemplateNotFoundError"; throw error; } var templateFunc; if (typeof template === "function"){ templateFunc = template; } else { templateFunc = Marionette.TemplateCache.get(template); } return templateFunc(data); } }; // Marionette.View // --------------- // The core view type that other Marionette views extend from. Marionette.View = Backbone.View.extend({ constructor: function(options){ _.bindAll(this, "render"); var args = Array.prototype.slice.apply(arguments); // this exposes view options to the view initializer // this is a backfill since backbone removed the assignment // of this.options // at some point however this may be removed this.options = _.extend({}, _.result(this, 'options'), _.isFunction(options) ? options.call(this) : options); // parses out the @ui DSL for events this.events = this.normalizeUIKeys(_.result(this, 'events')); Backbone.View.prototype.constructor.apply(this, args); Marionette.MonitorDOMRefresh(this); this.listenTo(this, "show", this.onShowCalled, this); }, // import the "triggerMethod" to trigger events with corresponding // methods if the method exists triggerMethod: Marionette.triggerMethod, // Imports the "normalizeMethods" to transform hashes of // events=>function references/names to a hash of events=>function references normalizeMethods: Marionette.normalizeMethods, // Get the template for this view // instance. You can set a `template` attribute in the view // definition or pass a `template: "whatever"` parameter in // to the constructor options. getTemplate: function(){ return Marionette.getOption(this, "template"); }, // Mix in template helper methods. Looks for a // `templateHelpers` attribute, which can either be an // object literal, or a function that returns an object // literal. All methods and attributes from this object // are copies to the object passed in. mixinTemplateHelpers: function(target){ target = target || {}; var templateHelpers = Marionette.getOption(this, "templateHelpers"); if (_.isFunction(templateHelpers)){ templateHelpers = templateHelpers.call(this); } return _.extend(target, templateHelpers); }, // allows for the use of the @ui. syntax within // a given key for triggers and events // swaps the @ui with the associated selector normalizeUIKeys: function(hash) { if (typeof(hash) === "undefined") { return; } _.each(_.keys(hash), function(v) { var split = v.split("@ui."); if (split.length === 2) { hash[split[0]+this.ui[split[1]]] = hash[v]; delete hash[v]; } }, this); return hash; }, // Configure `triggers` to forward DOM events to view // events. `triggers: {"click .foo": "do:foo"}` configureTriggers: function(){ if (!this.triggers) { return; } var triggerEvents = {}; // Allow `triggers` to be configured as a function var triggers = this.normalizeUIKeys(_.result(this, "triggers")); // Configure the triggers, prevent default // action and stop propagation of DOM events _.each(triggers, function(value, key){ var hasOptions = _.isObject(value); var eventName = hasOptions ? value.event : value; // build the event handler function for the DOM event triggerEvents[key] = function(e){ // stop the event in its tracks if (e) { var prevent = e.preventDefault; var stop = e.stopPropagation; var shouldPrevent = hasOptions ? value.preventDefault : prevent; var shouldStop = hasOptions ? value.stopPropagation : stop; if (shouldPrevent && prevent) { prevent.apply(e); } if (shouldStop && stop) { stop.apply(e); } } // build the args for the event var args = { view: this, model: this.model, collection: this.collection }; // trigger the event this.triggerMethod(eventName, args); }; }, this); return triggerEvents; }, // Overriding Backbone.View's delegateEvents to handle // the `triggers`, `modelEvents`, and `collectionEvents` configuration delegateEvents: function(events){ this._delegateDOMEvents(events); Marionette.bindEntityEvents(this, this.model, Marionette.getOption(this, "modelEvents")); Marionette.bindEntityEvents(this, this.collection, Marionette.getOption(this, "collectionEvents")); }, // internal method to delegate DOM events and triggers _delegateDOMEvents: function(events){ events = events || this.events; if (_.isFunction(events)){ events = events.call(this); } var combinedEvents = {}; var triggers = this.configureTriggers(); _.extend(combinedEvents, events, triggers); Backbone.View.prototype.delegateEvents.call(this, combinedEvents); }, // Overriding Backbone.View's undelegateEvents to handle unbinding // the `triggers`, `modelEvents`, and `collectionEvents` config undelegateEvents: function(){ var args = Array.prototype.slice.call(arguments); Backbone.View.prototype.undelegateEvents.apply(this, args); Marionette.unbindEntityEvents(this, this.model, Marionette.getOption(this, "modelEvents")); Marionette.unbindEntityEvents(this, this.collection, Marionette.getOption(this, "collectionEvents")); }, // Internal method, handles the `show` event. onShowCalled: function(){}, // Default `close` implementation, for removing a view from the // DOM and unbinding it. Regions will call this method // for you. You can specify an `onClose` method in your view to // add custom code that is called after the view is closed. close: function(){ if (this.isClosed) { return; } // allow the close to be stopped by returning `false` // from the `onBeforeClose` method var shouldClose = this.triggerMethod("before:close"); if (shouldClose === false){ return; } // mark as closed before doing the actual close, to // prevent infinite loops within "close" event handlers // that are trying to close other views this.isClosed = true; this.triggerMethod("close"); // unbind UI elements this.unbindUIElements(); // remove the view from the DOM this.remove(); }, // This method binds the elements specified in the "ui" hash inside the view's code with // the associated jQuery selectors. bindUIElements: function(){ if (!this.ui) { return; } // store the ui hash in _uiBindings so they can be reset later // and so re-rendering the view will be able to find the bindings if (!this._uiBindings){ this._uiBindings = this.ui; } // get the bindings result, as a function or otherwise var bindings = _.result(this, "_uiBindings"); // empty the ui so we don't have anything to start with this.ui = {}; // bind each of the selectors _.each(_.keys(bindings), function(key) { var selector = bindings[key]; this.ui[key] = this.$(selector); }, this); }, // This method unbinds the elements specified in the "ui" hash unbindUIElements: function(){ if (!this.ui || !this._uiBindings){ return; } // delete all of the existing ui bindings _.each(this.ui, function($el, name){ delete this.ui[name]; }, this); // reset the ui element to the original bindings configuration this.ui = this._uiBindings; delete this._uiBindings; } }); // Item View // --------- // A single item view implementation that contains code for rendering // with underscore.js templates, serializing the view's model or collection, // and calling several methods on extended views, such as `onRender`. Marionette.ItemView = Marionette.View.extend({ // Setting up the inheritance chain which allows changes to // Marionette.View.prototype.constructor which allows overriding constructor: function(){ Marionette.View.prototype.constructor.apply(this, slice(arguments)); }, // Serialize the model or collection for the view. If a model is // found, `.toJSON()` is called. If a collection is found, `.toJSON()` // is also called, but is used to populate an `items` array in the // resulting data. If both are found, defaults to the model. // You can override the `serializeData` method in your own view // definition, to provide custom serialization for your view's data. serializeData: function(){ var data = {}; if (this.model) { data = this.model.toJSON(); } else if (this.collection) { data = { items: this.collection.toJSON() }; } return data; }, // Render the view, defaulting to underscore.js templates. // You can override this in your view definition to provide // a very specific rendering for your view. In general, though, // you should override the `Marionette.Renderer` object to // change how Marionette renders views. render: function(){ this.isClosed = false; this.triggerMethod("before:render", this); this.triggerMethod("item:before:render", this); var data = this.serializeData(); data = this.mixinTemplateHelpers(data); var template = this.getTemplate(); var html = Marionette.Renderer.render(template, data); this.$el.html(html); this.bindUIElements(); this.triggerMethod("render", this); this.triggerMethod("item:rendered", this); return this; }, // Override the default close event to add a few // more events that are triggered. close: function(){ if (this.isClosed){ return; } this.triggerMethod('item:before:close'); Marionette.View.prototype.close.apply(this, slice(arguments)); this.triggerMethod('item:closed'); } }); // Collection View // --------------- // A view that iterates over a Backbone.Collection // and renders an individual ItemView for each model. Marionette.CollectionView = Marionette.View.extend({ // used as the prefix for item view events // that are forwarded through the collectionview itemViewEventPrefix: "itemview", // constructor constructor: function(options){ this._initChildViewStorage(); Marionette.View.prototype.constructor.apply(this, slice(arguments)); this._initialEvents(); this.initRenderBuffer(); }, // Instead of inserting elements one by one into the page, // it's much more performant to insert elements into a document // fragment and then insert that document fragment into the page initRenderBuffer: function() { this.elBuffer = document.createDocumentFragment(); this._bufferedChildren = []; }, startBuffering: function() { this.initRenderBuffer(); this.isBuffering = true; }, endBuffering: function() { this.isBuffering = false; this.appendBuffer(this, this.elBuffer); this._triggerShowBufferedChildren(); this.initRenderBuffer(); }, _triggerShowBufferedChildren: function () { if (this._isShown) { _.each(this._bufferedChildren, function (child) { Marionette.triggerMethod.call(child, "show"); }); this._bufferedChildren = []; } }, // Configured the initial events that the collection view // binds to. _initialEvents: function(){ if (this.collection){ this.listenTo(this.collection, "add", this.addChildView, this); this.listenTo(this.collection, "remove", this.removeItemView, this); this.listenTo(this.collection, "reset", this.render, this); } }, // Handle a child item added to the collection addChildView: function(item, collection, options){ this.closeEmptyView(); var ItemView = this.getItemView(item); var index = this.collection.indexOf(item); this.addItemView(item, ItemView, index); }, // Override from `Marionette.View` to guarantee the `onShow` method // of child views is called. onShowCalled: function(){ this.children.each(function(child){ Marionette.triggerMethod.call(child, "show"); }); }, // Internal method to trigger the before render callbacks // and events triggerBeforeRender: function(){ this.triggerMethod("before:render", this); this.triggerMethod("collection:before:render", this); }, // Internal method to trigger the rendered callbacks and // events triggerRendered: function(){ this.triggerMethod("render", this); this.triggerMethod("collection:rendered", this); }, // Render the collection of items. Override this method to // provide your own implementation of a render function for // the collection view. render: function(){ this.isClosed = false; this.triggerBeforeRender(); this._renderChildren(); this.triggerRendered(); return this; }, // Internal method. Separated so that CompositeView can have // more control over events being triggered, around the rendering // process _renderChildren: function(){ this.startBuffering(); this.closeEmptyView(); this.closeChildren(); if (!this.isEmpty(this.collection)) { this.showCollection(); } else { this.showEmptyView(); } this.endBuffering(); }, // Internal method to loop through each item in the // collection view and show it showCollection: function(){ var ItemView; this.collection.each(function(item, index){ ItemView = this.getItemView(item); this.addItemView(item, ItemView, index); }, this); }, // Internal method to show an empty view in place of // a collection of item views, when the collection is // empty showEmptyView: function(){ var EmptyView = this.getEmptyView(); if (EmptyView && !this._showingEmptyView){ this._showingEmptyView = true; var model = new Backbone.Model(); this.addItemView(model, EmptyView, 0); } }, // Internal method to close an existing emptyView instance // if one exists. Called when a collection view has been // rendered empty, and then an item is added to the collection. closeEmptyView: function(){ if (this._showingEmptyView){ this.closeChildren(); delete this._showingEmptyView; } }, // Retrieve the empty view type getEmptyView: function(){ return Marionette.getOption(this, "emptyView"); }, // Retrieve the itemView type, either from `this.options.itemView` // or from the `itemView` in the object definition. The "options" // takes precedence. getItemView: function(item){ var itemView = Marionette.getOption(this, "itemView"); if (!itemView){ throwError("An `itemView` must be specified", "NoItemViewError"); } return itemView; }, // Render the child item's view and add it to the // HTML for the collection view. addItemView: function(item, ItemView, index){ // get the itemViewOptions if any were specified var itemViewOptions = Marionette.getOption(this, "itemViewOptions"); if (_.isFunction(itemViewOptions)){ itemViewOptions = itemViewOptions.call(this, item, index); } // build the view var view = this.buildItemView(item, ItemView, itemViewOptions); // set up the child view event forwarding this.addChildViewEventForwarding(view); // this view is about to be added this.triggerMethod("before:item:added", view); // Store the child view itself so we can properly // remove and/or close it later this.children.add(view); // Render it and show it this.renderItemView(view, index); // call the "show" method if the collection view // has already been shown if (this._isShown && !this.isBuffering){ Marionette.triggerMethod.call(view, "show"); } // this view was added this.triggerMethod("after:item:added", view); return view; }, // Set up the child view event forwarding. Uses an "itemview:" // prefix in front of all forwarded events. addChildViewEventForwarding: function(view){ var prefix = Marionette.getOption(this, "itemViewEventPrefix"); // Forward all child item view events through the parent, // prepending "itemview:" to the event name this.listenTo(view, "all", function(){ var args = slice(arguments); var rootEvent = args[0]; var itemEvents = this.normalizeMethods(this.getItemEvents()); args[0] = prefix + ":" + rootEvent; args.splice(1, 0, view); // call collectionView itemEvent if defined if (typeof itemEvents !== "undefined" && _.isFunction(itemEvents[rootEvent])) { itemEvents[rootEvent].apply(this, args); } Marionette.triggerMethod.apply(this, args); }, this); }, // returns the value of itemEvents depending on if a function getItemEvents: function() { if (_.isFunction(this.itemEvents)) { return this.itemEvents.call(this); } return this.itemEvents; }, // render the item view renderItemView: function(view, index) { view.render(); this.appendHtml(this, view, index); }, // Build an `itemView` for every model in the collection. buildItemView: function(item, ItemViewType, itemViewOptions){ var options = _.extend({model: item}, itemViewOptions); return new ItemViewType(options); }, // get the child view by item it holds, and remove it removeItemView: function(item){ var view = this.children.findByModel(item); this.removeChildView(view); this.checkEmpty(); }, // Remove the child view and close it removeChildView: function(view){ // shut down the child view properly, // including events that the collection has from it if (view){ this.stopListening(view); // call 'close' or 'remove', depending on which is found if (view.close) { view.close(); } else if (view.remove) { view.remove(); } this.children.remove(view); } this.triggerMethod("item:removed", view); }, // helper to check if the collection is empty isEmpty: function(collection){ // check if we're empty now return !this.collection || this.collection.length === 0; }, // If empty, show the empty view checkEmpty: function (){ if (this.isEmpty(this.collection)){ this.showEmptyView(); } }, // You might need to override this if you've overridden appendHtml appendBuffer: function(collectionView, buffer) { collectionView.$el.append(buffer); }, // Append the HTML to the collection's `el`. // Override this method to do something other // then `.append`. appendHtml: function(collectionView, itemView, index){ if (collectionView.isBuffering) { // buffering happens on reset events and initial renders // in order to reduce the number of inserts into the // document, which are expensive. collectionView.elBuffer.appendChild(itemView.el); collectionView._bufferedChildren.push(itemView); } else { // If we've already rendered the main collection, just // append the new items directly into the element. collectionView.$el.append(itemView.el); } }, // Internal method to set up the `children` object for // storing all of the child views _initChildViewStorage: function(){ this.children = new Backbone.ChildViewContainer(); }, // Handle cleanup and other closing needs for // the collection of views. close: function(){ if (this.isClosed){ return; } this.triggerMethod("collection:before:close"); this.closeChildren(); this.triggerMethod("collection:closed"); Marionette.View.prototype.close.apply(this, slice(arguments)); }, // Close the child views that this collection view // is holding on to, if any closeChildren: function(){ this.children.each(function(child){ this.removeChildView(child); }, this); this.checkEmpty(); } }); // Composite View // -------------- // Used for rendering a branch-leaf, hierarchical structure. // Extends directly from CollectionView and also renders an // an item view as `modelView`, for the top leaf Marionette.CompositeView = Marionette.CollectionView.extend({ // Setting up the inheritance chain which allows changes to // Marionette.CollectionView.prototype.constructor which allows overriding constructor: function(){ Marionette.CollectionView.prototype.constructor.apply(this, slice(arguments)); }, // Configured the initial events that the composite view // binds to. Override this method to prevent the initial // events, or to add your own initial events. _initialEvents: function(){ // Bind only after composite view in rendered to avoid adding child views // to unexisting itemViewContainer this.once('render', function () { if (this.collection){ this.listenTo(this.collection, "add", this.addChildView, this); this.listenTo(this.collection, "remove", this.removeItemView, this); this.listenTo(this.collection, "reset", this._renderChildren, this); } }); }, // Retrieve the `itemView` to be used when rendering each of // the items in the collection. The default is to return // `this.itemView` or Marionette.CompositeView if no `itemView` // has been defined getItemView: function(item){ var itemView = Marionette.getOption(this, "itemView") || this.constructor; if (!itemView){ throwError("An `itemView` must be specified", "NoItemViewError"); } return itemView; }, // Serialize the collection for the view. // You can override the `serializeData` method in your own view // definition, to provide custom serialization for your view's data. serializeData: function(){ var data = {}; if (this.model){ data = this.model.toJSON(); } return data; }, // Renders the model once, and the collection once. Calling // this again will tell the model's view to re-render itself // but the collection will not re-render. render: function(){ this.isRendered = true; this.isClosed = false; this.resetItemViewContainer(); this.triggerBeforeRender(); var html = this.renderModel(); this.$el.html(html); // the ui bindings is done here and not at the end of render since they // will not be available until after the model is rendered, but should be // available before the collection is rendered. this.bindUIElements(); this.triggerMethod("composite:model:rendered"); this._renderChildren(); this.triggerMethod("composite:rendered"); this.triggerRendered(); return this; }, _renderChildren: function(){ if (this.isRendered){ this.triggerMethod("composite:collection:before:render"); Marionette.CollectionView.prototype._renderChildren.call(this); this.triggerMethod("composite:collection:rendered"); } }, // Render an individual model, if we have one, as // part of a composite view (branch / leaf). For example: // a treeview. renderModel: function(){ var data = {}; data = this.serializeData(); data = this.mixinTemplateHelpers(data); var template = this.getTemplate(); return Marionette.Renderer.render(template, data); }, // You might need to override this if you've overridden appendHtml appendBuffer: function(compositeView, buffer) { var $container = this.getItemViewContainer(compositeView); $container.append(buffer); }, // Appends the `el` of itemView instances to the specified // `itemViewContainer` (a jQuery selector). Override this method to // provide custom logic of how the child item view instances have their // HTML appended to the composite view instance. appendHtml: function(compositeView, itemView, index){ if (compositeView.isBuffering) { compositeView.elBuffer.appendChild(itemView.el); compositeView._bufferedChildren.push(itemView); } else { // If we've already rendered the main collection, just // append the new items directly into the element. var $container = this.getItemViewContainer(compositeView); $container.append(itemView.el); } }, // Internal method to ensure an `$itemViewContainer` exists, for the // `appendHtml` method to use. getItemViewContainer: function(containerView){ if ("$itemViewContainer" in containerView){ return containerView.$itemViewContainer; } var container; var itemViewContainer = Marionette.getOption(containerView, "itemViewContainer"); if (itemViewContainer){ var selector = _.isFunction(itemViewContainer) ? itemViewContainer.call(this) : itemViewContainer; container = containerView.$(selector); if (container.length <= 0) { throwError("The specified `itemViewContainer` was not found: " + containerView.itemViewContainer, "ItemViewContainerMissingError"); } } else { container = containerView.$el; } containerView.$itemViewContainer = container; return container; }, // Internal method to reset the `$itemViewContainer` on render resetItemViewContainer: function(){ if (this.$itemViewContainer){ delete this.$itemViewContainer; } } }); // Layout // ------ // Used for managing application layouts, nested layouts and // multiple regions within an application or sub-application. // // A specialized view type that renders an area of HTML and then // attaches `Region` instances to the specified `regions`. // Used for composite view management and sub-application areas. Marionette.Layout = Marionette.ItemView.extend({ regionType: Marionette.Region, // Ensure the regions are available when the `initialize` method // is called. constructor: function (options) { options = options || {}; this._firstRender = true; this._initializeRegions(options); Marionette.ItemView.prototype.constructor.call(this, options); }, // Layout's render will use the existing region objects the // first time it is called. Subsequent calls will close the // views that the regions are showing and then reset the `el` // for the regions to the newly rendered DOM elements. render: function(){ if (this.isClosed){ // a previously closed layout means we need to // completely re-initialize the regions this._initializeRegions(); } if (this._firstRender) { // if this is the first render, don't do anything to // reset the regions this._firstRender = false; } else if (!this.isClosed){ // If this is not the first render call, then we need to // re-initializing the `el` for each region this._reInitializeRegions(); } var args = Array.prototype.slice.apply(arguments); var result = Marionette.ItemView.prototype.render.apply(this, args); return result; }, // Handle closing regions, and then close the view itself. close: function () { if (this.isClosed){ return; } this.regionManager.close(); var args = Array.prototype.slice.apply(arguments); Marionette.ItemView.prototype.close.apply(this, args); }, // Add a single region, by name, to the layout addRegion: function(name, definition){ var regions = {}; regions[name] = definition; return this._buildRegions(regions)[name]; }, // Add multiple regions as a {name: definition, name2: def2} object literal addRegions: function(regions){ this.regions = _.extend({}, this.regions, regions); return this._buildRegions(regions); }, // Remove a single region from the Layout, by name removeRegion: function(name){ delete this.regions[name]; return this.regionManager.removeRegion(name); }, // internal method to build regions _buildRegions: function(regions){ var that = this; var defaults = { regionType: Marionette.getOption(this, "regionType"), parentEl: function(){ return that.$el; } }; return this.regionManager.addRegions(regions, defaults); }, // Internal method to initialize the regions that have been defined in a // `regions` attribute on this layout. _initializeRegions: function (options) { var regions; this._initRegionManager(); if (_.isFunction(this.regions)) { regions = this.regions(options); } else { regions = this.regions || {}; } this.addRegions(regions); }, // Internal method to re-initialize all of the regions by updating the `el` that // they point to _reInitializeRegions: function(){ this.regionManager.closeRegions(); this.regionManager.each(function(region){ region.reset(); }); }, // Internal method to initialize the region manager // and all regions in it _initRegionManager: function(){ this.regionManager = new Marionette.RegionManager(); this.listenTo(this.regionManager, "region:add", function(name, region){ this[name] = region; this.trigger("region:add", name, region); }); this.listenTo(this.regionManager, "region:remove", function(name, region){ delete this[name]; this.trigger("region:remove", name, region); }); } }); // AppRouter // --------- // Reduce the boilerplate code of handling route events // and then calling a single method on another object. // Have your routers configured to call the method on // your object, directly. // // Configure an AppRouter with `appRoutes`. // // App routers can only take one `controller` object. // It is recommended that you divide your controller // objects in to smaller pieces of related functionality // and have multiple routers / controllers, instead of // just one giant router and controller. // // You can also add standard routes to an AppRouter. Marionette.AppRouter = Backbone.Router.extend({ constructor: function(options){ Backbone.Router.prototype.constructor.apply(this, slice(arguments)); this.options = options || {}; var appRoutes = Marionette.getOption(this, "appRoutes"); var controller = this._getController(); this.processAppRoutes(controller, appRoutes); }, // Similar to route method on a Backbone Router but // method is called on the controller appRoute: function(route, methodName) { var controller = this._getController(); this._addAppRoute(controller, route, methodName); }, // Internal method to process the `appRoutes` for the // router, and turn them in to routes that trigger the // specified method on the specified `controller`. processAppRoutes: function(controller, appRoutes) { if (!appRoutes){ return; } var routeNames = _.keys(appRoutes).reverse(); // Backbone requires reverted order of routes _.each(routeNames, function(route) { this._addAppRoute(controller, route, appRoutes[route]); }, this); }, _getController: function(){ return Marionette.getOption(this, "controller"); }, _addAppRoute: function(controller, route, methodName){ var method = controller[methodName]; if (!method) { throw new Error("Method '" + methodName + "' was not found on the controller"); } this.route(route, methodName, _.bind(method, controller)); } }); // Application // ----------- // Contain and manage the composite application as a whole. // Stores and starts up `Region` objects, includes an // event aggregator as `app.vent` Marionette.Application = function(options){ this._initRegionManager(); this._initCallbacks = new Marionette.Callbacks(); this.vent = new Backbone.Wreqr.EventAggregator(); this.commands = new Backbone.Wreqr.Commands(); this.reqres = new Backbone.Wreqr.RequestResponse(); this.submodules = {}; _.extend(this, options); this.triggerMethod = Marionette.triggerMethod; }; _.extend(Marionette.Application.prototype, Backbone.Events, { // Command execution, facilitated by Backbone.Wreqr.Commands execute: function(){ var args = Array.prototype.slice.apply(arguments); this.commands.execute.apply(this.commands, args); }, // Request/response, facilitated by Backbone.Wreqr.RequestResponse request: function(){ var args = Array.prototype.slice.apply(arguments); return this.reqres.request.apply(this.reqres, args); }, // Add an initializer that is either run at when the `start` // method is called, or run immediately if added after `start` // has already been called. addInitializer: function(initializer){ this._initCallbacks.add(initializer); }, // kick off all of the application's processes. // initializes all of the regions that have been added // to the app, and runs all of the initializer functions start: function(options){ this.triggerMethod("initialize:before", options); this._initCallbacks.run(options, this); this.triggerMethod("initialize:after", options); this.triggerMethod("start", options); }, // Add regions to your app. // Accepts a hash of named strings or Region objects // addRegions({something: "#someRegion"}) // addRegions({something: Region.extend({el: "#someRegion"}) }); addRegions: function(regions){ return this._regionManager.addRegions(regions); }, // Close all regions in the app, without removing them closeRegions: function(){ this._regionManager.closeRegions(); }, // Removes a region from your app, by name // Accepts the regions name // removeRegion('myRegion') removeRegion: function(region) { this._regionManager.removeRegion(region); }, // Provides alternative access to regions // Accepts the region name // getRegion('main') getRegion: function(region) { return this._regionManager.get(region); }, // Create a module, attached to the application module: function(moduleNames, moduleDefinition){ var ModuleClass = Marionette.Module; // Overwrite the module class if the user specifies one if (moduleDefinition) { ModuleClass = moduleDefinition.moduleClass || ModuleClass; } // slice the args, and add this application object as the // first argument of the array var args = slice(arguments); args.unshift(this); // see the Marionette.Module object for more information return ModuleClass.create.apply(ModuleClass, args); }, // Internal method to set up the region manager _initRegionManager: function(){ this._regionManager = new Marionette.RegionManager(); this.listenTo(this._regionManager, "region:add", function(name, region){ this[name] = region; }); this.listenTo(this._regionManager, "region:remove", function(name, region){ delete this[name]; }); } }); // Copy the `extend` function used by Backbone's classes Marionette.Application.extend = Marionette.extend; // Module // ------ // A simple module system, used to create privacy and encapsulation in // Marionette applications Marionette.Module = function(moduleName, app, options){ this.moduleName = moduleName; this.options = _.extend({}, this.options, options); this.initialize = options.initialize || this.initialize; // store sub-modules this.submodules = {}; this._setupInitializersAndFinalizers(); // store the configuration for this module this.app = app; this.startWithParent = true; this.triggerMethod = Marionette.triggerMethod; if (_.isFunction(this.initialize)){ this.initialize(this.options, moduleName, app); } }; Marionette.Module.extend = Marionette.extend; // Extend the Module prototype with events / listenTo, so that the module // can be used as an event aggregator or pub/sub. _.extend(Marionette.Module.prototype, Backbone.Events, { // Initialize is an empty function by default. Override it with your own // initialization logic when extending Marionette.Module. initialize: function(){}, // Initializer for a specific module. Initializers are run when the // module's `start` method is called. addInitializer: function(callback){ this._initializerCallbacks.add(callback); }, // Finalizers are run when a module is stopped. They are used to teardown // and finalize any variables, references, events and other code that the // module had set up. addFinalizer: function(callback){ this._finalizerCallbacks.add(callback); }, // Start the module, and run all of its initializers start: function(options){ // Prevent re-starting a module that is already started if (this._isInitialized){ return; } // start the sub-modules (depth-first hierarchy) _.each(this.submodules, function(mod){ // check to see if we should start the sub-module with this parent if (mod.startWithParent){ mod.start(options); } }); // run the callbacks to "start" the current module this.triggerMethod("before:start", options); this._initializerCallbacks.run(options, this); this._isInitialized = true; this.triggerMethod("start", options); }, // Stop this module by running its finalizers and then stop all of // the sub-modules for this module stop: function(){ // if we are not initialized, don't bother finalizing if (!this._isInitialized){ return; } this._isInitialized = false; Marionette.triggerMethod.call(this, "before:stop"); // stop the sub-modules; depth-first, to make sure the // sub-modules are stopped / finalized before parents _.each(this.submodules, function(mod){ mod.stop(); }); // run the finalizers this._finalizerCallbacks.run(undefined,this); // reset the initializers and finalizers this._initializerCallbacks.reset(); this._finalizerCallbacks.reset(); Marionette.triggerMethod.call(this, "stop"); }, // Configure the module with a definition function and any custom args // that are to be passed in to the definition function addDefinition: function(moduleDefinition, customArgs){ this._runModuleDefinition(moduleDefinition, customArgs); }, // Internal method: run the module definition function with the correct // arguments _runModuleDefinition: function(definition, customArgs){ if (!definition){ return; } // build the correct list of arguments for the module definition var args = _.flatten([ this, this.app, Backbone, Marionette, Marionette.$, _, customArgs ]); definition.apply(this, args); }, // Internal method: set up new copies of initializers and finalizers. // Calling this method will wipe out all existing initializers and // finalizers. _setupInitializersAndFinalizers: function(){ this._initializerCallbacks = new Marionette.Callbacks(); this._finalizerCallbacks = new Marionette.Callbacks(); } }); // Type methods to create modules _.extend(Marionette.Module, { // Create a module, hanging off the app parameter as the parent object. create: function(app, moduleNames, moduleDefinition){ var module = app; // get the custom args passed in after the module definition and // get rid of the module name and definition function var customArgs = slice(arguments); customArgs.splice(0, 3); // split the module names and get the length moduleNames = moduleNames.split("."); var length = moduleNames.length; // store the module definition for the last module in the chain var moduleDefinitions = []; moduleDefinitions[length-1] = moduleDefinition; // Loop through all the parts of the module definition _.each(moduleNames, function(moduleName, i){ var parentModule = module; module = this._getModule(parentModule, moduleName, app, moduleDefinition); this._addModuleDefinition(parentModule, module, moduleDefinitions[i], customArgs); }, this); // Return the last module in the definition chain return module; }, _getModule: function(parentModule, moduleName, app, def, args){ var ModuleClass = Marionette.Module; var options = _.extend({}, def); if (def) { ModuleClass = def.moduleClass || ModuleClass; } // Get an existing module of this name if we have one var module = parentModule[moduleName]; if (!module){ // Create a new module if we don't have one module = new ModuleClass(moduleName, app, options); parentModule[moduleName] = module; // store the module on the parent parentModule.submodules[moduleName] = module; } return module; }, _addModuleDefinition: function(parentModule, module, def, args){ var fn; var startWithParent; if (_.isFunction(def)){ // if a function is supplied for the module definition fn = def; startWithParent = true; } else if (_.isObject(def)){ // if an object is supplied fn = def.define; startWithParent = (typeof def.startWithParent !== 'undefined') ? def.startWithParent : true; } else { // if nothing is supplied startWithParent = true; } // add module definition if needed if (fn){ module.addDefinition(fn, args); } // `and` the two together, ensuring a single `false` will prevent it // from starting with the parent module.startWithParent = module.startWithParent && startWithParent; // setup auto-start if needed if (module.startWithParent && !module.startWithParentIsConfigured){ // only configure this once module.startWithParentIsConfigured = true; // add the module initializer config parentModule.addInitializer(function(options){ if (module.startWithParent){ module.start(options); } }); } } }); return Marionette; })(this, Backbone, _);
module.exports = function(grunt) { grunt.initConfig({ mocha_istanbul: { coverage: { src: ["test", "lib"], // load used folders options: { mask: '**/*.js', excludes: ["**/test/**"], //we dont care about test coverage of our testing code print: "both", //prints both detailed and summary test data mochaOptions: ['--harmony'], istanbulOptions: ['--harmony', '--handle-sigint'] } } }, istanbul_check_coverage: { default: { options: { coverageFolder: 'coverage*', // will check both coverage folders and merge the coverage results check: { lines: 80, statements: 80 } } } } }); grunt.loadNpmTasks('grunt-mocha-istanbul'); //grunt.registerTask('jshint', ['jshint:all']); grunt.registerTask('coverage', ['mocha_istanbul:coverage']); };
import { AppRegistry } from 'react-native' import Main from './src/Main' AppRegistry.registerComponent('appZone', () => Main)
var pa = require("path"); var os = require("os"); var settings = { middlewarepath: "./lib/middleware/mware", routerpath: "./lib/routes/routes", resourcepath: "./lib/resources/resources", iopath: "./lib/routes/io", timeout: 7200000, // Default location where scanned licenses are stored homename: pa.join((process.env.HOME || process.env.HOMEPATH || process.env.USERPROFILE), "licenses"), scannerpath: pa.normalize(pa.join(__dirname,"..","..","lx")), tmpdir: pa.join(os.tmpdir(),"lxgui") }; module.exports = settings;
module.exports = function (grunt) { 'use strict'; var secret = {}; try { secret = grunt.file.readJSON('secret.json'); } catch (err) {} // Project configuration. grunt.initConfig({ // secret.json contains the host, username and password for a server to // run the tests on. secret: secret, test: { files: ['test/**/*.js'] }, nodeunit: { files: ['test/**/*.js'] }, beautify: { files: '<%= jshint.files %>' }, watch: { files: '<%= jshint.files %>', tasks: 'default' }, bump: { options: { pushTo: 'origin' } }, jshint: { options: { curly: true, eqeqeq: true, immed: true, latedef: true, newcap: true, noarg: true, sub: true, undef: true, boss: true, eqnull: true, node: true, globals: { exports: true } }, files: ['Gruntfile.js', 'tasks/**/*.js', 'test/**/*.js'] }, sftp: { test: { files: { "./": "tasks/**/*.js" }, options: { path: '/tmp', host: '<%= secret.host %>', username: '<%= secret.username %>', // password auth password: '<%= secret.password %>' // private key auth /* privateKey: grunt.file.read('id_rsa'), passphrase: '<%= secret.passphrase %>', */ // create directories /* path: "/tmp/does/not/exist/", createDirectories: true */ } } }, sshexec: { test: { // single command // command: 'uptime', // multiple commands command: ['uptime', 'ls', 'uptime'], options: { host: secret.host, username: secret.username, // private key auth //privateKey: grunt.file.read(secret.privateKeyPath), passphrase: secret.passphrase } } } }); // Actually load this plugin's tasks grunt.loadTasks('tasks'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-beautify'); grunt.loadNpmTasks('grunt-bump'); grunt.loadNpmTasks('grunt-contrib-nodeunit'); // Default task. grunt.registerTask('default', ['jshint', 'nodeunit']); grunt.registerTask('tidy', ['beautify']); };
/** * Habit Controller. * * @module server/controllers/habit */ const Habit = require('../models/Habit'); const User = require('../models/User'); const createHabit = (req, res, next) => new Habit(req.body) .save() .then((habit) => Promise.all([ habit, // Push the newly saved habit to the user's habit array. User.findByIdAndUpdate(req.user._id, { $push: { habits: habit._id } }), ])) .then(([habit]) => res.json(habit)) .catch(next); const deleteHabit = (req, res, next) => Habit .findByIdAndRemove(req.params.id) .then(() => res.json({ message: 'the habit was deleted' })) .catch(next); const getHabit = (req, res, next) => Habit .findById(req.params.id) .then((habit) => res.json(habit)) .catch(next); const getHabits = (req, res, next) => Habit .find() .then((habits) => res.json(habits)) .catch(next); const updateHabit = (req, res, next) => Habit .findByIdAndUpdate(req.params.id, req.body, { new: true }) .then((updatedHabit) => res.json(updatedHabit)) .catch(next); module.exports = { createHabit, getHabit, getHabits, updateHabit, deleteHabit, };
fetcher.scrappers.t4p_tv = function(genre, keywords, page, callback){ if(genre=='all') genre = !1; var url = 'http://time4popcorn.eu/shows?sort=seeds'; if (keywords) { url += '&keywords=' + keywords; } if (genre) { url += '&genre=' + genre; } if (page && page.toString().match(/\d+/)) { url += '&set=' + page; } $.ajax({ url: url, dataType:'json', error:function(){callback(false)}, success:function(data){ var movies = [], memory = {}; if (data.error || typeof data.MovieList === 'undefined') { callback(false) return; } data.MovieList.forEach(function (movie){ // No imdb, no movie. if( typeof movie.imdb != 'string' || movie.imdb.replace('tt', '') == '' ){ return;} try{ // Temporary object var movieModel = { imdb: movie.imdb, title: movie.title, year: movie.year ? movie.year : '&nbsp;', runtime: movie.runtime, synopsis: "", voteAverage:parseFloat(movie.rating), image: movie.poster_med, bigImage: movie.poster_big, backdrop: "", videos: {}, seeders: movie.torrent_seeds, leechers: movie.torrent_peers, trailer: movie.trailer ? 'http://www.youtube.com/embed/' + movie.trailer + '?autoplay=1': false, stars: utils.movie.rateToStars(parseFloat(movie.rating)), hasMetadata:false, hasSubtitle:false }; var stored = memory[movie.imdb]; // Create it on memory map if it doesn't exist. if (typeof stored === 'undefined') { stored = memory[movie.imdb] = movieModel; } // Push it if not currently on array. if (movies.indexOf(stored) === -1) { movies.push(stored); } }catch(e){ console.log(e.message);} }); callback(movies) }, }); }
import { get } from '@ember/object'; import Service, { inject as service } from '@ember/service'; /** * Converts an integer to a hex string and returns the last two characters * as a string. * * @method integerToHex * @param {Integer} integer An integer to convert * @return {String} A hexadecimal string of length 2. */ function integerToHex(integer) { return (`0${integer.toString(16)}`.substr(-2)); } /** * Generates a randomized array of decimals, converts them to hexadecimal values * and joins into a string in order to output a random string of specified * length. * * @method generateRandomString * @param {Integer} length The length of the random string to generate * @return {String} A random string of the specified length */ function generateRandomString(length = 40) { let unsignedInt8Array = new window.Uint8Array(length / 2); let randomizedArray = window.crypto.getRandomValues(unsignedInt8Array); return Array.from(randomizedArray).map(integerToHex).join(''); } /** * Service used to protect against cross site request forgery during the * GitHub OAuth process. * * The two methods, `generate()` and `validate(state)` work to initially * generate and then later validate a `state` string used in the process. * * @class GitHubStateService * @module code-corps-ember/services/github-state * @extends Ember.Service * @uses SessionService * @public */ export default Service.extend({ /** * We use the injected session service to store the `state` in a way that * persists across tabs * * @property session * @type Ember.Service * @private */ session: service(), /** * Generates and returns a random string. The string is also stored into * the user's session. * * This string can then be used as a `state` variable when navigating to * GitHub's authorization URL. GitHub will then return it upon succesful * approval, so it can be validated using the sibling `validate(state)` * function. * * @method generate * @return {String} A randomly generated string, also stored in the * user's session. * @public */ generate() { let githubState = generateRandomString(); // session service overrides `set`, so we need to use it directly get(this, 'session').set('data.githubState', githubState); return githubState; }, /** * Validates a state string. * * Compares the provided string with the string generated by the sibling * `generate()` function and stored in the user's session. * * @method validate * @param {String} stateToCheck The string to check if valid * @return {Boolean} True if the provided string matches the one stored * in the user's session; false otherwise. * @public */ validate(stateToCheck) { let state = get(this, 'session.data.githubState'); return state && state === stateToCheck; } });
import Vue from 'vue'; import store from '~/ide/stores'; import radioGroup from '~/ide/components/commit_sidebar/radio_group.vue'; import { createComponentWithStore } from 'spec/helpers/vue_mount_component_helper'; import { resetStore } from 'spec/ide/helpers'; describe('IDE commit sidebar radio group', () => { let vm; beforeEach(done => { const Component = Vue.extend(radioGroup); store.state.commit.commitAction = '2'; vm = createComponentWithStore(Component, store, { value: '1', label: 'test', checked: true, }); vm.$mount(); Vue.nextTick(done); }); afterEach(() => { vm.$destroy(); resetStore(vm.$store); }); it('uses label if present', () => { expect(vm.$el.textContent).toContain('test'); }); it('uses slot if label is not present', done => { vm.$destroy(); vm = new Vue({ components: { radioGroup, }, store, template: ` <radio-group value="1" > Testing slot </radio-group> `, }); vm.$mount(); Vue.nextTick(() => { expect(vm.$el.textContent).toContain('Testing slot'); done(); }); }); it('updates store when changing radio button', done => { vm.$el.querySelector('input').dispatchEvent(new Event('change')); Vue.nextTick(() => { expect(store.state.commit.commitAction).toBe('1'); done(); }); }); describe('with input', () => { beforeEach(done => { vm.$destroy(); const Component = Vue.extend(radioGroup); store.state.commit.commitAction = '1'; store.state.commit.newBranchName = 'test-123'; vm = createComponentWithStore(Component, store, { value: '1', label: 'test', checked: true, showInput: true, }); vm.$mount(); Vue.nextTick(done); }); it('renders input box when commitAction matches value', () => { expect(vm.$el.querySelector('.form-control')).not.toBeNull(); }); it('hides input when commitAction doesnt match value', done => { store.state.commit.commitAction = '2'; Vue.nextTick(() => { expect(vm.$el.querySelector('.form-control')).toBeNull(); done(); }); }); it('updates branch name in store on input', done => { const input = vm.$el.querySelector('.form-control'); input.value = 'testing-123'; input.dispatchEvent(new Event('input')); Vue.nextTick(() => { expect(store.state.commit.newBranchName).toBe('testing-123'); done(); }); }); it('renders newBranchName if present', () => { const input = vm.$el.querySelector('.form-control'); expect(input.value).toBe('test-123'); }); }); describe('tooltipTitle', () => { it('returns title when disabled', () => { vm.title = 'test title'; vm.disabled = true; expect(vm.tooltipTitle).toBe('test title'); }); it('returns blank when not disabled', () => { vm.title = 'test title'; expect(vm.tooltipTitle).not.toBe('test title'); }); }); });
//>>built require({cache:{"dojox/gfx/shape":function(){define("./_base dojo/_base/lang dojo/_base/declare dojo/_base/kernel dojo/_base/sniff dojo/on dojo/_base/array dojo/dom-construct dojo/_base/Color ./matrix".split(" "),function(f,q,p,t,m,c,l,g,h,b){function n(a,b){if(!u)return a.splice(b,1);var e=a.length;if(e){for(;b<e;)a[b]=a[b+1],b++;a.length--}}var u=!!m("chrome"),k=f.shape={};k.Shape=p("dojox.gfx.shape.Shape",null,{constructor:function(){this.parentMatrix=this.parent=this.bbox=this.strokeStyle=this.fillStyle= this.matrix=this.shape=this.rawNode=null;if(m("gfxRegistry")){var a=k.register(this);this.getUID=function(){return a}}},destroy:function(){m("gfxRegistry")&&k.dispose(this);this.rawNode&&"__gfxObject__"in this.rawNode&&(this.rawNode.__gfxObject__=null);this.rawNode=null},getNode:function(){return this.rawNode},getShape:function(){return this.shape},getTransform:function(){return this.matrix},getFill:function(){return this.fillStyle},getStroke:function(){return this.strokeStyle},getParent:function(){return this.parent}, getBoundingBox:function(){return this.bbox},getTransformedBoundingBox:function(){var a=this.getBoundingBox();if(!a)return null;var c=this._getRealMatrix();return[b.multiplyPoint(c,a.x,a.y),b.multiplyPoint(c,a.x+a.width,a.y),b.multiplyPoint(c,a.x+a.width,a.y+a.height),b.multiplyPoint(c,a.x,a.y+a.height)]},getEventSource:function(){return this.rawNode},setClip:function(a){this.clip=a},getClip:function(){return this.clip},setShape:function(a){this.shape=f.makeParameters(this.shape,a);this.bbox=null; return this},setFill:function(a){if(!a)return this.fillStyle=null,this;var b=null;if("object"==typeof a&&"type"in a)switch(a.type){case "linear":b=f.makeParameters(f.defaultLinearGradient,a);break;case "radial":b=f.makeParameters(f.defaultRadialGradient,a);break;case "pattern":b=f.makeParameters(f.defaultPattern,a)}else b=f.normalizeColor(a);this.fillStyle=b;return this},setStroke:function(a){if(!a)return this.strokeStyle=null,this;if("string"==typeof a||q.isArray(a)||a instanceof h)a={color:a};a= this.strokeStyle=f.makeParameters(f.defaultStroke,a);a.color=f.normalizeColor(a.color);return this},setTransform:function(a){this.matrix=b.clone(a?b.normalize(a):b.identity);return this._applyTransform()},_applyTransform:function(){return this},moveToFront:function(){var a=this.getParent();a&&(a._moveChildToFront(this),this._moveToFront());return this},moveToBack:function(){var a=this.getParent();a&&(a._moveChildToBack(this),this._moveToBack());return this},_moveToFront:function(){},_moveToBack:function(){}, applyRightTransform:function(a){return a?this.setTransform([this.matrix,a]):this},applyLeftTransform:function(a){return a?this.setTransform([a,this.matrix]):this},applyTransform:function(a){return a?this.setTransform([this.matrix,a]):this},removeShape:function(a){this.parent&&this.parent.remove(this,a);return this},_setParent:function(a,b){this.parent=a;return this._updateParentMatrix(b)},_updateParentMatrix:function(a){this.parentMatrix=a?b.clone(a):null;return this._applyTransform()},_getRealMatrix:function(){for(var a= this.matrix,c=this.parent;c;)c.matrix&&(a=b.multiply(c.matrix,a)),c=c.parent;return a}});k._eventsProcessing={on:function(a,b){return c(this.getEventSource(),a,k.fixCallback(this,f.fixTarget,b))},connect:function(a,b,e){"on"==a.substring(0,2)&&(a=a.substring(2));return this.on(a,e?q.hitch(b,e):b)},disconnect:function(a){return a.remove()}};k.fixCallback=function(a,b,e,c){c||(c=e,e=null);if(q.isString(c)){e=e||t.global;if(!e[c])throw['dojox.gfx.shape.fixCallback: scope["',c,'"] is null (scope\x3d"', e,'")'].join("");return function(f){return b(f,a)?e[c].apply(e,arguments||[]):void 0}}return e?function(f){return b(f,a)?c.apply(e,arguments||[]):void 0}:function(f){return b(f,a)?c.apply(e,arguments):void 0}};q.extend(k.Shape,k._eventsProcessing);k.Container={_init:function(){this.children=[];this._batch=0},openBatch:function(){return this},closeBatch:function(){return this},add:function(a){var b=a.getParent();b&&b.remove(a,!0);this.children.push(a);return a._setParent(this,this._getRealMatrix())}, remove:function(a,b){for(var e=0;e<this.children.length;++e)if(this.children[e]==a){b||(a.parent=null,a.parentMatrix=null);n(this.children,e);break}return this},clear:function(a){for(var b,e=0;e<this.children.length;++e)b=this.children[e],b.parent=null,b.parentMatrix=null,a&&b.destroy();this.children=[];return this},getBoundingBox:function(){if(this.children){var a=null;l.forEach(this.children,function(c){var e=c.getBoundingBox();e&&((c=c.getTransform())&&(e=b.multiplyRectangle(c,e)),a?(a.x=Math.min(a.x, e.x),a.y=Math.min(a.y,e.y),a.endX=Math.max(a.endX,e.x+e.width),a.endY=Math.max(a.endY,e.y+e.height)):a={x:e.x,y:e.y,endX:e.x+e.width,endY:e.y+e.height})});a&&(a.width=a.endX-a.x,a.height=a.endY-a.y);return a}return null},_moveChildToFront:function(a){for(var b=0;b<this.children.length;++b)if(this.children[b]==a){n(this.children,b);this.children.push(a);break}return this},_moveChildToBack:function(a){for(var b=0;b<this.children.length;++b)if(this.children[b]==a){n(this.children,b);this.children.unshift(a); break}return this}};k.Surface=p("dojox.gfx.shape.Surface",null,{constructor:function(){this._parent=this.rawNode=null;this._nodes=[];this._events=[]},destroy:function(){l.forEach(this._nodes,g.destroy);this._nodes=[];l.forEach(this._events,function(a){a&&a.remove()});this._events=[];this.rawNode=null;if(m("ie"))for(;this._parent.lastChild;)g.destroy(this._parent.lastChild);else this._parent.innerHTML="";this._parent=null},getEventSource:function(){return this.rawNode},_getRealMatrix:function(){return null}, isLoaded:!0,onLoad:function(a){},whenLoaded:function(a,b){var e=q.hitch(a,b);if(this.isLoaded)e(this);else c.once(this,"load",function(a){e(a)})}});q.extend(k.Surface,k._eventsProcessing);k.Rect=p("dojox.gfx.shape.Rect",k.Shape,{constructor:function(a){this.shape=f.getDefault("Rect");this.rawNode=a},getBoundingBox:function(){return this.shape}});k.Ellipse=p("dojox.gfx.shape.Ellipse",k.Shape,{constructor:function(a){this.shape=f.getDefault("Ellipse");this.rawNode=a},getBoundingBox:function(){if(!this.bbox){var a= this.shape;this.bbox={x:a.cx-a.rx,y:a.cy-a.ry,width:2*a.rx,height:2*a.ry}}return this.bbox}});k.Circle=p("dojox.gfx.shape.Circle",k.Shape,{constructor:function(a){this.shape=f.getDefault("Circle");this.rawNode=a},getBoundingBox:function(){if(!this.bbox){var a=this.shape;this.bbox={x:a.cx-a.r,y:a.cy-a.r,width:2*a.r,height:2*a.r}}return this.bbox}});k.Line=p("dojox.gfx.shape.Line",k.Shape,{constructor:function(a){this.shape=f.getDefault("Line");this.rawNode=a},getBoundingBox:function(){if(!this.bbox){var a= this.shape;this.bbox={x:Math.min(a.x1,a.x2),y:Math.min(a.y1,a.y2),width:Math.abs(a.x2-a.x1),height:Math.abs(a.y2-a.y1)}}return this.bbox}});k.Polyline=p("dojox.gfx.shape.Polyline",k.Shape,{constructor:function(a){this.shape=f.getDefault("Polyline");this.rawNode=a},setShape:function(a,b){a&&a instanceof Array?(this.inherited(arguments,[{points:a}]),b&&this.shape.points.length&&this.shape.points.push(this.shape.points[0])):this.inherited(arguments,[a]);return this},_normalizePoints:function(){var a= this.shape.points,b=a&&a.length;if(b&&"number"==typeof a[0]){for(var e=[],c=0;c<b;c+=2)e.push({x:a[c],y:a[c+1]});this.shape.points=e}},getBoundingBox:function(){if(!this.bbox&&this.shape.points.length){for(var a=this.shape.points,b=a.length,e=a[0],c=e.x,f=e.y,g=e.x,l=e.y,k=1;k<b;++k)e=a[k],c>e.x&&(c=e.x),g<e.x&&(g=e.x),f>e.y&&(f=e.y),l<e.y&&(l=e.y);this.bbox={x:c,y:f,width:g-c,height:l-f}}return this.bbox}});k.Image=p("dojox.gfx.shape.Image",k.Shape,{constructor:function(a){this.shape=f.getDefault("Image"); this.rawNode=a},getBoundingBox:function(){return this.shape},setStroke:function(){return this},setFill:function(){return this}});k.Text=p(k.Shape,{constructor:function(a){this.fontStyle=null;this.shape=f.getDefault("Text");this.rawNode=a},getFont:function(){return this.fontStyle},setFont:function(a){this.fontStyle="string"==typeof a?f.splitFontString(a):f.makeParameters(f.defaultFont,a);this._setFont();return this},getBoundingBox:function(){var a=null;this.getShape().text&&(a=f._base._computeTextBoundingBox(this)); return a}});k.Creator={createShape:function(a){switch(a.type){case f.defaultPath.type:return this.createPath(a);case f.defaultRect.type:return this.createRect(a);case f.defaultCircle.type:return this.createCircle(a);case f.defaultEllipse.type:return this.createEllipse(a);case f.defaultLine.type:return this.createLine(a);case f.defaultPolyline.type:return this.createPolyline(a);case f.defaultImage.type:return this.createImage(a);case f.defaultText.type:return this.createText(a);case f.defaultTextPath.type:return this.createTextPath(a)}return null}, createGroup:function(){return this.createObject(f.Group)},createRect:function(a){return this.createObject(f.Rect,a)},createEllipse:function(a){return this.createObject(f.Ellipse,a)},createCircle:function(a){return this.createObject(f.Circle,a)},createLine:function(a){return this.createObject(f.Line,a)},createPolyline:function(a){return this.createObject(f.Polyline,a)},createImage:function(a){return this.createObject(f.Image,a)},createText:function(a){return this.createObject(f.Text,a)},createPath:function(a){return this.createObject(f.Path, a)},createTextPath:function(a){return this.createObject(f.TextPath,{}).setText(a)},createObject:function(a,b){return null}};return k})},"dojox/gfx/path":function(){define(["./_base","dojo/_base/lang","dojo/_base/declare","./matrix","./shape"],function(f,q,p,t,m){m=p("dojox.gfx.path.Path",m.Shape,{constructor:function(c){this.shape=q.clone(f.defaultPath);this.segments=[];this.tbbox=null;this.absolute=!0;this.last={};this.rawNode=c;this.segmented=!1},setAbsoluteMode:function(c){this._confirmSegmented(); this.absolute="string"==typeof c?"absolute"==c:c;return this},getAbsoluteMode:function(){this._confirmSegmented();return this.absolute},getBoundingBox:function(){this._confirmSegmented();return this.bbox&&"l"in this.bbox?{x:this.bbox.l,y:this.bbox.t,width:this.bbox.r-this.bbox.l,height:this.bbox.b-this.bbox.t}:null},_getRealBBox:function(){this._confirmSegmented();if(this.tbbox)return this.tbbox;var c=this.bbox,f=this._getRealMatrix();this.bbox=null;for(var g=0,h=this.segments.length;g<h;++g)this._updateWithSegment(this.segments[g], f);f=this.bbox;this.bbox=c;return this.tbbox=f?[{x:f.l,y:f.t},{x:f.r,y:f.t},{x:f.r,y:f.b},{x:f.l,y:f.b}]:null},getLastPosition:function(){this._confirmSegmented();return"x"in this.last?this.last:null},_applyTransform:function(){this.tbbox=null;return this.inherited(arguments)},_updateBBox:function(c,f,g){g&&(f=t.multiplyPoint(g,c,f),c=f.x,f=f.y);this.bbox&&"l"in this.bbox?(this.bbox.l>c&&(this.bbox.l=c),this.bbox.r<c&&(this.bbox.r=c),this.bbox.t>f&&(this.bbox.t=f),this.bbox.b<f&&(this.bbox.b=f)): this.bbox={l:c,b:f,r:c,t:f}},_updateWithSegment:function(c,l){var g=c.args,h=g.length,b;switch(c.action){case "M":case "L":case "C":case "S":case "Q":case "T":for(b=0;b<h;b+=2)this._updateBBox(g[b],g[b+1],l);this.last.x=g[h-2];this.last.y=g[h-1];this.absolute=!0;break;case "H":for(b=0;b<h;++b)this._updateBBox(g[b],this.last.y,l);this.last.x=g[h-1];this.absolute=!0;break;case "V":for(b=0;b<h;++b)this._updateBBox(this.last.x,g[b],l);this.last.y=g[h-1];this.absolute=!0;break;case "m":b=0;"x"in this.last|| (this._updateBBox(this.last.x=g[0],this.last.y=g[1],l),b=2);for(;b<h;b+=2)this._updateBBox(this.last.x+=g[b],this.last.y+=g[b+1],l);this.absolute=!1;break;case "l":case "t":for(b=0;b<h;b+=2)this._updateBBox(this.last.x+=g[b],this.last.y+=g[b+1],l);this.absolute=!1;break;case "h":for(b=0;b<h;++b)this._updateBBox(this.last.x+=g[b],this.last.y,l);this.absolute=!1;break;case "v":for(b=0;b<h;++b)this._updateBBox(this.last.x,this.last.y+=g[b],l);this.absolute=!1;break;case "c":for(b=0;b<h;b+=6)this._updateBBox(this.last.x+ g[b],this.last.y+g[b+1],l),this._updateBBox(this.last.x+g[b+2],this.last.y+g[b+3],l),this._updateBBox(this.last.x+=g[b+4],this.last.y+=g[b+5],l);this.absolute=!1;break;case "s":case "q":for(b=0;b<h;b+=4)this._updateBBox(this.last.x+g[b],this.last.y+g[b+1],l),this._updateBBox(this.last.x+=g[b+2],this.last.y+=g[b+3],l);this.absolute=!1;break;case "A":for(b=0;b<h;b+=7)this._updateBBox(g[b+5],g[b+6],l);this.last.x=g[h-2];this.last.y=g[h-1];this.absolute=!0;break;case "a":for(b=0;b<h;b+=7)this._updateBBox(this.last.x+= g[b+5],this.last.y+=g[b+6],l);this.absolute=!1}var n=[c.action];for(b=0;b<h;++b)n.push(f.formatNumber(g[b],!0));if("string"==typeof this.shape.path)this.shape.path+=n.join("");else for(b=0,h=n.length;b<h;++b)this.shape.path.push(n[b])},_validSegments:{m:2,l:2,h:1,v:1,c:6,s:4,q:4,t:2,a:7,z:0},_pushSegment:function(c,f){this.tbbox=null;var g=this._validSegments[c.toLowerCase()];"number"==typeof g&&(g?f.length>=g&&(g={action:c,args:f.slice(0,f.length-f.length%g)},this.segments.push(g),this._updateWithSegment(g)): (g={action:c,args:[]},this.segments.push(g),this._updateWithSegment(g)))},_collectArgs:function(c,f){for(var g=0;g<f.length;++g){var h=f[g];"boolean"==typeof h?c.push(h?1:0):"number"==typeof h?c.push(h):h instanceof Array?this._collectArgs(c,h):"x"in h&&"y"in h&&c.push(h.x,h.y)}},moveTo:function(){this._confirmSegmented();var c=[];this._collectArgs(c,arguments);this._pushSegment(this.absolute?"M":"m",c);return this},lineTo:function(){this._confirmSegmented();var c=[];this._collectArgs(c,arguments); this._pushSegment(this.absolute?"L":"l",c);return this},hLineTo:function(){this._confirmSegmented();var c=[];this._collectArgs(c,arguments);this._pushSegment(this.absolute?"H":"h",c);return this},vLineTo:function(){this._confirmSegmented();var c=[];this._collectArgs(c,arguments);this._pushSegment(this.absolute?"V":"v",c);return this},curveTo:function(){this._confirmSegmented();var c=[];this._collectArgs(c,arguments);this._pushSegment(this.absolute?"C":"c",c);return this},smoothCurveTo:function(){this._confirmSegmented(); var c=[];this._collectArgs(c,arguments);this._pushSegment(this.absolute?"S":"s",c);return this},qCurveTo:function(){this._confirmSegmented();var c=[];this._collectArgs(c,arguments);this._pushSegment(this.absolute?"Q":"q",c);return this},qSmoothCurveTo:function(){this._confirmSegmented();var c=[];this._collectArgs(c,arguments);this._pushSegment(this.absolute?"T":"t",c);return this},arcTo:function(){this._confirmSegmented();var c=[];this._collectArgs(c,arguments);this._pushSegment(this.absolute?"A": "a",c);return this},closePath:function(){this._confirmSegmented();this._pushSegment("Z",[]);return this},_confirmSegmented:function(){if(!this.segmented){var c=this.shape.path;this.shape.path=[];this._setPath(c);this.shape.path=this.shape.path.join("");this.segmented=!0}},_setPath:function(c){c=q.isArray(c)?c:c.match(f.pathSvgRegExp);this.segments=[];this.absolute=!0;this.bbox={};this.last={};if(c){for(var l="",g=[],h=c.length,b=0;b<h;++b){var n=c[b],m=parseFloat(n);isNaN(m)?(l&&this._pushSegment(l, g),g=[],l=n):g.push(m)}this._pushSegment(l,g)}},setShape:function(c){this.inherited(arguments,["string"==typeof c?{path:c}:c]);this.segmented=!1;this.segments=[];f.lazyPathSegmentation||this._confirmSegmented();return this},_2PI:2*Math.PI});p=p("dojox.gfx.path.TextPath",m,{constructor:function(c){"text"in this||(this.text=q.clone(f.defaultTextPath));"fontStyle"in this||(this.fontStyle=q.clone(f.defaultFont))},getText:function(){return this.text},setText:function(c){this.text=f.makeParameters(this.text, "string"==typeof c?{text:c}:c);this._setText();return this},getFont:function(){return this.fontStyle},setFont:function(c){this.fontStyle="string"==typeof c?f.splitFontString(c):f.makeParameters(f.defaultFont,c);this._setFont();return this}});return f.path={Path:m,TextPath:p}})},"*noref":1}}); define("dojox/gfx/svg","dojo/_base/lang dojo/_base/sniff dojo/_base/window dojo/dom dojo/_base/declare dojo/_base/array dojo/dom-geometry dojo/dom-attr dojo/_base/Color ./_base ./shape ./path".split(" "),function(f,q,p,t,m,c,l,g,h,b,n,u){function k(d,a){return p.doc.createElementNS?p.doc.createElementNS(d,a):p.doc.createElement(a)}function a(d,a,b,e){return d.setAttributeNS?d.setAttributeNS(a,b,e):d.setAttribute(b,e)}function x(d){return e.useSvgWeb?p.doc.createTextNode(d,!0):p.doc.createTextNode(d)} var e=b.svg={};e.useSvgWeb="undefined"!=typeof window.svgweb;var z=navigator.userAgent,A=q("ios"),y=q("android"),B=q("chrome")||y&&4<=y?"auto":"optimizeLegibility";e.xmlns={xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"};e.getRef=function(d){return d&&"none"!=d?d.match(/^url\(#.+\)$/)?t.byId(d.slice(5,-1)):d.match(/^#dojoUnique\d+$/)?t.byId(d.slice(1)):null:null};e.dasharray={solid:"none",shortdash:[4,1],shortdot:[1,1],shortdashdot:[4,1,1,1],shortdashdotdot:[4,1,1,1,1,1],dot:[1, 3],dash:[4,3],longdash:[8,3],dashdot:[4,3,1,3],longdashdot:[8,3,1,3],longdashdotdot:[8,3,1,3,1,3]};var C=0;e.Shape=m("dojox.gfx.svg.Shape",n.Shape,{destroy:function(){if(this.fillStyle&&"type"in this.fillStyle){var d=this.rawNode.getAttribute("fill");(d=e.getRef(d))&&d.parentNode.removeChild(d)}this.clip&&(d=this.rawNode.getAttribute("clip-path"))&&(d=t.byId(d.match(/gfx_clip[\d]+/)[0]))&&d.parentNode.removeChild(d);n.Shape.prototype.destroy.apply(this,arguments)},setFill:function(d){if(!d)return this.fillStyle= null,this.rawNode.setAttribute("fill","none"),this.rawNode.setAttribute("fill-opacity",0),this;var a,e=function(d){this.setAttribute(d,a[d].toFixed(8))};if("object"==typeof d&&"type"in d){switch(d.type){case "linear":a=b.makeParameters(b.defaultLinearGradient,d);d=this._setFillObject(a,"linearGradient");c.forEach(["x1","y1","x2","y2"],e,d);break;case "radial":a=b.makeParameters(b.defaultRadialGradient,d);d=this._setFillObject(a,"radialGradient");c.forEach(["cx","cy","r"],e,d);break;case "pattern":a= b.makeParameters(b.defaultPattern,d),d=this._setFillObject(a,"pattern"),c.forEach(["x","y","width","height"],e,d)}this.fillStyle=a;return this}this.fillStyle=a=b.normalizeColor(d);this.rawNode.setAttribute("fill",a.toCss());this.rawNode.setAttribute("fill-opacity",a.a);this.rawNode.setAttribute("fill-rule","evenodd");return this},setStroke:function(d){var a=this.rawNode;if(!d)return this.strokeStyle=null,a.setAttribute("stroke","none"),a.setAttribute("stroke-opacity",0),this;if("string"==typeof d|| f.isArray(d)||d instanceof h)d={color:d};d=this.strokeStyle=b.makeParameters(b.defaultStroke,d);d.color=b.normalizeColor(d.color);if(d){var c=0>d.width?0:d.width;a.setAttribute("stroke",d.color.toCss());a.setAttribute("stroke-opacity",d.color.a);a.setAttribute("stroke-width",c);a.setAttribute("stroke-linecap",d.cap);"number"==typeof d.join?(a.setAttribute("stroke-linejoin","miter"),a.setAttribute("stroke-miterlimit",d.join)):a.setAttribute("stroke-linejoin",d.join);var g=d.style.toLowerCase();g in e.dasharray&&(g=e.dasharray[g]);if(g instanceof Array){var g=f._toArray(g),r;for(r=0;r<g.length;++r)g[r]*=c;if("butt"!=d.cap){for(r=0;r<g.length;r+=2)g[r]-=c,1>g[r]&&(g[r]=1);for(r=1;r<g.length;r+=2)g[r]+=c}g=g.join(",")}a.setAttribute("stroke-dasharray",g);a.setAttribute("dojoGfxStrokeStyle",d.style)}return this},_getParentSurface:function(){for(var d=this.parent;d&&!(d instanceof b.Surface);d=d.parent);return d},_setFillObject:function(d,c){var f=e.xmlns.svg;this.fillStyle=d;var v=this._getParentSurface().defNode, g=this.rawNode.getAttribute("fill");if(g=e.getRef(g))if(g.tagName.toLowerCase()!=c.toLowerCase()){var h=g.id;g.parentNode.removeChild(g);g=k(f,c);g.setAttribute("id",h);v.appendChild(g)}else for(;g.childNodes.length;)g.removeChild(g.lastChild);else g=k(f,c),g.setAttribute("id",b._base._getUniqueId()),v.appendChild(g);if("pattern"==c)g.setAttribute("patternUnits","userSpaceOnUse"),f=k(f,"image"),f.setAttribute("x",0),f.setAttribute("y",0),f.setAttribute("width",(0>d.width?0:d.width).toFixed(8)),f.setAttribute("height", (0>d.height?0:d.height).toFixed(8)),a(f,e.xmlns.xlink,"xlink:href",d.src),g.appendChild(f);else for(g.setAttribute("gradientUnits","userSpaceOnUse"),v=0;v<d.colors.length;++v){var h=d.colors[v],l=k(f,"stop"),m=h.color=b.normalizeColor(h.color);l.setAttribute("offset",h.offset.toFixed(8));l.setAttribute("stop-color",m.toCss());l.setAttribute("stop-opacity",m.a);g.appendChild(l)}this.rawNode.setAttribute("fill","url(#"+g.getAttribute("id")+")");this.rawNode.removeAttribute("fill-opacity");this.rawNode.setAttribute("fill-rule", "evenodd");return g},_applyTransform:function(){if(this.matrix){var d=this.matrix;this.rawNode.setAttribute("transform","matrix("+d.xx.toFixed(8)+","+d.yx.toFixed(8)+","+d.xy.toFixed(8)+","+d.yy.toFixed(8)+","+d.dx.toFixed(8)+","+d.dy.toFixed(8)+")")}else this.rawNode.removeAttribute("transform");return this},setRawNode:function(d){d=this.rawNode=d;"image"!=this.shape.type&&d.setAttribute("fill","none");d.setAttribute("fill-opacity",0);d.setAttribute("stroke","none");d.setAttribute("stroke-opacity", 0);d.setAttribute("stroke-width",1);d.setAttribute("stroke-linecap","butt");d.setAttribute("stroke-linejoin","miter");d.setAttribute("stroke-miterlimit",4);d.__gfxObject__=this},setShape:function(d){this.shape=b.makeParameters(this.shape,d);for(var a in this.shape)if("type"!=a){d=this.shape[a];if("width"===a||"height"===a)d=0>d?0:d;this.rawNode.setAttribute(a,d)}this.bbox=null;return this},_moveToFront:function(){this.rawNode.parentNode.appendChild(this.rawNode);return this},_moveToBack:function(){this.rawNode.parentNode.insertBefore(this.rawNode, this.rawNode.parentNode.firstChild);return this},setClip:function(d){this.inherited(arguments);var a=d?"width"in d?"rect":"cx"in d?"ellipse":"points"in d?"polyline":"d"in d?"path":null:null;if(d&&!a)return this;"polyline"===a&&(d=f.clone(d),d.points=d.points.join(","));var b,c=g.get(this.rawNode,"clip-path");c&&(b=t.byId(c.match(/gfx_clip[\d]+/)[0]))&&b.removeChild(b.childNodes[0]);d?(b?(a=k(e.xmlns.svg,a),b.appendChild(a)):(c="gfx_clip"+ ++C,this.rawNode.setAttribute("clip-path","url(#"+c+")"),b= k(e.xmlns.svg,"clipPath"),a=k(e.xmlns.svg,a),b.appendChild(a),this.rawNode.parentNode.insertBefore(b,this.rawNode),g.set(b,"id",c)),g.set(a,d)):(this.rawNode.removeAttribute("clip-path"),b&&b.parentNode.removeChild(b));return this},_removeClipNode:function(){var a,b=g.get(this.rawNode,"clip-path");b&&(a=t.byId(b.match(/gfx_clip[\d]+/)[0]))&&a.parentNode.removeChild(a);return a}});e.Group=m("dojox.gfx.svg.Group",e.Shape,{constructor:function(){n.Container._init.call(this)},setRawNode:function(a){this.rawNode= a;this.rawNode.__gfxObject__=this},destroy:function(){this.clear(!0);e.Shape.prototype.destroy.apply(this,arguments)}});e.Group.nodeType="g";e.Rect=m("dojox.gfx.svg.Rect",[e.Shape,n.Rect],{setShape:function(a){this.shape=b.makeParameters(this.shape,a);this.bbox=null;for(var d in this.shape)if("type"!=d&&"r"!=d){a=this.shape[d];if("width"===d||"height"===d)a=0>a?0:a;this.rawNode.setAttribute(d,a)}null!=this.shape.r&&(this.rawNode.setAttribute("ry",this.shape.r),this.rawNode.setAttribute("rx",this.shape.r)); return this}});e.Rect.nodeType="rect";e.Ellipse=m("dojox.gfx.svg.Ellipse",[e.Shape,n.Ellipse],{});e.Ellipse.nodeType="ellipse";e.Circle=m("dojox.gfx.svg.Circle",[e.Shape,n.Circle],{});e.Circle.nodeType="circle";e.Line=m("dojox.gfx.svg.Line",[e.Shape,n.Line],{});e.Line.nodeType="line";e.Polyline=m("dojox.gfx.svg.Polyline",[e.Shape,n.Polyline],{setShape:function(a,e){a&&a instanceof Array?(this.shape=b.makeParameters(this.shape,{points:a}),e&&this.shape.points.length&&this.shape.points.push(this.shape.points[0])): this.shape=b.makeParameters(this.shape,a);this.bbox=null;this._normalizePoints();for(var d=[],c=this.shape.points,f=0;f<c.length;++f)d.push(c[f].x.toFixed(8),c[f].y.toFixed(8));this.rawNode.setAttribute("points",d.join(" "));return this}});e.Polyline.nodeType="polyline";e.Image=m("dojox.gfx.svg.Image",[e.Shape,n.Image],{setShape:function(d){this.shape=b.makeParameters(this.shape,d);this.bbox=null;d=this.rawNode;for(var c in this.shape)if("type"!=c&&"src"!=c){var f=this.shape[c];if("width"===c||"height"=== c)f=0>f?0:f;d.setAttribute(c,f)}d.setAttribute("preserveAspectRatio","none");a(d,e.xmlns.xlink,"xlink:href",this.shape.src);d.__gfxObject__=this;return this}});e.Image.nodeType="image";e.Text=m("dojox.gfx.svg.Text",[e.Shape,n.Text],{setShape:function(a){this.shape=b.makeParameters(this.shape,a);this.bbox=null;a=this.rawNode;var d=this.shape;a.setAttribute("x",d.x);a.setAttribute("y",d.y);a.setAttribute("text-anchor",d.align);a.setAttribute("text-decoration",d.decoration);a.setAttribute("rotate",d.rotated? 90:0);a.setAttribute("kerning",d.kerning?"auto":0);a.setAttribute("text-rendering",B);a.firstChild?a.firstChild.nodeValue=d.text:a.appendChild(x(d.text));return this},getTextWidth:function(){var a=this.rawNode,b=a.parentNode,a=a.cloneNode(!0);a.style.visibility="hidden";var e=0,c=a.firstChild.nodeValue;b.appendChild(a);if(""!=c)for(;!e;)e=a.getBBox?parseInt(a.getBBox().width):68;b.removeChild(a);return e},getBoundingBox:function(){var a=null;if(this.getShape().text)try{a=this.rawNode.getBBox()}catch(v){a= {x:0,y:0,width:0,height:0}}return a}});e.Text.nodeType="text";e.Path=m("dojox.gfx.svg.Path",[e.Shape,u.Path],{_updateWithSegment:function(a){this.inherited(arguments);"string"==typeof this.shape.path&&this.rawNode.setAttribute("d",this.shape.path)},setShape:function(a){this.inherited(arguments);this.shape.path?this.rawNode.setAttribute("d",this.shape.path):this.rawNode.removeAttribute("d");return this}});e.Path.nodeType="path";e.TextPath=m("dojox.gfx.svg.TextPath",[e.Shape,u.TextPath],{_updateWithSegment:function(a){this.inherited(arguments); this._setTextPath()},setShape:function(a){this.inherited(arguments);this._setTextPath();return this},_setTextPath:function(){if("string"==typeof this.shape.path){var d=this.rawNode;if(!d.firstChild){var c=k(e.xmlns.svg,"textPath"),f=x("");c.appendChild(f);d.appendChild(c)}c=(c=d.firstChild.getAttributeNS(e.xmlns.xlink,"href"))&&e.getRef(c);if(!c&&(f=this._getParentSurface())){var f=f.defNode,c=k(e.xmlns.svg,"path"),g=b._base._getUniqueId();c.setAttribute("id",g);f.appendChild(c);a(d.firstChild,e.xmlns.xlink, "xlink:href","#"+g)}c&&c.setAttribute("d",this.shape.path)}},_setText:function(){var a=this.rawNode;if(!a.firstChild){var b=k(e.xmlns.svg,"textPath"),c=x("");b.appendChild(c);a.appendChild(b)}a=a.firstChild;b=this.text;a.setAttribute("alignment-baseline","middle");switch(b.align){case "middle":a.setAttribute("text-anchor","middle");a.setAttribute("startOffset","50%");break;case "end":a.setAttribute("text-anchor","end");a.setAttribute("startOffset","100%");break;default:a.setAttribute("text-anchor", "start"),a.setAttribute("startOffset","0%")}a.setAttribute("baseline-shift","0.5ex");a.setAttribute("text-decoration",b.decoration);a.setAttribute("rotate",b.rotated?90:0);a.setAttribute("kerning",b.kerning?"auto":0);a.firstChild.data=b.text}});e.TextPath.nodeType="text";var D=534<function(){var a=/WebKit\/(\d*)/.exec(z);return a?a[1]:0}();e.Surface=m("dojox.gfx.svg.Surface",n.Surface,{constructor:function(){n.Container._init.call(this)},destroy:function(){n.Container.clear.call(this,!0);this.defNode= null;this.inherited(arguments)},setDimensions:function(a,b){if(!this.rawNode)return this;var d=0>a?0:a,c=0>b?0:b;this.rawNode.setAttribute("width",d);this.rawNode.setAttribute("height",c);D&&(this.rawNode.style.width=d,this.rawNode.style.height=c);return this},getDimensions:function(){return this.rawNode?{width:b.normalizedLength(this.rawNode.getAttribute("width")),height:b.normalizedLength(this.rawNode.getAttribute("height"))}:null}});e.createSurface=function(a,c,f){var d=new e.Surface;d.rawNode= k(e.xmlns.svg,"svg");d.rawNode.setAttribute("overflow","hidden");c&&d.rawNode.setAttribute("width",0>c?0:c);f&&d.rawNode.setAttribute("height",0>f?0:f);c=k(e.xmlns.svg,"defs");d.rawNode.appendChild(c);d.defNode=c;d._parent=t.byId(a);d._parent.appendChild(d.rawNode);b._base._fixMsTouchAction(d);return d};q={_setFont:function(){var a=this.fontStyle;this.rawNode.setAttribute("font-style",a.style);this.rawNode.setAttribute("font-variant",a.variant);this.rawNode.setAttribute("font-weight",a.weight);this.rawNode.setAttribute("font-size", a.size);this.rawNode.setAttribute("font-family",a.family)}};var w=n.Container;m=e.Container={openBatch:function(){if(!this._batch){var a;a=e.useSvgWeb?p.doc.createDocumentFragment(!0):p.doc.createDocumentFragment();this.fragment=a}++this._batch;return this},closeBatch:function(){this._batch=0<this._batch?--this._batch:0;this.fragment&&!this._batch&&(this.rawNode.appendChild(this.fragment),delete this.fragment);return this},add:function(a){this!=a.getParent()&&(this.fragment?this.fragment.appendChild(a.rawNode): this.rawNode.appendChild(a.rawNode),w.add.apply(this,arguments),a.setClip(a.clip));return this},remove:function(a,b){this==a.getParent()&&(this.rawNode==a.rawNode.parentNode&&this.rawNode.removeChild(a.rawNode),this.fragment&&this.fragment==a.rawNode.parentNode&&this.fragment.removeChild(a.rawNode),a._removeClipNode(),w.remove.apply(this,arguments));return this},clear:function(){for(var a=this.rawNode;a.lastChild;)a.removeChild(a.lastChild);var b=this.defNode;if(b){for(;b.lastChild;)b.removeChild(b.lastChild); a.appendChild(b)}return w.clear.apply(this,arguments)},getBoundingBox:w.getBoundingBox,_moveChildToFront:w._moveChildToFront,_moveChildToBack:w._moveChildToBack};u=e.Creator={createObject:function(a,b){if(!this.rawNode)return null;var d=new a,c=k(e.xmlns.svg,a.nodeType);d.setRawNode(c);d.setShape(b);this.add(d);return d}};f.extend(e.Text,q);f.extend(e.TextPath,q);f.extend(e.Group,m);f.extend(e.Group,n.Creator);f.extend(e.Group,u);f.extend(e.Surface,m);f.extend(e.Surface,n.Creator);f.extend(e.Surface, u);e.fixTarget=function(a,b){a.gfxTarget||(a.gfxTarget=A&&a.target.wholeText?a.target.parentElement.__gfxObject__:a.target.__gfxObject__);return!0};e.useSvgWeb&&(e.createSurface=function(a,c,f){var d=new e.Surface;c=0>c?0:c;f=0>f?0:f;if(!c||!f){var g=l.position(a);c=c||g.w;f=f||g.h}a=t.byId(a);var g=a.id?a.id+"_svgweb":b._base._getUniqueId(),h=k(e.xmlns.svg,"svg");h.id=g;h.setAttribute("width",c);h.setAttribute("height",f);svgweb.appendChild(h,a);h.addEventListener("SVGLoad",function(){d.rawNode= this;d.isLoaded=!0;var a=k(e.xmlns.svg,"defs");d.rawNode.appendChild(a);d.defNode=a;if(d.onLoad)d.onLoad(d)},!1);d.isLoaded=!1;return d},e.Surface.extend({destroy:function(){var a=this.rawNode;svgweb.removeChild(a,a.parentNode)}}),q={connect:function(a,b,c){"on"===a.substring(0,2)&&(a=a.substring(2));c=2==arguments.length?b:f.hitch(b,c);this.getEventSource().addEventListener(a,c,!1);return[this,a,c]},disconnect:function(a){this.getEventSource().removeEventListener(a[1],a[2],!1);delete a[0]}},f.extend(e.Shape, q),f.extend(e.Surface,q));return e});
'use strict'; describe('Controller: MainCtrl', function () { // load the controller's module beforeEach(module('projectsApp')); var MainCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller, $rootScope) { scope = $rootScope.$new(); MainCtrl = $controller('MainCtrl', { $scope: scope }); })); it('should attach a list of awesomeThings to the scope', function () { expect(scope.awesomeThings.length).toBe(3); }); });
version https://git-lfs.github.com/spec/v1 oid sha256:1dcebc404b74361bb05cb9fbdb7ad4554e4553ea3b349c2e3bbb9c7b42258bc5 size 1587
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _reactIconBase = require('react-icon-base'); var _reactIconBase2 = _interopRequireDefault(_reactIconBase); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var MdToday = function MdToday(props) { return _react2.default.createElement( _reactIconBase2.default, _extends({ viewBox: '0 0 40 40' }, props), _react2.default.createElement( 'g', null, _react2.default.createElement('path', { d: 'm11.6 16.6h8.4v8.4h-8.4v-8.4z m20 15v-18.2h-23.2v18.2h23.2z m0-26.6c1.8 0 3.4 1.6 3.4 3.4v23.2c0 1.8-1.6 3.4-3.4 3.4h-23.2c-1.9 0-3.4-1.6-3.4-3.4v-23.2c0-1.8 1.5-3.4 3.4-3.4h1.6v-3.4h3.4v3.4h13.2v-3.4h3.4v3.4h1.6z' }) ) ); }; exports.default = MdToday; module.exports = exports['default'];
/* multiselect javascript AngularJS */ //angular.module('triangle.controls', []) T.UI.ngControls .directive('multiselect', ['$rootScope', '$compile', function($rootScope, $compile){ function link($scope, $element, $attrs, undefined, link){ $element.multiselect({}); } return { scope: { instance: '=controller', templateUrl: '@', unload: '&' }, restric: 'A', transclude: false, link: link }; }]);
/* * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ var test = require('tap').test; var util = require('util'); var uuid = require('uuid'); var fs = require('fs'); var exec = require('child_process').exec; var smartdc = require('../lib'); var sdc; var PACKAGE, DATASET, IMAGE, MACHINE, NETWORK, NIC; var TAG_KEY = 'smartdc_role'; var TAG_VAL = 'unitTest'; var TAG_TWO_KEY = 'smartdc_type'; var TAG_TWO_VAL = 'none'; var TAG_THREE_KEY = 'smartdc_whatever'; var TAG_THREE_VAL = 'whateverElse'; var META_KEY = 'foo'; var META_VAL = 'bar'; var META_CREDS = { 'root': 'secret', 'admin': 'secret' }; var META_CREDS_TWO = { 'root': 'secret', 'admin': 'secret', 'jill': 'secret' }; test('setup', function (t) { var f = process.env.SSH_KEY || process.env.HOME + '/.ssh/id_rsa'; var cmd = 'ssh-keygen -l -f ' + f + ' ' + '| awk \'{print $2}\''; var url = process.env.SDC_URL || 'http://localhost:8080'; var user = process.env.SDC_ACCOUNT || 'test'; fs.readFile(f, 'utf8', function (err, key) { t.ifError(err); exec(cmd, function (err2, stdout, stderr) { t.ifError(err2); sdc = smartdc.createClient({ connectTimeout: 1000, logLevel: (process.env.LOG_LEVEL || 'info'), retry: false, sign: smartdc.cliSigner({ keyId: stdout.replace('\n', ''), user: user }), url: url, account: user, noCache: true, rejectUnauthorized: false }); t.end(); }); }); }); // --- SSH keys tests: function checkKey(t, key) { t.ok(key); t.ok(key.name); t.ok(key.fingerprint); t.ok(key.key); } test('List keys', function (t) { sdc.listKeys(function (err, keys) { t.ifError(err); t.ok(keys.length); keys.forEach(function (key) { checkKey(t, key); }); t.end(); }, true); }); test('Create Key', function (t) { var fname = __dirname + '/.ssh/test_id_rsa.pub'; fs.readFile(fname, 'utf8', function (err, k) { t.ifError(err); sdc.createKey({ key: k, name: 'test_id_rsa' }, function (err2, key) { t.ifError(err2); checkKey(t, key); t.end(); }); }); }); test('Get key', function (t) { sdc.getKey('test_id_rsa', function (err, key) { t.ifError(err); checkKey(t, key); t.end(); }, true); }); test('Delete key', function (t) { sdc.deleteKey('test_id_rsa', function (err) { t.ifError(err); t.end(); }, true); }); // Packages: test('list packages', function (t) { sdc.listPackages(function (err, pkgs) { t.ifError(err); t.ok(pkgs); t.ok(Array.isArray(pkgs)); var packages = pkgs.filter(function (p) { return (p['default'] === 'true'); }); PACKAGE = packages[0]; // If there isn't a default package, use first one: if (!PACKAGE) { PACKAGE = pkgs[0]; } if (!PACKAGE) { console.error('Exiting because cannot find test package.'); process.exit(1); } t.end(); }, true); }); test('get package', function (t) { sdc.getPackage(PACKAGE.id, function (err, pkg) { t.ifError(err); t.ok(pkg); t.ok(pkg.name); t.ok(pkg.disk); t.ok(pkg.memory); t.ok(pkg.id); t.end(); }, true); }); // Datasets (we need to upgrade depending on default SmartOS version): test('list datasets', function (t) { sdc.listDatasets(function (err, datasets) { t.ifError(err); t.ok(datasets); t.ok(Array.isArray(datasets)); var smartos = datasets.filter(function (d) { return (d.name === 'smartos' && d.version === '1.6.3'); }); t.ok(smartos[0]); DATASET = smartos[0]; if (!DATASET) { console.error('Exiting because cannot find test dataset.'); process.exit(1); } t.end(); }, true); }); test('get dataset', function (t) { t.ok(DATASET); sdc.getDataset(DATASET.id, function (err, ds) { t.ifError(err); t.ok(ds); t.ok(ds.name); t.ok(ds.version); t.ok(ds.os); t.ok(ds.id); t.end(); }, true); }); // Images (we need to upgrade depending on default SmartOS version): test('list images', function (t) { sdc.listDatasets(function (err, images) { t.ifError(err); t.ok(images); t.ok(Array.isArray(images)); var smartos = images.filter(function (d) { return (d.name === 'smartos' && d.version === '1.6.3'); }); t.ok(smartos[0]); IMAGE = smartos[0]; if (!IMAGE) { console.error('Exiting because cannot find test image.'); process.exit(1); } t.end(); }, true); }); test('get images', function (t) { t.ok(IMAGE); sdc.getDataset(IMAGE.id, function (err, ds) { t.ifError(err); t.ok(ds); t.ok(ds.name); t.ok(ds.version); t.ok(ds.os); t.ok(ds.id); t.end(); }, true); }); test('list networks', function (t) { sdc.listNetworks(function (err, networks) { t.ifError(err); t.ok(Array.isArray(networks)); NETWORK = networks[0]; t.ok(NETWORK); t.ok(NETWORK.id); t.ok(NETWORK.name); t.ok(typeof (NETWORK.public) === 'boolean'); t.end(); }); }); test('get network', function (t) { sdc.getNetwork(NETWORK.id, function (err, network) { t.ifError(err); t.ok(network); t.ok(network.id); t.ok(network.name); t.ok(typeof (network.public) === 'boolean'); t.end(); }); }); // Datacenters: test('list datacenters', function (t) { sdc.listDatacenters(function (err, datacenters) { t.ifError(err); t.ok(datacenters); t.ok(Array.isArray(Object.keys(datacenters))); sdc.createClientForDatacenter('coal', function (err2, cli) { t.ifError(err2); t.ok(cli); t.equal(cli.account, sdc.account); t.ok(cli.client); t.end(); }, true); }, true); }); // Machines: function checkMachine(t, m) { t.ok(m, 'checkMachine ok'); t.ok(m.id, 'checkMachine id ok'); t.ok(m.name, 'checkMachine name ok'); t.ok(m.type, 'checkMachine type ok'); t.ok(m.state, 'checkMachine state ok'); t.ok(m.image, 'checkMachine image ok'); t.ok(m.ips, 'checkMachine ips ok'); t.ok(m.memory, 'checkMachine memory ok'); t.ok(m.metadata, 'checkMachine metadata ok'); t.ok(m['package'], 'checkMachine package ok'); t.ok(typeof (m.disk) !== 'undefined'); t.ok(typeof (m.created) !== 'undefined'); t.ok(typeof (m.updated) !== 'undefined'); } // This test case assumes no previous machines for the current user. Obviously, // it is useless if that's not true. test('empty machines list/count', function (t) { return sdc.countMachines(function (err, count, done) { t.ifError(err); t.equal(0, count); t.ok(done); return sdc.listMachines(function (err1, machines, done1) { t.ifError(err1); t.ok(Array.isArray(machines)); t.equal(0, machines.length); t.ok(done1); t.end(); }); }); }); function checkMachineAction(id, action, time, cb) { return sdc.getMachineAudit(id, function (err, actions) { if (err) { return cb(err); } var acts = actions.filter(function (a) { return (a.action === action && (new Date(a.time) > time)); }); if (acts.length === 0) { return cb(null, false); } var act = acts[0]; if (act.success !== 'yes') { return cb(action + ' failed'); } return cb(null, true); }, true); } function waitForAction(id, action, time, cb) { if (process.env.VERBOSE) { console.log('Waiting for machine \'%s\' %s to complete', id, action); } return checkMachineAction(id, action, time, function (err, ready) { if (err) { return cb(err); } if (!ready) { return setTimeout(function () { waitForAction(id, action, time, cb); }, (process.env.POLL_INTERVAL || 2500)); } return cb(null); }); } var NOW = new Date(); // Machine creation there we go!: test('create machine', { timeout: 600000 }, function (t) { var opts = { image: IMAGE.id, name: 'a' + uuid.v4().substr(0, 7) }; opts['package'] = PACKAGE.id; opts['metadata.' + META_KEY] = META_VAL; opts['tag.' + TAG_KEY] = TAG_VAL; opts['metadata.credentials'] = META_CREDS; sdc.createMachine(opts, function (err, machine) { if (err) { t.ifError(err); console.error('Exiting because machine creation failed.'); process.exit(1); } waitForAction(machine.id, 'provision', NOW, function (err1) { if (err1) { t.ifError(err1); console.error('Exiting because machine provisioning failed'); process.exit(1); } MACHINE = machine; t.end(); }); }); }); test('get machine', function (t) { sdc.getMachine(MACHINE.id, function (err, machine) { t.ifError(err); checkMachine(t, machine); t.ok(!machine.metadata.credentials); MACHINE = machine; t.test('get machine with credentials', function (t1) { sdc.getMachine(MACHINE.id, true, function (err1, machine1) { t1.ifError(err1); t1.ok(machine1.metadata.credentials); t1.end(); }, true); }); t.end(); }, true); }); test('machines list/count', function (t) { return sdc.countMachines(function (err, count, done) { t.ifError(err); t.equal(1, count); t.ok(done); return sdc.listMachines(function (err1, machines, done1) { t.ifError(err1); t.ok(Array.isArray(machines)); t.equal(1, machines.length); t.ok(done1); t.end(); }); }); }); test('stop machine', { timeout: 180000 }, function (t) { sdc.stopMachine(MACHINE.id, function (err) { t.ifError(err); waitForAction(MACHINE.id, 'stop', NOW, function (err1) { t.ifError(err1); t.end(); }); }); }); test('start machine', { timeout: 180000 }, function (t) { sdc.startMachine(MACHINE.id, function (err) { t.ifError(err); waitForAction(MACHINE.id, 'start', NOW, function (err1) { t.ifError(err1); t.end(); }); }); }); test('list machine metadata', function (t) { sdc.listMachineMetadata(MACHINE.id, function (err, metadata) { t.ifError(err); t.ok(Object.keys(metadata).length > 1); t.equal(metadata[META_KEY], META_VAL); t.end(); }); }); test('get machine metadata', function (t) { sdc.getMachineMetadataV2(MACHINE.id, META_KEY, function (err, metadata) { t.ifError(err); t.equal(metadata, META_VAL); t.end(); }); }); test('update machine metadata', function (t) { var newMeta = { baz: 'quux' }; sdc.updateMachineMetadata(MACHINE.id, newMeta, function (err, metadata) { t.ifError(err); t.ok(Object.keys(metadata).length > 2); t.equal(metadata.baz, 'quux'); waitForAction(MACHINE.id, 'set_metadata', NOW, function (err1) { t.ifError(err1); sdc.getMachineMetadataV2(MACHINE.id, 'baz', function (err2, val) { t.ifError(err2); t.equal(val, 'quux'); t.end(); }); }); }); }); test('delete machine metadata', function (t) { sdc.deleteMachineMetadata(MACHINE.id, 'baz', function (err) { t.ifError(err); waitForAction(MACHINE.id, 'remove_metadata', NOW, function (err1) { t.ifError(err1); sdc.getMachineMetadataV2(MACHINE.id, 'baz', function (err2) { t.equal(err2.statusCode, 404); t.end(); }); }); }); }); test('get machine tag', function (t) { sdc.getMachineTag(MACHINE.id, TAG_KEY, function (err, val) { t.ifError(err); t.equal(TAG_VAL, val); t.end(); }); }); test('add machine tags', function (t) { var ID = MACHINE.id; var tags = {}; tags[TAG_TWO_KEY] = TAG_TWO_VAL; tags[TAG_THREE_KEY] = TAG_THREE_VAL; sdc.addMachineTags(ID, tags, function (err) { t.ifError(err); waitForAction(ID, 'set_tags', NOW, function (er1) { t.ifError(er1); t.end(); }); }); }); test('list machine tags', function (t) { sdc.listMachineTags(MACHINE.id, function (err, tgs) { t.ifError(err); var tagNames = Object.keys(tgs); [TAG_KEY, TAG_TWO_KEY, TAG_THREE_KEY].forEach(function (name) { t.ok(tagNames.indexOf(name) !== -1); }); t.end(); }); }); test('delete machine tag', function (t) { sdc.deleteMachineTag(MACHINE.id, TAG_KEY, function (err) { t.ifError(err); waitForAction(MACHINE.id, 'remove_tags', NOW, function (er1) { t.ifError(er1); t.end(); }); }); }); test('replace machine tags', function (t) { var tags = {}; tags[TAG_KEY] = TAG_VAL; sdc.replaceMachineTags(MACHINE.id, tags, function (err) { t.ifError(err); waitForAction(MACHINE.id, 'replace_tags', (new Date()), function (er1) { t.ifError(er1); t.end(); }); }); }); test('delete machine tags', function (t) { sdc.deleteMachineTags(MACHINE.id, function (err) { t.ifError(err); waitForAction(MACHINE.id, 'remove_tags', (new Date()), function (er1) { t.ifError(er1); t.end(); }); }); }); test('list machine nics', function (t) { sdc.listNics(MACHINE.id, function (err, nics) { t.ifError(err); t.ok(Array.isArray(nics)); NIC = nics[0]; t.ok(NIC); t.ok(NIC.mac); t.ok(NIC.ip); t.ok(NIC.netmask); t.ok(NIC.gateway); t.ok(NIC.state); t.ok(typeof (NIC.primary) === 'boolean'); t.end(); }); }); test('get machine nic', function (t) { sdc.getNic(MACHINE.id, NIC.mac, function (err, nic) { t.ifError(err); t.ok(typeof (nic) === 'object'); t.ok(nic.mac); t.ok(nic.ip); t.ok(nic.netmask); t.ok(nic.gateway); t.ok(nic.state); t.ok(typeof (nic.primary) === 'boolean'); t.end(); }); }); test('remove machine nic', function (t) { sdc.deleteNic(MACHINE.id, NIC.mac, function (err) { t.ifError(err); waitForAction(MACHINE.id, 'remove_nics', NOW, function (err2) { t.ifError(err2); t.end(); }); }); }); test('add machine nic', function (t) { sdc.createNic({ machine: MACHINE.id, network: NETWORK.id }, function (err) { t.ifError(err); waitForAction(MACHINE.id, 'add_nics', NOW, function (err2) { t.ifError(err2); t.end(); }); }); }); // Note: Big chance for this test to be waiting for too long for a // simple rename operation. Or maybe not. test('rename machine', { timeout: 180000 }, function (t) { var name = 'b' + uuid.v4().substr(0, 7); sdc.renameMachine(MACHINE.id, { name: name }, function (err) { t.ifError(err); waitForAction(MACHINE.id, 'rename', NOW, function (err1) { t.ifError(err1); sdc.getMachine(MACHINE.id, function (er3, machine) { t.ifError(er3); t.equal(machine.name, name); MACHINE = machine; t.end(); }, true); }); }); }); test('reboot machine', { timeout: 180000 }, function (t) { sdc.rebootMachine(MACHINE.id, function (err) { t.ifError(err); waitForAction(MACHINE.id, 'reboot', NOW, function (err1) { t.ifError(err1); t.end(); }); }); }); test('delete machine', { timeout: 180000 }, function (t) { sdc.deleteMachine(MACHINE.id, function (err) { t.ifError(err); waitForAction(MACHINE.id, 'destroy', NOW, function (err1) { t.ifError(err1); t.end(); }); }); }); test('machine audit', function (t) { sdc.getMachineAudit(MACHINE.id, function (err, actions) { t.ifError(err); t.ok(Array.isArray(actions)); t.ok(actions.length); var f = actions.reverse()[0]; t.ok(f.success); t.ok(f.time); t.ok(f.action); t.ok(f.caller); t.ok(f.caller.type); t.equal(f.caller.type, 'signature'); t.ok(f.caller.ip); t.ok(f.caller.keyId); t.end(); }, true); }); test('teardown', function (t) { sdc.client.close(); t.end(); });
'use strict' // This test repeatedly calls `empire.getStatus()`` so as to test retrying // calls when we hit the 60 clicks per minute limit. let lacuna = require('./test-instance') let log = require('../../lib/log') let Promise = require('bluebird') let num = 0 let getStatus = () => { num += 1 log.info(`Getting status (${num})`) return lacuna.empire.getStatus().then(getStatus) } // Start it off lacuna.authenticate().then(() => { // Spam the server real good. return Promise.all([ lacuna.empire.getStatus().then(getStatus), lacuna.empire.getStatus().then(getStatus), lacuna.empire.getStatus().then(getStatus), lacuna.empire.getStatus().then(getStatus), lacuna.empire.getStatus().then(getStatus) ]) }).catch((err) => { log.error(err) })