How to use aa method in storybook-root

Best JavaScript code snippet using storybook-root

recognizer.spec.ts

Source:recognizer.spec.ts Github

copy

Full Screen

1import {2 ConfigurableRoute,3 DefaultRouteRecognizer,4 Endpoint,5 RecognizedRoute,6} from "./recognizer.js";7import { expect } from "chai";8describe(DefaultRouteRecognizer.name, function () {9 interface RecognizeSpec {10 routes: string[];11 tests: [string, string | null, Record<string, string | undefined> | null][];12 }13 const recognizeSpecs: RecognizeSpec[] = [14 // #region 1-depth static routes15 {16 routes: [""],17 tests: [18 ["", "", null],19 ["a", null, null],20 ],21 },22 {23 routes: ["a"],24 tests: [25 ["", null, null],26 ["a", "a", null],27 ["b", null, null],28 ["aa", null, null],29 ],30 },31 {32 routes: ["", "a"],33 tests: [34 ["", "", null],35 ["a", "a", null],36 ["b", null, null],37 ["aa", null, null],38 ],39 },40 {41 routes: ["aa"],42 tests: [43 ["", null, null],44 ["a", null, null],45 ["aa", "aa", null],46 ["ab", null, null],47 ["ba", null, null],48 ["aaa", null, null],49 ],50 },51 {52 routes: ["aaa"],53 tests: [54 ["", null, null],55 ["a", null, null],56 ["aa", null, null],57 ["aaa", "aaa", null],58 ["aab", null, null],59 ["baa", null, null],60 ["aba", null, null],61 ["aaaa", null, null],62 ],63 },64 {65 routes: ["a", "aa"],66 tests: [67 ["", null, null],68 ["a", "a", null],69 ["aa", "aa", null],70 ["aaa", null, null],71 ],72 },73 {74 routes: ["a", "aaa"],75 tests: [76 ["", null, null],77 ["a", "a", null],78 ["aa", null, null],79 ["aaa", "aaa", null],80 ["aaaa", null, null],81 ],82 },83 {84 routes: ["aa", "aaa"],85 tests: [86 ["", null, null],87 ["a", null, null],88 ["aa", "aa", null],89 ["aaa", "aaa", null],90 ["aaaa", null, null],91 ],92 },93 {94 routes: ["a", "aa", "aaa"],95 tests: [96 ["", null, null],97 ["a", "a", null],98 ["aa", "aa", null],99 ["aaa", "aaa", null],100 ["aaaa", null, null],101 ],102 },103 // #endregion104 // #region 2-depth static routes105 {106 routes: ["a/a"],107 tests: [108 ["", null, null],109 ["a", null, null],110 ["aa", null, null],111 ["aaa", null, null],112 ["a/a", "a/a", null],113 ["a/b", null, null],114 ["b/a", null, null],115 ],116 },117 {118 routes: ["", "a/a"],119 tests: [120 ["", "", null],121 ["a", null, null],122 ["aa", null, null],123 ["aaa", null, null],124 ["a/a", "a/a", null],125 ["a/b", null, null],126 ["b/a", null, null],127 ],128 },129 {130 routes: ["aa/a"],131 tests: [132 ["", null, null],133 ["a", null, null],134 ["aa", null, null],135 ["aaa", null, null],136 ["aaaa", null, null],137 ["a/a", null, null],138 ["aa/a", "aa/a", null],139 ["a/aa", null, null],140 ],141 },142 {143 routes: ["a/aa"],144 tests: [145 ["", null, null],146 ["a", null, null],147 ["aa", null, null],148 ["aaa", null, null],149 ["aaaa", null, null],150 ["a/a", null, null],151 ["aa/a", null, null],152 ["a/aa", "a/aa", null],153 ],154 },155 {156 routes: ["aa/aa"],157 tests: [158 ["", null, null],159 ["a", null, null],160 ["aa", null, null],161 ["aaa", null, null],162 ["aaaa", null, null],163 ["aaaaa", null, null],164 ["a/a", null, null],165 ["aa/a", null, null],166 ["a/aa", null, null],167 ["aa/aa", "aa/aa", null],168 ],169 },170 {171 routes: ["a/a", "aa/a"],172 tests: [173 ["", null, null],174 ["a", null, null],175 ["aa", null, null],176 ["aaa", null, null],177 ["aaaa", null, null],178 ["a/a", "a/a", null],179 ["aa/a", "aa/a", null],180 ["a/aa", null, null],181 ],182 },183 {184 routes: ["a/a", "a/aa"],185 tests: [186 ["", null, null],187 ["a", null, null],188 ["aa", null, null],189 ["aaa", null, null],190 ["aaaa", null, null],191 ["a/a", "a/a", null],192 ["aa/a", null, null],193 ["a/aa", "a/aa", null],194 ],195 },196 {197 routes: ["a/a", "aa/aa"],198 tests: [199 ["", null, null],200 ["a", null, null],201 ["aa", null, null],202 ["aaa", null, null],203 ["aaaa", null, null],204 ["aaaaa", null, null],205 ["a/a", "a/a", null],206 ["aa/a", null, null],207 ["a/aa", null, null],208 ["aa/aa", "aa/aa", null],209 ],210 },211 {212 routes: ["a/a", "aa/a", "aa/aa"],213 tests: [214 ["", null, null],215 ["a", null, null],216 ["aa", null, null],217 ["aaa", null, null],218 ["aaaa", null, null],219 ["aaaaa", null, null],220 ["a/a", "a/a", null],221 ["aa/a", "aa/a", null],222 ["a/aa", null, null],223 ["aa/aa", "aa/aa", null],224 ],225 },226 {227 routes: ["a/a", "a/aa", "aa/aa"],228 tests: [229 ["", null, null],230 ["a", null, null],231 ["aa", null, null],232 ["aaa", null, null],233 ["aaaa", null, null],234 ["aaaaa", null, null],235 ["a/a", "a/a", null],236 ["aa/a", null, null],237 ["a/aa", "a/aa", null],238 ["aa/aa", "aa/aa", null],239 ],240 },241 {242 routes: ["a/a", "aa/a", "a/aa", "aa/aa"],243 tests: [244 ["", null, null],245 ["a", null, null],246 ["aa", null, null],247 ["aaa", null, null],248 ["aaaa", null, null],249 ["aaaaa", null, null],250 ["a/a", "a/a", null],251 ["aa/a", "aa/a", null],252 ["a/aa", "a/aa", null],253 ["aa/aa", "aa/aa", null],254 ],255 },256 // #endregion257 // #region mixed 1,2-depth static routes258 {259 routes: ["a", "aa", "aaa", "a/a"],260 tests: [261 ["", null, null],262 ["a", "a", null],263 ["aa", "aa", null],264 ["aaa", "aaa", null],265 ["a/a", "a/a", null],266 ],267 },268 {269 routes: ["", "a", "aa", "aaa", "a/a"],270 tests: [271 ["", "", null],272 ["a", "a", null],273 ["aa", "aa", null],274 ["aaa", "aaa", null],275 ["a/a", "a/a", null],276 ],277 },278 {279 routes: ["a", "aa", "aaa", "aa/a"],280 tests: [281 ["", null, null],282 ["a", "a", null],283 ["aa", "aa", null],284 ["aaa", "aaa", null],285 ["aaaa", null, null],286 ["a/a", null, null],287 ["aa/a", "aa/a", null],288 ["a/aa", null, null],289 ],290 },291 {292 routes: ["a", "aa", "aaa", "a/aa"],293 tests: [294 ["", null, null],295 ["a", "a", null],296 ["aa", "aa", null],297 ["aaa", "aaa", null],298 ["aaaa", null, null],299 ["a/a", null, null],300 ["aa/a", null, null],301 ["a/aa", "a/aa", null],302 ],303 },304 {305 routes: ["a", "aa", "aaa", "aa/aa"],306 tests: [307 ["", null, null],308 ["a", "a", null],309 ["aa", "aa", null],310 ["aaa", "aaa", null],311 ["aaaa", null, null],312 ["aaaaa", null, null],313 ["a/a", null, null],314 ["aa/a", null, null],315 ["a/aa", null, null],316 ["aa/aa", "aa/aa", null],317 ],318 },319 {320 routes: ["a", "aa", "aaa", "a/a", "aa/a"],321 tests: [322 ["", null, null],323 ["a", "a", null],324 ["aa", "aa", null],325 ["aaa", "aaa", null],326 ["aaaa", null, null],327 ["a/a", "a/a", null],328 ["aa/a", "aa/a", null],329 ["a/aa", null, null],330 ],331 },332 {333 routes: ["a", "aa", "aaa", "a/a", "a/aa"],334 tests: [335 ["", null, null],336 ["a", "a", null],337 ["aa", "aa", null],338 ["aaa", "aaa", null],339 ["aaaa", null, null],340 ["a/a", "a/a", null],341 ["aa/a", null, null],342 ["a/aa", "a/aa", null],343 ],344 },345 {346 routes: ["a", "aa", "aaa", "a/a", "aa/aa"],347 tests: [348 ["", null, null],349 ["a", "a", null],350 ["aa", "aa", null],351 ["aaa", "aaa", null],352 ["aaaa", null, null],353 ["aaaaa", null, null],354 ["a/a", "a/a", null],355 ["aa/a", null, null],356 ["a/aa", null, null],357 ["aa/aa", "aa/aa", null],358 ],359 },360 {361 routes: ["a", "aa", "aaa", "a/a", "aa/a", "aa/aa"],362 tests: [363 ["", null, null],364 ["a", "a", null],365 ["aa", "aa", null],366 ["aaa", "aaa", null],367 ["aaaa", null, null],368 ["aaaaa", null, null],369 ["a/a", "a/a", null],370 ["aa/a", "aa/a", null],371 ["a/aa", null, null],372 ["aa/aa", "aa/aa", null],373 ],374 },375 {376 routes: ["a", "aa", "aaa", "a/a", "a/aa", "aa/aa"],377 tests: [378 ["", null, null],379 ["a", "a", null],380 ["aa", "aa", null],381 ["aaa", "aaa", null],382 ["aaaa", null, null],383 ["aaaaa", null, null],384 ["a/a", "a/a", null],385 ["aa/a", null, null],386 ["a/aa", "a/aa", null],387 ["aa/aa", "aa/aa", null],388 ],389 },390 {391 routes: ["a", "aa", "aaa", "a/a", "aa/a", "a/aa", "aa/aa"],392 tests: [393 ["", null, null],394 ["a", "a", null],395 ["aa", "aa", null],396 ["aaa", "aaa", null],397 ["aaaa", null, null],398 ["aaaaa", null, null],399 ["a/a", "a/a", null],400 ["aa/a", "aa/a", null],401 ["a/aa", "a/aa", null],402 ["aa/aa", "aa/aa", null],403 ],404 },405 // #endregion406 // #region 1-depth dynamic routes407 {408 routes: ["{1}"],409 tests: [410 ["", null, null],411 ["a", "{1}", { 1: "a" }],412 ["b", "{1}", { 1: "b" }],413 ["aa", "{1}", { 1: "aa" }],414 ["a/a", null, null],415 ],416 },417 {418 routes: ["", "{1}"],419 tests: [420 ["", "", null],421 ["a", "{1}", { 1: "a" }],422 ["b", "{1}", { 1: "b" }],423 ["aa", "{1}", { 1: "aa" }],424 ["a/a", null, null],425 ],426 },427 {428 routes: ["{1}", "a"],429 tests: [430 ["", null, null],431 ["a", "a", null],432 ["b", "{1}", { 1: "b" }],433 ["aa", "{1}", { 1: "aa" }],434 ["a/a", null, null],435 ],436 },437 {438 routes: ["{1}", "a", "aa"],439 tests: [440 ["", null, null],441 ["a", "a", null],442 ["b", "{1}", { 1: "b" }],443 ["aa", "aa", null],444 ["aaa", "{1}", { 1: "aaa" }],445 ["a/a", null, null],446 ],447 },448 {449 routes: ["{1}", "a", "aaa"],450 tests: [451 ["", null, null],452 ["a", "a", null],453 ["aa", "{1}", { 1: "aa" }],454 ["aaa", "aaa", null],455 ["aaaa", "{1}", { 1: "aaaa" }],456 ["a/a", null, null],457 ],458 },459 {460 routes: ["{1}", "aa", "aaa"],461 tests: [462 ["", null, null],463 ["a", "{1}", { 1: "a" }],464 ["aa", "aa", null],465 ["aaa", "aaa", null],466 ["aaaa", "{1}", { 1: "aaaa" }],467 ["a/a", null, null],468 ],469 },470 {471 routes: ["{1}", "a", "aa", "aaa"],472 tests: [473 ["", null, null],474 ["a", "a", null],475 ["aa", "aa", null],476 ["aaa", "aaa", null],477 ["aaaa", "{1}", { 1: "aaaa" }],478 ["a/a", null, null],479 ],480 },481 // #endregion482 // #region 2-depth dynamic routes483 // d/s484 {485 routes: ["{1}/a", "a/a"],486 tests: [487 ["", null, null],488 ["a", null, null],489 ["aa", null, null],490 ["aaa", null, null],491 ["a/a", "a/a", null],492 ["a/aa", null, null],493 ["aa/a", "{1}/a", { 1: "aa" }],494 ["aa/aa", null, null],495 ["a/a/a", null, null],496 ],497 },498 {499 routes: ["{1}/a", "a/a", "aa/a"],500 tests: [501 ["", null, null],502 ["a", null, null],503 ["aa", null, null],504 ["aaa", null, null],505 ["a/a", "a/a", null],506 ["a/aa", null, null],507 ["aa/a", "aa/a", null],508 ["aaa/a", "{1}/a", { 1: "aaa" }],509 ["aa/aa", null, null],510 ["a/a/a", null, null],511 ],512 },513 // s/d514 {515 routes: ["a/{2}", "a/a"],516 tests: [517 ["", null, null],518 ["a", null, null],519 ["aa", null, null],520 ["aaa", null, null],521 ["a/a", "a/a", null],522 ["a/aa", "a/{2}", { 2: "aa" }],523 ["aa/a", null, null],524 ["aa/aa", null, null],525 ["a/a/a", null, null],526 ],527 },528 {529 routes: ["a/{2}", "a/a", "a/aa"],530 tests: [531 ["", null, null],532 ["a", null, null],533 ["aa", null, null],534 ["aaa", null, null],535 ["a/a", "a/a", null],536 ["a/aa", "a/aa", null],537 ["a/aaa", "a/{2}", { 2: "aaa" }],538 ["aa/a", null, null],539 ["aa/aa", null, null],540 ["a/a/a", null, null],541 ],542 },543 // d/s + s/d544 {545 routes: ["{1}/a", "a/{2}", "a/a"],546 tests: [547 ["", null, null],548 ["a", null, null],549 ["aa", null, null],550 ["aaa", null, null],551 ["a/a", "a/a", null],552 ["a/aa", "a/{2}", { 2: "aa" }],553 ["aa/a", "{1}/a", { 1: "aa" }],554 ["a/a/a", null, null],555 ],556 },557 {558 routes: ["{1}/a", "a/{2}", "a/a", "aa/a"],559 tests: [560 ["", null, null],561 ["a", null, null],562 ["aa", null, null],563 ["aaa", null, null],564 ["a/a", "a/a", null],565 ["a/aa", "a/{2}", { 2: "aa" }],566 ["aa/a", "aa/a", null],567 ["aaa/a", "{1}/a", { 1: "aaa" }],568 ["a/a/a", null, null],569 ],570 },571 {572 routes: ["{1}/a", "a/{2}", "a/a", "a/aa"],573 tests: [574 ["", null, null],575 ["a", null, null],576 ["aa", null, null],577 ["aaa", null, null],578 ["a/a", "a/a", null],579 ["a/aa", "a/aa", null],580 ["a/aaa", "a/{2}", { 2: "aaa" }],581 ["aa/a", "{1}/a", { 1: "aa" }],582 ["a/a/a", null, null],583 ],584 },585 {586 routes: ["{1}/a", "a/{2}", "a/a", "a/aa", "aa/a"],587 tests: [588 ["", null, null],589 ["a", null, null],590 ["aa", null, null],591 ["aaa", null, null],592 ["a/a", "a/a", null],593 ["a/aa", "a/aa", null],594 ["a/aaa", "a/{2}", { 2: "aaa" }],595 ["aa/a", "aa/a", null],596 ["aaa/a", "{1}/a", { 1: "aaa" }],597 ["a/a/a", null, null],598 ],599 },600 // d/d + d/s + s/s601 {602 routes: ["{1}/{2}", "{1}/a", "a/a"],603 tests: [604 ["", null, null],605 ["a", null, null],606 ["aa", null, null],607 ["aaa", null, null],608 ["a/a", "a/a", null],609 ["a/aa", "{1}/{2}", { 1: "a", 2: "aa" }],610 ["aa/a", "{1}/a", { 1: "aa" }],611 ["aa/aa", "{1}/{2}", { 1: "aa", 2: "aa" }],612 ["a/a/a", null, null],613 ],614 },615 // d/d + d/s*2 + s/s616 {617 routes: ["{1}/{2}", "{1}/a", "{1}/aa", "a/a"],618 tests: [619 ["", null, null],620 ["a", null, null],621 ["aa", null, null],622 ["aaa", null, null],623 ["a/a", "a/a", null],624 ["a/aa", "{1}/aa", { 1: "a" }],625 ["a/aaa", "{1}/{2}", { 1: "a", 2: "aaa" }],626 ["aa/a", "{1}/a", { 1: "aa" }],627 ["aa/aa", "{1}/aa", { 1: "aa" }],628 ["aa/aaa", "{1}/{2}", { 1: "aa", 2: "aaa" }],629 ["a/a/a", null, null],630 ],631 },632 // d/d + d/s + s/s*2633 {634 routes: ["{1}/{2}", "{1}/a", "a/a", "aa/a"],635 tests: [636 ["", null, null],637 ["a", null, null],638 ["aa", null, null],639 ["aaa", null, null],640 ["a/a", "a/a", null],641 ["a/aa", "{1}/{2}", { 1: "a", 2: "aa" }],642 ["aa/a", "aa/a", null],643 ["aaa/a", "{1}/a", { 1: "aaa" }],644 ["aa/aa", "{1}/{2}", { 1: "aa", 2: "aa" }],645 ["a/a/a", null, null],646 ],647 },648 // d/d + d/s*2 + s/s*2649 {650 routes: ["{1}/{2}", "{1}/a", "{1}/aa", "a/a", "aa/a"],651 tests: [652 ["", null, null],653 ["a", null, null],654 ["aa", null, null],655 ["aaa", null, null],656 ["a/a", "a/a", null],657 ["a/aa", "{1}/aa", { 1: "a" }],658 ["a/aaa", "{1}/{2}", { 1: "a", 2: "aaa" }],659 ["aa/a", "aa/a", null],660 ["aaa/a", "{1}/a", { 1: "aaa" }],661 ["aa/aa", "{1}/aa", { 1: "aa" }],662 ["aa/aaa", "{1}/{2}", { 1: "aa", 2: "aaa" }],663 ["a/a/a", null, null],664 ],665 },666 // d/d + s/d + s/s667 {668 routes: ["{1}/{2}", "a/{2}", "a/a"],669 tests: [670 ["", null, null],671 ["a", null, null],672 ["aa", null, null],673 ["aaa", null, null],674 ["a/a", "a/a", null],675 ["a/aa", "a/{2}", { 2: "aa" }],676 ["aa/a", "{1}/{2}", { 1: "aa", 2: "a" }],677 ["aa/aa", "{1}/{2}", { 1: "aa", 2: "aa" }],678 ["a/a/a", null, null],679 ],680 },681 // d/d + s/d*2 + s/s682 {683 routes: ["{1}/{2}", "a/{2}", "aa/{2}", "a/a"],684 tests: [685 ["", null, null],686 ["a", null, null],687 ["aa", null, null],688 ["aaa", null, null],689 ["a/a", "a/a", null],690 ["a/aa", "a/{2}", { 2: "aa" }],691 ["aa/a", "aa/{2}", { 2: "a" }],692 ["aa/aa", "aa/{2}", { 2: "aa" }],693 ["aaa/aa", "{1}/{2}", { 1: "aaa", 2: "aa" }],694 ["a/a/a", null, null],695 ],696 },697 // d/d + s/d + s/s*2698 {699 routes: ["{1}/{2}", "a/{2}", "a/a", "a/aa"],700 tests: [701 ["", null, null],702 ["a", null, null],703 ["aa", null, null],704 ["aaa", null, null],705 ["a/a", "a/a", null],706 ["a/aa", "a/aa", null],707 ["a/aaa", "a/{2}", { 2: "aaa" }],708 ["aa/a", "{1}/{2}", { 1: "aa", 2: "a" }],709 ["aa/aa", "{1}/{2}", { 1: "aa", 2: "aa" }],710 ["a/a/a", null, null],711 ],712 },713 // d/d + s/d*2 + s/s*2714 {715 routes: ["{1}/{2}", "a/{2}", "aa/{2}", "a/a", "a/aa"],716 tests: [717 ["", null, null],718 ["a", null, null],719 ["aa", null, null],720 ["aaa", null, null],721 ["a/a", "a/a", null],722 ["a/aa", "a/aa", null],723 ["a/aaa", "a/{2}", { 2: "aaa" }],724 ["aa/a", "aa/{2}", { 2: "a" }],725 ["aa/aa", "aa/{2}", { 2: "aa" }],726 ["aaa/aa", "{1}/{2}", { 1: "aaa", 2: "aa" }],727 ["a/a/a", null, null],728 ],729 },730 // d/d + d/s + s/d + s/s731 {732 routes: ["{1}/{2}", "{1}/a", "a/{2}", "a/a"],733 tests: [734 ["", null, null],735 ["a", null, null],736 ["aa", null, null],737 ["aaa", null, null],738 ["a/a", "a/a", null],739 ["a/aa", "a/{2}", { 2: "aa" }],740 ["aa/a", "{1}/a", { 1: "aa" }],741 ["aa/aa", "{1}/{2}", { 1: "aa", 2: "aa" }],742 ["a/a/a", null, null],743 ],744 },745 // d/d + d/s*2 + s/d + s/s746 {747 routes: ["{1}/{2}", "{1}/a", "{1}/aa", "a/{2}", "a/a"],748 tests: [749 ["", null, null],750 ["a", null, null],751 ["aa", null, null],752 ["aaa", null, null],753 ["a/a", "a/a", null],754 ["a/aa", "a/{2}", { 2: "aa" }],755 ["aa/a", "{1}/a", { 1: "aa" }],756 ["aa/aa", "{1}/aa", { 1: "aa" }],757 ["aa/aaa", "{1}/{2}", { 1: "aa", 2: "aaa" }],758 ["a/a/a", null, null],759 ],760 },761 // d/d + d/s + s/d*2 + s/s762 {763 routes: ["{1}/{2}", "{1}/a", "a/{2}", "aa/{2}", "a/a"],764 tests: [765 ["", null, null],766 ["a", null, null],767 ["aa", null, null],768 ["aaa", null, null],769 ["a/a", "a/a", null],770 ["a/aa", "a/{2}", { 2: "aa" }],771 ["aa/a", "aa/{2}", { 2: "a" }],772 ["aa/aa", "aa/{2}", { 2: "aa" }],773 ["aaa/aa", "{1}/{2}", { 1: "aaa", 2: "aa" }],774 ["a/a/a", null, null],775 ],776 },777 // d/d + d/s*2 + s/d*2 + s/s778 {779 routes: ["{1}/{2}", "{1}/a", "{1}/aa", "a/{2}", "aa/{2}", "a/a"],780 tests: [781 ["", null, null],782 ["a", null, null],783 ["aa", null, null],784 ["aaa", null, null],785 ["a/a", "a/a", null],786 ["a/aa", "a/{2}", { 2: "aa" }],787 ["aa/a", "aa/{2}", { 2: "a" }],788 ["aa/aa", "aa/{2}", { 2: "aa" }],789 ["aa/aaa", "aa/{2}", { 2: "aaa" }],790 ["aaa/aa", "{1}/aa", { 1: "aaa" }],791 ["aaa/aaa", "{1}/{2}", { 1: "aaa", 2: "aaa" }],792 ["a/a/a", null, null],793 ],794 },795 // d/d + d/s + s/d + s/s*2 #1796 {797 routes: ["{1}/{2}", "{1}/a", "a/{2}", "a/a", "aa/a"],798 tests: [799 ["", null, null],800 ["a", null, null],801 ["aa", null, null],802 ["aaa", null, null],803 ["a/a", "a/a", null],804 ["a/aa", "a/{2}", { 2: "aa" }],805 ["aa/a", "aa/a", null],806 ["aa/aa", "{1}/{2}", { 1: "aa", 2: "aa" }],807 ["aaa/a", "{1}/a", { 1: "aaa" }],808 ["a/a/a", null, null],809 ],810 },811 // d/d + d/s*2 + s/d + s/s*2 #1812 {813 routes: ["{1}/{2}", "{1}/a", "{1}/aa", "a/{2}", "a/a", "aa/a"],814 tests: [815 ["", null, null],816 ["a", null, null],817 ["aa", null, null],818 ["aaa", null, null],819 ["a/a", "a/a", null],820 ["a/aa", "a/{2}", { 2: "aa" }],821 ["aa/a", "aa/a", null],822 ["aa/aa", "{1}/aa", { 1: "aa" }],823 ["aa/aaa", "{1}/{2}", { 1: "aa", 2: "aaa" }],824 ["aaa/a", "{1}/a", { 1: "aaa" }],825 ["a/a/a", null, null],826 ],827 },828 // d/d + d/s + s/d*2 + s/s*2 #1829 {830 routes: ["{1}/{2}", "{1}/a", "a/{2}", "aa/{2}", "a/a", "aa/a"],831 tests: [832 ["", null, null],833 ["a", null, null],834 ["aa", null, null],835 ["aaa", null, null],836 ["a/a", "a/a", null],837 ["a/aa", "a/{2}", { 2: "aa" }],838 ["aa/a", "aa/a", null],839 ["aa/aa", "aa/{2}", { 2: "aa" }],840 ["aaa/a", "{1}/a", { 1: "aaa" }],841 ["aaa/aa", "{1}/{2}", { 1: "aaa", 2: "aa" }],842 ["a/a/a", null, null],843 ],844 },845 // d/d + d/s*2 + s/d*2 + s/s*2 #1846 {847 routes: ["{1}/{2}", "{1}/a", "{1}/aa", "a/{2}", "aa/{2}", "a/a", "aa/a"],848 tests: [849 ["", null, null],850 ["a", null, null],851 ["aa", null, null],852 ["aaa", null, null],853 ["a/a", "a/a", null],854 ["a/aa", "a/{2}", { 2: "aa" }],855 ["aa/a", "aa/a", null],856 ["aa/aa", "aa/{2}", { 2: "aa" }],857 ["aa/aaa", "aa/{2}", { 2: "aaa" }],858 ["aaa/a", "{1}/a", { 1: "aaa" }],859 ["aaa/aa", "{1}/aa", { 1: "aaa" }],860 ["aaa/aaa", "{1}/{2}", { 1: "aaa", 2: "aaa" }],861 ["a/a/a", null, null],862 ],863 },864 // d/d + d/s + s/d + s/s*2 #2865 {866 routes: ["{1}/{2}", "{1}/a", "a/{2}", "a/a", "a/aa"],867 tests: [868 ["", null, null],869 ["a", null, null],870 ["aa", null, null],871 ["aaa", null, null],872 ["a/a", "a/a", null],873 ["a/aa", "a/aa", null],874 ["a/aaa", "a/{2}", { 2: "aaa" }],875 ["aa/a", "{1}/a", { 1: "aa" }],876 ["aa/aa", "{1}/{2}", { 1: "aa", 2: "aa" }],877 ["a/a/a", null, null],878 ],879 },880 // d/d + d/s*2 + s/d + s/s*2 #2881 {882 routes: ["{1}/{2}", "{1}/a", "{1}/aa", "a/{2}", "a/a", "a/aa"],883 tests: [884 ["", null, null],885 ["a", null, null],886 ["aa", null, null],887 ["aaa", null, null],888 ["a/a", "a/a", null],889 ["a/aa", "a/aa", null],890 ["a/aaa", "a/{2}", { 2: "aaa" }],891 ["aa/a", "{1}/a", { 1: "aa" }],892 ["aa/aa", "{1}/aa", { 1: "aa" }],893 ["aa/aaa", "{1}/{2}", { 1: "aa", 2: "aaa" }],894 ["a/a/a", null, null],895 ],896 },897 // d/d + d/s + s/d*2 + s/s*2 #2898 {899 routes: ["{1}/{2}", "{1}/a", "a/{2}", "aa/{2}", "a/a", "a/aa"],900 tests: [901 ["", null, null],902 ["a", null, null],903 ["aa", null, null],904 ["aaa", null, null],905 ["a/a", "a/a", null],906 ["a/aa", "a/aa", null],907 ["a/aaa", "a/{2}", { 2: "aaa" }],908 ["aa/a", "aa/{2}", { 2: "a" }],909 ["aa/aa", "aa/{2}", { 2: "aa" }],910 ["aaa/a", "{1}/a", { 1: "aaa" }],911 ["aaa/aa", "{1}/{2}", { 1: "aaa", 2: "aa" }],912 ["a/a/a", null, null],913 ],914 },915 // d/d + d/s*2 + s/d*2 + s/s*2 #2916 {917 routes: ["{1}/{2}", "{1}/a", "{1}/aa", "a/{2}", "aa/{2}", "a/a", "a/aa"],918 tests: [919 ["", null, null],920 ["a", null, null],921 ["aa", null, null],922 ["aaa", null, null],923 ["a/a", "a/a", null],924 ["a/aa", "a/aa", null],925 ["a/aaa", "a/{2}", { 2: "aaa" }],926 ["aa/a", "aa/{2}", { 2: "a" }],927 ["aa/aa", "aa/{2}", { 2: "aa" }],928 ["aa/aaa", "aa/{2}", { 2: "aaa" }],929 ["aaa/a", "{1}/a", { 1: "aaa" }],930 ["aaa/aa", "{1}/aa", { 1: "aaa" }],931 ["aaa/aaa", "{1}/{2}", { 1: "aaa", 2: "aaa" }],932 ["a/a/a", null, null],933 ],934 },935 // d/d + d/s + s/d + s/s*3936 {937 routes: ["{1}/{2}", "{1}/a", "a/{2}", "a/a", "a/aa", "aa/a"],938 tests: [939 ["", null, null],940 ["a", null, null],941 ["aa", null, null],942 ["aaa", null, null],943 ["a/a", "a/a", null],944 ["a/aa", "a/aa", null],945 ["a/aaa", "a/{2}", { 2: "aaa" }],946 ["aa/a", "aa/a", null],947 ["aa/aa", "{1}/{2}", { 1: "aa", 2: "aa" }],948 ["aaa/a", "{1}/a", { 1: "aaa" }],949 ["a/a/a", null, null],950 ],951 },952 // d/d + d/s*2 + s/d + s/s*3953 {954 routes: ["{1}/{2}", "{1}/a", "{1}/aa", "a/{2}", "a/a", "a/aa", "aa/a"],955 tests: [956 ["", null, null],957 ["a", null, null],958 ["aa", null, null],959 ["aaa", null, null],960 ["a/a", "a/a", null],961 ["a/aa", "a/aa", null],962 ["a/aaa", "a/{2}", { 2: "aaa" }],963 ["aa/a", "aa/a", null],964 ["aa/aa", "{1}/aa", { 1: "aa" }],965 ["aa/aaa", "{1}/{2}", { 1: "aa", 2: "aaa" }],966 ["aaa/a", "{1}/a", { 1: "aaa" }],967 ["a/a/a", null, null],968 ],969 },970 // d/d + d/s + s/d*2 + s/s*3971 {972 routes: ["{1}/{2}", "{1}/a", "a/{2}", "aa/{2}", "a/a", "a/aa", "aa/a"],973 tests: [974 ["", null, null],975 ["a", null, null],976 ["aa", null, null],977 ["aaa", null, null],978 ["a/a", "a/a", null],979 ["a/aa", "a/aa", null],980 ["a/aaa", "a/{2}", { 2: "aaa" }],981 ["aa/a", "aa/a", null],982 ["aa/aa", "aa/{2}", { 2: "aa" }],983 ["aaa/a", "{1}/a", { 1: "aaa" }],984 ["aaa/aa", "{1}/{2}", { 1: "aaa", 2: "aa" }],985 ["a/a/a", null, null],986 ],987 },988 // d/d + d/s*2 + s/d*2 + s/s*3989 {990 routes: ["{1}/{2}", "{1}/a", "{1}/aa", "a/{2}", "aa/{2}", "a/a", "a/aa", "aa/a"],991 tests: [992 ["", null, null],993 ["a", null, null],994 ["aa", null, null],995 ["aaa", null, null],996 ["a/a", "a/a", null],997 ["a/aa", "a/aa", null],998 ["a/aaa", "a/{2}", { 2: "aaa" }],999 ["aa/a", "aa/a", null],1000 ["aa/aa", "aa/{2}", { 2: "aa" }],1001 ["aa/aaa", "aa/{2}", { 2: "aaa" }],1002 ["aaa/a", "{1}/a", { 1: "aaa" }],1003 ["aaa/aa", "{1}/aa", { 1: "aaa" }],1004 ["aaa/aaa", "{1}/{2}", { 1: "aaa", 2: "aaa" }],1005 ["a/a/a", null, null],1006 ],1007 },1008 // #endregion1009 {1010 routes: ["{1?}"],1011 tests: [1012 ["", "{1?}", { 1: void 0 }],1013 ["a", "{1?}", { 1: "a" }],1014 ["aa", "{1?}", { 1: "aa" }],1015 ["aaa", "{1?}", { 1: "aaa" }],1016 ["a/a", null, null],1017 ],1018 },1019 // #region 2-depth optional dynamic routes1020 // d/s1021 {1022 routes: ["{1?}/a", "a/a"],1023 tests: [1024 ["", null, null],1025 ["a", "{1?}/a", { 1: void 0 }],1026 ["aa", null, null],1027 ["aaa", null, null],1028 ["a/a", "a/a", null],1029 ["a/aa", null, null],1030 ["aa/a", "{1?}/a", { 1: "aa" }],1031 ["aa/aa", null, null],1032 ["a/a/a", null, null],1033 ],1034 },1035 {1036 routes: ["{1?}/a", "a/a", "aa/a"],1037 tests: [1038 ["", null, null],1039 ["a", "{1?}/a", { 1: void 0 }],1040 ["aa", null, null],1041 ["aaa", null, null],1042 ["a/a", "a/a", null],1043 ["a/aa", null, null],1044 ["aa/a", "aa/a", null],1045 ["aaa/a", "{1?}/a", { 1: "aaa" }],1046 ["aa/aa", null, null],1047 ["a/a/a", null, null],1048 ],1049 },1050 // s/d1051 {1052 routes: ["a/{2?}", "a/a"],1053 tests: [1054 ["", null, null],1055 ["a", "a/{2?}", { 2: void 0 }],1056 ["aa", null, null],1057 ["aaa", null, null],1058 ["a/a", "a/a", null],1059 ["a/aa", "a/{2?}", { 2: "aa" }],1060 ["aa/a", null, null],1061 ["aa/aa", null, null],1062 ["a/a/a", null, null],1063 ],1064 },1065 {1066 routes: ["a/{2?}", "a/a", "a/aa"],1067 tests: [1068 ["", null, null],1069 ["a", "a/{2?}", { 2: void 0 }],1070 ["aa", null, null],1071 ["aaa", null, null],1072 ["a/a", "a/a", null],1073 ["a/aa", "a/aa", null],1074 ["a/aaa", "a/{2?}", { 2: "aaa" }],1075 ["aa/a", null, null],1076 ["aa/aa", null, null],1077 ["a/a/a", null, null],1078 ],1079 },1080 // d/s + s/d1081 {1082 routes: ["{1?}/a", "a/{2?}", "a/a"],1083 tests: [1084 ["", null, null],1085 ["a", "a/{2?}", { 2: void 0 }],1086 ["aa", null, null],1087 ["aaa", null, null],1088 ["a/a", "a/a", null],1089 ["a/aa", "a/{2?}", { 2: "aa" }],1090 ["aa/a", "{1?}/a", { 1: "aa" }],1091 ["a/a/a", null, null],1092 ],1093 },1094 {1095 routes: ["{1?}/a", "a/{2?}", "a/a", "aa/a"],1096 tests: [1097 ["", null, null],1098 ["a", "a/{2?}", { 2: void 0 }],1099 ["aa", null, null],1100 ["aaa", null, null],1101 ["a/a", "a/a", null],1102 ["a/aa", "a/{2?}", { 2: "aa" }],1103 ["aa/a", "aa/a", null],1104 ["aaa/a", "{1?}/a", { 1: "aaa" }],1105 ["a/a/a", null, null],1106 ],1107 },1108 {1109 routes: ["{1?}/a", "a/{2?}", "a/a", "a/aa"],1110 tests: [1111 ["", null, null],1112 ["a", "a/{2?}", { 2: void 0 }],1113 ["aa", null, null],1114 ["aaa", null, null],1115 ["a/a", "a/a", null],1116 ["a/aa", "a/aa", null],1117 ["a/aaa", "a/{2?}", { 2: "aaa" }],1118 ["aa/a", "{1?}/a", { 1: "aa" }],1119 ["a/a/a", null, null],1120 ],1121 },1122 {1123 routes: ["{1?}/a", "a/{2?}", "a/a", "a/aa", "aa/a"],1124 tests: [1125 ["", null, null],1126 ["a", "a/{2?}", { 2: void 0 }],1127 ["aa", null, null],1128 ["aaa", null, null],1129 ["a/a", "a/a", null],1130 ["a/aa", "a/aa", null],1131 ["a/aaa", "a/{2?}", { 2: "aaa" }],1132 ["aa/a", "aa/a", null],1133 ["aaa/a", "{1?}/a", { 1: "aaa" }],1134 ["a/a/a", null, null],1135 ],1136 },1137 // d/d + d/s + s/s1138 {1139 routes: ["{1?}/{2?}", "{1?}/a", "a/a"],1140 tests: [1141 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1142 ["a", "{1?}/a", { 1: void 0 }],1143 ["aa", "{1?}/{2?}", { 1: "aa", 2: void 0 }],1144 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1145 ["a/a", "a/a", null],1146 ["a/aa", "{1?}/{2?}", { 1: "a", 2: "aa" }],1147 ["aa/a", "{1?}/a", { 1: "aa" }],1148 ["aa/aa", "{1?}/{2?}", { 1: "aa", 2: "aa" }],1149 ["a/a/a", null, null],1150 ],1151 },1152 // d/d + d/s*2 + s/s1153 {1154 routes: ["{1?}/{2?}", "{1?}/a", "{1?}/aa", "a/a"],1155 tests: [1156 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1157 ["a", "{1?}/a", { 1: void 0 }],1158 ["aa", "{1?}/aa", { 1: void 0 }],1159 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1160 ["a/a", "a/a", null],1161 ["a/aa", "{1?}/aa", { 1: "a" }],1162 ["a/aaa", "{1?}/{2?}", { 1: "a", 2: "aaa" }],1163 ["aa/a", "{1?}/a", { 1: "aa" }],1164 ["aa/aa", "{1?}/aa", { 1: "aa" }],1165 ["aa/aaa", "{1?}/{2?}", { 1: "aa", 2: "aaa" }],1166 ["a/a/a", null, null],1167 ],1168 },1169 // d/d + d/s + s/s*21170 {1171 routes: ["{1?}/{2?}", "{1?}/a", "a/a", "aa/a"],1172 tests: [1173 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1174 ["a", "{1?}/a", { 1: void 0 }],1175 ["aa", "{1?}/{2?}", { 1: "aa", 2: void 0 }],1176 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1177 ["a/a", "a/a", null],1178 ["a/aa", "{1?}/{2?}", { 1: "a", 2: "aa" }],1179 ["aa/a", "aa/a", null],1180 ["aaa/a", "{1?}/a", { 1: "aaa" }],1181 ["aa/aa", "{1?}/{2?}", { 1: "aa", 2: "aa" }],1182 ["a/a/a", null, null],1183 ],1184 },1185 // d/d + d/s*2 + s/s*21186 {1187 routes: ["{1?}/{2?}", "{1?}/a", "{1?}/aa", "a/a", "aa/a"],1188 tests: [1189 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1190 ["a", "{1?}/a", { 1: void 0 }],1191 ["aa", "{1?}/aa", { 1: void 0 }],1192 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1193 ["a/a", "a/a", null],1194 ["a/aa", "{1?}/aa", { 1: "a" }],1195 ["a/aaa", "{1?}/{2?}", { 1: "a", 2: "aaa" }],1196 ["aa/a", "aa/a", null],1197 ["aaa/a", "{1?}/a", { 1: "aaa" }],1198 ["aa/aa", "{1?}/aa", { 1: "aa" }],1199 ["aa/aaa", "{1?}/{2?}", { 1: "aa", 2: "aaa" }],1200 ["a/a/a", null, null],1201 ],1202 },1203 // d/d + s/d + s/s1204 {1205 routes: ["{1?}/{2?}", "a/{2?}", "a/a"],1206 tests: [1207 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1208 ["a", "a/{2?}", { 2: void 0 }],1209 ["aa", "{1?}/{2?}", { 1: "aa", 2: void 0 }],1210 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1211 ["a/a", "a/a", null],1212 ["a/aa", "a/{2?}", { 2: "aa" }],1213 ["aa/a", "{1?}/{2?}", { 1: "aa", 2: "a" }],1214 ["aa/aa", "{1?}/{2?}", { 1: "aa", 2: "aa" }],1215 ["a/a/a", null, null],1216 ],1217 },1218 // d/d + s/d*2 + s/s1219 {1220 routes: ["{1?}/{2?}", "a/{2?}", "aa/{2?}", "a/a"],1221 tests: [1222 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1223 ["a", "a/{2?}", { 2: void 0 }],1224 ["aa", "aa/{2?}", { 2: void 0 }],1225 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1226 ["a/a", "a/a", null],1227 ["a/aa", "a/{2?}", { 2: "aa" }],1228 ["aa/a", "aa/{2?}", { 2: "a" }],1229 ["aa/aa", "aa/{2?}", { 2: "aa" }],1230 ["aaa/aa", "{1?}/{2?}", { 1: "aaa", 2: "aa" }],1231 ["a/a/a", null, null],1232 ],1233 },1234 // d/d + s/d + s/s*21235 {1236 routes: ["{1?}/{2?}", "a/{2?}", "a/a", "a/aa"],1237 tests: [1238 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1239 ["a", "a/{2?}", { 2: void 0 }],1240 ["aa", "{1?}/{2?}", { 1: "aa", 2: void 0 }],1241 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1242 ["a/a", "a/a", null],1243 ["a/aa", "a/aa", null],1244 ["a/aaa", "a/{2?}", { 2: "aaa" }],1245 ["aa/a", "{1?}/{2?}", { 1: "aa", 2: "a" }],1246 ["aa/aa", "{1?}/{2?}", { 1: "aa", 2: "aa" }],1247 ["a/a/a", null, null],1248 ],1249 },1250 // d/d + s/d*2 + s/s*21251 {1252 routes: ["{1?}/{2?}", "a/{2?}", "aa/{2?}", "a/a", "a/aa"],1253 tests: [1254 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1255 ["a", "a/{2?}", { 2: void 0 }],1256 ["aa", "aa/{2?}", { 2: void 0 }],1257 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1258 ["a/a", "a/a", null],1259 ["a/aa", "a/aa", null],1260 ["a/aaa", "a/{2?}", { 2: "aaa" }],1261 ["aa/a", "aa/{2?}", { 2: "a" }],1262 ["aa/aa", "aa/{2?}", { 2: "aa" }],1263 ["aaa/aa", "{1?}/{2?}", { 1: "aaa", 2: "aa" }],1264 ["a/a/a", null, null],1265 ],1266 },1267 // d/d + d/s + s/d + s/s1268 {1269 routes: ["{1?}/{2?}", "{1?}/a", "a/{2?}", "a/a"],1270 tests: [1271 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1272 ["a", "a/{2?}", { 2: void 0 }],1273 ["aa", "{1?}/{2?}", { 1: "aa", 2: void 0 }],1274 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1275 ["a/a", "a/a", null],1276 ["a/aa", "a/{2?}", { 2: "aa" }],1277 ["aa/a", "{1?}/a", { 1: "aa" }],1278 ["aa/aa", "{1?}/{2?}", { 1: "aa", 2: "aa" }],1279 ["a/a/a", null, null],1280 ],1281 },1282 // d/d + d/s*2 + s/d + s/s1283 {1284 routes: ["{1?}/{2?}", "{1?}/a", "{1?}/aa", "a/{2?}", "a/a"],1285 tests: [1286 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1287 ["a", "a/{2?}", { 2: void 0 }],1288 ["aa", "{1?}/aa", { 1: void 0 }],1289 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1290 ["a/a", "a/a", null],1291 ["a/aa", "a/{2?}", { 2: "aa" }],1292 ["aa/a", "{1?}/a", { 1: "aa" }],1293 ["aa/aa", "{1?}/aa", { 1: "aa" }],1294 ["aa/aaa", "{1?}/{2?}", { 1: "aa", 2: "aaa" }],1295 ["a/a/a", null, null],1296 ],1297 },1298 // d/d + d/s + s/d*2 + s/s1299 {1300 routes: ["{1?}/{2?}", "{1?}/a", "a/{2?}", "aa/{2?}", "a/a"],1301 tests: [1302 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1303 ["a", "a/{2?}", { 2: void 0 }],1304 ["aa", "aa/{2?}", { 2: void 0 }],1305 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1306 ["a/a", "a/a", null],1307 ["a/aa", "a/{2?}", { 2: "aa" }],1308 ["aa/a", "aa/{2?}", { 2: "a" }],1309 ["aa/aa", "aa/{2?}", { 2: "aa" }],1310 ["aaa/aa", "{1?}/{2?}", { 1: "aaa", 2: "aa" }],1311 ["a/a/a", null, null],1312 ],1313 },1314 // d/d + d/s*2 + s/d*2 + s/s1315 {1316 routes: ["{1?}/{2?}", "{1?}/a", "{1?}/aa", "a/{2?}", "aa/{2?}", "a/a"],1317 tests: [1318 ["", "{1?}/{2?}", { 1: void 0, 2: void 0 }],1319 ["a", "a/{2?}", { 2: void 0 }],1320 ["aa", "aa/{2?}", { 2: void 0 }],1321 ["aaa", "{1?}/{2?}", { 1: "aaa", 2: void 0 }],1322 ["a/a", "a/a", null],1323 ["a/aa", "a/{2?}", { 2: "aa" }],1324 ["aa/a", "aa/{2?}", { 2: "a" }],1325 ["aa/aa", "aa/{2?}", { 2: "aa" }],1326 ["aa/aaa", "aa/{2?}", { 2: "aaa" }],1327 ["aaa/aa", "{1?}/aa", { 1: "aaa" }],1328 ["aaa/aaa", "{1?}/{2?}", { 1: "aaa", 2: "aaa" }],1329 ["a/a/a", null, null],1330 ],1331 },1332 // #endregion1333 // #region 1-depth star routes1334 {1335 routes: ["*1"],1336 tests: [1337 ["", null, null],1338 ["a", "*1", { 1: "a" }],1339 ["aa", "*1", { 1: "aa" }],1340 ["a/a", "*1", { 1: "a/a" }],1341 ["aa/a", "*1", { 1: "aa/a" }],1342 ["a/aa", "*1", { 1: "a/aa" }],1343 ["aa/aa", "*1", { 1: "aa/aa" }],1344 ["a/a/a", "*1", { 1: "a/a/a" }],1345 ],1346 },1347 {1348 routes: ["", "*1"],1349 tests: [1350 ["", "", null],1351 ["a", "*1", { 1: "a" }],1352 ["aa", "*1", { 1: "aa" }],1353 ["a/a", "*1", { 1: "a/a" }],1354 ["aa/a", "*1", { 1: "aa/a" }],1355 ["a/aa", "*1", { 1: "a/aa" }],1356 ["aa/aa", "*1", { 1: "aa/aa" }],1357 ["a/a/a", "*1", { 1: "a/a/a" }],1358 ],1359 },1360 {1361 routes: ["*1", "a"],1362 tests: [1363 ["", null, null],1364 ["a", "a", null],1365 ["aa", "*1", { 1: "aa" }],1366 ["a/a", "*1", { 1: "a/a" }],1367 ["aa/a", "*1", { 1: "aa/a" }],1368 ["a/aa", "*1", { 1: "a/aa" }],1369 ["aa/aa", "*1", { 1: "aa/aa" }],1370 ["a/a/a", "*1", { 1: "a/a/a" }],1371 ],1372 },1373 {1374 routes: ["*1", "a", "aa"],1375 tests: [1376 ["", null, null],1377 ["a", "a", null],1378 ["aa", "aa", null],1379 ["aaa", "*1", { 1: "aaa" }],1380 ["a/a", "*1", { 1: "a/a" }],1381 ["aa/a", "*1", { 1: "aa/a" }],1382 ["a/aa", "*1", { 1: "a/aa" }],1383 ["aa/aa", "*1", { 1: "aa/aa" }],1384 ["a/a/a", "*1", { 1: "a/a/a" }],1385 ],1386 },1387 {1388 routes: ["*1", "a", "aaa"],1389 tests: [1390 ["", null, null],1391 ["a", "a", null],1392 ["aa", "*1", { 1: "aa" }],1393 ["aaa", "aaa", null],1394 ["aaaa", "*1", { 1: "aaaa" }],1395 ["a/a", "*1", { 1: "a/a" }],1396 ["aa/a", "*1", { 1: "aa/a" }],1397 ["a/aa", "*1", { 1: "a/aa" }],1398 ["aa/aa", "*1", { 1: "aa/aa" }],1399 ["a/a/a", "*1", { 1: "a/a/a" }],1400 ],1401 },1402 {1403 routes: ["*1", "aa", "aaa"],1404 tests: [1405 ["", null, null],1406 ["a", "*1", { 1: "a" }],1407 ["aa", "aa", null],1408 ["aaa", "aaa", null],1409 ["aaaa", "*1", { 1: "aaaa" }],1410 ["a/a", "*1", { 1: "a/a" }],1411 ["aa/a", "*1", { 1: "aa/a" }],1412 ["a/aa", "*1", { 1: "a/aa" }],1413 ["aa/aa", "*1", { 1: "aa/aa" }],1414 ["a/a/a", "*1", { 1: "a/a/a" }],1415 ],1416 },1417 {1418 routes: ["*1", "a", "aa", "aaa"],1419 tests: [1420 ["", null, null],1421 ["a", "a", null],1422 ["aa", "aa", null],1423 ["aaa", "aaa", null],1424 ["aaaa", "*1", { 1: "aaaa" }],1425 ["a/a", "*1", { 1: "a/a" }],1426 ["aa/a", "*1", { 1: "aa/a" }],1427 ["a/aa", "*1", { 1: "a/aa" }],1428 ["aa/aa", "*1", { 1: "aa/aa" }],1429 ["a/a/a", "*1", { 1: "a/a/a" }],1430 ],1431 },1432 // #endregion1433 // #region 1-depth star + dynamic routes1434 {1435 routes: ["*1", "{1}"],1436 tests: [1437 ["", null, null],1438 ["a", "{1}", { 1: "a" }],1439 ["aa", "{1}", { 1: "aa" }],1440 ["a/a", "*1", { 1: "a/a" }],1441 ["aa/a", "*1", { 1: "aa/a" }],1442 ["a/aa", "*1", { 1: "a/aa" }],1443 ["aa/aa", "*1", { 1: "aa/aa" }],1444 ["a/a/a", "*1", { 1: "a/a/a" }],1445 ],1446 },1447 {1448 routes: ["*1", "{1}", "a"],1449 tests: [1450 ["", null, null],1451 ["a", "a", null],1452 ["aa", "{1}", { 1: "aa" }],1453 ["a/a", "*1", { 1: "a/a" }],1454 ["aa/a", "*1", { 1: "aa/a" }],1455 ["a/aa", "*1", { 1: "a/aa" }],1456 ["aa/aa", "*1", { 1: "aa/aa" }],1457 ["a/a/a", "*1", { 1: "a/a/a" }],1458 ],1459 },1460 {1461 routes: ["*1", "{1}", "a", "aa"],1462 tests: [1463 ["", null, null],1464 ["a", "a", null],1465 ["aa", "aa", null],1466 ["aaa", "{1}", { 1: "aaa" }],1467 ["a/a", "*1", { 1: "a/a" }],1468 ["aa/a", "*1", { 1: "aa/a" }],1469 ["a/aa", "*1", { 1: "a/aa" }],1470 ["aa/aa", "*1", { 1: "aa/aa" }],1471 ["a/a/a", "*1", { 1: "a/a/a" }],1472 ],1473 },1474 {1475 routes: ["*1", "{1}", "a", "aaa"],1476 tests: [1477 ["", null, null],1478 ["a", "a", null],1479 ["aa", "{1}", { 1: "aa" }],1480 ["aaa", "aaa", null],1481 ["aaaa", "{1}", { 1: "aaaa" }],1482 ["a/a", "*1", { 1: "a/a" }],1483 ["aa/a", "*1", { 1: "aa/a" }],1484 ["a/aa", "*1", { 1: "a/aa" }],1485 ["aa/aa", "*1", { 1: "aa/aa" }],1486 ["a/a/a", "*1", { 1: "a/a/a" }],1487 ],1488 },1489 {1490 routes: ["*1", "{1}", "aa", "aaa"],1491 tests: [1492 ["", null, null],1493 ["a", "{1}", { 1: "a" }],1494 ["aa", "aa", null],1495 ["aaa", "aaa", null],1496 ["aaaa", "{1}", { 1: "aaaa" }],1497 ["a/a", "*1", { 1: "a/a" }],1498 ["aa/a", "*1", { 1: "aa/a" }],1499 ["a/aa", "*1", { 1: "a/aa" }],1500 ["aa/aa", "*1", { 1: "aa/aa" }],1501 ["a/a/a", "*1", { 1: "a/a/a" }],1502 ],1503 },1504 {1505 routes: ["*1", "{1}", "a", "aa", "aaa"],1506 tests: [1507 ["", null, null],1508 ["a", "a", null],1509 ["aa", "aa", null],1510 ["aaa", "aaa", null],1511 ["aaaa", "{1}", { 1: "aaaa" }],1512 ["a/a", "*1", { 1: "a/a" }],1513 ["aa/a", "*1", { 1: "aa/a" }],1514 ["a/aa", "*1", { 1: "a/aa" }],1515 ["aa/aa", "*1", { 1: "aa/aa" }],1516 ["a/a/a", "*1", { 1: "a/a/a" }],1517 ],1518 },1519 // #endregion1520 // #region 2-depth dynamic routes1521 // d/s1522 {1523 routes: ["*1/a"],1524 tests: [1525 ["", null, null],1526 ["a", null, null],1527 ["aa", null, null],1528 ["aaa", null, null],1529 ["a/a", "*1/a", { 1: "a" }],1530 ["a/aa", null, null],1531 ["aa/a", "*1/a", { 1: "aa" }],1532 ["aa/aa", null, null],1533 ["a/a/a", "*1/a", { 1: "a/a" }],1534 ["aa/a/a", "*1/a", { 1: "aa/a" }],1535 ["a/aa/a", "*1/a", { 1: "a/aa" }],1536 ["a/a/aa", null, null],1537 ],1538 },1539 {1540 routes: ["*1/a", "a/a"],1541 tests: [1542 ["", null, null],1543 ["a", null, null],1544 ["aa", null, null],1545 ["aaa", null, null],1546 ["a/a", "a/a", null],1547 ["a/aa", null, null],1548 ["aa/a", "*1/a", { 1: "aa" }],1549 ["aa/aa", null, null],1550 ["a/a/a", "*1/a", { 1: "a/a" }],1551 ["aa/a/a", "*1/a", { 1: "aa/a" }],1552 ["a/aa/a", "*1/a", { 1: "a/aa" }],1553 ["a/a/aa", null, null],1554 ],1555 },1556 {1557 routes: ["*1/a", "a/a", "aa/a"],1558 tests: [1559 ["", null, null],1560 ["a", null, null],1561 ["aa", null, null],1562 ["aaa", null, null],1563 ["a/a", "a/a", null],1564 ["a/aa", null, null],1565 ["aa/a", "aa/a", null],1566 ["aaa/a", "*1/a", { 1: "aaa" }],1567 ["aa/aa", null, null],1568 ["a/a/a", "*1/a", { 1: "a/a" }],1569 ["aa/a/a", "*1/a", { 1: "aa/a" }],1570 ["a/aa/a", "*1/a", { 1: "a/aa" }],1571 ["a/a/aa", null, null],1572 ],1573 },1574 // s/d1575 {1576 routes: ["a/*2"],1577 tests: [1578 ["", null, null],1579 ["a", null, null],1580 ["aa", null, null],1581 ["aaa", null, null],1582 ["a/a", "a/*2", { 2: "a" }],1583 ["a/aa", "a/*2", { 2: "aa" }],1584 ["aa/a", null, null],1585 ["aa/aa", null, null],1586 ["a/a/a", "a/*2", { 2: "a/a" }],1587 ["aa/a/a", null, null],1588 ],1589 },1590 {1591 routes: ["a/*2", "a/a"],1592 tests: [1593 ["", null, null],1594 ["a", null, null],1595 ["aa", null, null],1596 ["aaa", null, null],1597 ["a/a", "a/a", null],1598 ["a/aa", "a/*2", { 2: "aa" }],1599 ["aa/a", null, null],1600 ["aa/aa", null, null],1601 ["a/a/a", "a/*2", { 2: "a/a" }],1602 ["a/aa/a", "a/*2", { 2: "aa/a" }],1603 ["a/a/aa", "a/*2", { 2: "a/aa" }],1604 ["aa/a/a", null, null],1605 ],1606 },1607 {1608 routes: ["a/*2", "a/a", "a/aa"],1609 tests: [1610 ["", null, null],1611 ["a", null, null],1612 ["aa", null, null],1613 ["aaa", null, null],1614 ["a/a", "a/a", null],1615 ["a/aa", "a/aa", null],1616 ["a/aaa", "a/*2", { 2: "aaa" }],1617 ["aa/a", null, null],1618 ["aa/aa", null, null],1619 ["a/a/a", "a/*2", { 2: "a/a" }],1620 ["a/aa/a", "a/*2", { 2: "aa/a" }],1621 ["a/a/aa", "a/*2", { 2: "a/aa" }],1622 ["aa/a/a", null, null],1623 ],1624 },1625 // d/s + s/d1626 {1627 routes: ["*1/a", "a/*2"],1628 tests: [1629 ["", null, null],1630 ["a", null, null],1631 ["aa", null, null],1632 ["aaa", null, null],1633 ["a/a", "a/*2", { 2: "a" }],1634 ["a/aa", "a/*2", { 2: "aa" }],1635 ["aa/a", "*1/a", { 1: "aa" }],1636 ["aa/aa", null, null],1637 ["a/a/a", "a/*2", { 2: "a/a" }],1638 ["a/aa/a", "a/*2", { 2: "aa/a" }],1639 ["a/a/aa", "a/*2", { 2: "a/aa" }],1640 ["aa/a/a", "*1/a", { 1: "aa/a" }],1641 ["aa/a/aa", null, null],1642 ],1643 },1644 {1645 routes: ["*1/a", "a/*2", "a/a"],1646 tests: [1647 ["", null, null],1648 ["a", null, null],1649 ["aa", null, null],1650 ["aaa", null, null],1651 ["a/a", "a/a", null],1652 ["a/aa", "a/*2", { 2: "aa" }],1653 ["aa/a", "*1/a", { 1: "aa" }],1654 ["aa/aa", null, null],1655 ["a/a/a", "a/*2", { 2: "a/a" }],1656 ["a/aa/a", "a/*2", { 2: "aa/a" }],1657 ["a/a/aa", "a/*2", { 2: "a/aa" }],1658 ["aa/a/a", "*1/a", { 1: "aa/a" }],1659 ["aa/a/aa", null, null],1660 ],1661 },1662 {1663 routes: ["*1/a", "a/*2", "a/a", "aa/a"],1664 tests: [1665 ["", null, null],1666 ["a", null, null],1667 ["aa", null, null],1668 ["aaa", null, null],1669 ["a/a", "a/a", null],1670 ["a/aa", "a/*2", { 2: "aa" }],1671 ["aa/a", "aa/a", null],1672 ["aaa/a", "*1/a", { 1: "aaa" }],1673 ["aa/aa", null, null],1674 ["a/a/a", "a/*2", { 2: "a/a" }],1675 ["a/aa/a", "a/*2", { 2: "aa/a" }],1676 ["a/a/aa", "a/*2", { 2: "a/aa" }],1677 ["aa/a/a", "*1/a", { 1: "aa/a" }],1678 ["aa/a/aa", null, null],1679 ],1680 },1681 {1682 routes: ["*1/a", "a/*2", "a/a", "a/aa"],1683 tests: [1684 ["", null, null],1685 ["a", null, null],1686 ["aa", null, null],1687 ["aaa", null, null],1688 ["a/a", "a/a", null],1689 ["a/aa", "a/aa", null],1690 ["a/aaa", "a/*2", { 2: "aaa" }],1691 ["aa/a", "*1/a", { 1: "aa" }],1692 ["aa/aa", null, null],1693 ["a/a/a", "a/*2", { 2: "a/a" }],1694 ["a/aa/a", "a/*2", { 2: "aa/a" }],1695 ["a/a/aa", "a/*2", { 2: "a/aa" }],1696 ["aa/a/a", "*1/a", { 1: "aa/a" }],1697 ["aa/a/aa", null, null],1698 ],1699 },1700 {1701 routes: ["*1/a", "a/*2", "a/a", "a/aa", "aa/a"],1702 tests: [1703 ["", null, null],1704 ["a", null, null],1705 ["aa", null, null],1706 ["aaa", null, null],1707 ["a/a", "a/a", null],1708 ["a/aa", "a/aa", null],1709 ["a/aaa", "a/*2", { 2: "aaa" }],1710 ["aa/a", "aa/a", null],1711 ["aaa/a", "*1/a", { 1: "aaa" }],1712 ["aa/aa", null, null],1713 ["a/a/a", "a/*2", { 2: "a/a" }],1714 ["a/aa/a", "a/*2", { 2: "aa/a" }],1715 ["a/a/aa", "a/*2", { 2: "a/aa" }],1716 ["aa/a/a", "*1/a", { 1: "aa/a" }],1717 ["aa/a/aa", null, null],1718 ],1719 },1720 // d/d1721 {1722 routes: ["*1/*2"],1723 tests: [1724 ["", null, null],1725 ["a", null, null],1726 ["aa", null, null],1727 ["aaa", null, null],1728 ["a/a", "*1/*2", { 1: "a", 2: "a" }],1729 ["a/aa", "*1/*2", { 1: "a", 2: "aa" }],1730 ["aa/a", "*1/*2", { 1: "aa", 2: "a" }],1731 ["aa/aa", "*1/*2", { 1: "aa", 2: "aa" }],1732 ["a/a/a", "*1/*2", { 1: "a", 2: "a/a" }],1733 ["a/aa/a", "*1/*2", { 1: "a", 2: "aa/a" }],1734 ["a/a/aa", "*1/*2", { 1: "a", 2: "a/aa" }],1735 ["aa/a/a", "*1/*2", { 1: "aa", 2: "a/a" }],1736 ["aa/aa/a", "*1/*2", { 1: "aa", 2: "aa/a" }],1737 ["aa/a/aa", "*1/*2", { 1: "aa", 2: "a/aa" }],1738 ],1739 },1740 // d/d + d/s1741 {1742 routes: ["*1/*2", "*1/a"],1743 tests: [1744 ["", null, null],1745 ["a", null, null],1746 ["aa", null, null],1747 ["aaa", null, null],1748 ["a/a", "*1/a", { 1: "a" }],1749 ["a/aa", "*1/*2", { 1: "a", 2: "aa" }],1750 ["aa/a", "*1/a", { 1: "aa" }],1751 ["aa/aa", "*1/*2", { 1: "aa", 2: "aa" }],1752 ["a/a/a", "*1/a", { 1: "a/a" }],1753 ["a/aa/a", "*1/a", { 1: "a/aa" }],1754 ["a/a/aa", "*1/*2", { 1: "a", 2: "a/aa" }],1755 ["aa/a/a", "*1/a", { 1: "aa/a" }],1756 ["aa/aa/a", "*1/a", { 1: "aa/aa" }],1757 ["aa/a/aa", "*1/*2", { 1: "aa", 2: "a/aa" }],1758 ],1759 },1760 // d/d + d/s + s/s1761 {1762 routes: ["*1/*2", "*1/a", "a/a"],1763 tests: [1764 ["", null, null],1765 ["a", null, null],1766 ["aa", null, null],1767 ["aaa", null, null],1768 ["a/a", "a/a", null],1769 ["a/aa", "*1/*2", { 1: "a", 2: "aa" }],1770 ["aa/a", "*1/a", { 1: "aa" }],1771 ["aa/aa", "*1/*2", { 1: "aa", 2: "aa" }],1772 ["a/a/a", "*1/a", { 1: "a/a" }],1773 ["a/aa/a", "*1/a", { 1: "a/aa" }],1774 ["a/a/aa", "*1/*2", { 1: "a", 2: "a/aa" }],1775 ["aa/a/a", "*1/a", { 1: "aa/a" }],1776 ["aa/aa/a", "*1/a", { 1: "aa/aa" }],1777 ["aa/a/aa", "*1/*2", { 1: "aa", 2: "a/aa" }],1778 ],1779 },1780 // d/d + d/s*2 + s/s1781 {1782 routes: ["*1/*2", "*1/a", "*1/aa", "a/a"],1783 tests: [1784 ["", null, null],1785 ["a", null, null],1786 ["aa", null, null],1787 ["aaa", null, null],1788 ["a/a", "a/a", null],1789 ["a/aa", "*1/aa", { 1: "a" }],1790 ["a/aaa", "*1/*2", { 1: "a", 2: "aaa" }],1791 ["aa/a", "*1/a", { 1: "aa" }],1792 ["aa/aa", "*1/aa", { 1: "aa" }],1793 ["aa/aaa", "*1/*2", { 1: "aa", 2: "aaa" }],1794 ["a/a/a", "*1/a", { 1: "a/a" }],1795 ["a/aa/a", "*1/a", { 1: "a/aa" }],1796 ["a/a/aa", "*1/aa", { 1: "a/a" }],1797 ["a/a/aaa", "*1/*2", { 1: "a", 2: "a/aaa" }],1798 ["aa/a/a", "*1/a", { 1: "aa/a" }],1799 ["aa/aa/a", "*1/a", { 1: "aa/aa" }],1800 ["aa/a/aa", "*1/aa", { 1: "aa/a" }],1801 ["aa/a/aaa", "*1/*2", { 1: "aa", 2: "a/aaa" }],1802 ],1803 },1804 // d/d + d/s + s/s*21805 {1806 routes: ["*1/*2", "*1/a", "a/a", "aa/a"],1807 tests: [1808 ["", null, null],1809 ["a", null, null],1810 ["aa", null, null],1811 ["aaa", null, null],1812 ["a/a", "a/a", null],1813 ["aa/a", "aa/a", null],1814 ["a/aa", "*1/*2", { 1: "a", 2: "aa" }],1815 ["aa/aa", "*1/*2", { 1: "aa", 2: "aa" }],1816 ["a/a/a", "*1/a", { 1: "a/a" }],1817 ["a/aa/a", "*1/a", { 1: "a/aa" }],1818 ["a/a/aa", "*1/*2", { 1: "a", 2: "a/aa" }],1819 ["aa/a/a", "*1/a", { 1: "aa/a" }],1820 ["aa/aa/a", "*1/a", { 1: "aa/aa" }],1821 ["aa/a/aa", "*1/*2", { 1: "aa", 2: "a/aa" }],1822 ],1823 },1824 // d/d + d/s*2 + s/s*21825 {1826 routes: ["*1/*2", "*1/a", "*1/aa", "a/a", "aa/a"],1827 tests: [1828 ["", null, null],1829 ["a", null, null],1830 ["aa", null, null],1831 ["aaa", null, null],1832 ["a/a", "a/a", null],1833 ["aa/a", "aa/a", null],1834 ["a/aa", "*1/aa", { 1: "a" }],1835 ["a/aaa", "*1/*2", { 1: "a", 2: "aaa" }],1836 ["aa/aa", "*1/aa", { 1: "aa" }],1837 ["aa/aaa", "*1/*2", { 1: "aa", 2: "aaa" }],1838 ["a/a/a", "*1/a", { 1: "a/a" }],1839 ["a/aa/a", "*1/a", { 1: "a/aa" }],1840 ["a/a/aa", "*1/aa", { 1: "a/a" }],1841 ["a/a/aaa", "*1/*2", { 1: "a", 2: "a/aaa" }],1842 ["aa/a/a", "*1/a", { 1: "aa/a" }],1843 ["aa/aa/a", "*1/a", { 1: "aa/aa" }],1844 ["aa/a/aa", "*1/aa", { 1: "aa/a" }],1845 ["aa/a/aaa", "*1/*2", { 1: "aa", 2: "a/aaa" }],1846 ],1847 },1848 // d/d + s/d + s/s1849 {1850 routes: ["*1/*2", "a/*2", "a/a"],1851 tests: [1852 ["", null, null],1853 ["a", null, null],1854 ["aa", null, null],1855 ["aaa", null, null],1856 ["a/a", "a/a", null],1857 ["aa/a", "*1/*2", { 1: "aa", 2: "a" }],1858 ["a/aa", "a/*2", { 2: "aa" }],1859 ["aa/aa", "*1/*2", { 1: "aa", 2: "aa" }],1860 ["a/a/a", "a/*2", { 2: "a/a" }],1861 ["a/aa/a", "a/*2", { 2: "aa/a" }],1862 ["aa/a/a", "*1/*2", { 1: "aa", 2: "a/a" }],1863 ["a/a/aa", "a/*2", { 2: "a/aa" }],1864 ["a/aa/aa", "a/*2", { 2: "aa/aa" }],1865 ["aa/a/aa", "*1/*2", { 1: "aa", 2: "a/aa" }],1866 ],1867 },1868 // d/d + s/d*2 + s/s1869 {1870 routes: ["*1/*2", "a/*2", "aa/*2", "a/a"],1871 tests: [1872 ["", null, null],1873 ["a", null, null],1874 ["aa", null, null],1875 ["aaa", null, null],1876 ["a/a", "a/a", null],1877 ["aa/a", "aa/*2", { 2: "a" }],1878 ["aaa/a", "*1/*2", { 1: "aaa", 2: "a" }],1879 ["a/aa", "a/*2", { 2: "aa" }],1880 ["aa/aa", "aa/*2", { 2: "aa" }],1881 ["aaa/aa", "*1/*2", { 1: "aaa", 2: "aa" }],1882 ["a/a/a", "a/*2", { 2: "a/a" }],1883 ["a/aa/a", "a/*2", { 2: "aa/a" }],1884 ["aa/a/a", "aa/*2", { 2: "a/a" }],1885 ["aaa/a/a", "*1/*2", { 1: "aaa", 2: "a/a" }],1886 ["a/a/aa", "a/*2", { 2: "a/aa" }],1887 ["a/aa/aa", "a/*2", { 2: "aa/aa" }],1888 ["aa/a/aa", "aa/*2", { 2: "a/aa" }],1889 ["aaa/a/aa", "*1/*2", { 1: "aaa", 2: "a/aa" }],1890 ],1891 },1892 // d/d + s/d + s/s*21893 {1894 routes: ["*1/*2", "a/*2", "a/a", "a/aa"],1895 tests: [1896 ["", null, null],1897 ["a", null, null],1898 ["aa", null, null],1899 ["aaa", null, null],1900 ["a/a", "a/a", null],1901 ["a/aa", "a/aa", null],1902 ["aa/a", "*1/*2", { 1: "aa", 2: "a" }],1903 ["aa/aa", "*1/*2", { 1: "aa", 2: "aa" }],1904 ["a/a/a", "a/*2", { 2: "a/a" }],1905 ["a/aa/a", "a/*2", { 2: "aa/a" }],1906 ["aa/a/a", "*1/*2", { 1: "aa", 2: "a/a" }],1907 ["a/a/aa", "a/*2", { 2: "a/aa" }],1908 ["a/aa/aa", "a/*2", { 2: "aa/aa" }],1909 ["aa/a/aa", "*1/*2", { 1: "aa", 2: "a/aa" }],1910 ],1911 },1912 // d/d + s/d*2 + s/s*21913 {1914 routes: ["*1/*2", "a/*2", "aa/*2", "a/a", "a/aa"],1915 tests: [1916 ["", null, null],1917 ["a", null, null],1918 ["aa", null, null],1919 ["aaa", null, null],1920 ["a/a", "a/a", null],1921 ["a/aa", "a/aa", null],1922 ["aa/a", "aa/*2", { 2: "a" }],1923 ["aaa/a", "*1/*2", { 1: "aaa", 2: "a" }],1924 ["aa/aa", "aa/*2", { 2: "aa" }],1925 ["aaa/aa", "*1/*2", { 1: "aaa", 2: "aa" }],1926 ["a/a/a", "a/*2", { 2: "a/a" }],1927 ["a/aa/a", "a/*2", { 2: "aa/a" }],1928 ["aa/a/a", "aa/*2", { 2: "a/a" }],1929 ["aaa/a/a", "*1/*2", { 1: "aaa", 2: "a/a" }],1930 ["a/a/aa", "a/*2", { 2: "a/aa" }],1931 ["a/aa/aa", "a/*2", { 2: "aa/aa" }],1932 ["aa/a/aa", "aa/*2", { 2: "a/aa" }],1933 ["aaa/a/aa", "*1/*2", { 1: "aaa", 2: "a/aa" }],1934 ],1935 },1936 // d/d + d/s + s/d + s/s1937 {1938 routes: ["*1/*2", "*1/a", "a/*2", "a/a"],1939 tests: [1940 ["", null, null],1941 ["a", null, null],1942 ["aa", null, null],1943 ["aaa", null, null],1944 ["a/a", "a/a", null],1945 ["aa/a", "*1/a", { 1: "aa" }],1946 ["a/aa", "a/*2", { 2: "aa" }],1947 ["aa/aa", "*1/*2", { 1: "aa", 2: "aa" }],1948 ["a/a/a", "a/*2", { 2: "a/a" }],1949 ["aa/a/a", "*1/a", { 1: "aa/a" }],1950 ["a/aa/a", "a/*2", { 2: "aa/a" }],1951 ["aa/aa/a", "*1/a", { 1: "aa/aa" }],1952 ["a/a/aa", "a/*2", { 2: "a/aa" }],1953 ["aa/a/aa", "*1/*2", { 1: "aa", 2: "a/aa" }],1954 ["a/aa/aa", "a/*2", { 2: "aa/aa" }],1955 ["aa/aa/aa", "*1/*2", { 1: "aa", 2: "aa/aa" }],1956 ],1957 },1958 // d/d + d/s*2 + s/d + s/s1959 {1960 routes: ["*1/*2", "*1/a", "*1/aa", "a/*2", "a/a"],1961 tests: [1962 ["", null, null],1963 ["a", null, null],1964 ["aa", null, null],1965 ["aaa", null, null],1966 ["a/a", "a/a", null],1967 ["aa/a", "*1/a", { 1: "aa" }],1968 ["a/aa", "a/*2", { 2: "aa" }],1969 ["aa/aa", "*1/aa", { 1: "aa" }],1970 ["aa/aaa", "*1/*2", { 1: "aa", 2: "aaa" }],1971 ["a/a/a", "a/*2", { 2: "a/a" }],1972 ["aa/a/a", "*1/a", { 1: "aa/a" }],1973 ["a/aa/a", "a/*2", { 2: "aa/a" }],1974 ["aa/aa/a", "*1/a", { 1: "aa/aa" }],1975 ["a/a/aa", "a/*2", { 2: "a/aa" }],1976 ["a/aa/aa", "a/*2", { 2: "aa/aa" }],1977 ["aa/a/aa", "*1/aa", { 1: "aa/a" }],1978 ["aa/a/aaa", "*1/*2", { 1: "aa", 2: "a/aaa" }],1979 ["aa/aa/aa", "*1/aa", { 1: "aa/aa" }],1980 ["aa/aa/aaa", "*1/*2", { 1: "aa", 2: "aa/aaa" }],1981 ],1982 },1983 // d/d + d/s + s/d*2 + s/s1984 {1985 routes: ["*1/*2", "*1/a", "a/*2", "aa/*2", "a/a"],1986 tests: [1987 ["", null, null],1988 ["a", null, null],1989 ["aa", null, null],1990 ["aaa", null, null],1991 ["a/a", "a/a", null],1992 ["aa/a", "aa/*2", { 2: "a" }],1993 ["aaa/a", "*1/a", { 1: "aaa" }],1994 ["a/aa", "a/*2", { 2: "aa" }],1995 ["aa/aa", "aa/*2", { 2: "aa" }],1996 ["aaa/aa", "*1/*2", { 1: "aaa", 2: "aa" }],1997 ["a/a/a", "a/*2", { 2: "a/a" }],1998 ["aa/a/a", "aa/*2", { 2: "a/a" }],1999 ["aaa/a/a", "*1/a", { 1: "aaa/a" }],2000 ["a/aa/a", "a/*2", { 2: "aa/a" }],2001 ["aa/aa/a", "aa/*2", { 2: "aa/a" }],2002 ["aaa/aa/a", "*1/a", { 1: "aaa/aa" }],2003 ["a/a/aa", "a/*2", { 2: "a/aa" }],2004 ["a/aa/aa", "a/*2", { 2: "aa/aa" }],2005 ["aa/a/aa", "aa/*2", { 2: "a/aa" }],2006 ["aaa/a/aa", "*1/*2", { 1: "aaa", 2: "a/aa" }],2007 ["aa/aa/aa", "aa/*2", { 2: "aa/aa" }],2008 ["aaa/aa/aa", "*1/*2", { 1: "aaa", 2: "aa/aa" }],2009 ],2010 },2011 // d/d + d/s*2 + s/d*2 + s/s2012 {2013 routes: ["*1/*2", "*1/a", "*1/aa", "a/*2", "aa/*2", "a/a"],2014 tests: [2015 ["", null, null],2016 ["a", null, null],2017 ["aa", null, null],2018 ["aaa", null, null],2019 ["a/a", "a/a", null],2020 ["aa/a", "aa/*2", { 2: "a" }],2021 ["aaa/a", "*1/a", { 1: "aaa" }],2022 ["a/aa", "a/*2", { 2: "aa" }],2023 ["aa/aa", "aa/*2", { 2: "aa" }],2024 ["aaa/aa", "*1/aa", { 1: "aaa" }],2025 ["aaa/aaa", "*1/*2", { 1: "aaa", 2: "aaa" }],2026 ["a/a/a", "a/*2", { 2: "a/a" }],2027 ["aa/a/a", "aa/*2", { 2: "a/a" }],2028 ["aaa/a/a", "*1/a", { 1: "aaa/a" }],2029 ["a/aa/a", "a/*2", { 2: "aa/a" }],2030 ["aa/aa/a", "aa/*2", { 2: "aa/a" }],2031 ["aaa/aa/a", "*1/a", { 1: "aaa/aa" }],2032 ["a/a/aa", "a/*2", { 2: "a/aa" }],2033 ["a/aa/aa", "a/*2", { 2: "aa/aa" }],2034 ["aa/a/aa", "aa/*2", { 2: "a/aa" }],2035 ["aaa/a/aa", "*1/aa", { 1: "aaa/a" }],2036 ["aaa/a/aaa", "*1/*2", { 1: "aaa", 2: "a/aaa" }],2037 ["aa/aa/aa", "aa/*2", { 2: "aa/aa" }],2038 ["aaa/aa/aa", "*1/aa", { 1: "aaa/aa" }],2039 ["aaa/aa/aaa", "*1/*2", { 1: "aaa", 2: "aa/aaa" }],2040 ],2041 },2042 // #endregion2043 // #region complex combinations2044 // TODO(fkleuver): this is not done yet. Plenty of edge cases still to be added (esp. with dynamic vs optional dynamic with star segments, etc)2045 {2046 routes: [2047 "a",2048 "a/a",2049 "a/a/a",2050 "a/a/aa",2051 "a/a/{3}",2052 "a/a/{3?}/a",2053 "a/a/{3?}/aa",2054 "a/aa",2055 "a/aa/a",2056 "a/aa/aa",2057 "a/aa/{3}",2058 "a/aa/{3?}/a",2059 "a/aa/{3?}/aa",2060 "a/{2}",2061 "a/{2}/a",2062 "a/{2}/aa",2063 "a/{2}/{3}",2064 "a/{2}/{3?}/a",2065 "a/{2}/{3?}/aa",2066 "aa",2067 "aa/a",2068 "aa/a/a",2069 "aa/a/aa",2070 "aa/a/{3}",2071 "aa/a/{3?}/a",2072 "aa/a/{3?}/aa",2073 "aa/aa",2074 "aa/aa/a",2075 "aa/aa/aa",2076 "aa/aa/{3}",2077 "aa/aa/{3?}/a",2078 "aa/aa/{3?}/aa",2079 "aa/{2}",2080 "aa/{2}/a",2081 "aa/{2}/aa",2082 "aa/{2}/{3}",2083 "aa/{2}/{3?}/a",2084 "aa/{2}/{3?}/aa",2085 "{1}",2086 "{1}/a",2087 "{1}/a/a",2088 "{1}/a/aa",2089 "{1}/a/{3}",2090 "{1}/a/{3?}/a",2091 "{1}/a/{3?}/aa",2092 "{1}/aa",2093 "{1}/aa/a",2094 "{1}/aa/aa",2095 "{1}/aa/{3}",2096 "{1}/aa/{3?}/a",2097 "{1}/aa/{3?}/aa",2098 "{1}/{2}",2099 "{1}/{2}/a",2100 "{1}/{2}/aa",2101 "{1}/{2}/{3}",2102 "{1}/{2}/{3?}/a",2103 "{1}/{2}/{3?}/aa",2104 ],2105 tests: [2106 ["a", "a", null],2107 ["a/a", "a/a", null],2108 ["a/a/a", "a/a/{3?}/a", { 3: void 0 }],2109 ["a/a/aa", "a/a/{3?}/aa", { 3: void 0 }],2110 ["a/a/aaa", "a/a/{3}", { 3: "aaa" }],2111 ["a/a/aaa/a", "a/a/{3?}/a", { 3: "aaa" }],2112 ["a/a/aaa/aa", "a/a/{3?}/aa", { 3: "aaa" }],2113 ["a/aa", "a/aa", null],2114 ["a/aa/a", "a/aa/{3?}/a", { 3: void 0 }],2115 ["a/aa/aa", "a/aa/{3?}/aa", { 3: void 0 }],2116 ["a/aa/aaa", "a/aa/{3}", { 3: "aaa" }],2117 ["a/aa/aaa/a", "a/aa/{3?}/a", { 3: "aaa" }],2118 ["a/aa/aaa/aa", "a/aa/{3?}/aa", { 3: "aaa" }],2119 ["a/aaa", "a/{2}", { 2: "aaa" }],2120 ["a/aaa/a", "a/{2}/{3?}/a", { 2: "aaa", 3: void 0 }],2121 ["a/aaa/aa", "a/{2}/{3?}/aa", { 2: "aaa", 3: void 0 }],2122 ["a/aaa/aaa", "a/{2}/{3}", { 2: "aaa", 3: "aaa" }],2123 ["a/aaa/aaa/a", "a/{2}/{3?}/a", { 2: "aaa", 3: "aaa" }],2124 ["a/aaa/aaa/aa", "a/{2}/{3?}/aa", { 2: "aaa", 3: "aaa" }],2125 ["aa", "aa", null],2126 ["aa/a", "aa/a", null],2127 ["aa/a/a", "aa/a/{3?}/a", { 3: void 0 }],2128 ["aa/a/aa", "aa/a/{3?}/aa", { 3: void 0 }],2129 ["aa/a/aaa", "aa/a/{3}", { 3: "aaa" }],2130 ["aa/a/aaa/a", "aa/a/{3?}/a", { 3: "aaa" }],2131 ["aa/a/aaa/aa", "aa/a/{3?}/aa", { 3: "aaa" }],2132 ["aa/aa", "aa/aa", null],2133 ["aa/aa/a", "aa/aa/{3?}/a", { 3: void 0 }],2134 ["aa/aa/aa", "aa/aa/{3?}/aa", { 3: void 0 }],2135 ["aa/aa/aaa", "aa/aa/{3}", { 3: "aaa" }],2136 ["aa/aa/aaa/a", "aa/aa/{3?}/a", { 3: "aaa" }],2137 ["aa/aa/aaa/aa", "aa/aa/{3?}/aa", { 3: "aaa" }],2138 ["aa/aaa", "aa/{2}", { 2: "aaa" }],2139 ["aa/aaa/a", "aa/{2}/{3?}/a", { 2: "aaa", 3: void 0 }],2140 ["aa/aaa/aa", "aa/{2}/{3?}/aa", { 2: "aaa", 3: void 0 }],2141 ["aa/aaa/aaa", "aa/{2}/{3}", { 2: "aaa", 3: "aaa" }],2142 ["aa/aaa/aaa/a", "aa/{2}/{3?}/a", { 2: "aaa", 3: "aaa" }],2143 ["aa/aaa/aaa/aa", "aa/{2}/{3?}/aa", { 2: "aaa", 3: "aaa" }],2144 ["aaa", "{1}", { 1: "aaa" }],2145 ["aaa/a", "{1}/a", { 1: "aaa" }],2146 ["aaa/a/a", "{1}/a/{3?}/a", { 1: "aaa", 3: void 0 }],2147 ["aaa/a/aa", "{1}/a/{3?}/aa", { 1: "aaa", 3: void 0 }],2148 ["aaa/a/aaa", "{1}/a/{3}", { 1: "aaa", 3: "aaa" }],2149 ["aaa/a/aaa/a", "{1}/a/{3?}/a", { 1: "aaa", 3: "aaa" }],2150 ["aaa/a/aaa/aa", "{1}/a/{3?}/aa", { 1: "aaa", 3: "aaa" }],2151 ["aaa/aa", "{1}/aa", { 1: "aaa" }],2152 ["aaa/aa/a", "{1}/aa/{3?}/a", { 1: "aaa", 3: void 0 }],2153 ["aaa/aa/aa", "{1}/aa/{3?}/aa", { 1: "aaa", 3: void 0 }],2154 ["aaa/aa/aaa", "{1}/aa/{3}", { 1: "aaa", 3: "aaa" }],2155 ["aaa/aa/aaa/a", "{1}/aa/{3?}/a", { 1: "aaa", 3: "aaa" }],2156 ["aaa/aa/aaa/aa", "{1}/aa/{3?}/aa", { 1: "aaa", 3: "aaa" }],2157 ["aaa/aaa", "{1}/{2}", { 1: "aaa", 2: "aaa" }],2158 ["aaa/aaa/a", "{1}/{2}/{3?}/a", { 1: "aaa", 2: "aaa", 3: void 0 }],2159 ["aaa/aaa/aa", "{1}/{2}/{3?}/aa", { 1: "aaa", 2: "aaa", 3: void 0 }],2160 ["aaa/aaa/aaa", "{1}/{2}/{3}", { 1: "aaa", 2: "aaa", 3: "aaa" }],2161 ["aaa/aaa/aaa/a", "{1}/{2}/{3?}/a", { 1: "aaa", 2: "aaa", 3: "aaa" }],2162 ["aaa/aaa/aaa/aa", "{1}/{2}/{3?}/aa", { 1: "aaa", 2: "aaa", 3: "aaa" }],2163 ],2164 },2165 // #endregion2166 ];2167 for (const hasLeadingSlash of [true, false]) {2168 for (const hasTrailingSlash of [true, false]) {2169 for (const reverseAdd of [true, false]) {2170 for (const { tests, routes: $routes } of recognizeSpecs) {2171 const routes = reverseAdd ? $routes.slice().reverse() : $routes;2172 for (const [path, match, $params] of tests) {2173 const leading = hasLeadingSlash ? "/" : "";2174 const trailing = hasTrailingSlash ? "/" : "";2175 let title = `should`;2176 if (match === null) {2177 title = `${title} reject '${path}' out of routes: [${routes2178 .map(x => `'${x}'`)2179 .join(",")}]`;2180 it(title, async function () {2181 // Arrange2182 const sut = new DefaultRouteRecognizer();2183 for (const route of routes) {2184 sut.add({ path: route });2185 }2186 // Act2187 const actual = await sut.recognize(path);2188 // Assert2189 expect(actual).equal(null);2190 });2191 } else {2192 const input = `${leading}${path}${trailing}`;2193 title = `${title} recognize '${input}' as '${match}' out of routes: [${routes2194 .map(x => `'${x}'`)2195 .join(",")}]`;2196 it(title, async function () {2197 // Arrange2198 const sut = new DefaultRouteRecognizer();2199 for (const route of routes) {2200 sut.add({ path: route });2201 }2202 const params = { ...$params };2203 const typedParams = { ...params };2204 const paramNames = Object.keys(params);2205 const configurableRoute = new ConfigurableRoute(2206 match,2207 "",2208 false2209 );2210 const endpoint = new Endpoint(2211 configurableRoute,2212 paramNames,2213 paramNames.map(x => "string"),2214 null2215 );2216 const expected = new RecognizedRoute(2217 endpoint,2218 params,2219 typedParams,2220 {}2221 );2222 // Act2223 const actual1 = await sut.recognize(path);2224 const actual2 = await sut.recognize(path);2225 // Assert2226 expect(actual1).deep.equal(2227 actual2,2228 `consecutive calls should return the same result`2229 );2230 expect(actual1).deep.equal(expected);2231 });2232 }2233 }2234 }2235 }2236 }2237 }2238 for (const [route1, route2] of [2239 ["", "?{1}"],2240 ["?{1}", ""],2241 ["a", "a"],2242 ["{1}", "{2}"],2243 ["*1", "*2"],2244 ]) {2245 it(`throws on clashing patterns: [${route1},${route2}]`, function () {2246 const sut = new DefaultRouteRecognizer();2247 let err: Error | null = null;2248 sut.add({ path: route1 });2249 try {2250 sut.add({ path: route2 });2251 } catch (e) {2252 err = e;2253 }2254 expect(() => sut.add({ path: route2 })).throws();2255 });2256 }...

Full Screen

Full Screen

encrypt.js

Source:encrypt.js Github

copy

Full Screen

1navigator = {appName:"Netscape"}2RSA = function() {3 function g(z, t) {4 return new ar(z, t)5 }6 function ah(aA, aB) {7 var t = "";8 var z = 0;9 while (z + aB < aA.length) {10 t += aA.substring(z, z + aB) + "\n";11 z += aB12 }13 return t + aA.substring(z, aA.length)14 }15 function r(t) {16 if (t < 16) {17 return "0" + t.toString(16)18 } else {19 return t.toString(16)20 }21 }22 function af(aB, aE) {23 if (aE < aB.length + 11) {24 uv_alert("Message too long for RSA");25 return null26 }27 var aD = new Array();28 var aA = aB.length - 1;29 while (aA >= 0 && aE > 0) {30 var aC = aB.charCodeAt(aA--);31 aD[--aE] = aC32 }33 aD[--aE] = 0;34 var z = new ad();35 var t = new Array();36 while (aE > 2) {37 t[0] = 0;38 while (t[0] == 0) {39 z.nextBytes(t)40 }41 aD[--aE] = t[0]42 }43 aD[--aE] = 2;44 aD[--aE] = 0;45 return new ar(aD)46 }47 function L() {48 this.n = null;49 this.e = 0;50 this.d = null;51 this.p = null;52 this.q = null;53 this.dmp1 = null;54 this.dmq1 = null;55 this.coeff = null56 }57 function o(z, t) {58 if (z != null && t != null && z.length > 0 && t.length > 0) {59 this.n = g(z, 16);60 this.e = parseInt(t, 16)61 } else {62 uv_alert("Invalid RSA public key")63 }64 }65 function W(t) {66 return t.modPowInt(this.e, this.n)67 }68 function p(aA) {69 var t = af(aA, (this.n.bitLength() + 7) >> 3);70 if (t == null) {71 return null72 }73 var aB = this.doPublic(t);74 if (aB == null) {75 return null76 }77 var z = aB.toString(16);78 if ((z.length & 1) == 0) {79 return z80 } else {81 return "0" + z82 }83 }84 L.prototype.doPublic = W;85 L.prototype.setPublic = o;86 L.prototype.encrypt = p;87 var aw;88 var ai = 244837814094590;89 var Z = ((ai & 16777215) == 15715070);90 function ar(z, t, aA) {91 if (z != null) {92 if ("number" == typeof z) {93 this.fromNumber(z, t, aA)94 } else {95 if (t == null && "string" != typeof z) {96 this.fromString(z, 256)97 } else {98 this.fromString(z, t)99 }100 }101 }102 }103 function h() {104 return new ar(null)105 }106 function b(aC, t, z, aB, aE, aD) {107 while (--aD >= 0) {108 var aA = t * this[aC++] + z[aB] + aE;109 aE = Math.floor(aA / 67108864);110 z[aB++] = aA & 67108863111 }112 return aE113 }114 function ay(aC, aH, aI, aB, aF, t) {115 var aE = aH & 32767, aG = aH >> 15;116 while (--t >= 0) {117 var aA = this[aC] & 32767;118 var aD = this[aC++] >> 15;119 var z = aG * aA + aD * aE;120 aA = aE * aA + ((z & 32767) << 15) + aI[aB] + (aF & 1073741823);121 aF = (aA >>> 30) + (z >>> 15) + aG * aD + (aF >>> 30);122 aI[aB++] = aA & 1073741823123 }124 return aF125 }126 function ax(aC, aH, aI, aB, aF, t) {127 var aE = aH & 16383, aG = aH >> 14;128 while (--t >= 0) {129 var aA = this[aC] & 16383;130 var aD = this[aC++] >> 14;131 var z = aG * aA + aD * aE;132 aA = aE * aA + ((z & 16383) << 14) + aI[aB] + aF;133 aF = (aA >> 28) + (z >> 14) + aG * aD;134 aI[aB++] = aA & 268435455135 }136 return aF137 }138 if (Z && (navigator.appName == "Microsoft Internet Explorer")) {139 ar.prototype.am = ay;140 aw = 30141 } else {142 if (Z && (navigator.appName != "Netscape")) {143 ar.prototype.am = b;144 aw = 26145 } else {146 ar.prototype.am = ax;147 aw = 28148 }149 }150 ar.prototype.DB = aw;151 ar.prototype.DM = ((1 << aw) - 1);152 ar.prototype.DV = (1 << aw);153 var aa = 52;154 ar.prototype.FV = Math.pow(2, aa);155 ar.prototype.F1 = aa - aw;156 ar.prototype.F2 = 2 * aw - aa;157 var ae = "0123456789abcdefghijklmnopqrstuvwxyz";158 var ag = new Array();159 var ap, v;160 ap = "0".charCodeAt(0);161 for (v = 0; v <= 9; ++v) {162 ag[ap++] = v163 }164 ap = "a".charCodeAt(0);165 for (v = 10; v < 36; ++v) {166 ag[ap++] = v167 }168 ap = "A".charCodeAt(0);169 for (v = 10; v < 36; ++v) {170 ag[ap++] = v171 }172 function az(t) {173 return ae.charAt(t)174 }175 function A(z, t) {176 var aA = ag[z.charCodeAt(t)];177 return (aA == null) ? -1 : aA178 }179 function Y(z) {180 for (var t = this.t - 1; t >= 0; --t) {181 z[t] = this[t]182 }183 z.t = this.t;184 z.s = this.s185 }186 function n(t) {187 this.t = 1;188 this.s = (t < 0) ? -1 : 0;189 if (t > 0) {190 this[0] = t191 } else {192 if (t < -1) {193 this[0] = t + DV194 } else {195 this.t = 0196 }197 }198 }199 function c(t) {200 var z = h();201 z.fromInt(t);202 return z203 }204 function w(aE, z) {205 var aB;206 if (z == 16) {207 aB = 4208 } else {209 if (z == 8) {210 aB = 3211 } else {212 if (z == 256) {213 aB = 8214 } else {215 if (z == 2) {216 aB = 1217 } else {218 if (z == 32) {219 aB = 5220 } else {221 if (z == 4) {222 aB = 2223 } else {224 this.fromRadix(aE, z);225 return226 }227 }228 }229 }230 }231 }232 this.t = 0;233 this.s = 0;234 var aD = aE.length, aA = false, aC = 0;235 while (--aD >= 0) {236 var t = (aB == 8) ? aE[aD] & 255 : A(aE, aD);237 if (t < 0) {238 if (aE.charAt(aD) == "-") {239 aA = true240 }241 continue242 }243 aA = false;244 if (aC == 0) {245 this[this.t++] = t246 } else {247 if (aC + aB > this.DB) {248 this[this.t - 1] |= (t & ((1 << (this.DB - aC)) - 1)) << aC;249 this[this.t++] = (t >> (this.DB - aC))250 } else {251 this[this.t - 1] |= t << aC252 }253 }254 aC += aB;255 if (aC >= this.DB) {256 aC -= this.DB257 }258 }259 if (aB == 8 && (aE[0] & 128) != 0) {260 this.s = -1;261 if (aC > 0) {262 this[this.t - 1] |= ((1 << (this.DB - aC)) - 1) << aC263 }264 }265 this.clamp();266 if (aA) {267 ar.ZERO.subTo(this, this)268 }269 }270 function O() {271 var t = this.s & this.DM;272 while (this.t > 0 && this[this.t - 1] == t) {273 --this.t274 }275 }276 function q(z) {277 if (this.s < 0) {278 return "-" + this.negate().toString(z)279 }280 var aA;281 if (z == 16) {282 aA = 4283 } else {284 if (z == 8) {285 aA = 3286 } else {287 if (z == 2) {288 aA = 1289 } else {290 if (z == 32) {291 aA = 5292 } else {293 if (z == 4) {294 aA = 2295 } else {296 return this.toRadix(z)297 }298 }299 }300 }301 }302 var aC = (1 << aA) - 1, aF, t = false, aD = "", aB = this.t;303 var aE = this.DB - (aB * this.DB) % aA;304 if (aB-- > 0) {305 if (aE < this.DB && (aF = this[aB] >> aE) > 0) {306 t = true;307 aD = az(aF)308 }309 while (aB >= 0) {310 if (aE < aA) {311 aF = (this[aB] & ((1 << aE) - 1)) << (aA - aE);312 aF |= this[--aB] >> (aE += this.DB - aA)313 } else {314 aF = (this[aB] >> (aE -= aA)) & aC;315 if (aE <= 0) {316 aE += this.DB;317 --aB318 }319 }320 if (aF > 0) {321 t = true322 }323 if (t) {324 aD += az(aF)325 }326 }327 }328 return t ? aD : "0"329 }330 function R() {331 var t = h();332 ar.ZERO.subTo(this, t);333 return t334 }335 function al() {336 return (this.s < 0) ? this.negate() : this337 }338 function G(t) {339 var aA = this.s - t.s;340 if (aA != 0) {341 return aA342 }343 var z = this.t;344 aA = z - t.t;345 if (aA != 0) {346 return aA347 }348 while (--z >= 0) {349 if ((aA = this[z] - t[z]) != 0) {350 return aA351 }352 }353 return 0354 }355 function j(z) {356 var aB = 1, aA;357 if ((aA = z >>> 16) != 0) {358 z = aA;359 aB += 16360 }361 if ((aA = z >> 8) != 0) {362 z = aA;363 aB += 8364 }365 if ((aA = z >> 4) != 0) {366 z = aA;367 aB += 4368 }369 if ((aA = z >> 2) != 0) {370 z = aA;371 aB += 2372 }373 if ((aA = z >> 1) != 0) {374 z = aA;375 aB += 1376 }377 return aB378 }379 function u() {380 if (this.t <= 0) {381 return 0382 }383 return this.DB * (this.t - 1) + j(this[this.t - 1] ^ (this.s & this.DM))384 }385 function aq(aA, z) {386 var t;387 for (t = this.t - 1; t >= 0; --t) {388 z[t + aA] = this[t]389 }390 for (t = aA - 1; t >= 0; --t) {391 z[t] = 0392 }393 z.t = this.t + aA;394 z.s = this.s395 }396 function X(aA, z) {397 for (var t = aA; t < this.t; ++t) {398 z[t - aA] = this[t]399 }400 z.t = Math.max(this.t - aA, 0);401 z.s = this.s402 }403 function s(aF, aB) {404 var z = aF % this.DB;405 var t = this.DB - z;406 var aD = (1 << t) - 1;407 var aC = Math.floor(aF / this.DB), aE = (this.s << z) & this.DM, aA;408 for (aA = this.t - 1; aA >= 0; --aA) {409 aB[aA + aC + 1] = (this[aA] >> t) | aE;410 aE = (this[aA] & aD) << z411 }412 for (aA = aC - 1; aA >= 0; --aA) {413 aB[aA] = 0414 }415 aB[aC] = aE;416 aB.t = this.t + aC + 1;417 aB.s = this.s;418 aB.clamp()419 }420 function l(aE, aB) {421 aB.s = this.s;422 var aC = Math.floor(aE / this.DB);423 if (aC >= this.t) {424 aB.t = 0;425 return426 }427 var z = aE % this.DB;428 var t = this.DB - z;429 var aD = (1 << z) - 1;430 aB[0] = this[aC] >> z;431 for (var aA = aC + 1; aA < this.t; ++aA) {432 aB[aA - aC - 1] |= (this[aA] & aD) << t;433 aB[aA - aC] = this[aA] >> z434 }435 if (z > 0) {436 aB[this.t - aC - 1] |= (this.s & aD) << t437 }438 aB.t = this.t - aC;439 aB.clamp()440 }441 function ab(z, aB) {442 var aA = 0, aC = 0, t = Math.min(z.t, this.t);443 while (aA < t) {444 aC += this[aA] - z[aA];445 aB[aA++] = aC & this.DM;446 aC >>= this.DB447 }448 if (z.t < this.t) {449 aC -= z.s;450 while (aA < this.t) {451 aC += this[aA];452 aB[aA++] = aC & this.DM;453 aC >>= this.DB454 }455 aC += this.s456 } else {457 aC += this.s;458 while (aA < z.t) {459 aC -= z[aA];460 aB[aA++] = aC & this.DM;461 aC >>= this.DB462 }463 aC -= z.s464 }465 aB.s = (aC < 0) ? -1 : 0;466 if (aC < -1) {467 aB[aA++] = this.DV + aC468 } else {469 if (aC > 0) {470 aB[aA++] = aC471 }472 }473 aB.t = aA;474 aB.clamp()475 }476 function D(z, aB) {477 var t = this.abs(), aC = z.abs();478 var aA = t.t;479 aB.t = aA + aC.t;480 while (--aA >= 0) {481 aB[aA] = 0482 }483 for (aA = 0; aA < aC.t; ++aA) {484 aB[aA + t.t] = t.am(0, aC[aA], aB, aA, 0, t.t)485 }486 aB.s = 0;487 aB.clamp();488 if (this.s != z.s) {489 ar.ZERO.subTo(aB, aB)490 }491 }492 function Q(aA) {493 var t = this.abs();494 var z = aA.t = 2 * t.t;495 while (--z >= 0) {496 aA[z] = 0497 }498 for (z = 0; z < t.t - 1; ++z) {499 var aB = t.am(z, t[z], aA, 2 * z, 0, 1);500 if ((aA[z + t.t] += t.am(z + 1, 2 * t[z], aA, 2 * z + 1, aB, t.t - z - 1)) >= t.DV) {501 aA[z + t.t] -= t.DV;502 aA[z + t.t + 1] = 1503 }504 }505 if (aA.t > 0) {506 aA[aA.t - 1] += t.am(z, t[z], aA, 2 * z, 0, 1)507 }508 aA.s = 0;509 aA.clamp()510 }511 function E(aI, aF, aE) {512 var aO = aI.abs();513 if (aO.t <= 0) {514 return515 }516 var aG = this.abs();517 if (aG.t < aO.t) {518 if (aF != null) {519 aF.fromInt(0)520 }521 if (aE != null) {522 this.copyTo(aE)523 }524 return525 }526 if (aE == null) {527 aE = h()528 }529 var aC = h(), z = this.s, aH = aI.s;530 var aN = this.DB - j(aO[aO.t - 1]);531 if (aN > 0) {532 aO.lShiftTo(aN, aC);533 aG.lShiftTo(aN, aE)534 } else {535 aO.copyTo(aC);536 aG.copyTo(aE)537 }538 var aK = aC.t;539 var aA = aC[aK - 1];540 if (aA == 0) {541 return542 }543 var aJ = aA * (1 << this.F1) + ((aK > 1) ? aC[aK - 2] >> this.F2 : 0);544 var aR = this.FV / aJ, aQ = (1 << this.F1) / aJ, aP = 1 << this.F2;545 var aM = aE.t, aL = aM - aK, aD = (aF == null) ? h() : aF;546 aC.dlShiftTo(aL, aD);547 if (aE.compareTo(aD) >= 0) {548 aE[aE.t++] = 1;549 aE.subTo(aD, aE)550 }551 ar.ONE.dlShiftTo(aK, aD);552 aD.subTo(aC, aC);553 while (aC.t < aK) {554 aC[aC.t++] = 0555 }556 while (--aL >= 0) {557 var aB = (aE[--aM] == aA) ? this.DM : Math.floor(aE[aM] * aR + (aE[aM - 1] + aP) * aQ);558 if ((aE[aM] += aC.am(0, aB, aE, aL, 0, aK)) < aB) {559 aC.dlShiftTo(aL, aD);560 aE.subTo(aD, aE);561 while (aE[aM] < --aB) {562 aE.subTo(aD, aE)563 }564 }565 }566 if (aF != null) {567 aE.drShiftTo(aK, aF);568 if (z != aH) {569 ar.ZERO.subTo(aF, aF)570 }571 }572 aE.t = aK;573 aE.clamp();574 if (aN > 0) {575 aE.rShiftTo(aN, aE)576 }577 if (z < 0) {578 ar.ZERO.subTo(aE, aE)579 }580 }581 function N(t) {582 var z = h();583 this.abs().divRemTo(t, null, z);584 if (this.s < 0 && z.compareTo(ar.ZERO) > 0) {585 t.subTo(z, z)586 }587 return z588 }589 function K(t) {590 this.m = t591 }592 function V(t) {593 if (t.s < 0 || t.compareTo(this.m) >= 0) {594 return t.mod(this.m)595 } else {596 return t597 }598 }599 function ak(t) {600 return t601 }602 function J(t) {603 t.divRemTo(this.m, null, t)604 }605 function H(t, aA, z) {606 t.multiplyTo(aA, z);607 this.reduce(z)608 }609 function au(t, z) {610 t.squareTo(z);611 this.reduce(z)612 }613 K.prototype.convert = V;614 K.prototype.revert = ak;615 K.prototype.reduce = J;616 K.prototype.mulTo = H;617 K.prototype.sqrTo = au;618 function B() {619 if (this.t < 1) {620 return 0621 }622 var t = this[0];623 if ((t & 1) == 0) {624 return 0625 }626 var z = t & 3;627 z = (z * (2 - (t & 15) * z)) & 15;628 z = (z * (2 - (t & 255) * z)) & 255;629 z = (z * (2 - (((t & 65535) * z) & 65535))) & 65535;630 z = (z * (2 - t * z % this.DV)) % this.DV;631 return (z > 0) ? this.DV - z : -z632 }633 function f(t) {634 this.m = t;635 this.mp = t.invDigit();636 this.mpl = this.mp & 32767;637 this.mph = this.mp >> 15;638 this.um = (1 << (t.DB - 15)) - 1;639 this.mt2 = 2 * t.t640 }641 function aj(t) {642 var z = h();643 t.abs().dlShiftTo(this.m.t, z);644 z.divRemTo(this.m, null, z);645 if (t.s < 0 && z.compareTo(ar.ZERO) > 0) {646 this.m.subTo(z, z)647 }648 return z649 }650 function at(t) {651 var z = h();652 t.copyTo(z);653 this.reduce(z);654 return z655 }656 function P(t) {657 while (t.t <= this.mt2) {658 t[t.t++] = 0659 }660 for (var aA = 0; aA < this.m.t; ++aA) {661 var z = t[aA] & 32767;662 var aB = (z * this.mpl + (((z * this.mph + (t[aA] >> 15) * this.mpl) & this.um) << 15)) & t.DM;663 z = aA + this.m.t;664 t[z] += this.m.am(0, aB, t, aA, 0, this.m.t);665 while (t[z] >= t.DV) {666 t[z] -= t.DV;667 t[++z]++668 }669 }670 t.clamp();671 t.drShiftTo(this.m.t, t);672 if (t.compareTo(this.m) >= 0) {673 t.subTo(this.m, t)674 }675 }676 function am(t, z) {677 t.squareTo(z);678 this.reduce(z)679 }680 function y(t, aA, z) {681 t.multiplyTo(aA, z);682 this.reduce(z)683 }684 f.prototype.convert = aj;685 f.prototype.revert = at;686 f.prototype.reduce = P;687 f.prototype.mulTo = y;688 f.prototype.sqrTo = am;689 function i() {690 return ((this.t > 0) ? (this[0] & 1) : this.s) == 0691 }692 function x(aF, aG) {693 if (aF > 4294967295 || aF < 1) {694 return ar.ONE695 }696 var aE = h(), aA = h(), aD = aG.convert(this), aC = j(aF) - 1;697 aD.copyTo(aE);698 while (--aC >= 0) {699 aG.sqrTo(aE, aA);700 if ((aF & (1 << aC)) > 0) {701 aG.mulTo(aA, aD, aE)702 } else {703 var aB = aE;704 aE = aA;705 aA = aB706 }707 }708 return aG.revert(aE)709 }710 function an(aA, t) {711 var aB;712 if (aA < 256 || t.isEven()) {713 aB = new K(t)714 } else {715 aB = new f(t)716 }717 return this.exp(aA, aB)718 }719 ar.prototype.copyTo = Y;720 ar.prototype.fromInt = n;721 ar.prototype.fromString = w;722 ar.prototype.clamp = O;723 ar.prototype.dlShiftTo = aq;724 ar.prototype.drShiftTo = X;725 ar.prototype.lShiftTo = s;726 ar.prototype.rShiftTo = l;727 ar.prototype.subTo = ab;728 ar.prototype.multiplyTo = D;729 ar.prototype.squareTo = Q;730 ar.prototype.divRemTo = E;731 ar.prototype.invDigit = B;732 ar.prototype.isEven = i;733 ar.prototype.exp = x;734 ar.prototype.toString = q;735 ar.prototype.negate = R;736 ar.prototype.abs = al;737 ar.prototype.compareTo = G;738 ar.prototype.bitLength = u;739 ar.prototype.mod = N;740 ar.prototype.modPowInt = an;741 ar.ZERO = c(0);742 ar.ONE = c(1);743 var m;744 var U;745 var ac;746 function d(t) {747 U[ac++] ^= t & 255;748 U[ac++] ^= (t >> 8) & 255;749 U[ac++] ^= (t >> 16) & 255;750 U[ac++] ^= (t >> 24) & 255;751 if (ac >= M) {752 ac -= M753 }754 }755 function T() {756 d(new Date().getTime())757 }758 if (U == null) {759 U = new Array();760 ac = 0;761 var I;762 if (navigator.appName == "Netscape" && navigator.appVersion < "5" && window.crypto && window.crypto.random) {763 var F = window.crypto.random(32);764 for (I = 0; I < F.length; ++I) {765 U[ac++] = F.charCodeAt(I) & 255766 }767 }768 while (ac < M) {769 I = Math.floor(65536 * Math.random());770 U[ac++] = I >>> 8;771 U[ac++] = I & 255772 }773 ac = 0;774 T()775 }776 function C() {777 if (m == null) {778 T();779 m = ao();780 m.init(U);781 for (ac = 0; ac < U.length; ++ac) {782 U[ac] = 0783 }784 ac = 0785 }786 return m.next()787 }788 function av(z) {789 var t;790 for (t = 0; t < z.length; ++t) {791 z[t] = C()792 }793 }794 function ad() {795 }796 ad.prototype.nextBytes = av;797 function k() {798 this.i = 0;799 this.j = 0;800 this.S = new Array()801 }802 function e(aC) {803 var aB, z, aA;804 for (aB = 0; aB < 256; ++aB) {805 this.S[aB] = aB806 }807 z = 0;808 for (aB = 0; aB < 256; ++aB) {809 z = (z + this.S[aB] + aC[aB % aC.length]) & 255;810 aA = this.S[aB];811 this.S[aB] = this.S[z];812 this.S[z] = aA813 }814 this.i = 0;815 this.j = 0816 }817 function a() {818 var z;819 this.i = (this.i + 1) & 255;820 this.j = (this.j + this.S[this.i]) & 255;821 z = this.S[this.i];822 this.S[this.i] = this.S[this.j];823 this.S[this.j] = z;824 return this.S[(z + this.S[this.i]) & 255]825 }826 k.prototype.init = e;827 k.prototype.next = a;828 function ao() {829 return new k()830 }831 var M = 256;832 function S(aB, aA, z) {833 aA = "F20CE00BAE5361F8FA3AE9CEFA495362FF7DA1BA628F64A347F0A8C012BF0B254A30CD92ABFFE7A6EE0DC424CB6166F8819EFA5BCCB20EDFB4AD02E412CCF579B1CA711D55B8B0B3AEB60153D5E0693A2A86F3167D7847A0CB8B00004716A9095D9BADC977CBB804DBDCBA6029A9710869A453F27DFDDF83C016D928B3CBF4C7";834 z = "3";835 var t = new L();836 t.setPublic(aA, z);837 return t.encrypt(aB)838 }839 return {rsa_encrypt: S}840}();841window = {};842Encryption = function() {843 var hexcase = 1;844 var b64pad = "";845 var chrsz = 8;846 var mode = 32;847 function md5(s) {848 return hex_md5(s)849 }850 function hex_md5(s) {851 return binl2hex(core_md5(str2binl(s), s.length * chrsz))852 }853 function str_md5(s) {854 return binl2str(core_md5(str2binl(s), s.length * chrsz))855 }856 function hex_hmac_md5(key, data) {857 return binl2hex(core_hmac_md5(key, data))858 }859 function b64_hmac_md5(key, data) {860 return binl2b64(core_hmac_md5(key, data))861 }862 function str_hmac_md5(key, data) {863 return binl2str(core_hmac_md5(key, data))864 }865 function core_md5(x, len) {866 x[len >> 5] |= 128 << ((len) % 32);867 x[(((len + 64) >>> 9) << 4) + 14] = len;868 var a = 1732584193;869 var b = -271733879;870 var c = -1732584194;871 var d = 271733878;872 for (var i = 0; i < x.length; i += 16) {873 var olda = a;874 var oldb = b;875 var oldc = c;876 var oldd = d;877 a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);878 d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);879 c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);880 b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);881 a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);882 d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);883 c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);884 b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);885 a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);886 d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);887 c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);888 b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);889 a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);890 d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);891 c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);892 b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);893 a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);894 d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);895 c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);896 b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);897 a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);898 d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);899 c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);900 b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);901 a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);902 d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);903 c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);904 b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);905 a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);906 d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);907 c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);908 b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);909 a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);910 d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);911 c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);912 b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);913 a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);914 d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);915 c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);916 b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);917 a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);918 d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);919 c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);920 b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);921 a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);922 d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);923 c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);924 b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);925 a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);926 d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);927 c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);928 b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);929 a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);930 d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);931 c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);932 b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);933 a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);934 d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);935 c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);936 b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);937 a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);938 d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);939 c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);940 b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);941 a = safe_add(a, olda);942 b = safe_add(b, oldb);943 c = safe_add(c, oldc);944 d = safe_add(d, oldd)945 }946 if (mode == 16) {947 return Array(b, c)948 } else {949 return Array(a, b, c, d)950 }951 }952 function md5_cmn(q, a, b, x, s, t) {953 return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b)954 }955 function md5_ff(a, b, c, d, x, s, t) {956 return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t)957 }958 function md5_gg(a, b, c, d, x, s, t) {959 return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t)960 }961 function md5_hh(a, b, c, d, x, s, t) {962 return md5_cmn(b ^ c ^ d, a, b, x, s, t)963 }964 function md5_ii(a, b, c, d, x, s, t) {965 return md5_cmn(c ^ (b | (~d)), a, b, x, s, t)966 }967 function core_hmac_md5(key, data) {968 var bkey = str2binl(key);969 if (bkey.length > 16) {970 bkey = core_md5(bkey, key.length * chrsz)971 }972 var ipad = Array(16), opad = Array(16);973 for (var i = 0; i < 16; i++) {974 ipad[i] = bkey[i] ^ 909522486;975 opad[i] = bkey[i] ^ 1549556828976 }977 var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);978 return core_md5(opad.concat(hash), 512 + 128)979 }980 function safe_add(x, y) {981 var lsw = (x & 65535) + (y & 65535);982 var msw = (x >> 16) + (y >> 16) + (lsw >> 16);983 return (msw << 16) | (lsw & 65535)984 }985 function bit_rol(num, cnt) {986 return (num << cnt) | (num >>> (32 - cnt))987 }988 function str2binl(str) {989 var bin = Array();990 var mask = (1 << chrsz) - 1;991 for (var i = 0; i < str.length * chrsz; i += chrsz) {992 bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32)993 }994 return bin995 }996 function binl2str(bin) {997 var str = "";998 var mask = (1 << chrsz) - 1;999 for (var i = 0; i < bin.length * 32; i += chrsz) {1000 str += String.fromCharCode((bin[i >> 5] >>> (i % 32)) & mask)1001 }1002 return str1003 }1004 function binl2hex(binarray) {1005 var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";1006 var str = "";1007 for (var i = 0; i < binarray.length * 4; i++) {1008 str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 15) + hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 15)1009 }1010 return str1011 }1012 function binl2b64(binarray) {1013 var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";1014 var str = "";1015 for (var i = 0; i < binarray.length * 4; i += 3) {1016 var triplet = (((binarray[i >> 2] >> 8 * (i % 4)) & 255) << 16) | (((binarray[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 255) << 8) | ((binarray[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 255);1017 for (var j = 0; j < 4; j++) {1018 if (i * 8 + j * 6 > binarray.length * 32) {1019 str += b64pad1020 } else {1021 str += tab.charAt((triplet >> 6 * (3 - j)) & 63)1022 }1023 }1024 }1025 return str1026 }1027 function hexchar2bin(str) {1028 var arr = [];1029 for (var i = 0; i < str.length; i = i + 2) {1030 arr.push("\\x" + str.substr(i, 2))1031 }1032 arr = arr.join("");1033 eval("var temp = '" + arr + "'");1034 return temp1035 }1036 function __monitor(mid, probability) {1037 if (Math.random() > (probability || 1)) {1038 return1039 }1040 //var url = location.protocol + "//ui.ptlogin2.qq.com/cgi-bin/report?id=" + mid;1041 //var s = document.createElement("img");1042 //s.src = url;1043 //s = null1044 }1045 function getEncryption(password, salt_, vcode, isMd5) {1046 vcode = vcode || "";1047 password = password || "";1048 eval("salt='"+salt_.replace(/\-/g,'\\')+"';")1049 TEA = window.TEA;1050 var md5Pwd = isMd5 ? password : md5(password), h1 = hexchar2bin(md5Pwd), s2 = md5(h1 + salt), rsaH1 = RSA.rsa_encrypt(h1), rsaH1Len = (rsaH1.length / 2).toString(16), hexVcode = TEA.strToBytes(vcode.toUpperCase()), vcodeLen = "000" + vcode.length.toString(16);1051 while (rsaH1Len.length < 4) {1052 rsaH1Len = "0" + rsaH1Len1053 }1054 1055 TEA.initkey(s2);1056 var saltPwd = TEA.enAsBase64(rsaH1Len + rsaH1 + TEA.strToBytes(salt) + vcodeLen + hexVcode);1057 TEA.initkey("");1058 __monitor(488358, 1);1059 return saltPwd.replace(/[\/\+=]/g, function(a) {1060 return {"/": "-","+": "*","=": "_"}[a]1061 })1062 }1063 function getRSAEncryption(password, vcode, isMd5) {1064 var str1 = isMd5 ? password : md5(password);1065 var str2 = str1 + vcode.toUpperCase();1066 var str3 = RSA.rsa_encrypt(str2);1067 return str31068 }1069 return {getEncryption: getEncryption,getRSAEncryption: getRSAEncryption,md5: md5}1070}();1071(function(q) {1072 var r = "", a = 0, g = [], w = [], x = 0, t = 0, l = [], s = [], m = true;1073 function e() {1074 return Math.round(Math.random() * 4294967295)1075 }1076 function i(B, C, y) {1077 if (!y || y > 4) {1078 y = 41079 }1080 var z = 0;1081 for (var A = C; A < C + y; A++) {1082 z <<= 8;1083 z |= B[A]1084 }1085 return (z & 4294967295) >>> 01086 }1087 function b(z, A, y) {1088 z[A + 3] = (y >> 0) & 255;1089 z[A + 2] = (y >> 8) & 255;1090 z[A + 1] = (y >> 16) & 255;1091 z[A + 0] = (y >> 24) & 2551092 }1093 function v(B) {1094 if (!B) {1095 return ""1096 }1097 var y = "";1098 for (var z = 0; z < B.length; z++) {1099 var A = Number(B[z]).toString(16);1100 if (A.length == 1) {1101 A = "0" + A1102 }1103 y += A1104 }1105 return y1106 }1107 function u(z) {1108 var A = "";1109 for (var y = 0; y < z.length; y += 2) {1110 A += String.fromCharCode(parseInt(z.substr(y, 2), 16))1111 }1112 return A1113 }1114 function c(A) {1115 if (!A) {1116 return ""1117 }1118 var z = [];1119 for (var y = 0; y < A.length; y++) {1120 z[y] = A.charCodeAt(y)1121 }1122 return v(z)1123 }1124 function h(A) {1125 g = new Array(8);1126 w = new Array(8);1127 x = t = 0;1128 m = true;1129 a = 0;1130 var y = A.length;1131 var B = 0;1132 a = (y + 10) % 8;1133 if (a != 0) {1134 a = 8 - a1135 }1136 l = new Array(y + a + 10);1137 g[0] = ((e() & 248) | a) & 255;1138 for (var z = 1; z <= a; z++) {1139 g[z] = e() & 2551140 }1141 a++;1142 for (var z = 0; z < 8; z++) {1143 w[z] = 01144 }1145 B = 1;1146 while (B <= 2) {1147 if (a < 8) {1148 g[a++] = e() & 255;1149 B++1150 }1151 if (a == 8) {1152 o()1153 }1154 }1155 var z = 0;1156 while (y > 0) {1157 if (a < 8) {1158 g[a++] = A[z++];1159 y--1160 }1161 if (a == 8) {1162 o()1163 }1164 }1165 B = 1;1166 while (B <= 7) {1167 if (a < 8) {1168 g[a++] = 0;1169 B++1170 }1171 if (a == 8) {1172 o()1173 }1174 }1175 return l1176 }1177 function p(C) {1178 var B = 0;1179 var z = new Array(8);1180 var y = C.length;1181 s = C;1182 if (y % 8 != 0 || y < 16) {1183 return null1184 }1185 w = k(C);1186 a = w[0] & 7;1187 B = y - a - 10;1188 if (B < 0) {1189 return null1190 }1191 for (var A = 0; A < z.length; A++) {1192 z[A] = 01193 }1194 l = new Array(B);1195 t = 0;1196 x = 8;1197 a++;1198 var D = 1;1199 while (D <= 2) {1200 if (a < 8) {1201 a++;1202 D++1203 }1204 if (a == 8) {1205 z = C;1206 if (!f()) {1207 return null1208 }1209 }1210 }1211 var A = 0;1212 while (B != 0) {1213 if (a < 8) {1214 l[A] = (z[t + a] ^ w[a]) & 255;1215 A++;1216 B--;1217 a++1218 }1219 if (a == 8) {1220 z = C;1221 t = x - 8;1222 if (!f()) {1223 return null1224 }1225 }1226 }1227 for (D = 1; D < 8; D++) {1228 if (a < 8) {1229 if ((z[t + a] ^ w[a]) != 0) {1230 return null1231 }1232 a++1233 }1234 if (a == 8) {1235 z = C;1236 t = x;1237 if (!f()) {1238 return null1239 }1240 }1241 }1242 return l1243 }1244 function o() {1245 for (var y = 0; y < 8; y++) {1246 if (m) {1247 g[y] ^= w[y]1248 } else {1249 g[y] ^= l[t + y]1250 }1251 }1252 var z = j(g);1253 for (var y = 0; y < 8; y++) {1254 l[x + y] = z[y] ^ w[y];1255 w[y] = g[y]1256 }1257 t = x;1258 x += 8;1259 a = 0;1260 m = false1261 }1262 function j(A) {1263 var B = 16;1264 var G = i(A, 0, 4);1265 var F = i(A, 4, 4);1266 var I = i(r, 0, 4);1267 var H = i(r, 4, 4);1268 var E = i(r, 8, 4);1269 var D = i(r, 12, 4);1270 var C = 0;1271 var J = 2654435769 >>> 0;1272 while (B-- > 0) {1273 C += J;1274 C = (C & 4294967295) >>> 0;1275 G += ((F << 4) + I) ^ (F + C) ^ ((F >>> 5) + H);1276 G = (G & 4294967295) >>> 0;1277 F += ((G << 4) + E) ^ (G + C) ^ ((G >>> 5) + D);1278 F = (F & 4294967295) >>> 01279 }1280 var K = new Array(8);1281 b(K, 0, G);1282 b(K, 4, F);1283 return K1284 }1285 function k(A) {1286 var B = 16;1287 var G = i(A, 0, 4);1288 var F = i(A, 4, 4);1289 var I = i(r, 0, 4);1290 var H = i(r, 4, 4);1291 var E = i(r, 8, 4);1292 var D = i(r, 12, 4);1293 var C = 3816266640 >>> 0;1294 var J = 2654435769 >>> 0;1295 while (B-- > 0) {1296 F -= ((G << 4) + E) ^ (G + C) ^ ((G >>> 5) + D);1297 F = (F & 4294967295) >>> 0;1298 G -= ((F << 4) + I) ^ (F + C) ^ ((F >>> 5) + H);1299 G = (G & 4294967295) >>> 0;1300 C -= J;1301 C = (C & 4294967295) >>> 01302 }1303 var K = new Array(8);1304 b(K, 0, G);1305 b(K, 4, F);1306 return K1307 }1308 function f() {1309 var y = s.length;1310 for (var z = 0; z < 8; z++) {1311 w[z] ^= s[x + z]1312 }1313 w = k(w);1314 x += 8;1315 a = 0;1316 return true1317 }1318 function n(C, B) {1319 var A = [];1320 if (B) {1321 for (var z = 0; z < C.length; z++) {1322 A[z] = C.charCodeAt(z) & 2551323 }1324 } else {1325 var y = 0;1326 for (var z = 0; z < C.length; z += 2) {1327 A[y++] = parseInt(C.substr(z, 2), 16)1328 }1329 }1330 return A1331 }1332 q.TEA = {encrypt: function(B, A) {1333 var z = n(B, A);1334 var y = h(z);1335 return v(y)1336 },enAsBase64: function(D, C) {1337 var B = n(D, C);1338 var A = h(B);1339 var y = "";1340 for (var z = 0; z < A.length; z++) {1341 y += String.fromCharCode(A[z])1342 }1343 return q.btoa(y)1344 },decrypt: function(A) {1345 var z = n(A, false);1346 var y = p(z);1347 return v(y)1348 },initkey: function(y, z) {1349 r = n(y, z)1350 },bytesToStr: u,strToBytes: c,bytesInStr: v,dataFromStr: n};1351 var d = {};1352 d.PADCHAR = "=";1353 d.ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";1354 d.getbyte = function(A, z) {1355 var y = A.charCodeAt(z);1356 if (y > 255) {1357 throw "INVALID_CHARACTER_ERR: DOM Exception 5"1358 }1359 return y1360 };1361 d.encode = function(C) {1362 if (arguments.length != 1) {1363 throw "SyntaxError: Not enough arguments"1364 }1365 var z = d.PADCHAR;1366 var E = d.ALPHA;1367 var D = d.getbyte;1368 var B, F;1369 var y = [];1370 C = "" + C;1371 var A = C.length - C.length % 3;1372 if (C.length == 0) {1373 return C1374 }1375 for (B = 0; B < A; B += 3) {1376 F = (D(C, B) << 16) | (D(C, B + 1) << 8) | D(C, B + 2);1377 y.push(E.charAt(F >> 18));1378 y.push(E.charAt((F >> 12) & 63));1379 y.push(E.charAt((F >> 6) & 63));1380 y.push(E.charAt(F & 63))1381 }1382 switch (C.length - A) {1383 case 1:1384 F = D(C, B) << 16;1385 y.push(E.charAt(F >> 18) + E.charAt((F >> 12) & 63) + z + z);1386 break;1387 case 2:1388 F = (D(C, B) << 16) | (D(C, B + 1) << 8);1389 y.push(E.charAt(F >> 18) + E.charAt((F >> 12) & 63) + E.charAt((F >> 6) & 63) + z);1390 break1391 }1392 return y.join("")1393 };1394 if (!window.btoa) {1395 window.btoa = d.encode1396 }1397})(window);1398//export symbol1399encryption = Encryption.getEncryption;1400rsaencryption = Encryption.getRSAEncryption;1401function xyz(x,y,z){1402return x+y+z;...

Full Screen

Full Screen

JDK-8061391.js

Source:JDK-8061391.js Github

copy

Full Screen

1/*2 * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4 *5 * This code is free software; you can redistribute it and/or modify it6 * under the terms of the GNU General Public License version 2 only, as7 * published by the Free Software Foundation.8 *9 * This code is distributed in the hope that it will be useful, but WITHOUT10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12 * version 2 for more details (a copy is included in the LICENSE file that13 * accompanied this code).14 *15 * You should have received a copy of the GNU General Public License version16 * 2 along with this work; if not, write to the Free Software Foundation,17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18 *19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20 * or visit www.oracle.com if you need additional information or have any21 * questions.22 */23/**24 * JDK-8061391 - Checks that the optimistic builtin for concat is semantically25 * correct.26 *27 * @test28 * @run29 */30var maxJavaInt = 0x7fffffff;31var ia = [1, 2, 3, 4];32var la = [maxJavaInt + 1000, maxJavaInt + 2000, maxJavaInt + 3000, maxJavaInt + 4000];33var da = [1.1, 2.2, 3.3, 4.4];34var oa = ["one", "two", "three", "four"]; 35var aa = [ia, la, da, oa];36function concats() {37 print("shared callsite");38 print(ia);39 print(la);40 print(da);41 print(oa);42 print(aa);43 44 for (var i = 0; i < aa.length; i++) {45 print(aa[i].concat(aa[i][0]));46 for (var j = 0; j < aa.length ; j++) {47 print(aa[i].concat(aa[j]));48 }49 }50}51function concats_inline() {52 print("separate callsites");53 print(ia);54 print(la);55 print(da);56 print(oa);57 print(aa);58 59 print(aa[0].concat(aa[0]));60 print(aa[0].concat(aa[1]));61 print(aa[0].concat(aa[2]));62 print(aa[0].concat(aa[3]));63 print(aa[0].concat(aa[0][0])); 64 print(aa[1].concat(aa[0]));65 print(aa[1].concat(aa[1]));66 print(aa[1].concat(aa[2]));67 print(aa[1].concat(aa[3]));68 print(aa[1].concat(aa[1][0])); 69 print(aa[2].concat(aa[0]));70 print(aa[2].concat(aa[1]));71 print(aa[2].concat(aa[2]));72 print(aa[2].concat(aa[3]));73 print(aa[2].concat(aa[2][0])); 74 print(aa[3].concat(aa[0]));75 print(aa[3].concat(aa[1]));76 print(aa[3].concat(aa[2]));77 print(aa[3].concat(aa[3]));78 print(aa[3].concat(aa[3][0])); 79}80concats();81concats_inline();82print();83var oldia = ia.slice(0); //clone ia84print("oldia = " + oldia);85ia[10] = "sparse";86print("oldia = " + oldia);87print();88print("Redoing with sparse arrays");89concats();90concats_inline();91ia = oldia;92print("Restored ia = " + ia);93function concat_expand() {94 print("concat type expansion");95 print(ia.concat(la));96 print(ia.concat(da));97 print(ia.concat(oa));98 print(la.concat(ia));99 print(la.concat(da));100 print(la.concat(oa));101 print(da.concat(ia));102 print(da.concat(la));103 print(da.concat(oa));104}105print();106concat_expand();107print();108function concat_varargs() {109 print("concat varargs");110 print(ia.concat(la)); //fast111 print(ia.concat(la, da, oa)); //slow112 var slow = ia.concat(1, maxJavaInt * 2, 4711.17, function() { print("hello, world") }); //slow113 print(slow);114 return slow;115}116var slow = concat_varargs();117print();118print("sanity checks");119slow.map(120 function(elem) {121 if (elem instanceof Function) {122 elem();123 } else {124 print((typeof elem) + " = " + elem);125 }126 });127print(ia.concat({key: "value"}));...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1import { aa } from 'storybook-root';2import { bb } from 'storybook-root';3import { cc } from 'storybook-root';4import { dd } from 'storybook-root';5import { ee } from 'storybook-root';6import { ff } from 'storybook-root';7import { gg } from 'storybook-root';8import { hh } from 'storybook-root';9import { ii } from 'storybook-root';10import { jj } from 'storybook-root';11import { kk } from 'storybook-root';12import { ll } from 'storybook-root';13import { mm } from 'storybook-root';14import { nn } from 'storybook-root';15import { oo } from 'storybook-root';16import { pp } from 'storybook-root';17import { qq } from 'storybook-root';18import { rr } from 'storybook-root';19import { ss } from 'storybook-root';20import { tt } from 'storybook-root';21import { uu } from 'storybook-root';22import { vv } from 'storybook-root';23import { ww } from 'storybook-root';24import { xx } from 'storybook-root';25import { yy } from 'storybook-root';

Full Screen

Using AI Code Generation

copy

Full Screen

1import { aa } from 'storybook-root';2import { bb } from 'storybook-root';3import { aa } from 'storybook-root';4import { bb } from 'storybook-root';5module.exports = (baseConfig, env, defaultConfig) => {6 defaultConfig.resolve.modules.push(path.resolve(__dirname, '../node_modules'));7 return defaultConfig;8};

Full Screen

Using AI Code Generation

copy

Full Screen

1import { aa } from 'storybook-root';2const bb = () => {3 return aa();4};5export { bb };6import { bb } from 'test.js';7const cc = () => {8 return bb();9};10export { cc };11import { cc } from 'test2.js';12const dd = () => {13 return cc();14};15export { dd };16import { dd } from 'index.js';17const ee = () => {18 return dd();19};20export { ee };

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run storybook-root 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