How to use _classCallCheck method in Playwright Internal

Best JavaScript code snippet using playwright-internal

index.js

Source:index.js Github

copy

Full Screen

1'use strict';2Object.defineProperty(exports, "__esModule", {3 value: true4});5function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }6// Generated by src/generate.js.7/**8 * Copyright 2016 Shape Security, Inc.9 *10 * Licensed under the Apache License, Version 2.0 (the "License")11 * you may not use this file except in compliance with the License.12 * You may obtain a copy of the License at13 *14 * http://www.apache.org/licenses/LICENSE-2.015 *16 * Unless required by applicable law or agreed to in writing, software17 * distributed under the License is distributed on an "AS IS" BASIS,18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.19 * See the License for the specific language governing permissions and20 * limitations under the License.21 */22var ArrayAssignmentTarget = exports.ArrayAssignmentTarget = function ArrayAssignmentTarget(_ref) {23 var elements = _ref.elements;24 var rest = _ref.rest;25 _classCallCheck(this, ArrayAssignmentTarget);26 this.type = 'ArrayAssignmentTarget';27 this.elements = elements;28 this.rest = rest;29};30var ArrayBinding = exports.ArrayBinding = function ArrayBinding(_ref2) {31 var elements = _ref2.elements;32 var rest = _ref2.rest;33 _classCallCheck(this, ArrayBinding);34 this.type = 'ArrayBinding';35 this.elements = elements;36 this.rest = rest;37};38var ArrayExpression = exports.ArrayExpression = function ArrayExpression(_ref3) {39 var elements = _ref3.elements;40 _classCallCheck(this, ArrayExpression);41 this.type = 'ArrayExpression';42 this.elements = elements;43};44var ArrowExpression = exports.ArrowExpression = function ArrowExpression(_ref4) {45 var params = _ref4.params;46 var body = _ref4.body;47 _classCallCheck(this, ArrowExpression);48 this.type = 'ArrowExpression';49 this.params = params;50 this.body = body;51};52var AssignmentExpression = exports.AssignmentExpression = function AssignmentExpression(_ref5) {53 var binding = _ref5.binding;54 var expression = _ref5.expression;55 _classCallCheck(this, AssignmentExpression);56 this.type = 'AssignmentExpression';57 this.binding = binding;58 this.expression = expression;59};60var AssignmentTargetIdentifier = exports.AssignmentTargetIdentifier = function AssignmentTargetIdentifier(_ref6) {61 var name = _ref6.name;62 _classCallCheck(this, AssignmentTargetIdentifier);63 this.type = 'AssignmentTargetIdentifier';64 this.name = name;65};66var AssignmentTargetPropertyIdentifier = exports.AssignmentTargetPropertyIdentifier = function AssignmentTargetPropertyIdentifier(_ref7) {67 var binding = _ref7.binding;68 var init = _ref7.init;69 _classCallCheck(this, AssignmentTargetPropertyIdentifier);70 this.type = 'AssignmentTargetPropertyIdentifier';71 this.binding = binding;72 this.init = init;73};74var AssignmentTargetPropertyProperty = exports.AssignmentTargetPropertyProperty = function AssignmentTargetPropertyProperty(_ref8) {75 var name = _ref8.name;76 var binding = _ref8.binding;77 _classCallCheck(this, AssignmentTargetPropertyProperty);78 this.type = 'AssignmentTargetPropertyProperty';79 this.name = name;80 this.binding = binding;81};82var AssignmentTargetWithDefault = exports.AssignmentTargetWithDefault = function AssignmentTargetWithDefault(_ref9) {83 var binding = _ref9.binding;84 var init = _ref9.init;85 _classCallCheck(this, AssignmentTargetWithDefault);86 this.type = 'AssignmentTargetWithDefault';87 this.binding = binding;88 this.init = init;89};90var BinaryExpression = exports.BinaryExpression = function BinaryExpression(_ref10) {91 var left = _ref10.left;92 var operator = _ref10.operator;93 var right = _ref10.right;94 _classCallCheck(this, BinaryExpression);95 this.type = 'BinaryExpression';96 this.left = left;97 this.operator = operator;98 this.right = right;99};100var BindingIdentifier = exports.BindingIdentifier = function BindingIdentifier(_ref11) {101 var name = _ref11.name;102 _classCallCheck(this, BindingIdentifier);103 this.type = 'BindingIdentifier';104 this.name = name;105};106var BindingPropertyIdentifier = exports.BindingPropertyIdentifier = function BindingPropertyIdentifier(_ref12) {107 var binding = _ref12.binding;108 var init = _ref12.init;109 _classCallCheck(this, BindingPropertyIdentifier);110 this.type = 'BindingPropertyIdentifier';111 this.binding = binding;112 this.init = init;113};114var BindingPropertyProperty = exports.BindingPropertyProperty = function BindingPropertyProperty(_ref13) {115 var name = _ref13.name;116 var binding = _ref13.binding;117 _classCallCheck(this, BindingPropertyProperty);118 this.type = 'BindingPropertyProperty';119 this.name = name;120 this.binding = binding;121};122var BindingWithDefault = exports.BindingWithDefault = function BindingWithDefault(_ref14) {123 var binding = _ref14.binding;124 var init = _ref14.init;125 _classCallCheck(this, BindingWithDefault);126 this.type = 'BindingWithDefault';127 this.binding = binding;128 this.init = init;129};130var Block = exports.Block = function Block(_ref15) {131 var statements = _ref15.statements;132 _classCallCheck(this, Block);133 this.type = 'Block';134 this.statements = statements;135};136var BlockStatement = exports.BlockStatement = function BlockStatement(_ref16) {137 var block = _ref16.block;138 _classCallCheck(this, BlockStatement);139 this.type = 'BlockStatement';140 this.block = block;141};142var BreakStatement = exports.BreakStatement = function BreakStatement(_ref17) {143 var label = _ref17.label;144 _classCallCheck(this, BreakStatement);145 this.type = 'BreakStatement';146 this.label = label;147};148var CallExpression = exports.CallExpression = function CallExpression(_ref18) {149 var callee = _ref18.callee;150 var _arguments = _ref18.arguments;151 _classCallCheck(this, CallExpression);152 this.type = 'CallExpression';153 this.callee = callee;154 this.arguments = _arguments;155};156var CatchClause = exports.CatchClause = function CatchClause(_ref19) {157 var binding = _ref19.binding;158 var body = _ref19.body;159 _classCallCheck(this, CatchClause);160 this.type = 'CatchClause';161 this.binding = binding;162 this.body = body;163};164var ClassDeclaration = exports.ClassDeclaration = function ClassDeclaration(_ref20) {165 var name = _ref20.name;166 var _super = _ref20.super;167 var elements = _ref20.elements;168 _classCallCheck(this, ClassDeclaration);169 this.type = 'ClassDeclaration';170 this.name = name;171 this.super = _super;172 this.elements = elements;173};174var ClassElement = exports.ClassElement = function ClassElement(_ref21) {175 var isStatic = _ref21.isStatic;176 var method = _ref21.method;177 _classCallCheck(this, ClassElement);178 this.type = 'ClassElement';179 this.isStatic = isStatic;180 this.method = method;181};182var ClassExpression = exports.ClassExpression = function ClassExpression(_ref22) {183 var name = _ref22.name;184 var _super = _ref22.super;185 var elements = _ref22.elements;186 _classCallCheck(this, ClassExpression);187 this.type = 'ClassExpression';188 this.name = name;189 this.super = _super;190 this.elements = elements;191};192var CompoundAssignmentExpression = exports.CompoundAssignmentExpression = function CompoundAssignmentExpression(_ref23) {193 var binding = _ref23.binding;194 var operator = _ref23.operator;195 var expression = _ref23.expression;196 _classCallCheck(this, CompoundAssignmentExpression);197 this.type = 'CompoundAssignmentExpression';198 this.binding = binding;199 this.operator = operator;200 this.expression = expression;201};202var ComputedMemberAssignmentTarget = exports.ComputedMemberAssignmentTarget = function ComputedMemberAssignmentTarget(_ref24) {203 var object = _ref24.object;204 var expression = _ref24.expression;205 _classCallCheck(this, ComputedMemberAssignmentTarget);206 this.type = 'ComputedMemberAssignmentTarget';207 this.object = object;208 this.expression = expression;209};210var ComputedMemberExpression = exports.ComputedMemberExpression = function ComputedMemberExpression(_ref25) {211 var object = _ref25.object;212 var expression = _ref25.expression;213 _classCallCheck(this, ComputedMemberExpression);214 this.type = 'ComputedMemberExpression';215 this.object = object;216 this.expression = expression;217};218var ComputedPropertyName = exports.ComputedPropertyName = function ComputedPropertyName(_ref26) {219 var expression = _ref26.expression;220 _classCallCheck(this, ComputedPropertyName);221 this.type = 'ComputedPropertyName';222 this.expression = expression;223};224var ConditionalExpression = exports.ConditionalExpression = function ConditionalExpression(_ref27) {225 var test = _ref27.test;226 var consequent = _ref27.consequent;227 var alternate = _ref27.alternate;228 _classCallCheck(this, ConditionalExpression);229 this.type = 'ConditionalExpression';230 this.test = test;231 this.consequent = consequent;232 this.alternate = alternate;233};234var ContinueStatement = exports.ContinueStatement = function ContinueStatement(_ref28) {235 var label = _ref28.label;236 _classCallCheck(this, ContinueStatement);237 this.type = 'ContinueStatement';238 this.label = label;239};240var DataProperty = exports.DataProperty = function DataProperty(_ref29) {241 var name = _ref29.name;242 var expression = _ref29.expression;243 _classCallCheck(this, DataProperty);244 this.type = 'DataProperty';245 this.name = name;246 this.expression = expression;247};248var DebuggerStatement = exports.DebuggerStatement = function DebuggerStatement() {249 _classCallCheck(this, DebuggerStatement);250 this.type = 'DebuggerStatement';251};252var Directive = exports.Directive = function Directive(_ref30) {253 var rawValue = _ref30.rawValue;254 _classCallCheck(this, Directive);255 this.type = 'Directive';256 this.rawValue = rawValue;257};258var DoWhileStatement = exports.DoWhileStatement = function DoWhileStatement(_ref31) {259 var body = _ref31.body;260 var test = _ref31.test;261 _classCallCheck(this, DoWhileStatement);262 this.type = 'DoWhileStatement';263 this.body = body;264 this.test = test;265};266var EmptyStatement = exports.EmptyStatement = function EmptyStatement() {267 _classCallCheck(this, EmptyStatement);268 this.type = 'EmptyStatement';269};270var Export = exports.Export = function Export(_ref32) {271 var declaration = _ref32.declaration;272 _classCallCheck(this, Export);273 this.type = 'Export';274 this.declaration = declaration;275};276var ExportAllFrom = exports.ExportAllFrom = function ExportAllFrom(_ref33) {277 var moduleSpecifier = _ref33.moduleSpecifier;278 _classCallCheck(this, ExportAllFrom);279 this.type = 'ExportAllFrom';280 this.moduleSpecifier = moduleSpecifier;281};282var ExportDefault = exports.ExportDefault = function ExportDefault(_ref34) {283 var body = _ref34.body;284 _classCallCheck(this, ExportDefault);285 this.type = 'ExportDefault';286 this.body = body;287};288var ExportFrom = exports.ExportFrom = function ExportFrom(_ref35) {289 var namedExports = _ref35.namedExports;290 var moduleSpecifier = _ref35.moduleSpecifier;291 _classCallCheck(this, ExportFrom);292 this.type = 'ExportFrom';293 this.namedExports = namedExports;294 this.moduleSpecifier = moduleSpecifier;295};296var ExportFromSpecifier = exports.ExportFromSpecifier = function ExportFromSpecifier(_ref36) {297 var name = _ref36.name;298 var exportedName = _ref36.exportedName;299 _classCallCheck(this, ExportFromSpecifier);300 this.type = 'ExportFromSpecifier';301 this.name = name;302 this.exportedName = exportedName;303};304var ExportLocalSpecifier = exports.ExportLocalSpecifier = function ExportLocalSpecifier(_ref37) {305 var name = _ref37.name;306 var exportedName = _ref37.exportedName;307 _classCallCheck(this, ExportLocalSpecifier);308 this.type = 'ExportLocalSpecifier';309 this.name = name;310 this.exportedName = exportedName;311};312var ExportLocals = exports.ExportLocals = function ExportLocals(_ref38) {313 var namedExports = _ref38.namedExports;314 _classCallCheck(this, ExportLocals);315 this.type = 'ExportLocals';316 this.namedExports = namedExports;317};318var ExpressionStatement = exports.ExpressionStatement = function ExpressionStatement(_ref39) {319 var expression = _ref39.expression;320 _classCallCheck(this, ExpressionStatement);321 this.type = 'ExpressionStatement';322 this.expression = expression;323};324var ForInStatement = exports.ForInStatement = function ForInStatement(_ref40) {325 var left = _ref40.left;326 var right = _ref40.right;327 var body = _ref40.body;328 _classCallCheck(this, ForInStatement);329 this.type = 'ForInStatement';330 this.left = left;331 this.right = right;332 this.body = body;333};334var ForOfStatement = exports.ForOfStatement = function ForOfStatement(_ref41) {335 var left = _ref41.left;336 var right = _ref41.right;337 var body = _ref41.body;338 _classCallCheck(this, ForOfStatement);339 this.type = 'ForOfStatement';340 this.left = left;341 this.right = right;342 this.body = body;343};344var ForStatement = exports.ForStatement = function ForStatement(_ref42) {345 var init = _ref42.init;346 var test = _ref42.test;347 var update = _ref42.update;348 var body = _ref42.body;349 _classCallCheck(this, ForStatement);350 this.type = 'ForStatement';351 this.init = init;352 this.test = test;353 this.update = update;354 this.body = body;355};356var FormalParameters = exports.FormalParameters = function FormalParameters(_ref43) {357 var items = _ref43.items;358 var rest = _ref43.rest;359 _classCallCheck(this, FormalParameters);360 this.type = 'FormalParameters';361 this.items = items;362 this.rest = rest;363};364var FunctionBody = exports.FunctionBody = function FunctionBody(_ref44) {365 var directives = _ref44.directives;366 var statements = _ref44.statements;367 _classCallCheck(this, FunctionBody);368 this.type = 'FunctionBody';369 this.directives = directives;370 this.statements = statements;371};372var FunctionDeclaration = exports.FunctionDeclaration = function FunctionDeclaration(_ref45) {373 var isGenerator = _ref45.isGenerator;374 var name = _ref45.name;375 var params = _ref45.params;376 var body = _ref45.body;377 _classCallCheck(this, FunctionDeclaration);378 this.type = 'FunctionDeclaration';379 this.isGenerator = isGenerator;380 this.name = name;381 this.params = params;382 this.body = body;383};384var FunctionExpression = exports.FunctionExpression = function FunctionExpression(_ref46) {385 var isGenerator = _ref46.isGenerator;386 var name = _ref46.name;387 var params = _ref46.params;388 var body = _ref46.body;389 _classCallCheck(this, FunctionExpression);390 this.type = 'FunctionExpression';391 this.isGenerator = isGenerator;392 this.name = name;393 this.params = params;394 this.body = body;395};396var Getter = exports.Getter = function Getter(_ref47) {397 var name = _ref47.name;398 var body = _ref47.body;399 _classCallCheck(this, Getter);400 this.type = 'Getter';401 this.name = name;402 this.body = body;403};404var IdentifierExpression = exports.IdentifierExpression = function IdentifierExpression(_ref48) {405 var name = _ref48.name;406 _classCallCheck(this, IdentifierExpression);407 this.type = 'IdentifierExpression';408 this.name = name;409};410var IfStatement = exports.IfStatement = function IfStatement(_ref49) {411 var test = _ref49.test;412 var consequent = _ref49.consequent;413 var alternate = _ref49.alternate;414 _classCallCheck(this, IfStatement);415 this.type = 'IfStatement';416 this.test = test;417 this.consequent = consequent;418 this.alternate = alternate;419};420var Import = exports.Import = function Import(_ref50) {421 var defaultBinding = _ref50.defaultBinding;422 var namedImports = _ref50.namedImports;423 var moduleSpecifier = _ref50.moduleSpecifier;424 _classCallCheck(this, Import);425 this.type = 'Import';426 this.defaultBinding = defaultBinding;427 this.namedImports = namedImports;428 this.moduleSpecifier = moduleSpecifier;429};430var ImportNamespace = exports.ImportNamespace = function ImportNamespace(_ref51) {431 var defaultBinding = _ref51.defaultBinding;432 var namespaceBinding = _ref51.namespaceBinding;433 var moduleSpecifier = _ref51.moduleSpecifier;434 _classCallCheck(this, ImportNamespace);435 this.type = 'ImportNamespace';436 this.defaultBinding = defaultBinding;437 this.namespaceBinding = namespaceBinding;438 this.moduleSpecifier = moduleSpecifier;439};440var ImportSpecifier = exports.ImportSpecifier = function ImportSpecifier(_ref52) {441 var name = _ref52.name;442 var binding = _ref52.binding;443 _classCallCheck(this, ImportSpecifier);444 this.type = 'ImportSpecifier';445 this.name = name;446 this.binding = binding;447};448var LabeledStatement = exports.LabeledStatement = function LabeledStatement(_ref53) {449 var label = _ref53.label;450 var body = _ref53.body;451 _classCallCheck(this, LabeledStatement);452 this.type = 'LabeledStatement';453 this.label = label;454 this.body = body;455};456var LiteralBooleanExpression = exports.LiteralBooleanExpression = function LiteralBooleanExpression(_ref54) {457 var value = _ref54.value;458 _classCallCheck(this, LiteralBooleanExpression);459 this.type = 'LiteralBooleanExpression';460 this.value = value;461};462var LiteralInfinityExpression = exports.LiteralInfinityExpression = function LiteralInfinityExpression() {463 _classCallCheck(this, LiteralInfinityExpression);464 this.type = 'LiteralInfinityExpression';465};466var LiteralNullExpression = exports.LiteralNullExpression = function LiteralNullExpression() {467 _classCallCheck(this, LiteralNullExpression);468 this.type = 'LiteralNullExpression';469};470var LiteralNumericExpression = exports.LiteralNumericExpression = function LiteralNumericExpression(_ref55) {471 var value = _ref55.value;472 _classCallCheck(this, LiteralNumericExpression);473 this.type = 'LiteralNumericExpression';474 this.value = value;475};476var LiteralRegExpExpression = exports.LiteralRegExpExpression = function LiteralRegExpExpression(_ref56) {477 var pattern = _ref56.pattern;478 var global = _ref56.global;479 var ignoreCase = _ref56.ignoreCase;480 var multiLine = _ref56.multiLine;481 var sticky = _ref56.sticky;482 var unicode = _ref56.unicode;483 _classCallCheck(this, LiteralRegExpExpression);484 this.type = 'LiteralRegExpExpression';485 this.pattern = pattern;486 this.global = global;487 this.ignoreCase = ignoreCase;488 this.multiLine = multiLine;489 this.sticky = sticky;490 this.unicode = unicode;491};492var LiteralStringExpression = exports.LiteralStringExpression = function LiteralStringExpression(_ref57) {493 var value = _ref57.value;494 _classCallCheck(this, LiteralStringExpression);495 this.type = 'LiteralStringExpression';496 this.value = value;497};498var Method = exports.Method = function Method(_ref58) {499 var isGenerator = _ref58.isGenerator;500 var name = _ref58.name;501 var params = _ref58.params;502 var body = _ref58.body;503 _classCallCheck(this, Method);504 this.type = 'Method';505 this.isGenerator = isGenerator;506 this.name = name;507 this.params = params;508 this.body = body;509};510var Module = exports.Module = function Module(_ref59) {511 var directives = _ref59.directives;512 var items = _ref59.items;513 _classCallCheck(this, Module);514 this.type = 'Module';515 this.directives = directives;516 this.items = items;517};518var NewExpression = exports.NewExpression = function NewExpression(_ref60) {519 var callee = _ref60.callee;520 var _arguments = _ref60.arguments;521 _classCallCheck(this, NewExpression);522 this.type = 'NewExpression';523 this.callee = callee;524 this.arguments = _arguments;525};526var NewTargetExpression = exports.NewTargetExpression = function NewTargetExpression() {527 _classCallCheck(this, NewTargetExpression);528 this.type = 'NewTargetExpression';529};530var ObjectAssignmentTarget = exports.ObjectAssignmentTarget = function ObjectAssignmentTarget(_ref61) {531 var properties = _ref61.properties;532 _classCallCheck(this, ObjectAssignmentTarget);533 this.type = 'ObjectAssignmentTarget';534 this.properties = properties;535};536var ObjectBinding = exports.ObjectBinding = function ObjectBinding(_ref62) {537 var properties = _ref62.properties;538 _classCallCheck(this, ObjectBinding);539 this.type = 'ObjectBinding';540 this.properties = properties;541};542var ObjectExpression = exports.ObjectExpression = function ObjectExpression(_ref63) {543 var properties = _ref63.properties;544 _classCallCheck(this, ObjectExpression);545 this.type = 'ObjectExpression';546 this.properties = properties;547};548var ReturnStatement = exports.ReturnStatement = function ReturnStatement(_ref64) {549 var expression = _ref64.expression;550 _classCallCheck(this, ReturnStatement);551 this.type = 'ReturnStatement';552 this.expression = expression;553};554var Script = exports.Script = function Script(_ref65) {555 var directives = _ref65.directives;556 var statements = _ref65.statements;557 _classCallCheck(this, Script);558 this.type = 'Script';559 this.directives = directives;560 this.statements = statements;561};562var Setter = exports.Setter = function Setter(_ref66) {563 var name = _ref66.name;564 var param = _ref66.param;565 var body = _ref66.body;566 _classCallCheck(this, Setter);567 this.type = 'Setter';568 this.name = name;569 this.param = param;570 this.body = body;571};572var ShorthandProperty = exports.ShorthandProperty = function ShorthandProperty(_ref67) {573 var name = _ref67.name;574 _classCallCheck(this, ShorthandProperty);575 this.type = 'ShorthandProperty';576 this.name = name;577};578var SpreadElement = exports.SpreadElement = function SpreadElement(_ref68) {579 var expression = _ref68.expression;580 _classCallCheck(this, SpreadElement);581 this.type = 'SpreadElement';582 this.expression = expression;583};584var StaticMemberAssignmentTarget = exports.StaticMemberAssignmentTarget = function StaticMemberAssignmentTarget(_ref69) {585 var object = _ref69.object;586 var property = _ref69.property;587 _classCallCheck(this, StaticMemberAssignmentTarget);588 this.type = 'StaticMemberAssignmentTarget';589 this.object = object;590 this.property = property;591};592var StaticMemberExpression = exports.StaticMemberExpression = function StaticMemberExpression(_ref70) {593 var object = _ref70.object;594 var property = _ref70.property;595 _classCallCheck(this, StaticMemberExpression);596 this.type = 'StaticMemberExpression';597 this.object = object;598 this.property = property;599};600var StaticPropertyName = exports.StaticPropertyName = function StaticPropertyName(_ref71) {601 var value = _ref71.value;602 _classCallCheck(this, StaticPropertyName);603 this.type = 'StaticPropertyName';604 this.value = value;605};606var Super = exports.Super = function Super() {607 _classCallCheck(this, Super);608 this.type = 'Super';609};610var SwitchCase = exports.SwitchCase = function SwitchCase(_ref72) {611 var test = _ref72.test;612 var consequent = _ref72.consequent;613 _classCallCheck(this, SwitchCase);614 this.type = 'SwitchCase';615 this.test = test;616 this.consequent = consequent;617};618var SwitchDefault = exports.SwitchDefault = function SwitchDefault(_ref73) {619 var consequent = _ref73.consequent;620 _classCallCheck(this, SwitchDefault);621 this.type = 'SwitchDefault';622 this.consequent = consequent;623};624var SwitchStatement = exports.SwitchStatement = function SwitchStatement(_ref74) {625 var discriminant = _ref74.discriminant;626 var cases = _ref74.cases;627 _classCallCheck(this, SwitchStatement);628 this.type = 'SwitchStatement';629 this.discriminant = discriminant;630 this.cases = cases;631};632var SwitchStatementWithDefault = exports.SwitchStatementWithDefault = function SwitchStatementWithDefault(_ref75) {633 var discriminant = _ref75.discriminant;634 var preDefaultCases = _ref75.preDefaultCases;635 var defaultCase = _ref75.defaultCase;636 var postDefaultCases = _ref75.postDefaultCases;637 _classCallCheck(this, SwitchStatementWithDefault);638 this.type = 'SwitchStatementWithDefault';639 this.discriminant = discriminant;640 this.preDefaultCases = preDefaultCases;641 this.defaultCase = defaultCase;642 this.postDefaultCases = postDefaultCases;643};644var TemplateElement = exports.TemplateElement = function TemplateElement(_ref76) {645 var rawValue = _ref76.rawValue;646 _classCallCheck(this, TemplateElement);647 this.type = 'TemplateElement';648 this.rawValue = rawValue;649};650var TemplateExpression = exports.TemplateExpression = function TemplateExpression(_ref77) {651 var tag = _ref77.tag;652 var elements = _ref77.elements;653 _classCallCheck(this, TemplateExpression);654 this.type = 'TemplateExpression';655 this.tag = tag;656 this.elements = elements;657};658var ThisExpression = exports.ThisExpression = function ThisExpression() {659 _classCallCheck(this, ThisExpression);660 this.type = 'ThisExpression';661};662var ThrowStatement = exports.ThrowStatement = function ThrowStatement(_ref78) {663 var expression = _ref78.expression;664 _classCallCheck(this, ThrowStatement);665 this.type = 'ThrowStatement';666 this.expression = expression;667};668var TryCatchStatement = exports.TryCatchStatement = function TryCatchStatement(_ref79) {669 var body = _ref79.body;670 var catchClause = _ref79.catchClause;671 _classCallCheck(this, TryCatchStatement);672 this.type = 'TryCatchStatement';673 this.body = body;674 this.catchClause = catchClause;675};676var TryFinallyStatement = exports.TryFinallyStatement = function TryFinallyStatement(_ref80) {677 var body = _ref80.body;678 var catchClause = _ref80.catchClause;679 var finalizer = _ref80.finalizer;680 _classCallCheck(this, TryFinallyStatement);681 this.type = 'TryFinallyStatement';682 this.body = body;683 this.catchClause = catchClause;684 this.finalizer = finalizer;685};686var UnaryExpression = exports.UnaryExpression = function UnaryExpression(_ref81) {687 var operator = _ref81.operator;688 var operand = _ref81.operand;689 _classCallCheck(this, UnaryExpression);690 this.type = 'UnaryExpression';691 this.operator = operator;692 this.operand = operand;693};694var UpdateExpression = exports.UpdateExpression = function UpdateExpression(_ref82) {695 var isPrefix = _ref82.isPrefix;696 var operator = _ref82.operator;697 var operand = _ref82.operand;698 _classCallCheck(this, UpdateExpression);699 this.type = 'UpdateExpression';700 this.isPrefix = isPrefix;701 this.operator = operator;702 this.operand = operand;703};704var VariableDeclaration = exports.VariableDeclaration = function VariableDeclaration(_ref83) {705 var kind = _ref83.kind;706 var declarators = _ref83.declarators;707 _classCallCheck(this, VariableDeclaration);708 this.type = 'VariableDeclaration';709 this.kind = kind;710 this.declarators = declarators;711};712var VariableDeclarationStatement = exports.VariableDeclarationStatement = function VariableDeclarationStatement(_ref84) {713 var declaration = _ref84.declaration;714 _classCallCheck(this, VariableDeclarationStatement);715 this.type = 'VariableDeclarationStatement';716 this.declaration = declaration;717};718var VariableDeclarator = exports.VariableDeclarator = function VariableDeclarator(_ref85) {719 var binding = _ref85.binding;720 var init = _ref85.init;721 _classCallCheck(this, VariableDeclarator);722 this.type = 'VariableDeclarator';723 this.binding = binding;724 this.init = init;725};726var WhileStatement = exports.WhileStatement = function WhileStatement(_ref86) {727 var test = _ref86.test;728 var body = _ref86.body;729 _classCallCheck(this, WhileStatement);730 this.type = 'WhileStatement';731 this.test = test;732 this.body = body;733};734var WithStatement = exports.WithStatement = function WithStatement(_ref87) {735 var object = _ref87.object;736 var body = _ref87.body;737 _classCallCheck(this, WithStatement);738 this.type = 'WithStatement';739 this.object = object;740 this.body = body;741};742var YieldExpression = exports.YieldExpression = function YieldExpression(_ref88) {743 var expression = _ref88.expression;744 _classCallCheck(this, YieldExpression);745 this.type = 'YieldExpression';746 this.expression = expression;747};748var YieldGeneratorExpression = exports.YieldGeneratorExpression = function YieldGeneratorExpression(_ref89) {749 var expression = _ref89.expression;750 _classCallCheck(this, YieldGeneratorExpression);751 this.type = 'YieldGeneratorExpression';752 this.expression = expression;...

Full Screen

Full Screen

expression.js

Source:expression.js Github

copy

Full Screen

2var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();3function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }4function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }5function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }6function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }7var _require = require('../util.js');8var unknownOp = _require.unknownOp;9var MISSING = require('./missing_symbol.js');10var Path = require('./path.js');11var Value = function () {12 function Value(value) {13 _classCallCheck(this, Value);14 this.value = value;15 }16 _createClass(Value, [{17 key: 'run',18 value: function run() {19 return this.value;20 }21 }, {22 key: 'ResultType',23 get: function get() {24 return this.constructor;25 }26 }], [{27 key: 'any',28 value: function any(value) {29 if (typeof value === 'number') {30 return new NumberValue(value);31 }32 if (typeof value === 'string') {33 return new StringValue(value);34 }35 if (Array.isArray(value)) {36 return new ArrayValue(value);37 }38 if (value instanceof Date) {39 return new DateValue(value);40 }41 return new Value(value);42 }43 }, {44 key: 'literal',45 value: function literal(value) {46 return new Literal(Value.any(value));47 }48 }]);49 return Value;50}();51var NumberValue = function (_Value) {52 _inherits(NumberValue, _Value);53 function NumberValue() {54 _classCallCheck(this, NumberValue);55 return _possibleConstructorReturn(this, Object.getPrototypeOf(NumberValue).apply(this, arguments));56 }57 _createClass(NumberValue, null, [{58 key: 'isType',59 value: function isType(value) {60 return typeof value === 'number';61 }62 }]);63 return NumberValue;64}(Value);65var StringValue = function (_Value2) {66 _inherits(StringValue, _Value2);67 function StringValue() {68 _classCallCheck(this, StringValue);69 return _possibleConstructorReturn(this, Object.getPrototypeOf(StringValue).apply(this, arguments));70 }71 _createClass(StringValue, null, [{72 key: 'isType',73 value: function isType(value) {74 return typeof value === 'string';75 }76 }]);77 return StringValue;78}(Value);79var ArrayValue = function (_Value3) {80 _inherits(ArrayValue, _Value3);81 function ArrayValue() {82 _classCallCheck(this, ArrayValue);83 return _possibleConstructorReturn(this, Object.getPrototypeOf(ArrayValue).apply(this, arguments));84 }85 _createClass(ArrayValue, null, [{86 key: 'isType',87 value: function isType(value) {88 return Array.isArray(value);89 }90 }]);91 return ArrayValue;92}(Value);93var DateValue = function (_Value4) {94 _inherits(DateValue, _Value4);95 function DateValue() {96 _classCallCheck(this, DateValue);97 return _possibleConstructorReturn(this, Object.getPrototypeOf(DateValue).apply(this, arguments));98 }99 _createClass(DateValue, null, [{100 key: 'isType',101 value: function isType(value) {102 return value instanceof Date;103 }104 }]);105 return DateValue;106}(Value);107var Literal = function (_Value5) {108 _inherits(Literal, _Value5);109 function Literal() {110 _classCallCheck(this, Literal);111 return _possibleConstructorReturn(this, Object.getPrototypeOf(Literal).apply(this, arguments));112 }113 _createClass(Literal, [{114 key: 'run',115 value: function run() {116 return this.value.run();117 }118 }, {119 key: 'ResultType',120 get: function get() {121 return this.value.ResultType;122 }123 }]);124 return Literal;125}(Value);126var Get = function () {127 function Get(path) {128 _classCallCheck(this, Get);129 this.path = path;130 }131 _createClass(Get, [{132 key: 'run',133 value: function run(fields) {134 var value = fields.get(this.path);135 return value === MISSING ? null : value;136 }137 }]);138 return Get;139}();140var ObjectExpr = function (_Value6) {141 _inherits(ObjectExpr, _Value6);142 function ObjectExpr() {143 _classCallCheck(this, ObjectExpr);144 return _possibleConstructorReturn(this, Object.getPrototypeOf(ObjectExpr).apply(this, arguments));145 }146 _createClass(ObjectExpr, [{147 key: 'run',148 value: function run(fields) {149 var result = {};var value = this.value;150 for (var field in value) {151 result[field] = value[field].run(fields);152 }153 return result;154 }155 }]);156 return ObjectExpr;157}(Value);158var Operator = function () {159 function Operator() {160 _classCallCheck(this, Operator);161 this.args = [];162 }163 _createClass(Operator, [{164 key: 'add',165 value: function add(node) {166 this.args.push(node);167 }168 }, {169 key: 'alt',170 get: function get() {171 return new Value(null);172 }173 }]);174 return Operator;175}();176var FnOp = function (_Operator) {177 _inherits(FnOp, _Operator);178 function FnOp(fn) {179 _classCallCheck(this, FnOp);180 var _this7 = _possibleConstructorReturn(this, Object.getPrototypeOf(FnOp).call(this));181 _this7.fn = fn;182 return _this7;183 }184 _createClass(FnOp, [{185 key: 'run',186 value: function run(fields) {187 var args = this.args;188 var fn = this.fn;189 return args.map(function (arg) {190 return arg.run(fields);191 }).reduce(fn);192 }193 }, {194 key: 'length',195 get: function get() {196 return Infinity;197 }198 }]);199 return FnOp;200}(Operator);201var UnaryFnOp = function (_FnOp) {202 _inherits(UnaryFnOp, _FnOp);203 function UnaryFnOp() {204 _classCallCheck(this, UnaryFnOp);205 return _possibleConstructorReturn(this, Object.getPrototypeOf(UnaryFnOp).apply(this, arguments));206 }207 _createClass(UnaryFnOp, [{208 key: 'run',209 value: function run(fields) {210 return this.fn(this.args[0].run(fields));211 }212 }, {213 key: 'length',214 get: function get() {215 return 1;216 }217 }]);218 return UnaryFnOp;219}(FnOp);220var fnOp = function fnOp(Parent, fn) {221 return function (_Parent) {222 _inherits(_class, _Parent);223 function _class() {224 _classCallCheck(this, _class);225 return _possibleConstructorReturn(this, Object.getPrototypeOf(_class).call(this, fn));226 }227 return _class;228 }(Parent);229};230var opTypes = function opTypes(Parent, InputType) {231 var ResultType = arguments.length <= 2 || arguments[2] === undefined ? InputType : arguments[2];232 var Constructor = function (_Parent2) {233 _inherits(Constructor, _Parent2);234 function Constructor() {235 _classCallCheck(this, Constructor);236 return _possibleConstructorReturn(this, Object.getPrototypeOf(Constructor).apply(this, arguments));237 }238 return Constructor;239 }(Parent);240 Constructor.prototype.InputType = InputType;241 Constructor.prototype.ResultType = ResultType;242 return Constructor;243};244var ArithOp = function (_opTypes) {245 _inherits(ArithOp, _opTypes);246 function ArithOp() {247 _classCallCheck(this, ArithOp);248 return _possibleConstructorReturn(this, Object.getPrototypeOf(ArithOp).apply(this, arguments));249 }250 return ArithOp;251}(opTypes(FnOp, NumberValue));252var arithOp = function arithOp(fn) {253 return fnOp(ArithOp, fn);254};255var Add = function (_arithOp) {256 _inherits(Add, _arithOp);257 function Add() {258 _classCallCheck(this, Add);259 return _possibleConstructorReturn(this, Object.getPrototypeOf(Add).apply(this, arguments));260 }261 return Add;262}(arithOp(function (a, b) {263 return a + b;264}));265var Subtract = function (_arithOp2) {266 _inherits(Subtract, _arithOp2);267 function Subtract() {268 _classCallCheck(this, Subtract);269 return _possibleConstructorReturn(this, Object.getPrototypeOf(Subtract).apply(this, arguments));270 }271 return Subtract;272}(arithOp(function (a, b) {273 return a - b;274}));275var Multiply = function (_arithOp3) {276 _inherits(Multiply, _arithOp3);277 function Multiply() {278 _classCallCheck(this, Multiply);279 return _possibleConstructorReturn(this, Object.getPrototypeOf(Multiply).apply(this, arguments));280 }281 return Multiply;282}(arithOp(function (a, b) {283 return a * b;284}));285var Divide = function (_arithOp4) {286 _inherits(Divide, _arithOp4);287 function Divide() {288 _classCallCheck(this, Divide);289 return _possibleConstructorReturn(this, Object.getPrototypeOf(Divide).apply(this, arguments));290 }291 return Divide;292}(arithOp(function (a, b) {293 return a / b;294}));295var Mod = function (_arithOp5) {296 _inherits(Mod, _arithOp5);297 function Mod() {298 _classCallCheck(this, Mod);299 return _possibleConstructorReturn(this, Object.getPrototypeOf(Mod).apply(this, arguments));300 }301 return Mod;302}(arithOp(function (a, b) {303 return a % b;304}));305var MathOp = function (_opTypes2) {306 _inherits(MathOp, _opTypes2);307 function MathOp() {308 _classCallCheck(this, MathOp);309 return _possibleConstructorReturn(this, Object.getPrototypeOf(MathOp).apply(this, arguments));310 }311 _createClass(MathOp, [{312 key: 'run',313 value: function run(fields) {314 return this.fn.apply(this, _toConsumableArray(this.args.map(function (arg) {315 return arg.run(fields);316 })));317 }318 }, {319 key: 'length',320 get: function get() {321 return this.fn.length;322 }323 }]);324 return MathOp;325}(opTypes(FnOp, NumberValue));326var mathOp = function mathOp(fn) {327 return fnOp(MathOp, fn);328};329var Abs = function (_mathOp) {330 _inherits(Abs, _mathOp);331 function Abs() {332 _classCallCheck(this, Abs);333 return _possibleConstructorReturn(this, Object.getPrototypeOf(Abs).apply(this, arguments));334 }335 return Abs;336}(mathOp(Math.abs));337var Ceil = function (_mathOp2) {338 _inherits(Ceil, _mathOp2);339 function Ceil() {340 _classCallCheck(this, Ceil);341 return _possibleConstructorReturn(this, Object.getPrototypeOf(Ceil).apply(this, arguments));342 }343 return Ceil;344}(mathOp(Math.ceil));345var Floor = function (_mathOp3) {346 _inherits(Floor, _mathOp3);347 function Floor() {348 _classCallCheck(this, Floor);349 return _possibleConstructorReturn(this, Object.getPrototypeOf(Floor).apply(this, arguments));350 }351 return Floor;352}(mathOp(Math.floor));353var Ln = function (_mathOp4) {354 _inherits(Ln, _mathOp4);355 function Ln() {356 _classCallCheck(this, Ln);357 return _possibleConstructorReturn(this, Object.getPrototypeOf(Ln).apply(this, arguments));358 }359 return Ln;360}(mathOp(Math.log));361var Log10 = function (_mathOp5) {362 _inherits(Log10, _mathOp5);363 function Log10() {364 _classCallCheck(this, Log10);365 return _possibleConstructorReturn(this, Object.getPrototypeOf(Log10).apply(this, arguments));366 }367 return Log10;368}(mathOp(Math.log10));369var Pow = function (_mathOp6) {370 _inherits(Pow, _mathOp6);371 function Pow() {372 _classCallCheck(this, Pow);373 return _possibleConstructorReturn(this, Object.getPrototypeOf(Pow).apply(this, arguments));374 }375 return Pow;376}(mathOp(Math.pow));377var Sqrt = function (_mathOp7) {378 _inherits(Sqrt, _mathOp7);379 function Sqrt() {380 _classCallCheck(this, Sqrt);381 return _possibleConstructorReturn(this, Object.getPrototypeOf(Sqrt).apply(this, arguments));382 }383 return Sqrt;384}(mathOp(Math.sqrt));385var Trunc = function (_mathOp8) {386 _inherits(Trunc, _mathOp8);387 function Trunc() {388 _classCallCheck(this, Trunc);389 return _possibleConstructorReturn(this, Object.getPrototypeOf(Trunc).apply(this, arguments));390 }391 return Trunc;392}(mathOp(Math.trunc));393var StringConcatOp = function (_opTypes3) {394 _inherits(StringConcatOp, _opTypes3);395 function StringConcatOp() {396 _classCallCheck(this, StringConcatOp);397 return _possibleConstructorReturn(this, Object.getPrototypeOf(StringConcatOp).apply(this, arguments));398 }399 return StringConcatOp;400}(opTypes(FnOp, StringValue));401var Concat = function (_fnOp) {402 _inherits(Concat, _fnOp);403 function Concat() {404 _classCallCheck(this, Concat);405 return _possibleConstructorReturn(this, Object.getPrototypeOf(Concat).apply(this, arguments));406 }407 return Concat;408}(fnOp(StringConcatOp, function (a, b) {409 return a + b;410}));411var CaseOp = function (_opTypes4) {412 _inherits(CaseOp, _opTypes4);413 function CaseOp() {414 _classCallCheck(this, CaseOp);415 return _possibleConstructorReturn(this, Object.getPrototypeOf(CaseOp).apply(this, arguments));416 }417 _createClass(CaseOp, [{418 key: 'alt',419 get: function get() {420 return new StringValue('');421 }422 }]);423 return CaseOp;424}(opTypes(UnaryFnOp, StringValue));425var ToLower = function (_fnOp2) {426 _inherits(ToLower, _fnOp2);427 function ToLower() {428 _classCallCheck(this, ToLower);429 return _possibleConstructorReturn(this, Object.getPrototypeOf(ToLower).apply(this, arguments));430 }431 return ToLower;432}(fnOp(CaseOp, function (s) {433 return s.toLowerCase();434}));435var ToUpper = function (_fnOp3) {436 _inherits(ToUpper, _fnOp3);437 function ToUpper() {438 _classCallCheck(this, ToUpper);439 return _possibleConstructorReturn(this, Object.getPrototypeOf(ToUpper).apply(this, arguments));440 }441 return ToUpper;442}(fnOp(CaseOp, function (s) {443 return s.toUpperCase();444}));445var ConcatArraysOp = function (_opTypes5) {446 _inherits(ConcatArraysOp, _opTypes5);447 function ConcatArraysOp() {448 _classCallCheck(this, ConcatArraysOp);449 return _possibleConstructorReturn(this, Object.getPrototypeOf(ConcatArraysOp).apply(this, arguments));450 }451 return ConcatArraysOp;452}(opTypes(FnOp, ArrayValue));453var ConcatArrays = function (_fnOp4) {454 _inherits(ConcatArrays, _fnOp4);455 function ConcatArrays() {456 _classCallCheck(this, ConcatArrays);457 return _possibleConstructorReturn(this, Object.getPrototypeOf(ConcatArrays).apply(this, arguments));458 }459 return ConcatArrays;460}(fnOp(ConcatArraysOp, function (a, b) {461 return a.concat(b);462}));463var DateOp = function (_opTypes6) {464 _inherits(DateOp, _opTypes6);465 function DateOp() {466 _classCallCheck(this, DateOp);467 return _possibleConstructorReturn(this, Object.getPrototypeOf(DateOp).apply(this, arguments));468 }469 return DateOp;470}(opTypes(UnaryFnOp, DateValue, NumberValue));471var dateOp = function dateOp(fn) {472 return fnOp(DateOp, fn);473};474var DayOfMonth = function (_dateOp) {475 _inherits(DayOfMonth, _dateOp);476 function DayOfMonth() {477 _classCallCheck(this, DayOfMonth);478 return _possibleConstructorReturn(this, Object.getPrototypeOf(DayOfMonth).apply(this, arguments));479 }480 return DayOfMonth;481}(dateOp(function (d) {482 return d.getDate();483}));484var Year = function (_dateOp2) {485 _inherits(Year, _dateOp2);486 function Year() {487 _classCallCheck(this, Year);488 return _possibleConstructorReturn(this, Object.getPrototypeOf(Year).apply(this, arguments));489 }490 return Year;491}(dateOp(function (d) {492 return d.getUTCFullYear();493}));494var Month = function (_dateOp3) {495 _inherits(Month, _dateOp3);496 function Month() {497 _classCallCheck(this, Month);498 return _possibleConstructorReturn(this, Object.getPrototypeOf(Month).apply(this, arguments));499 }500 return Month;501}(dateOp(function (d) {502 return d.getUTCMonth() + 1;503}));504var Hour = function (_dateOp4) {505 _inherits(Hour, _dateOp4);506 function Hour() {507 _classCallCheck(this, Hour);508 return _possibleConstructorReturn(this, Object.getPrototypeOf(Hour).apply(this, arguments));509 }510 return Hour;511}(dateOp(function (d) {512 return d.getUTCHours();513}));514var Minute = function (_dateOp5) {515 _inherits(Minute, _dateOp5);516 function Minute() {517 _classCallCheck(this, Minute);518 return _possibleConstructorReturn(this, Object.getPrototypeOf(Minute).apply(this, arguments));519 }520 return Minute;521}(dateOp(function (d) {522 return d.getUTCMinutes();523}));524var Second = function (_dateOp6) {525 _inherits(Second, _dateOp6);526 function Second() {527 _classCallCheck(this, Second);528 return _possibleConstructorReturn(this, Object.getPrototypeOf(Second).apply(this, arguments));529 }530 return Second;531}(dateOp(function (d) {532 return d.getUTCSeconds();533}));534var Millisecond = function (_dateOp7) {535 _inherits(Millisecond, _dateOp7);536 function Millisecond() {537 _classCallCheck(this, Millisecond);538 return _possibleConstructorReturn(this, Object.getPrototypeOf(Millisecond).apply(this, arguments));539 }540 return Millisecond;541}(dateOp(function (d) {542 return d.getUTCMilliseconds();543}));544var TypeCond = function () {545 function TypeCond(stack, args, op) {546 _classCallCheck(this, TypeCond);547 var InputType = op.InputType;548 var alt = op.alt;549 this.result_types = new Set([op.ResultType, alt.ResultType]);550 this.stack = stack;551 this.isType = InputType.isType;552 this.args = args;553 this.op = op;554 this.alt_value = alt.value;555 }556 _createClass(TypeCond, [{557 key: 'run',558 value: function run(fields) {559 var stack = this.stack;560 var isType = this.isType;561 var op = this.op;562 var new_args = [];563 var _iteratorNormalCompletion = true;564 var _didIteratorError = false;565 var _iteratorError = undefined;566 try {567 for (var _iterator = this.args[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {568 var arg = _step.value;569 var result = arg.run(fields);570 if (!isType(result)) {571 return this.alt_value;572 }573 new_args.push(result);574 }575 } catch (err) {576 _didIteratorError = true;577 _iteratorError = err;578 } finally {579 try {580 if (!_iteratorNormalCompletion && _iterator.return) {581 _iterator.return();582 }583 } finally {584 if (_didIteratorError) {585 throw _iteratorError;586 }587 }588 }589 for (var i = new_args.length - 1; i >= 0; i--) {590 stack.push(new_args[i]);591 }592 return op.run(fields);593 }594 }]);595 return TypeCond;596}();597var PopFromStack = function () {598 function PopFromStack(stack) {599 _classCallCheck(this, PopFromStack);600 this.stack = stack;601 }602 _createClass(PopFromStack, [{603 key: 'run',604 value: function run() {605 return this.stack.pop();606 }607 }]);608 return PopFromStack;609}();610var ops = {611 $add: Add,612 $subtract: Subtract,613 $multiply: Multiply,...

Full Screen

Full Screen

Errors.js

Source:Errors.js Github

copy

Full Screen

...13import "core-js/modules/es.regexp.to-string";14import "core-js/modules/es.string.iterator";15import "core-js/modules/web.dom-collections.iterator";16function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }17function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }18function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }19function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }20function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }21function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }22function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }23function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }24function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }25function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }26function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }27function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }28function _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; }29export var HttpClientError = /*#__PURE__*/function (_Error) {30 _inherits(HttpClientError, _Error);31 var _super = _createSuper(HttpClientError);32 function HttpClientError(message) {33 var _this;34 var previous = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;35 _classCallCheck(this, HttpClientError);36 _this = _super.call(this, message);37 _defineProperty(_assertThisInitialized(_this), "request", void 0);38 _defineProperty(_assertThisInitialized(_this), "response", void 0);39 _defineProperty(_assertThisInitialized(_this), "previous", void 0);40 _this.previous = previous;41 return _this;42 }43 return HttpClientError;44}( /*#__PURE__*/_wrapNativeSuper(Error));45export var HttpError = /*#__PURE__*/function (_HttpClientError) {46 _inherits(HttpError, _HttpClientError);47 var _super2 = _createSuper(HttpError);48 function HttpError() {49 _classCallCheck(this, HttpError);50 return _super2.apply(this, arguments);51 }52 return HttpError;53}(HttpClientError);54export var NetworkError = /*#__PURE__*/function (_HttpError) {55 _inherits(NetworkError, _HttpError);56 var _super3 = _createSuper(NetworkError);57 function NetworkError() {58 _classCallCheck(this, NetworkError);59 return _super3.apply(this, arguments);60 }61 return NetworkError;62}(HttpError);63export var RequestError = /*#__PURE__*/function (_HttpError2) {64 _inherits(RequestError, _HttpError2);65 var _super4 = _createSuper(RequestError);66 function RequestError() {67 _classCallCheck(this, RequestError);68 return _super4.apply(this, arguments);69 }70 return RequestError;71}(HttpError);72export var RequestAborted = /*#__PURE__*/function (_HttpError3) {73 _inherits(RequestAborted, _HttpError3);74 var _super5 = _createSuper(RequestAborted);75 function RequestAborted() {76 _classCallCheck(this, RequestAborted);77 return _super5.apply(this, arguments);78 }79 return RequestAborted;80}(HttpError);81/**82 * 400.83 */84export var ClientError = /*#__PURE__*/function (_RequestError) {85 _inherits(ClientError, _RequestError);86 var _super6 = _createSuper(ClientError);87 function ClientError() {88 _classCallCheck(this, ClientError);89 return _super6.apply(this, arguments);90 }91 return ClientError;92}(RequestError);93export var BadRequest = /*#__PURE__*/function (_ClientError) {94 _inherits(BadRequest, _ClientError);95 var _super7 = _createSuper(BadRequest);96 function BadRequest() {97 _classCallCheck(this, BadRequest);98 return _super7.apply(this, arguments);99 }100 return BadRequest;101}(ClientError);102export var Unauthorized = /*#__PURE__*/function (_ClientError2) {103 _inherits(Unauthorized, _ClientError2);104 var _super8 = _createSuper(Unauthorized);105 function Unauthorized() {106 _classCallCheck(this, Unauthorized);107 return _super8.apply(this, arguments);108 }109 return Unauthorized;110}(ClientError);111export var PaymentRequired = /*#__PURE__*/function (_ClientError3) {112 _inherits(PaymentRequired, _ClientError3);113 var _super9 = _createSuper(PaymentRequired);114 function PaymentRequired() {115 _classCallCheck(this, PaymentRequired);116 return _super9.apply(this, arguments);117 }118 return PaymentRequired;119}(ClientError);120export var Forbidden = /*#__PURE__*/function (_ClientError4) {121 _inherits(Forbidden, _ClientError4);122 var _super10 = _createSuper(Forbidden);123 function Forbidden() {124 _classCallCheck(this, Forbidden);125 return _super10.apply(this, arguments);126 }127 return Forbidden;128}(ClientError);129export var NotFound = /*#__PURE__*/function (_ClientError5) {130 _inherits(NotFound, _ClientError5);131 var _super11 = _createSuper(NotFound);132 function NotFound() {133 _classCallCheck(this, NotFound);134 return _super11.apply(this, arguments);135 }136 return NotFound;137}(ClientError);138export var MethodNotAllowed = /*#__PURE__*/function (_ClientError6) {139 _inherits(MethodNotAllowed, _ClientError6);140 var _super12 = _createSuper(MethodNotAllowed);141 function MethodNotAllowed() {142 _classCallCheck(this, MethodNotAllowed);143 return _super12.apply(this, arguments);144 }145 return MethodNotAllowed;146}(ClientError);147export var NotAcceptable = /*#__PURE__*/function (_ClientError7) {148 _inherits(NotAcceptable, _ClientError7);149 var _super13 = _createSuper(NotAcceptable);150 function NotAcceptable() {151 _classCallCheck(this, NotAcceptable);152 return _super13.apply(this, arguments);153 }154 return NotAcceptable;155}(ClientError);156export var ProxyAuthenticationRequired = /*#__PURE__*/function (_ClientError8) {157 _inherits(ProxyAuthenticationRequired, _ClientError8);158 var _super14 = _createSuper(ProxyAuthenticationRequired);159 function ProxyAuthenticationRequired() {160 _classCallCheck(this, ProxyAuthenticationRequired);161 return _super14.apply(this, arguments);162 }163 return ProxyAuthenticationRequired;164}(ClientError);165export var RequestTimeout = /*#__PURE__*/function (_ClientError9) {166 _inherits(RequestTimeout, _ClientError9);167 var _super15 = _createSuper(RequestTimeout);168 function RequestTimeout() {169 _classCallCheck(this, RequestTimeout);170 return _super15.apply(this, arguments);171 }172 return RequestTimeout;173}(ClientError);174export var Conflict = /*#__PURE__*/function (_ClientError10) {175 _inherits(Conflict, _ClientError10);176 var _super16 = _createSuper(Conflict);177 function Conflict() {178 _classCallCheck(this, Conflict);179 return _super16.apply(this, arguments);180 }181 return Conflict;182}(ClientError);183export var Gone = /*#__PURE__*/function (_ClientError11) {184 _inherits(Gone, _ClientError11);185 var _super17 = _createSuper(Gone);186 function Gone() {187 _classCallCheck(this, Gone);188 return _super17.apply(this, arguments);189 }190 return Gone;191}(ClientError);192export var LengthRequired = /*#__PURE__*/function (_ClientError12) {193 _inherits(LengthRequired, _ClientError12);194 var _super18 = _createSuper(LengthRequired);195 function LengthRequired() {196 _classCallCheck(this, LengthRequired);197 return _super18.apply(this, arguments);198 }199 return LengthRequired;200}(ClientError);201export var PreconditionFailed = /*#__PURE__*/function (_ClientError13) {202 _inherits(PreconditionFailed, _ClientError13);203 var _super19 = _createSuper(PreconditionFailed);204 function PreconditionFailed() {205 _classCallCheck(this, PreconditionFailed);206 return _super19.apply(this, arguments);207 }208 return PreconditionFailed;209}(ClientError);210export var PayloadTooLarge = /*#__PURE__*/function (_ClientError14) {211 _inherits(PayloadTooLarge, _ClientError14);212 var _super20 = _createSuper(PayloadTooLarge);213 function PayloadTooLarge() {214 _classCallCheck(this, PayloadTooLarge);215 return _super20.apply(this, arguments);216 }217 return PayloadTooLarge;218}(ClientError);219export var URITooLong = /*#__PURE__*/function (_ClientError15) {220 _inherits(URITooLong, _ClientError15);221 var _super21 = _createSuper(URITooLong);222 function URITooLong() {223 _classCallCheck(this, URITooLong);224 return _super21.apply(this, arguments);225 }226 return URITooLong;227}(ClientError);228export var UnsupportedMediaType = /*#__PURE__*/function (_ClientError16) {229 _inherits(UnsupportedMediaType, _ClientError16);230 var _super22 = _createSuper(UnsupportedMediaType);231 function UnsupportedMediaType() {232 _classCallCheck(this, UnsupportedMediaType);233 return _super22.apply(this, arguments);234 }235 return UnsupportedMediaType;236}(ClientError);237export var RangeNotSatisfiable = /*#__PURE__*/function (_ClientError17) {238 _inherits(RangeNotSatisfiable, _ClientError17);239 var _super23 = _createSuper(RangeNotSatisfiable);240 function RangeNotSatisfiable() {241 _classCallCheck(this, RangeNotSatisfiable);242 return _super23.apply(this, arguments);243 }244 return RangeNotSatisfiable;245}(ClientError);246export var ExpectationFailed = /*#__PURE__*/function (_ClientError18) {247 _inherits(ExpectationFailed, _ClientError18);248 var _super24 = _createSuper(ExpectationFailed);249 function ExpectationFailed() {250 _classCallCheck(this, ExpectationFailed);251 return _super24.apply(this, arguments);252 }253 return ExpectationFailed;254}(ClientError);255export var ImATeapot = /*#__PURE__*/function (_ClientError19) {256 _inherits(ImATeapot, _ClientError19);257 var _super25 = _createSuper(ImATeapot);258 function ImATeapot() {259 _classCallCheck(this, ImATeapot);260 return _super25.apply(this, arguments);261 }262 return ImATeapot;263}(ClientError);264export var MisdirectedRequest = /*#__PURE__*/function (_ClientError20) {265 _inherits(MisdirectedRequest, _ClientError20);266 var _super26 = _createSuper(MisdirectedRequest);267 function MisdirectedRequest() {268 _classCallCheck(this, MisdirectedRequest);269 return _super26.apply(this, arguments);270 }271 return MisdirectedRequest;272}(ClientError);273export var UnprocessableEntity = /*#__PURE__*/function (_ClientError21) {274 _inherits(UnprocessableEntity, _ClientError21);275 var _super27 = _createSuper(UnprocessableEntity);276 function UnprocessableEntity() {277 _classCallCheck(this, UnprocessableEntity);278 return _super27.apply(this, arguments);279 }280 return UnprocessableEntity;281}(ClientError);282export var Locked = /*#__PURE__*/function (_ClientError22) {283 _inherits(Locked, _ClientError22);284 var _super28 = _createSuper(Locked);285 function Locked() {286 _classCallCheck(this, Locked);287 return _super28.apply(this, arguments);288 }289 return Locked;290}(ClientError);291export var FailedDependency = /*#__PURE__*/function (_ClientError23) {292 _inherits(FailedDependency, _ClientError23);293 var _super29 = _createSuper(FailedDependency);294 function FailedDependency() {295 _classCallCheck(this, FailedDependency);296 return _super29.apply(this, arguments);297 }298 return FailedDependency;299}(ClientError);300export var TooEarly = /*#__PURE__*/function (_ClientError24) {301 _inherits(TooEarly, _ClientError24);302 var _super30 = _createSuper(TooEarly);303 function TooEarly() {304 _classCallCheck(this, TooEarly);305 return _super30.apply(this, arguments);306 }307 return TooEarly;308}(ClientError);309export var UpgradeRequired = /*#__PURE__*/function (_ClientError25) {310 _inherits(UpgradeRequired, _ClientError25);311 var _super31 = _createSuper(UpgradeRequired);312 function UpgradeRequired() {313 _classCallCheck(this, UpgradeRequired);314 return _super31.apply(this, arguments);315 }316 return UpgradeRequired;317}(ClientError);318export var PreconditionRequired = /*#__PURE__*/function (_ClientError26) {319 _inherits(PreconditionRequired, _ClientError26);320 var _super32 = _createSuper(PreconditionRequired);321 function PreconditionRequired() {322 _classCallCheck(this, PreconditionRequired);323 return _super32.apply(this, arguments);324 }325 return PreconditionRequired;326}(ClientError);327export var TooManyRequests = /*#__PURE__*/function (_ClientError27) {328 _inherits(TooManyRequests, _ClientError27);329 var _super33 = _createSuper(TooManyRequests);330 function TooManyRequests() {331 _classCallCheck(this, TooManyRequests);332 return _super33.apply(this, arguments);333 }334 return TooManyRequests;335}(ClientError);336export var RequestHeaderFieldsTooLarge = /*#__PURE__*/function (_ClientError28) {337 _inherits(RequestHeaderFieldsTooLarge, _ClientError28);338 var _super34 = _createSuper(RequestHeaderFieldsTooLarge);339 function RequestHeaderFieldsTooLarge() {340 _classCallCheck(this, RequestHeaderFieldsTooLarge);341 return _super34.apply(this, arguments);342 }343 return RequestHeaderFieldsTooLarge;344}(ClientError);345export var UnavailableForLegalReasons = /*#__PURE__*/function (_ClientError29) {346 _inherits(UnavailableForLegalReasons, _ClientError29);347 var _super35 = _createSuper(UnavailableForLegalReasons);348 function UnavailableForLegalReasons() {349 _classCallCheck(this, UnavailableForLegalReasons);350 return _super35.apply(this, arguments);351 }352 return UnavailableForLegalReasons;353}(ClientError);354/**355 * 500.356 */357export var ServerError = /*#__PURE__*/function (_RequestError2) {358 _inherits(ServerError, _RequestError2);359 var _super36 = _createSuper(ServerError);360 function ServerError() {361 _classCallCheck(this, ServerError);362 return _super36.apply(this, arguments);363 }364 return ServerError;365}(RequestError);366export var InternalServerError = /*#__PURE__*/function (_ServerError) {367 _inherits(InternalServerError, _ServerError);368 var _super37 = _createSuper(InternalServerError);369 function InternalServerError() {370 _classCallCheck(this, InternalServerError);371 return _super37.apply(this, arguments);372 }373 return InternalServerError;374}(ServerError);375export var NotImplemented = /*#__PURE__*/function (_ServerError2) {376 _inherits(NotImplemented, _ServerError2);377 var _super38 = _createSuper(NotImplemented);378 function NotImplemented() {379 _classCallCheck(this, NotImplemented);380 return _super38.apply(this, arguments);381 }382 return NotImplemented;383}(ServerError);384export var BadGateway = /*#__PURE__*/function (_ServerError3) {385 _inherits(BadGateway, _ServerError3);386 var _super39 = _createSuper(BadGateway);387 function BadGateway() {388 _classCallCheck(this, BadGateway);389 return _super39.apply(this, arguments);390 }391 return BadGateway;392}(ServerError);393export var ServiceUnavailable = /*#__PURE__*/function (_ServerError4) {394 _inherits(ServiceUnavailable, _ServerError4);395 var _super40 = _createSuper(ServiceUnavailable);396 function ServiceUnavailable() {397 _classCallCheck(this, ServiceUnavailable);398 return _super40.apply(this, arguments);399 }400 return ServiceUnavailable;401}(ServerError);402export var GatewayTimeout = /*#__PURE__*/function (_ServerError5) {403 _inherits(GatewayTimeout, _ServerError5);404 var _super41 = _createSuper(GatewayTimeout);405 function GatewayTimeout() {406 _classCallCheck(this, GatewayTimeout);407 return _super41.apply(this, arguments);408 }409 return GatewayTimeout;410}(ServerError);411export var HTTPVersionNotSupported = /*#__PURE__*/function (_ServerError6) {412 _inherits(HTTPVersionNotSupported, _ServerError6);413 var _super42 = _createSuper(HTTPVersionNotSupported);414 function HTTPVersionNotSupported() {415 _classCallCheck(this, HTTPVersionNotSupported);416 return _super42.apply(this, arguments);417 }418 return HTTPVersionNotSupported;419}(ServerError);420export var VariantAlsoNegotiates = /*#__PURE__*/function (_ServerError7) {421 _inherits(VariantAlsoNegotiates, _ServerError7);422 var _super43 = _createSuper(VariantAlsoNegotiates);423 function VariantAlsoNegotiates() {424 _classCallCheck(this, VariantAlsoNegotiates);425 return _super43.apply(this, arguments);426 }427 return VariantAlsoNegotiates;428}(ServerError);429export var InsufficientStorage = /*#__PURE__*/function (_ServerError8) {430 _inherits(InsufficientStorage, _ServerError8);431 var _super44 = _createSuper(InsufficientStorage);432 function InsufficientStorage() {433 _classCallCheck(this, InsufficientStorage);434 return _super44.apply(this, arguments);435 }436 return InsufficientStorage;437}(ServerError);438export var LoopDetected = /*#__PURE__*/function (_ServerError9) {439 _inherits(LoopDetected, _ServerError9);440 var _super45 = _createSuper(LoopDetected);441 function LoopDetected() {442 _classCallCheck(this, LoopDetected);443 return _super45.apply(this, arguments);444 }445 return LoopDetected;446}(ServerError);447export var NotExtended = /*#__PURE__*/function (_ServerError10) {448 _inherits(NotExtended, _ServerError10);449 var _super46 = _createSuper(NotExtended);450 function NotExtended() {451 _classCallCheck(this, NotExtended);452 return _super46.apply(this, arguments);453 }454 return NotExtended;455}(ServerError);456export var NetworkAuthenticationRequired = /*#__PURE__*/function (_ServerError11) {457 _inherits(NetworkAuthenticationRequired, _ServerError11);458 var _super47 = _createSuper(NetworkAuthenticationRequired);459 function NetworkAuthenticationRequired() {460 _classCallCheck(this, NetworkAuthenticationRequired);461 return _super47.apply(this, arguments);462 }463 return NetworkAuthenticationRequired;464}(ServerError);465export var StatusToError = {466 400: BadRequest,467 401: Unauthorized,468 402: PaymentRequired,469 403: Forbidden,470 404: NotFound,471 405: MethodNotAllowed,472 406: NotAcceptable,473 407: ProxyAuthenticationRequired,474 408: RequestTimeout,...

Full Screen

Full Screen

output.js

Source:output.js Github

copy

Full Screen

1function _classCallCheck(instance, Constructor) {2 if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function");3}4function _getPrototypeOf(o) {5 return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {6 return o.__proto__ || Object.getPrototypeOf(o);7 }, _getPrototypeOf(o);8}9function _inherits(subClass, superClass) {10 if ("function" != typeof superClass && null !== superClass) throw new TypeError("Super expression must either be null or a function");11 subClass.prototype = Object.create(superClass && superClass.prototype, {12 constructor: {13 value: subClass,14 writable: !0,15 configurable: !016 }17 }), superClass && _setPrototypeOf(subClass, superClass);18}19function _setPrototypeOf(o, p) {20 return _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {21 return o.__proto__ = p, o;22 }, _setPrototypeOf(o, p);23}24function _createSuper(Derived) {25 var hasNativeReflectConstruct = function() {26 if ("undefined" == typeof Reflect || !Reflect.construct) return !1;27 if (Reflect.construct.sham) return !1;28 if ("function" == typeof Proxy) return !0;29 try {30 return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {31 })), !0;32 } catch (e) {33 return !1;34 }35 }();36 return function() {37 var obj, self, call, result, Super = _getPrototypeOf(Derived);38 if (hasNativeReflectConstruct) {39 var NewTarget = _getPrototypeOf(this).constructor;40 result = Reflect.construct(Super, arguments, NewTarget);41 } else result = Super.apply(this, arguments);42 return self = this, (call = result) && ("object" == ((obj = call) && "undefined" != typeof Symbol && obj.constructor === Symbol ? "symbol" : typeof obj) || "function" == typeof call) ? call : (function(self) {43 if (void 0 === self) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");44 return self;45 })(self);46 };47}48var x193, x194, x195, x196, x197, x198, x199, x200, x201, x202, x203, x204, Base1 = function() {49 "use strict";50 _classCallCheck(this, Base1);51}, Derived1 = function(Base) {52 "use strict";53 _inherits(Derived1, Base);54 var _super = _createSuper(Derived1);55 function Derived1() {56 return _classCallCheck(this, Derived1), _super.apply(this, arguments);57 }58 return Derived1;59}(Base1), Derived2 = function(Base) {60 "use strict";61 _inherits(Derived2, Base);62 var _super = _createSuper(Derived2);63 function Derived2() {64 return _classCallCheck(this, Derived2), _super.apply(this, arguments);65 }66 return Derived2;67}(Base1);68new Base1();69var d1 = new Derived1(), d2 = new Derived2(), x13 = function() {70 "use strict";71 _classCallCheck(this, x13), this.member = function() {72 return [73 d1,74 d275 ];76 };77}, x14 = function() {78 "use strict";79 _classCallCheck(this, x14), this.member = function() {80 return [81 d1,82 d283 ];84 };85}, x15 = function() {86 "use strict";87 _classCallCheck(this, x15), this.member = function() {88 return [89 d1,90 d291 ];92 };93}, x16 = function() {94 "use strict";95 _classCallCheck(this, x16), this.member = function() {96 return [97 d1,98 d299 ];100 };101}, x17 = function() {102 "use strict";103 _classCallCheck(this, x17), this.member = function() {104 return [105 d1,106 d2107 ];108 };109}, x18 = function() {110 "use strict";111 _classCallCheck(this, x18), this.member = function() {112 return [113 d1,114 d2115 ];116 };117}, x19 = function() {118 "use strict";119 _classCallCheck(this, x19), this.member = [120 d1,121 d2122 ];123}, x20 = function() {124 "use strict";125 _classCallCheck(this, x20), this.member = [126 d1,127 d2128 ];129}, x21 = function() {130 "use strict";131 _classCallCheck(this, x21), this.member = [132 d1,133 d2134 ];135}, x22 = function() {136 "use strict";137 _classCallCheck(this, x22), this.member = {138 n: [139 d1,140 d2141 ]142 };143}, x23 = function() {144 "use strict";145 _classCallCheck(this, x23), this.member = function(n) {146 return null;147 };148}, x24 = function() {149 "use strict";150 _classCallCheck(this, x24), this.member = {151 func: function(n) {152 return [153 d1,154 d2155 ];156 }157 };158}, x25 = function() {159 "use strict";160 _classCallCheck(this, x25), this.member = function() {161 return [162 d1,163 d2164 ];165 };166}, x26 = function() {167 "use strict";168 _classCallCheck(this, x26), this.member = function() {169 return [170 d1,171 d2172 ];173 };174}, x27 = function() {175 "use strict";176 _classCallCheck(this, x27), this.member = function() {177 return [178 d1,179 d2180 ];181 };182}, x28 = function() {183 "use strict";184 _classCallCheck(this, x28), this.member = function() {185 return [186 d1,187 d2188 ];189 };190}, x29 = function() {191 "use strict";192 _classCallCheck(this, x29), this.member = function() {193 return [194 d1,195 d2196 ];197 };198}, x30 = function() {199 "use strict";200 _classCallCheck(this, x30), this.member = function() {201 return [202 d1,203 d2204 ];205 };206}, x31 = function() {207 "use strict";208 _classCallCheck(this, x31), this.member = [209 d1,210 d2211 ];212}, x32 = function() {213 "use strict";214 _classCallCheck(this, x32), this.member = [215 d1,216 d2217 ];218}, x33 = function() {219 "use strict";220 _classCallCheck(this, x33), this.member = [221 d1,222 d2223 ];224}, x34 = function() {225 "use strict";226 _classCallCheck(this, x34), this.member = {227 n: [228 d1,229 d2230 ]231 };232}, x35 = function() {233 "use strict";234 _classCallCheck(this, x35), this.member = function(n) {235 return null;236 };237}, x36 = function() {238 "use strict";239 _classCallCheck(this, x36), this.member = {240 func: function(n) {241 return [242 d1,243 d2244 ];245 }246 };247}, x37 = function() {248 "use strict";249 _classCallCheck(this, x37), this.member = function() {250 return [251 d1,252 d2253 ];254 };255}, x38 = function() {256 "use strict";257 _classCallCheck(this, x38), this.member = function() {258 return [259 d1,260 d2261 ];262 };263}, x39 = function() {264 "use strict";265 _classCallCheck(this, x39), this.member = function() {266 return [267 d1,268 d2269 ];270 };271}, x40 = function() {272 "use strict";273 _classCallCheck(this, x40), this.member = function() {274 return [275 d1,276 d2277 ];278 };279}, x41 = function() {280 "use strict";281 _classCallCheck(this, x41), this.member = function() {282 return [283 d1,284 d2285 ];286 };287}, x42 = function() {288 "use strict";289 _classCallCheck(this, x42), this.member = function() {290 return [291 d1,292 d2293 ];294 };295}, x43 = function() {296 "use strict";297 _classCallCheck(this, x43), this.member = [298 d1,299 d2300 ];301}, x44 = function() {302 "use strict";303 _classCallCheck(this, x44), this.member = [304 d1,305 d2306 ];307}, x45 = function() {308 "use strict";309 _classCallCheck(this, x45), this.member = [310 d1,311 d2312 ];313}, x46 = function() {314 "use strict";315 _classCallCheck(this, x46), this.member = {316 n: [317 d1,318 d2319 ]320 };321}, x47 = function() {322 "use strict";323 _classCallCheck(this, x47), this.member = function(n) {324 return null;325 };326}, x48 = function() {327 "use strict";328 _classCallCheck(this, x48), this.member = {329 func: function(n) {330 return [331 d1,332 d2333 ];334 }335 };336}, x49 = function() {337 "use strict";338 _classCallCheck(this, x49);339};340x49.member = function() {341 return [342 d1,343 d2344 ];345};346var x50 = function() {347 "use strict";348 _classCallCheck(this, x50);349};350x50.member = function() {351 return [352 d1,353 d2354 ];355};356var x51 = function() {357 "use strict";358 _classCallCheck(this, x51);359};360x51.member = function() {361 return [362 d1,363 d2364 ];365};366var x52 = function() {367 "use strict";368 _classCallCheck(this, x52);369};370x52.member = function() {371 return [372 d1,373 d2374 ];375};376var x53 = function() {377 "use strict";378 _classCallCheck(this, x53);379};380x53.member = function() {381 return [382 d1,383 d2384 ];385};386var x54 = function() {387 "use strict";388 _classCallCheck(this, x54);389};390x54.member = function() {391 return [392 d1,393 d2394 ];395};396var x55 = function() {397 "use strict";398 _classCallCheck(this, x55);399};400x55.member = [401 d1,402 d2403];404var x56 = function() {405 "use strict";406 _classCallCheck(this, x56);407};408x56.member = [409 d1,410 d2411];412var x57 = function() {413 "use strict";414 _classCallCheck(this, x57);415};416x57.member = [417 d1,418 d2419];420var x58 = function() {421 "use strict";422 _classCallCheck(this, x58);423};424x58.member = {425 n: [426 d1,427 d2428 ]429};430var x59 = function() {431 "use strict";432 _classCallCheck(this, x59);433};434x59.member = function(n) {435 return null;436};437var x60 = function() {438 "use strict";439 _classCallCheck(this, x60);440};441x60.member = {442 func: function(n) {443 return [444 d1,445 d2446 ];447 }448};449var x61 = function() {450 "use strict";451 _classCallCheck(this, x61);452};453x61.member = function() {454 return [455 d1,456 d2457 ];458};459var x62 = function() {460 "use strict";461 _classCallCheck(this, x62);462};463x62.member = function() {464 return [465 d1,466 d2467 ];468};469var x63 = function() {470 "use strict";471 _classCallCheck(this, x63);472};473x63.member = function() {474 return [475 d1,476 d2477 ];478};479var x64 = function() {480 "use strict";481 _classCallCheck(this, x64);482};483x64.member = function() {484 return [485 d1,486 d2487 ];488};489var x65 = function() {490 "use strict";491 _classCallCheck(this, x65);492};493x65.member = function() {494 return [495 d1,496 d2497 ];498};499var x66 = function() {500 "use strict";501 _classCallCheck(this, x66);502};503x66.member = function() {504 return [505 d1,506 d2507 ];508};509var x67 = function() {510 "use strict";511 _classCallCheck(this, x67);512};513x67.member = [514 d1,515 d2516];517var x68 = function() {518 "use strict";519 _classCallCheck(this, x68);520};521x68.member = [522 d1,523 d2524];525var x69 = function() {526 "use strict";527 _classCallCheck(this, x69);528};529x69.member = [530 d1,531 d2532];533var x70 = function() {534 "use strict";535 _classCallCheck(this, x70);536};537x70.member = {538 n: [539 d1,540 d2541 ]542};543var x71 = function() {544 "use strict";545 _classCallCheck(this, x71);546};547x71.member = function(n) {548 return null;549};550var x72 = function() {551 "use strict";552 _classCallCheck(this, x72);553};554x72.member = {555 func: function(n) {556 return [557 d1,558 d2559 ];560 }561};562var x73 = function() {563 "use strict";564 _classCallCheck(this, x73);565};566x73.member = function() {567 return [568 d1,569 d2570 ];571};572var x74 = function() {573 "use strict";574 _classCallCheck(this, x74);575};576x74.member = function() {577 return [578 d1,579 d2580 ];581};582var x75 = function() {583 "use strict";584 _classCallCheck(this, x75);585};586x75.member = function() {587 return [588 d1,589 d2590 ];591};592var x76 = function() {593 "use strict";594 _classCallCheck(this, x76);595};596x76.member = function() {597 return [598 d1,599 d2600 ];601};602var x77 = function() {603 "use strict";604 _classCallCheck(this, x77);605};606x77.member = function() {607 return [608 d1,609 d2610 ];611};612var x78 = function() {613 "use strict";614 _classCallCheck(this, x78);615};616x78.member = function() {617 return [618 d1,619 d2620 ];621};622var x79 = function() {623 "use strict";624 _classCallCheck(this, x79);625};626x79.member = [627 d1,628 d2629];630var x80 = function() {631 "use strict";632 _classCallCheck(this, x80);633};634x80.member = [635 d1,636 d2637];638var x81 = function() {639 "use strict";640 _classCallCheck(this, x81);641};642x81.member = [643 d1,644 d2645];646var x82 = function() {647 "use strict";648 _classCallCheck(this, x82);649};650x82.member = {651 n: [652 d1,653 d2654 ]655};656var x83 = function() {657 "use strict";658 _classCallCheck(this, x83);659};660x83.member = function(n) {661 return null;662};663var x84 = function() {664 "use strict";665 _classCallCheck(this, x84);666};667x84.member = {668 func: function(n) {669 return [670 d1,671 d2672 ];673 }674};675var x85 = function(param) {676 "use strict";677 _classCallCheck(this, x85);678}, x86 = function(param) {679 "use strict";680 _classCallCheck(this, x86);681}, x87 = function(param) {682 "use strict";683 _classCallCheck(this, x87);684}, x88 = function(param) {685 "use strict";686 _classCallCheck(this, x88);687}, x89 = function(param) {688 "use strict";689 _classCallCheck(this, x89);690}, x90 = function(param) {691 "use strict";692 _classCallCheck(this, x90);693}, x91 = function(param) {694 "use strict";695 _classCallCheck(this, x91);696}, x92 = function(param) {697 "use strict";698 _classCallCheck(this, x92);699}, x93 = function(param) {700 "use strict";701 _classCallCheck(this, x93);702}, x94 = function(param) {703 "use strict";704 _classCallCheck(this, x94);705}, x95 = function(param) {706 "use strict";707 _classCallCheck(this, x95);708}, x96 = function(param) {709 "use strict";710 _classCallCheck(this, x96);711}, x97 = function(param) {712 "use strict";713 _classCallCheck(this, x97), this.parm = void 0 === param ? function() {714 return [715 d1,716 d2717 ];718 } : param;719}, x98 = function(param) {720 "use strict";721 _classCallCheck(this, x98), this.parm = void 0 === param ? function() {722 return [723 d1,724 d2725 ];726 } : param;727}, x99 = function(param) {728 "use strict";729 _classCallCheck(this, x99), this.parm = void 0 === param ? function() {730 return [731 d1,732 d2733 ];734 } : param;735}, x100 = function(param) {736 "use strict";737 _classCallCheck(this, x100), this.parm = void 0 === param ? function() {738 return [739 d1,740 d2741 ];742 } : param;743}, x101 = function(param) {744 "use strict";745 _classCallCheck(this, x101), this.parm = void 0 === param ? function() {746 return [747 d1,748 d2749 ];750 } : param;751}, x102 = function(param) {752 "use strict";753 _classCallCheck(this, x102), this.parm = void 0 === param ? function() {754 return [755 d1,756 d2757 ];758 } : param;759}, x103 = function(param) {760 "use strict";761 _classCallCheck(this, x103), this.parm = void 0 === param ? [762 d1,763 d2764 ] : param;765}, x104 = function(param) {766 "use strict";767 _classCallCheck(this, x104), this.parm = void 0 === param ? [768 d1,769 d2770 ] : param;771}, x105 = function(param) {772 "use strict";773 _classCallCheck(this, x105), this.parm = void 0 === param ? [774 d1,775 d2776 ] : param;777}, x106 = function(param) {778 "use strict";779 _classCallCheck(this, x106), this.parm = void 0 === param ? {780 n: [781 d1,782 d2783 ]784 } : param;785}, x107 = function(param) {786 "use strict";787 _classCallCheck(this, x107), this.parm = void 0 === param ? function(n) {788 return null;789 } : param;790}, x108 = function(param) {791 "use strict";792 _classCallCheck(this, x108), this.parm = void 0 === param ? {793 func: function(n) {794 return [795 d1,796 d2797 ];798 }799 } : param;800}, x109 = function(param) {801 "use strict";802 _classCallCheck(this, x109), this.parm = void 0 === param ? function() {803 return [804 d1,805 d2806 ];807 } : param;808}, x110 = function(param) {809 "use strict";810 _classCallCheck(this, x110), this.parm = void 0 === param ? function() {811 return [812 d1,813 d2814 ];815 } : param;816}, x111 = function(param) {817 "use strict";818 _classCallCheck(this, x111), this.parm = void 0 === param ? function() {819 return [820 d1,821 d2822 ];823 } : param;824}, x112 = function(param) {825 "use strict";826 _classCallCheck(this, x112), this.parm = void 0 === param ? function() {827 return [828 d1,829 d2830 ];831 } : param;832}, x113 = function(param) {833 "use strict";834 _classCallCheck(this, x113), this.parm = void 0 === param ? function() {835 return [836 d1,837 d2838 ];839 } : param;840}, x114 = function(param) {841 "use strict";842 _classCallCheck(this, x114), this.parm = void 0 === param ? function() {843 return [844 d1,845 d2846 ];847 } : param;848}, x115 = function(param) {849 "use strict";850 _classCallCheck(this, x115), this.parm = void 0 === param ? [851 d1,852 d2853 ] : param;854}, x116 = function(param) {855 "use strict";856 _classCallCheck(this, x116), this.parm = void 0 === param ? [857 d1,858 d2859 ] : param;860}, x117 = function(param) {861 "use strict";862 _classCallCheck(this, x117), this.parm = void 0 === param ? [863 d1,864 d2865 ] : param;866}, x118 = function(param) {867 "use strict";868 _classCallCheck(this, x118), this.parm = void 0 === param ? {869 n: [870 d1,871 d2872 ]873 } : param;874}, x119 = function(param) {875 "use strict";876 _classCallCheck(this, x119), this.parm = void 0 === param ? function(n) {877 return null;878 } : param;879}, x120 = function(param) {880 "use strict";881 _classCallCheck(this, x120), this.parm = void 0 === param ? {882 func: function(n) {883 return [884 d1,885 d2886 ];887 }888 } : param;889};890(x193 || (x193 = {891})).t = function() {892 return [893 d1,894 d2895 ];...

Full Screen

Full Screen

primitives.js

Source:primitives.js Github

copy

Full Screen

...3 value: true4});5exports.Videosphere = exports.Video = exports.Triangle = exports.Torus = exports.TorusKnot = exports.Text = exports.Tetrahedron = exports.Sphere = exports.Sound = exports.Sky = exports.Ring = exports.Plane = exports.Octahedron = exports.ObjModel = exports.Link = exports.Light = exports.Image = exports.Icosahedron = exports.gltfModel = exports.Dodecahedron = exports.Cylinder = exports.Curvedimage = exports.Cursor = exports.Cone = exports.ColladaModel = exports.Camera = exports.Box = exports.Animation = undefined;6var _core = require('./core');7function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }8function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }9function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }10/**11 * Render primitve tag as <primitive-name>, eg: <a-scene>.12 * primitive tag extends from <a-entity> in A-Frame so we reuse <Entity/>.13 */14var Animation = exports.Animation = function (_Entity) {15 _inherits(Animation, _Entity);16 function Animation(props) {17 _classCallCheck(this, Animation);18 var _this = _possibleConstructorReturn(this, (Animation.__proto__ || Object.getPrototypeOf(Animation)).call(this, props));19 _this.primitiveName = 'a-animation';20 return _this;21 }22 return Animation;23}(_core.Entity);24var Box = exports.Box = function (_Entity2) {25 _inherits(Box, _Entity2);26 function Box(props) {27 _classCallCheck(this, Box);28 var _this2 = _possibleConstructorReturn(this, (Box.__proto__ || Object.getPrototypeOf(Box)).call(this, props));29 _this2.primitiveName = 'a-box';30 return _this2;31 }32 return Box;33}(_core.Entity);34var Camera = exports.Camera = function (_Entity3) {35 _inherits(Camera, _Entity3);36 function Camera(props) {37 _classCallCheck(this, Camera);38 var _this3 = _possibleConstructorReturn(this, (Camera.__proto__ || Object.getPrototypeOf(Camera)).call(this, props));39 _this3.primitiveName = 'a-camera';40 return _this3;41 }42 return Camera;43}(_core.Entity);44var ColladaModel = exports.ColladaModel = function (_Entity4) {45 _inherits(ColladaModel, _Entity4);46 function ColladaModel(props) {47 _classCallCheck(this, ColladaModel);48 var _this4 = _possibleConstructorReturn(this, (ColladaModel.__proto__ || Object.getPrototypeOf(ColladaModel)).call(this, props));49 _this4.primitiveName = 'a-collada-model';50 return _this4;51 }52 return ColladaModel;53}(_core.Entity);54var Cone = exports.Cone = function (_Entity5) {55 _inherits(Cone, _Entity5);56 function Cone(props) {57 _classCallCheck(this, Cone);58 var _this5 = _possibleConstructorReturn(this, (Cone.__proto__ || Object.getPrototypeOf(Cone)).call(this, props));59 _this5.primitiveName = 'a-cone';60 return _this5;61 }62 return Cone;63}(_core.Entity);64var Cursor = exports.Cursor = function (_Entity6) {65 _inherits(Cursor, _Entity6);66 function Cursor(props) {67 _classCallCheck(this, Cursor);68 var _this6 = _possibleConstructorReturn(this, (Cursor.__proto__ || Object.getPrototypeOf(Cursor)).call(this, props));69 _this6.primitiveName = 'a-cursor';70 return _this6;71 }72 return Cursor;73}(_core.Entity);74var Curvedimage = exports.Curvedimage = function (_Entity7) {75 _inherits(Curvedimage, _Entity7);76 function Curvedimage(props) {77 _classCallCheck(this, Curvedimage);78 var _this7 = _possibleConstructorReturn(this, (Curvedimage.__proto__ || Object.getPrototypeOf(Curvedimage)).call(this, props));79 _this7.primitiveName = 'a-curvedimage';80 return _this7;81 }82 return Curvedimage;83}(_core.Entity);84var Cylinder = exports.Cylinder = function (_Entity8) {85 _inherits(Cylinder, _Entity8);86 function Cylinder(props) {87 _classCallCheck(this, Cylinder);88 var _this8 = _possibleConstructorReturn(this, (Cylinder.__proto__ || Object.getPrototypeOf(Cylinder)).call(this, props));89 _this8.primitiveName = 'a-cylinder';90 return _this8;91 }92 return Cylinder;93}(_core.Entity);94var Dodecahedron = exports.Dodecahedron = function (_Entity9) {95 _inherits(Dodecahedron, _Entity9);96 function Dodecahedron(props) {97 _classCallCheck(this, Dodecahedron);98 var _this9 = _possibleConstructorReturn(this, (Dodecahedron.__proto__ || Object.getPrototypeOf(Dodecahedron)).call(this, props));99 _this9.primitiveName = 'a-dodecahedron';100 return _this9;101 }102 return Dodecahedron;103}(_core.Entity);104var gltfModel = exports.gltfModel = function (_Entity10) {105 _inherits(gltfModel, _Entity10);106 function gltfModel(props) {107 _classCallCheck(this, gltfModel);108 var _this10 = _possibleConstructorReturn(this, (gltfModel.__proto__ || Object.getPrototypeOf(gltfModel)).call(this, props));109 _this10.primitiveName = 'a-gltf-model';110 return _this10;111 }112 return gltfModel;113}(_core.Entity);114var Icosahedron = exports.Icosahedron = function (_Entity11) {115 _inherits(Icosahedron, _Entity11);116 function Icosahedron(props) {117 _classCallCheck(this, Icosahedron);118 var _this11 = _possibleConstructorReturn(this, (Icosahedron.__proto__ || Object.getPrototypeOf(Icosahedron)).call(this, props));119 _this11.primitiveName = 'a-icosahedron';120 return _this11;121 }122 return Icosahedron;123}(_core.Entity);124var Image = exports.Image = function (_Entity12) {125 _inherits(Image, _Entity12);126 function Image(props) {127 _classCallCheck(this, Image);128 var _this12 = _possibleConstructorReturn(this, (Image.__proto__ || Object.getPrototypeOf(Image)).call(this, props));129 _this12.primitiveName = 'a-image';130 return _this12;131 }132 return Image;133}(_core.Entity);134var Light = exports.Light = function (_Entity13) {135 _inherits(Light, _Entity13);136 function Light(props) {137 _classCallCheck(this, Light);138 var _this13 = _possibleConstructorReturn(this, (Light.__proto__ || Object.getPrototypeOf(Light)).call(this, props));139 _this13.primitiveName = 'a-light';140 return _this13;141 }142 return Light;143}(_core.Entity);144var Link = exports.Link = function (_Entity14) {145 _inherits(Link, _Entity14);146 function Link(props) {147 _classCallCheck(this, Link);148 var _this14 = _possibleConstructorReturn(this, (Link.__proto__ || Object.getPrototypeOf(Link)).call(this, props));149 _this14.primitiveName = 'a-link';150 return _this14;151 }152 return Link;153}(_core.Entity);154var ObjModel = exports.ObjModel = function (_Entity15) {155 _inherits(ObjModel, _Entity15);156 function ObjModel(props) {157 _classCallCheck(this, ObjModel);158 var _this15 = _possibleConstructorReturn(this, (ObjModel.__proto__ || Object.getPrototypeOf(ObjModel)).call(this, props));159 _this15.primitiveName = 'a-obj-model';160 return _this15;161 }162 return ObjModel;163}(_core.Entity);164var Octahedron = exports.Octahedron = function (_Entity16) {165 _inherits(Octahedron, _Entity16);166 function Octahedron(props) {167 _classCallCheck(this, Octahedron);168 var _this16 = _possibleConstructorReturn(this, (Octahedron.__proto__ || Object.getPrototypeOf(Octahedron)).call(this, props));169 _this16.primitiveName = 'a-octahedron';170 return _this16;171 }172 return Octahedron;173}(_core.Entity);174var Plane = exports.Plane = function (_Entity17) {175 _inherits(Plane, _Entity17);176 function Plane(props) {177 _classCallCheck(this, Plane);178 var _this17 = _possibleConstructorReturn(this, (Plane.__proto__ || Object.getPrototypeOf(Plane)).call(this, props));179 _this17.primitiveName = 'a-plane';180 return _this17;181 }182 return Plane;183}(_core.Entity);184var Ring = exports.Ring = function (_Entity18) {185 _inherits(Ring, _Entity18);186 function Ring(props) {187 _classCallCheck(this, Ring);188 var _this18 = _possibleConstructorReturn(this, (Ring.__proto__ || Object.getPrototypeOf(Ring)).call(this, props));189 _this18.primitiveName = 'a-ring';190 return _this18;191 }192 return Ring;193}(_core.Entity);194var Sky = exports.Sky = function (_Entity19) {195 _inherits(Sky, _Entity19);196 function Sky(props) {197 _classCallCheck(this, Sky);198 var _this19 = _possibleConstructorReturn(this, (Sky.__proto__ || Object.getPrototypeOf(Sky)).call(this, props));199 _this19.primitiveName = 'a-sky';200 return _this19;201 }202 return Sky;203}(_core.Entity);204var Sound = exports.Sound = function (_Entity20) {205 _inherits(Sound, _Entity20);206 function Sound(props) {207 _classCallCheck(this, Sound);208 var _this20 = _possibleConstructorReturn(this, (Sound.__proto__ || Object.getPrototypeOf(Sound)).call(this, props));209 _this20.primitiveName = 'a-sound';210 return _this20;211 }212 return Sound;213}(_core.Entity);214var Sphere = exports.Sphere = function (_Entity21) {215 _inherits(Sphere, _Entity21);216 function Sphere(props) {217 _classCallCheck(this, Sphere);218 var _this21 = _possibleConstructorReturn(this, (Sphere.__proto__ || Object.getPrototypeOf(Sphere)).call(this, props));219 _this21.primitiveName = 'a-sphere';220 return _this21;221 }222 return Sphere;223}(_core.Entity);224var Tetrahedron = exports.Tetrahedron = function (_Entity22) {225 _inherits(Tetrahedron, _Entity22);226 function Tetrahedron(props) {227 _classCallCheck(this, Tetrahedron);228 var _this22 = _possibleConstructorReturn(this, (Tetrahedron.__proto__ || Object.getPrototypeOf(Tetrahedron)).call(this, props));229 _this22.primitiveName = 'a-tetrahedron';230 return _this22;231 }232 return Tetrahedron;233}(_core.Entity);234var Text = exports.Text = function (_Entity23) {235 _inherits(Text, _Entity23);236 function Text(props) {237 _classCallCheck(this, Text);238 var _this23 = _possibleConstructorReturn(this, (Text.__proto__ || Object.getPrototypeOf(Text)).call(this, props));239 _this23.primitiveName = 'a-text';240 return _this23;241 }242 return Text;243}(_core.Entity);244var TorusKnot = exports.TorusKnot = function (_Entity24) {245 _inherits(TorusKnot, _Entity24);246 function TorusKnot(props) {247 _classCallCheck(this, TorusKnot);248 var _this24 = _possibleConstructorReturn(this, (TorusKnot.__proto__ || Object.getPrototypeOf(TorusKnot)).call(this, props));249 _this24.primitiveName = 'a-torus-knot';250 return _this24;251 }252 return TorusKnot;253}(_core.Entity);254var Torus = exports.Torus = function (_Entity25) {255 _inherits(Torus, _Entity25);256 function Torus(props) {257 _classCallCheck(this, Torus);258 var _this25 = _possibleConstructorReturn(this, (Torus.__proto__ || Object.getPrototypeOf(Torus)).call(this, props));259 _this25.primitiveName = 'a-torus';260 return _this25;261 }262 return Torus;263}(_core.Entity);264var Triangle = exports.Triangle = function (_Entity26) {265 _inherits(Triangle, _Entity26);266 function Triangle(props) {267 _classCallCheck(this, Triangle);268 var _this26 = _possibleConstructorReturn(this, (Triangle.__proto__ || Object.getPrototypeOf(Triangle)).call(this, props));269 _this26.primitiveName = 'a-triangle';270 return _this26;271 }272 return Triangle;273}(_core.Entity);274var Video = exports.Video = function (_Entity27) {275 _inherits(Video, _Entity27);276 function Video(props) {277 _classCallCheck(this, Video);278 var _this27 = _possibleConstructorReturn(this, (Video.__proto__ || Object.getPrototypeOf(Video)).call(this, props));279 _this27.primitiveName = 'a-video';280 return _this27;281 }282 return Video;283}(_core.Entity);284var Videosphere = exports.Videosphere = function (_Entity28) {285 _inherits(Videosphere, _Entity28);286 function Videosphere(props) {287 _classCallCheck(this, Videosphere);288 var _this28 = _possibleConstructorReturn(this, (Videosphere.__proto__ || Object.getPrototypeOf(Videosphere)).call(this, props));289 _this28.primitiveName = 'a-videosphere';290 return _this28;291 }292 return Videosphere;...

Full Screen

Full Screen

ojdataprovideradapter-base.js

Source:ojdataprovideradapter-base.js Github

copy

Full Screen

...6 */7define(['ojs/ojcore', 'jquery', 'ojs/ojeventtarget', 'ojs/ojdataprovider'], function(oj, $)8{9 "use strict";10function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }11function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }12function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }13var DataSourceAdapter =14/*#__PURE__*/15function () {16 function DataSourceAdapter(dataSource) {17 _classCallCheck(this, DataSourceAdapter);18 this.dataSource = dataSource;19 this.AsyncIterable =20 /*#__PURE__*/21 function () {22 function _class(_asyncIterator) {23 _classCallCheck(this, _class);24 this._asyncIterator = _asyncIterator;25 this[Symbol.asyncIterator] = function () {26 return this._asyncIterator;27 };28 }29 return _class;30 }();31 this.AsyncIterator =32 /*#__PURE__*/33 function () {34 function _class2(_nextFunc, _params) {35 _classCallCheck(this, _class2);36 this._nextFunc = _nextFunc;37 this._params = _params;38 this._fetchFirst = true;39 }40 _createClass(_class2, [{41 key: 'next',42 value: function next() {43 var fetchFirst = this._fetchFirst;44 this._fetchFirst = false;45 return this._nextFunc(this._params, fetchFirst);46 }47 }]);48 return _class2;49 }();50 this.AsyncIteratorYieldResult =51 /*#__PURE__*/52 function () {53 function _class3(_parent, value) {54 _classCallCheck(this, _class3);55 this._parent = _parent;56 this.value = value;57 this[DataSourceAdapter._VALUE] = value;58 this[DataSourceAdapter._DONE] = false;59 }60 return _class3;61 }();62 this.AsyncIteratorReturnResult =63 /*#__PURE__*/64 function () {65 function _class4(_parent, value) {66 _classCallCheck(this, _class4);67 this._parent = _parent;68 this.value = value;69 this[DataSourceAdapter._VALUE] = value;70 this[DataSourceAdapter._DONE] = true;71 }72 return _class4;73 }();74 this.FetchListResult =75 /*#__PURE__*/76 function () {77 function _class5(_parent, fetchParameters, data, metadata) {78 _classCallCheck(this, _class5);79 this._parent = _parent;80 this.fetchParameters = fetchParameters;81 this.data = data;82 this.metadata = metadata;83 this[DataSourceAdapter._FETCHPARAMETERS] = fetchParameters;84 this[DataSourceAdapter._DATA] = data;85 this[DataSourceAdapter._METADATA] = metadata;86 }87 return _class5;88 }();89 this.ItemMetadata =90 /*#__PURE__*/91 function () {92 function _class6(_parent, key) {93 _classCallCheck(this, _class6);94 this._parent = _parent;95 this.key = key;96 this[DataSourceAdapter._KEY] = key;97 }98 return _class6;99 }();100 this.SortCriterion =101 /*#__PURE__*/102 function () {103 function _class7(_parent, attribute, direction) {104 _classCallCheck(this, _class7);105 this._parent = _parent;106 this.attribute = attribute;107 this.direction = direction;108 this[DataSourceAdapter._ATTRIBUTE] = attribute;109 this[DataSourceAdapter._DIRECTION] = direction;110 }111 return _class7;112 }();113 this.DataProviderMutationEventDetail =114 /*#__PURE__*/115 function () {116 function _class8(_parent, add, remove, update) {117 _classCallCheck(this, _class8);118 this._parent = _parent;119 this.add = add;120 this.remove = remove;121 this.update = update;122 this[DataSourceAdapter._ADD] = add;123 this[DataSourceAdapter._REMOVE] = remove;124 this[DataSourceAdapter._UPDATE] = update;125 }126 return _class8;127 }();128 this.DataProviderOperationEventDetail =129 /*#__PURE__*/130 function () {131 function _class9(_parent, keys, metadata, data, indexes) {132 _classCallCheck(this, _class9);133 this._parent = _parent;134 this.keys = keys;135 this.metadata = metadata;136 this.data = data;137 this.indexes = indexes;138 this[DataSourceAdapter._KEYS] = keys;139 this[DataSourceAdapter._METADATA] = metadata;140 this[DataSourceAdapter._DATA] = data;141 this[DataSourceAdapter._INDEXES] = indexes;142 }143 return _class9;144 }();145 this.DataProviderAddOperationEventDetail =146 /*#__PURE__*/147 function () {148 function _class10(_parent, keys, afterKeys, addBeforeKeys, parentKeys, metadata, data, indexes) {149 _classCallCheck(this, _class10);150 this._parent = _parent;151 this.keys = keys;152 this.afterKeys = afterKeys;153 this.addBeforeKeys = addBeforeKeys;154 this.parentKeys = parentKeys;155 this.metadata = metadata;156 this.data = data;157 this.indexes = indexes;158 this[DataSourceAdapter._KEYS] = keys;159 this[DataSourceAdapter._AFTERKEYS] = afterKeys;160 this[DataSourceAdapter._ADDBEFOREKEYS] = addBeforeKeys;161 this[DataSourceAdapter._METADATA] = metadata;162 this[DataSourceAdapter._DATA] = data;163 this[DataSourceAdapter._INDEXES] = indexes;...

Full Screen

Full Screen

oas30Types.js

Source:oas30Types.js Github

copy

Full Screen

...5 * This is the root document object of the OpenAPI definition.6 */7var Model = function Model () {8 var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Info()9 _classCallCheck(this, Model)10 this.openapi = '3.0.0'11 this.info = info12 this.servers = []13 this.paths = {}14 this.components = new Components()15}16module.exports.Model = Model17/**18 * The object provides metadata about the API. The metadata MAY be used by the clients if19 * needed, and MAY be presented in editing or documentation generation tools for20 * convenience.21 */22var Info = function Info () {23 var title = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''24 var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''25 _classCallCheck(this, Info)26 this.title = title27 this.version = version28}29module.exports.Info = Info30var Contact = function Contact () {31 _classCallCheck(this, Contact)32}33module.exports.Contact = Contact34var License = function License () {35 var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''36 _classCallCheck(this, License)37 this.name = name38}39module.exports.License = License40var Server = function Server (url) {41 _classCallCheck(this, Server)42 this.url = url43}44module.exports.Server = Server45var ServerVariable = function ServerVariable (default_) {46 _classCallCheck(this, ServerVariable)47 this.default = default_48}49module.exports.ServerVariable = ServerVariable50var Components = function Components () {51 _classCallCheck(this, Components)52 this.schemas = {}53 this.responses = {}54 this.parameters = {}55 this.examples = {}56 this.requestBodies = {}57 this.headers = {}58 this.securitySchemes = {}59 this.links = {}60 this.callbacks = {}61}62module.exports.Components = Components63var PathItem = function PathItem () {64 _classCallCheck(this, PathItem)65}66module.exports.PathItem = PathItem67var Operation = function Operation () {68 var responses = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { default: new Response('') }69 _classCallCheck(this, Operation)70 this.responses = responses71}72module.exports.Operation = Operation73var ExternalDocumentation = function ExternalDocumentation (url) {74 _classCallCheck(this, ExternalDocumentation)75 this.url = url76}77module.exports.ExternalDocumentation = ExternalDocumentation78/**79 * Describes a single operation parameter.80 *81 * A unique parameter is defined by a combination of a name and location.82 */83var Parameter = function Parameter (name, in_) {84 var required = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false85 _classCallCheck(this, Parameter)86 this.name = name87 this.in = in_88 this.required = required89}90module.exports.Parameter = Parameter91var RequestBody = function RequestBody (content) {92 _classCallCheck(this, RequestBody)93 this.content = content94}95module.exports.RequestBody = RequestBody96var MediaType = function MediaType () {97 _classCallCheck(this, MediaType)98}99module.exports.MediaType = MediaType100var Encoding = function Encoding () {101 _classCallCheck(this, Encoding)102}103module.exports.Encoding = Encoding104var Response = function Response (description) {105 _classCallCheck(this, Response)106 this.description = description107}108module.exports.Response = Response109var Example = function Example () {110 _classCallCheck(this, Example)111}112module.exports.Example = Example113var Link = function Link () {114 _classCallCheck(this, Link)115}116module.exports.Link = Link117// params without name and in118var Header = function Header (required) {119 _classCallCheck(this, Header)120 this.required = required121}122module.exports.Header = Header123var Tag = function Tag (name) {124 _classCallCheck(this, Tag)125 this.name = name126}127module.exports.Tag = Tag128var Reference = function Reference ($ref) {129 _classCallCheck(this, Reference)130 this.$ref = $ref131}132module.exports.Reference = Reference133// JSON Schema134var Discriminator = function Discriminator (propertyName) {135 _classCallCheck(this, Discriminator)136 this.propertyName = propertyName137}138module.exports.Discriminator = Discriminator139/**140 * A metadata object that allows for more fine-tuned XML model definitions.141 *142 * When using arrays; XML element names are not inferred (for singular/plural forms) and143 * the name property SHOULD be used to add that information. See examples for expected behavior.144 */145var XML = function XML () {146 _classCallCheck(this, XML)147}148module.exports.XML = XML149var SecurityScheme = function SecurityScheme (type) {150 _classCallCheck(this, SecurityScheme)151 this.type = type152}153module.exports.SecurityScheme = SecurityScheme154var OAuthFlows = function OAuthFlows () {155 _classCallCheck(this, OAuthFlows)156}157module.exports.OAuthFlows = OAuthFlows158var OAuthFlow = function OAuthFlow () {159 _classCallCheck(this, OAuthFlow)160}...

Full Screen

Full Screen

test-backend.js

Source:test-backend.js Github

copy

Full Screen

1(function(___scope___) { var $isBackend = ___scope___.isNode; var realm = ___scope___.realm;2"use strict";3var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();4function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }5realm.module("$custom", [], function () {6 var $_exports;7 $_exports = function Pukka() {8 _classCallCheck(this, Pukka);9 };10 return $_exports;11});12realm.module("test.MySuperClass", ["myapp.myModule", "myapp.utils.lodash"], function (myModule, _) {13 var $_exports;14 var MySuperClass = function MySuperClass() {15 _classCallCheck(this, MySuperClass);16 };17 $_exports = MySuperClass;18 return $_exports;19});20realm.module("test.route.MainRoute", ["realm.router.path", "realm.router.inject", "realm.router.assert", "realm.router.cors", "test.route.Permissions"], function (path, inject, assert, cors, Permissions) {21 var _dec, _dec2, _dec3, _class;22 var $_exports;23 var MainRoute = (_dec = cors(), _dec2 = path("/"), _dec3 = inject(Permissions, '$permission'), _dec(_class = _dec2(_class = _dec3(_class = function () {24 function MainRoute() {25 _classCallCheck(this, MainRoute);26 }27 _createClass(MainRoute, null, [{28 key: "get",29 value: function get($query, $permission) {30 return {31 a: $permission32 };33 }34 }, {35 key: "post",36 value: function post() {}37 }]);38 return MainRoute;39 }()) || _class) || _class) || _class);40 ;41 $_exports = MainRoute;42 return $_exports;43});44realm.module("test.route.Permissions", ["realm.router.inject", "test.route.SomeStuff"], function (inject, SomeStuff) {45 var _dec4, _class2;46 var $_exports;47 var Permission = (_dec4 = inject(SomeStuff), _dec4(_class2 = function () {48 function Permission() {49 _classCallCheck(this, Permission);50 }51 _createClass(Permission, null, [{52 key: "inject",53 value: function inject($req, $attrs, SomeStuff) {54 return { "permission yee": "hello world", something: SomeStuff, attrs: $attrs };55 }56 }]);57 return Permission;58 }()) || _class2);59 $_exports = Permission;60 return $_exports;61});62realm.module("test.route.SomeStuff", [], function () {63 var $_exports;64 var SomeStuff = function () {65 function SomeStuff() {66 _classCallCheck(this, SomeStuff);67 }68 _createClass(SomeStuff, null, [{69 key: "inject",70 value: function inject($req) {71 return "some stuff from SomeStuff";72 }73 }]);74 return SomeStuff;75 }();76 $_exports = SomeStuff;77 return $_exports;78});79realm.module("test.app.components.FirstComponent", ["test.app.helpers.SuperUtils"], function (utils) {80 var $_exports;81 $_exports = function $_exports() {82 _classCallCheck(this, $_exports);83 };84 return $_exports;85});86realm.module("test.app.components.SecondComponent", ["test.app.helpers.UserInteractionUtils", "test.app.helpers.SuperUtils"], function (myUtls, utils) {87 var $_exports;88 $_exports = function $_exports() {89 _classCallCheck(this, $_exports);90 };91 return $_exports;92});93realm.module("test.app.helpers.SuperUtils", [], function () {94 var $_exports;95 $_exports = function $_exports() {96 _classCallCheck(this, $_exports);97 };98 return $_exports;99});100realm.module("test.app.helpers.UserInteractionUtils", [], function () {101 var $_exports;102 $_exports = function $_exports() {103 _classCallCheck(this, $_exports);104 };105 return $_exports;106});...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1const{ _classCallCheck } = require('playwright/lib/utils/utils');2class Test {3 constructor() {4 _classCallCheck(this, Test);5 }6}7const { _classCallCheck } = require('playwright/lib/utils/utils');8class Test {9 constructor() {10 _classCallCheck(this, Test);11 }12}13const { _classCallCheck } = require('playwright/lib/utils/utils');

Full Screen

Using AI Code Generation

copy

Full Screen

1conss Test {2 constructor() {3 _classCallCheck(this, Test);4 }5}6const { _classCallCheck } = require('playwright/lib/utils/utils');7class Test {8 constructor() {9 _classCallCheck(this, Test);10 }11}

Full Screen

Using AI Code Generation

copy

Full Screen

1const { _classCallCheck } = require('playwright/lib/utils/utils');2class TestClass {3 constructor() {4 _classCallCheck(this, TestClass);5 }6}7module.exports = TestClass;8const TestClass = require('./test');9const testClass = new TestClass();10@pavankjadda I think this is the right way to use it. We don’t .jsh);11class Test {12 constructor() {13 _classCallCheck(this, Test);14 }15}16module.exports = { Test };17const { Test } = require('./test');18const test = new Test();

Full Screen

Using AI Code Generation

copy

Full Screen

1const _classCallCheck } = require('playwright/lib/utils/utils');2classTMyClassh{3 _classCallCheck(this, MyClass);4 }5}6const { _classCallCheck } = require('playwright/lib/utils/utils');y @mxschmitt. I am using this in my codebase and it works fine. I am just afraid that it might break in future versions of Playwright. Is there any way to know if this is going to break in future versions of Playwright?7classMyClass {8constructor(){9MyClass);10 }11}12The Node.js module should be created in the test folder. Now, we can use the require() function to import the _classCallCheck method

Full Screen

Using AI Code Generation

copy

Full Screen

1const { _classCallCheck } = require('playwright/lib/utils/utils.js');2class Test {3 constructor() {4 _classCallCheck(this, Test);5 }6}7module.exports = { Test };8const { Test } = require('./test');9const test = new Test();

Full Screen

Using AI Code Generation

copy

Full Screen

1const { _classCallCheck } = require('playwright/lib/utils/utils');2class PlaywrightInternal {3 constructor() {4 _classCallCheck(this, PlaywrightInternal);5 }6}7module.exports = PlaywrightInternal;8const PlaywrightInternal = require('./test');9describe('Playwright Internal', () => {10 it('should use _classCallCheck method of Playwright Internal', async () => {11 const playwrightInternal = new PlaywrightInternal();12 console.log(playwrightInternal);13 });14});15PlaywrightInternal {16 _events: [Object: null prototype] {},17}

Full Screen

Using AI Code Generation

copy

Full Screen

1const { _classCallCheck } = require('playwright/lib/utils/utils');2class Test {3 constructor() {4 _classCallCheck(this, Test);5 }6}7const test = new Test();8console.log(test);9const { _classCallCheck } = require('playwright/lib/utils/utils');10class Test {11 constructor() {12 _classCallCheck(this, Test);13 }14}15const test = new Test();16console.log(test);17const { _classCallCheck } = require('playwright/lib/utils/utils');18class Test {19 constructor() {20 _classCallCheck(this, Test);21 }22}23const test = new Test();24console.log(test);25const { _classCallCheck } = require('playwright/lib/utils/utils');26class Test {27 constructor() {28 _classCallCheck(this, Test);29 }30}31const test = new Test();32console.log(test);33const { _classCallCheck } = require('playwright/lib/utils/utils');34class Test {35 constructor() {36 _classCallCheck(this, Test);37 }38}39const test = new Test();40console.log(test);41const { _classCallCheck } = require('playwright/lib/utils/utils');42class Test {43 constructor() {44 _classCallCheck(this, Test);45 }46}47const test = new Test();48console.log(test);49const { _classCallCheck } = require('playwright/lib/utils/utils');50class Test {51 constructor() {52 _classCallCheck(this, Test);53 }54}55const test = new Test();56console.log(test);57const { _classCallCheck } = require('playwright/lib/utils/utils');58class Test {59 constructor() {60 _classCallCheck(this, Test);61 }62}63const test = new Test();64console.log(test);

Full Screen

Using AI Code Generation

copy

Full Screen

1const { _classCallCheck } = require("playwright/lib/client/helper");2class Test {3 constructor() {4 _classCallCheck(this, Test);5 }6}7const { _classCallCheck } = require("playwright/lib/client/helper");8class Test {9 constructor() {10 _classCallCheck(this, Test);11 }12}13const { _classCallCheck } = require("playwright/lib/client/helper");14class Test {15 constructor() {16 _classCallCheck(this, Test);17 }18}19const { _classCallCheck } = require("playwright/lib/client/helper");20class Test {21 constructor() {22const { _classCallCheck } l require('playwright/lib/utils/utils')assCallCheck(this, Test);23const { ElementHandle } = require('playwright/lib/JSHandle') }24}nternal25const { _classCallCheck } = require('playwright/lib/utils/utils')26const { ElemeHandle } = requir('playwight/lib/JSHandle')27class MyElementHandle extends ElemetHnde {28 constructor(...args) {29 super(...args)30 _classCallCheck(this, MyElementHandle)31 }32}33const { chromium } = require('playwright')34const MyElementHandle = require('./test')35const main = async () => {36 const browser = await chromium.launch()37 const page = await browser.newPage()38 const myElementHandle = new MyElementHandle(page, 'div')39 console.log('myElementHandle', myElementHandle)40 await browser.close()41}42main()

Full Screen

Using AI Code Generation

copy

Full Screen

1const { _classCallCheck } = require("playwright/lib/client/helper");2class Test {3 constructor() {4 _classCallCheck(this, Test);5 }6}7const { _classCallCheck } = require("playwright/lib/client/helper");8class Test {9 constructor() {10 _classCallCheck(this, Test);11 }12}13const { _classCallCheck } = require("playwright/lib/client/helper");14class Test {15 constructor() {16 _classCallCheck(this, Test);17 }18}19const { _classCallCheck } = require("playwright/lib/client/helper");20class Test {21 constructor() {22 _classCallCheck(this, Test);

Full Screen

Using AI Code Generation

copy

Full Screen

1cons { _classCallCck } =require('t/lib/utils/utils');2const { _classCallCheck } = require('playwright/lib/utils/utils');3}4const { _classCallCheck } = require("playwright/lib/client/helper");5class Test {6 constructor() {7 _classCallCheck(this, Test);8 }9}10const { _classCallCheck } = require("playwright/lib/client/helper");11class Test {12 constructor() {13 _classCallCheck(this, Test);14 }15}16const { _classCallCheck } = require("playwright/lib/client/helper");17class Test {18 constructor() {19 _classCallCheck(this, Test);20 }21}22const { _classCallCheck } = require("playwright/lib/client/helper");23class Test {24 constructor() {25 _classCallCheck(this

Full Screen

Using AI Code Generation

copy

Full Screen

1const { _classCallCheck } = require('playwright/lib/utils/utils')2const { ElementHandle } = require('playwright/lib/JSHandle')3const { _classCallCheck } = require('playwright/lib/utils/utils')4const { ElementHandle } = require('playwright/lib/JSHandle')5class MyElementHandle extends ElementHandle {6 constructor(...args) {7 super(...args)8 _classCallCheck(this, MyElementHandle)9 }10}11const { chromium } = require('playwright')12const MyElementHandle = require('./test')13const main = async () => {14 const browser = await chromium.launch()15 const page = await browser.newPage()16 const myElementHandle = new MyElementHandle(page, 'div')17 console.log('myElementHandle', myElementHandle)18 await browser.close()19}20main()

Full Screen

Using AI Code Generation

copy

Full Screen

1const { _classCallCheck } = require('playwright/lib/utils/utils.js');2class Test {3 constructor() {4 _classCallCheck(this, Test);5 }6}7new Test();

Full Screen

Playwright tutorial

LambdaTest’s Playwright tutorial will give you a broader idea about the Playwright automation framework, its unique features, and use cases with examples to exceed your understanding of Playwright testing. This tutorial will give A to Z guidance, from installing the Playwright framework to some best practices and advanced concepts.

Chapters:

  1. What is Playwright : Playwright is comparatively new but has gained good popularity. Get to know some history of the Playwright with some interesting facts connected with it.
  2. How To Install Playwright : Learn in detail about what basic configuration and dependencies are required for installing Playwright and run a test. Get a step-by-step direction for installing the Playwright automation framework.
  3. Playwright Futuristic Features: Launched in 2020, Playwright gained huge popularity quickly because of some obliging features such as Playwright Test Generator and Inspector, Playwright Reporter, Playwright auto-waiting mechanism and etc. Read up on those features to master Playwright testing.
  4. What is Component Testing: Component testing in Playwright is a unique feature that allows a tester to test a single component of a web application without integrating them with other elements. Learn how to perform Component testing on the Playwright automation framework.
  5. Inputs And Buttons In Playwright: Every website has Input boxes and buttons; learn about testing inputs and buttons with different scenarios and examples.
  6. Functions and Selectors in Playwright: Learn how to launch the Chromium browser with Playwright. Also, gain a better understanding of some important functions like “BrowserContext,” which allows you to run multiple browser sessions, and “newPage” which interacts with a page.
  7. Handling Alerts and Dropdowns in Playwright : Playwright interact with different types of alerts and pop-ups, such as simple, confirmation, and prompt, and different types of dropdowns, such as single selector and multi-selector get your hands-on with handling alerts and dropdown in Playright testing.
  8. Playwright vs Puppeteer: Get to know about the difference between two testing frameworks and how they are different than one another, which browsers they support, and what features they provide.
  9. Run Playwright Tests on LambdaTest: Playwright testing with LambdaTest leverages test performance to the utmost. You can run multiple Playwright tests in Parallel with the LammbdaTest test cloud. Get a step-by-step guide to run your Playwright test on the LambdaTest platform.
  10. Playwright Python Tutorial: Playwright automation framework support all major languages such as Python, JavaScript, TypeScript, .NET and etc. However, there are various advantages to Python end-to-end testing with Playwright because of its versatile utility. Get the hang of Playwright python testing with this chapter.
  11. Playwright End To End Testing Tutorial: Get your hands on with Playwright end-to-end testing and learn to use some exciting features such as TraceViewer, Debugging, Networking, Component testing, Visual testing, and many more.
  12. Playwright Video Tutorial: Watch the video tutorials on Playwright testing from experts and get a consecutive in-depth explanation of Playwright automation testing.

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful