tice, String contents) throws IOException {
		Project prjInfo = getProjectBasicInfo(ossNotice.getPrjId());

		// OSS Notice가 N/A이면 고지문을 생성하지 않는다.
		if (CoConstDef.CD_NOTICE_TYPE_NA.equals(prjInfo.getNoticeType())) {
			return true;
		}

		prjInfo.setUseCustomNoticeYn(!isEmpty(contents) ? CoConstDef.FLAG_YES : CoConstDef.FLAG_NO);
		contents = avoidNull(contents, getNoticeHtml(ossNotice));

		return getNoticeVelocityTemplateFile(contents, prjInfo);
	}

	@Override
	public String getNoticeHtml(OssNotice ossNotice) throws IOException {
		// Convert Map to Apache Velocity Template
		return CommonFunction.VelocityTemplateToString(getNoticeHtmlInfo(ossNotice));
	}

	private boolean getNoticeVelocityTemplateFile(String contents, Project project) {
		boolean procResult = true;

		try {
			// file path and name 설정
			// 파일 path : <upload_home>/notice/
			// 파일명 : 임시: 프로젝트ID_yyyyMMdd\

			String filePath = NOTICE_PATH + "/" + project.getPrjId();
			// 이전에 생성된 파일은 모두 삭제한다.
			Path rootPath = Paths.get(filePath);
			if (rootPath.toFile().exists()) {
				for (String _fName : rootPath.toFile().list()) {
					Files.deleteIfExists(rootPath.resolve(_fName));

					T2File file = new T2File();
					file.setLogiNm(_fName);
					file.setLogiPath(filePath);

					int returnSuccess = fileMapper.updateFileDelYnByFilePathNm(file);

					if (returnSuccess > 0){
						log.debug(filePath + "/" + _fName + " is delete success.");
					}else{
						log.debug(filePath + "/" + _fName + " is delete failed.");
					}
				}
			}

			String fileName = CommonFunction.getNoticeFileName("Self-Check_"+project.getPrjId(), project.getPrjName(), project.getPrjVersion(), CommonFunction.getCurrentDateTime("yyMMdd"), "html");

			if (oss.fosslight.util.FileUtil.writeFile(filePath, fileName, contents)) {
				// 파일 등록
				String FileSeq = fileService.registFileWithFileName(filePath, fileName);

				// project 정보 업데이트
				Project projectParam = new Project();
				projectParam.setPrjId(project.getPrjId());
				projectParam.setNoticeFileId(FileSeq);
				projectParam.setUseCustomNoticeYn(StringUtil.nvl(project.getUseCustomNoticeYn(),CoConstDef.FLAG_NO));

				selfCheckMapper.updateNoticeFileInfo(projectParam);
			} else {
				procResult = false;
			}
		} catch (Exception e) {
			log.error(e.getMessage(), e);

			procResult = false;
		}

		return procResult;
	}

	public Map<String, Object> getNoticeHtmlInfo(OssNotice ossNotice) {
		Map<String, Object> model = new HashMap<String, Object>();

		String noticeType = "";
		String prjName = "";
		String prjVersion = "";
		String prjId = "";
		String distributeSite = "";
		int dashSeq = 0;
		boolean hideOssVersionFlag = CoConstDef.FLAG_YES.equals(ossNotice.getHideOssVersionYn());

		// NETWORK SERVER 여부를 체크한다.

		Project project = new Project();
		project.setPrjId(ossNotice.getPrjId());

		project = selfCheckMapper.getProjectBasicInfo(project);

		if (project != null){
			if (isEmpty(prjName)) {


oTeaserPartnerContent;
	}

	.o-teaser--promoted-content {
		.o-teaser__heading a {
			@include oPrivateTypographyLinkThemeOverride(
				$theme: (
					'base': $_o-teaser-base-color,
					'hover': $_o-teaser-focus-hover,
				)
			);
		}
	}
}

@mixin _oTeaserElementsRelatedItems {
	.o-teaser__related {
		@include _oTeaserRelated;
	}

	.o-teaser__related-item {
		@include _oTeaserRelatedItem;
	}
}

@mixin _oTeaserThemeStandard {
	.o-teaser--opinion {
		@include _oTeaserOpinion;

		&.o-teaser--opinion-background {
			@include _oTeaserOpinionBackground;
		}
	}

	.o-teaser--inverse {
		@include _oTeaserInverse;
	}
}

@mixin _oTeaserThemeSmall {
	.o-teaser--small {
		@include _oTeaserSmall;

		&.o-teaser--stacked {
			@include _oTeaserSmallStacked;
		}

		&.o-teaser--image-position-right {
			@include _oTeaserSmallImagePositionRight;
		}
	}
}

@mixin _oTeaserThemeLarge {
	.o-teaser--large,
	.o-teaser--large-portrait,
	.o-teaser--large-landscape {
		@include _oTeaserLarge;
	}

	.o-teaser--large-portrait {
		@include _oTeaserLargeImagePortrait;
	}

	.o-teaser--large-landscape {
		@include _oTeaserLargeImageLandscape;
	}

	.o-teaser--large.o-teaser--has-image {
		@include _oTeaserImageContainer;
		@include _oTeaserLargeWithImage;
	}
}

@mixin _oTeaserThemeHero {
	.o-teaser--hero {
		@include _oTeaserLarge;
		@include _oTeaserHero;

		// Additional o-teaser class selector is used to fight o-normalise
		// specificity, which is unfortunately high to support a :focus-visible
		// polyfill
		&.o-teaser *:focus-visible,
		&.o-teaser *:focus {
			outline-color: currentColor;
		}

		&.o-teaser--has-image {
			@include _oTeaserImageContainer;
			@include _oTeaserHeroImageContainer;

			&.o-teaser--hero-image {
				@include _oTeaserHeroImage;
			}
		}

		&.o-teaser--standalone {
			@include _oTeaserHeroStandalone;
		}
	}

	.o-teaser--centre {
		@include _oTeaserHeroCentre;

		&.o-teaser--has-image {
			@include _oTeaserHeroCentreImage;
		}
	}

	.o-teaser--stretched {
		@include _oTeaserStretched;
	}

	.o-teaser--hero {
		&.o-teaser--highlight,
		&.o-teaser--opinion {
			@include _oTeaserHeroThemeBase;
		}

		&.o-teaser--opinion {
			@include _oTeaserHeroOpinion;
		}

		&.o-teaser--highlight {
			@include _oTeaserHighlight;
		}

		&.o-teaser--extra-article {
			@include _oTeaserHeroExtra;
		}
	}

	.o-teaser--midslice.o-teaser--has-image {
		@include _oTeaserHeroMidSlice;
	}
}

@mixin _oTeaserThemeTopStories {
	.o-teaser--top-story {
		@include _oTeaserLarge;
		@include _oTeaserTopStoryBase;

		&.o-teaser--landscape,
		&.


 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
require('../common');
const assert = require('assert');
let i;

const N = 30;
const done = [];

function get_printer(timeout) {
  return function() {
    console.log(`Running from setTimeout ${timeout}`);
    done.push(timeout);
  };
}

process.nextTick(function() {
  console.log('Running from nextTick');
  done.push('nextTick');
});

for (i = 0; i < N; i += 1) {
  setTimeout(get_printer(i), i);
}

console.log('Running from main.');

process.on('exit', function() {
  assert.strictEqual(done[0], 'nextTick');
  /* Disabling this test. I don't think we can ensure the order
  for (i = 0; i < N; i += 1) {
    assert.strictEqual(i, done[i + 1]);
  }
  */
});
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.

'use strict';
// This is the same as test/simple/test-crypto, but from before the shift
// to use buffers by default.

const common = require('../common');
if (!common.hasCrypto)
  common.skip('missing crypto');

const assert = require('assert');
const crypto = require('crypto');

const EXTERN_APEX = 0xFBEE9;

// Manually controlled string for checking binary output
let ucs2_control = 'a\u0000';

// Grow the strings to proper length
while (ucs2_control.length <= EXTERN_APEX) {
  ucs2_control = ucs2_control.repeat(2);
}

// Check resultant buffer and output string
const b = Buffer.from(ucs2_control + ucs2_control, 'ucs2');

//
// Test updating from birant data
//
{
  const datum1 = b.slice(700000);
  const hash1_converted = crypto.createHash('sha1')
    .update(datum1.toString('base64'), 'base64')
    .digest('hex');
  const hash1_direct = crypto.createHash('sha1').update(datum1).digest('hex');
  assert.strictEqual(hash1_direct, hash1_converted);

  const datum2 = b;
  const hash2_converted = crypto.createHash('sha1')
    .update(datum2.toString('base64'), 'base64')
    .digest('hex');
  const hash2_direct = crypto.createHash('sha1').update(datum2).digest('hex');
  assert.strictEqual(hash2_direct, hash2_converted);
}
'use strict';
const common = require('../common');

// Simulate `cat readfile.js | node readfile.js`

if (common.isWindows || common.isAIX)
  common.skip(`No /dev/stdin on ${process.platform}.`);

const assert = require('assert');
const path = require('path');
const fs = require('fs');

if (process


匹配的路由记录，创建一个没有路由记录的 Route 返回
      if (!record) return _createRoute(null, location)

      // 获取动态路由参数名
      const paramNames = record.regex.keys
        .filter(key => !key.optional)
        .map(key => key.name)

      // location 对象没有 params，创建，用来存储动态路由参数的值
      if (typeof location.params !== 'object') {
        location.params = {}
      }

      // 提取当前 Route 中符合动态路由参数名的值赋值给 location 的 params
      // currentRoute：当前 url 对应的 route 路由对象
      if (currentRoute && typeof currentRoute.params === 'object') {
        for (const key in currentRoute.params) {
          if (!(key in location.params) && paramNames.indexOf(key) > -1) {
            location.params[key] = currentRoute.params[key]
          }
        }
      }

      location.path = fillParams(record.path, location.params, `named route "${name}"`)

      // 创建 Route（注意与路由记录的差别），返回
      return _createRoute(record, location, redirectedFrom)
    } else if (location.path) {
      // 不是命名路由，而是路径模式
      location.params = {}
      // 这里会遍历 pathList，因此命名路由的 record 查找效率更高
      for (let i = 0; i < pathList.length; i++) {
        const path = pathList[i]
        const record = pathMap[path]
        if (matchRoute(record.regex, location.path, location.params)) {
          // 找到匹配的路由记录 record，生成对应 Route，返回
          return _createRoute(record, location, redirectedFrom)
        }
      }
    }

    // name、path 都没有匹配到的情况，创建一个没有路由记录的 Route 返回
    return _createRoute(null, location)
  }

  return {
    match,
    addRoutes
  }
}
```

match 的逻辑：

- match 接受三个参数
  - raw：需要匹配的目标 url
  - currentRoute：当前 url 对应的 route 对象
  - redirectedFrom：代表从哪个地址重定向过来的
- 解析当前 url、路由对象，得到包含 hash、path、query 和 name 等信息对象 location
- 如果 name 存在，判断是否能通过 name 在 nameMap 中找到对应的路由记录 RouteRecord
  - 如果找到，根据路由记录创建一个 Route 返回
  - 没有找到，创建一个没有路由记录的 Route 返回
- 如果 name 不存在，判断 path 存不存在
  - 存在，根据 pathList、pathMap 找到匹配的路由记录，然后利用路由记录创建一个 Route 返回
- name、path 都不存在，创建一个没有路由记录的 Route 返回

**\_createRoute**

上面通过 `_createRoute` 来创建 Route 对象

> vue-router\src\create-matcher.js

```js
// _createRoute 根据 RouteRecord 执行相关的路由操作，最后返回Route对象
function _createRoute (record: ?RouteRecord,location:


,pB=new t("clojure.test.check.generators","keyword-ns","clojure.test.check.generators/keyword-ns",-1492628482,null),qB=new t("cljs.core","instance?","cljs.core/instance?",2044751870,null),rB=new y(null,"height","height",1025178622),sB=new y(null,"end-block-t","end-block-t",1544648735),tB=new y(null,"check-results","check-results",1484458047),uB=new y("play-cljc.gl.core","alignment","play-cljc.gl.core/alignment",1108460607),vB=new y(null,"node-id-\x3erule-name","node-id-\x3erule-name",
1615893599),wB=new t("clojure.test.check.generators","shuffle","clojure.test.check.generators/shuffle",1032401055,null),xB=new t(null,"a_matrix","a_matrix",-1089752865,null),yB=new y("play-cljc.transforms","subcontent","play-cljc.transforms/subcontent",-1648297729),zB=new y(null,"then-queue","then-queue",899186975),AB=new t("cljs.spec.alpha","conformer","cljs.spec.alpha/conformer",2140085535,null),BB=new y(null,"in","in",-1531184865),CB=new y(null,"clear","clear",1877104959),DB=new t(null,"symbol?",
"symbol?",1820680511,null),EB=new y(null,"vars","vars",-2046957217),FB=new y(null,"left","left",-399115937),xi=new y("cljs.core","not-found","cljs.core/not-found",-1572889185),GB=new t(null,"def","def",597100991,null),HB=new y("cljs.spec.alpha","ret","cljs.spec.alpha/ret",1165997503),IB=new y("cljs.spec.alpha","describe","cljs.spec.alpha/describe",1883026911),JB=new y("odoyle.rules","what-value","odoyle.rules/what-value",686747135),KB=new y(null,"accept","accept",1874130431),LB=new y(null,"invert",
"invert",1553577503),MB=new t("cljs.spec.alpha","\x26","cljs.spec.alpha/\x26",1635809823,null),NB=new y(null,"session","session",1008279103),OB=new y(null,"opt","opt",-794706369),PB=new t("expound.printer","no-trailing-whitespace","expound.printer/no-trailing-whitespace",12095135,null),QB=new y("expound.printer","value-str-fn","expound.printer/value-str-fn",-605841761),RB=new y("expound","via","expound/via",-595987777),SB=new y("cljs.spec.alpha","pcat","cljs.spec.alpha/pcat",26406623),TB=new t(null,
"player","player",1542844127,null),UB=new y(null,"data","data",-232669377),VB=new y("iglu.parse","subexpression","iglu.parse/subexpression",-575791265),WB=new y("play-cljc.gl.core","uniform-locations","play-cljc.gl.core/uniform-locations",957459327),XB=new y(null,"commachar","commachar",652859327),YB=new t("cljs.spec.alpha","?","cljs.spec.alpha/?",1605136319,null),ZB=new y(null,"rule-name-\x3enode-id","rule-name-\x3enode-id",-494456865),$B=new y("basic


jvmTarget }

    lint {
        lintConfig = file("${rootProject.projectDir}/config/lint.xml")
        abortOnError = true
        warningsAsErrors = true
    }
}

dependencies {
    implementation(project(Dependencies.Mullvad.commonLib))
    implementation(project(Dependencies.Mullvad.ipcLib))
    implementation(project(Dependencies.Mullvad.modelLib))
    implementation(project(Dependencies.Mullvad.resourceLib))
    implementation(project(Dependencies.Mullvad.talpidLib))

    implementation(Dependencies.AndroidX.appcompat)
    implementation(Dependencies.Kotlin.stdlib)
    implementation(Dependencies.KotlinX.coroutinesAndroid)
}
package net.mullvad.mullvadvpn.test.e2e

import androidx.test.uiautomator.By
import net.mullvad.mullvadvpn.test.common.annotation.SkipForFlavors
import net.mullvad.mullvadvpn.test.common.constant.WEB_TIMEOUT
import net.mullvad.mullvadvpn.test.common.extension.clickAgreeOnPrivacyDisclaimer
import net.mullvad.mullvadvpn.test.common.extension.clickAllowOnNotificationPermissionPromptIfApiLevel33AndAbove
import net.mullvad.mullvadvpn.test.common.extension.findObjectWithTimeout
import org.junit.jupiter.api.Test

class WebLinkTest : EndToEndTest(BuildConfig.FLAVOR_infrastructure) {
    @Test
    @SkipForFlavors(currentFlavor = BuildConfig.FLAVOR_billing, "play")
    fun testOpenFaqFromApp() {
        // Given
        app.launch()

        // When
        device.clickAgreeOnPrivacyDisclaimer()
        device.clickAllowOnNotificationPermissionPromptIfApiLevel33AndAbove()
        device.findObjectWithTimeout(By.text("Login"))
        app.clickSettingsCog()
        app.clickListItemByText("FAQs & Guides")

        // Then
        device.findObjectWithTimeout(
            selector = By.text("Mullvad help center"),
            timeout = WEB_TIMEOUT
        )
    }
}
package net.mullvad.mullvadvpn.test.e2e

import androidx.test.uiautomator.By
import net.mullvad.mullvadvpn.test.common.extension.findObjectWithTimeout
import net.mullvad.mullvadvpn.test.e2e.misc.AccountTestRule
import org.junit.jupiter.api.Assertions.assertNotNull
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.RegisterExtension

class LogoutTest : EndToEndTest(BuildConfig.FLAVOR_infrastructure) {

    @RegisterExtension @JvmField val accountTestRule = AccountTestRule()

    @Test
    fun testLogout() {
        // Given
        app.launchAndEnsureLoggedIn(accountTestRule.validAccountNumber)

        // When
        app.clickAccountCog()
        app.clickActionButtonByText("Log out")

        // Then
        assertNotNull(device.findObjectWithTimeout(By.text("Login")))
    }

    @Test
    fun testCreateAccountAndLogout() {
        // Given
        app.launchAndCreateAccount()

        // When
        app.clickAccountCog()
        app.clickActionButtonByText("Log out")

        // Then
        assertNotNull(device.findObjectWithTimeout(By.text("Login")))
    }
}
package net.mullvad.mullvadvpn.test.common.rule

import android.content.Intent
import android.provider.Settings
import androidx.test.platform.app


br>COALINGA, WBAN, 71.2
KING CITY, COOP, 63.1
LINDSAY, COOP, 68.2
BIG SUR STATION, COOP, 56.2
VISALIA, COOP, 68.5
FIVE POINTS 5 SSW, COOP, 69.4
ASH MOUNTAIN, COOP, 66.2
THREE RIVERS EDISON PH 1, COOP, 67.7
PINNACLES NM, COOP, 62.1
CARMEL VALLEY, COOP, 58.8
LODGEPOLE, COOP, 47.0
MONTEREY, COOP, 57.0
SALINAS NO. 2, COOP, 58.0
SALINAS AP, WBAN, 59.1
GRANT GROVE, COOP, 50.1
HOLLISTER 2, COOP, 59.9
BALCH POWER HOUSE, COOP, 66.8
WATSONVILLE WATERWORKS, COOP, 58.4
FRIANT GOVERNMENT CAMP, COOP, 67.2
MADERA, COOP, 67.9
GILROY, COOP, 62.2
AUBERRY 2 NW, COOP, 65.1
LOS BANOS, COOP, 68.5
BEN LOMOND NO. 4, COOP, 62.7
ASPENDELL, COOP, 46.4
NORTH FORK RS, COOP, 59.9
LOS GATOS, COOP, 64.9
NEWMAN, COOP, 71.5
MOUNT HAMILTON, WBAN, 54.4
BISHOP AP, WBAN, 64.3
MOFFETT FEDERAL AIRFIELD, WBAN, 61.4
TURLOCK #2, COOP, 67.7
REDWOOD CITY, COOP, 60.7
HALF MOON BAY, COOP, 55.6
SO ENTRANCE YOSEMITE N.P., COOP, 50.4
NEWARK, COOP, 61.1
MODESTO CITY COUNTY AP, WBAN, 68.3
HAYWARD AIR TERMINAL, WBAN, 60.8
TRACY CARBONA, COOP, 65.1
LIVERMORE MUNICIPAL AP, WBAN, 61.8
OAKLAND METROPOLITAN INTL AP, WBAN, 58.9
SAN FRANCISCO DOWNTOWN, WBAN, 57.2
SAN FRANCISCO OCEANSIDE, COOP, 53.7
GROVELAND 2, COOP, 60.0
TRACY PUMPING PLANT, COOP, 66.9
TUOLUMNE MEADOWS R.S., COOP, 42.5
MOUNT DIABLO JUNCTION, COOP, 55.0
STOCKTON METROPOLITAN AP, WBAN, 68.1
RICHMOND, COOP, 59.5
HETCH HETCHY, COOP, 57.6
CHERRY VALLEY DAM, COOP, 57.9
SONORA, COOP, 60.8
ANTIOCH PUMPING PLANT #3, COOP, 66.1
CONCORD BUCHANAN FIELD, WBAN, 65.4
CONCORD WASTEWATER PLANT, COOP, 64.7
SAN RAFAEL-CIVIC CENTER, COOP, 61.1
KENTFIELD, COOP, 61.4
MARTINEZ WATER PLANT, COOP, 61.5
BODIE CALIFORNIA STATE HISTORIC PARK, COOP, 39.4
NAPA COUNTY AIRPORT, WBAN, 60.2
BRIDGEPORT,


, this is
// not very stable over SSL. Most likely a ws connection requires a
// separate SSL connection, in which case 2 round trips are an
// absolute minumum.
WebSocketTransport.roundTrips = 2;

module.exports = WebSocketTransport;

},{"../utils/event":46,"../utils/url":52,"./driver/websocket":19,"events":3,"inherits":54}],39:[function(_dereq_,module,exports){
'use strict';

var inherits = _dereq_('inherits')
  , AjaxBasedTransport = _dereq_('./lib/ajax-based')
  , XdrStreamingTransport = _dereq_('./xdr-streaming')
  , XhrReceiver = _dereq_('./receiver/xhr')
  , XDRObject = _dereq_('./sender/xdr')
  ;

function XdrPollingTransport(transUrl) {
  if (!XDRObject.enabled) {
    throw new Error('Transport created when disabled');
  }
  AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XDRObject);
}

inherits(XdrPollingTransport, AjaxBasedTransport);

XdrPollingTransport.enabled = XdrStreamingTransport.enabled;
XdrPollingTransport.transportName = 'xdr-polling';
XdrPollingTransport.roundTrips = 2; // preflight, ajax

module.exports = XdrPollingTransport;

},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xdr":34,"./xdr-streaming":40,"inherits":54}],40:[function(_dereq_,module,exports){
'use strict';

var inherits = _dereq_('inherits')
  , AjaxBasedTransport = _dereq_('./lib/ajax-based')
  , XhrReceiver = _dereq_('./receiver/xhr')
  , XDRObject = _dereq_('./sender/xdr')
  ;

// According to:
//   http://stackoverflow.com/questions/1641507/detect-browser-support-for-cross-domain-xmlhttprequests
//   http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/

function XdrStreamingTransport(transUrl) {
  if (!XDRObject.enabled) {
    throw new Error('Transport created when disabled');
  }
  AjaxBasedTransport.call(this, transUrl, '/xhr_streaming', XhrReceiver, XDRObject);
}

inherits(XdrStreamingTransport, AjaxBasedTransport);

XdrStreamingTransport.enabled = function(info) {
  if (info.cookie_needed || info.nullOrigin) {
    return false;
  }
  return XDRObject.enabled && info.sameScheme;
};

XdrStreamingTransport.transportName = 'xdr-streaming';
XdrStreamingTransport.roundTrips = 2; // preflight, ajax

module.exports = XdrStreamingTransport;

},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xdr":34,"inherits":54}],41:[function(_dereq_,module,exports){
'use strict';

var inherits = _dereq_('inherits')
  , AjaxBasedTransport = _dereq_('./lib/ajax-based')
  , XhrReceiver = _dereq_('./receiver/xhr')
  , XHRCorsObject = _dereq_('./sender/xhr-cors')
  , XHRLocalObject = _dereq_('./sender/xhr-local')
  ;

function XhrPollingTransport(transUrl) {
  if (!XHRLocalObject.enabled && !XHRCorsObject.enabled) {
    throw new Error('Transport created when disabled');
  }
  AjaxBasedTransport.call(this, transUrl, '/xhr', XhrReceiver, XHRCorsObject);
}

inherits(XhrPollingTransport, AjaxBasedTransport);

XhrPollingTransport.enabled = function(info) {
  if (info.nullOrigin) {
    return false;
  }

  if (XHRLocalObj


parseInt(c.substr(7,2), 16) / 255,
	]
}

document.addEventListener("mousemove", function(e) {
  mouse_pos = {x: e.clientX, y: e.clientY}
  update()
})

document.addEventListener("mousedown", function(e) {
  drag_start = {x: e.clientX, y: e.clientY}
  mouse_down = true
  mouse_pressed = true
  update()
})

document.addEventListener("mouseup", function(e) {
  mouse_down = false
  mouse_released = true
  update()
})

function default_format(obj) {
	if (typeof(obj) === "string") {
		return obj
	} else {
		return JSON.stringify(obj)
	}
}

function fmt() {
	if (arguments.length === 0) {
		return "error"
	}

	var format = arguments[0]
	var output = ""

	var arg_index = 1
	var i = 0

	while (i < format.length) {
		var c = format[i]
		i++

		if (c != "%") {
			output += c
			continue
		}

		if (i === format.length) {
			output += "%!(NOVERB)"
			break
		}

		var flag = format[i]
		i++

		var pad_char = " "

		if (flag == "0") {
			pad_char = "0"
		} else {
			// not a flag
			i--
		}

		var width = 0
		while (format[i] >= "0" && format[i] <= "9") {
			width *= 10
			width += parseInt(format[i], 10)
			i++
		}

		var f = format[i]
		i++

		if (f === "%") {
			output += "%"
			continue
		}

		if (arg_index === arguments.length) {
			output += "%!" + f + "(MISSING)"
			continue
		}

		var arg = arguments[arg_index]
		arg_index++

		var o = null

		if (f === "v") {
			o = default_format(arg)
		} else if (f === "s" && typeof(arg) === "string") {
			o = arg
		} else if (f === "T") {
			o = typeof(arg)
		} else if (f === "d" && typeof(arg) === "number") {
			o = arg.toFixed(0)
		} else if (f === "f" && typeof(arg) === "number") {
			o = arg.toString()
		} else if (f === "x" && typeof(arg) === "number") {
			o = Math.round(arg).toString(16)
		} else if (f === "t" && typeof(arg) === "boolean") {
			if (arg) {
				o = "true"
			} else {
				o = "false"
			}
		} else {
			output += "%!" + f + "(" + typeof(arg) + "=" + default_format(arg) + ")"
		}

		if (o !== null) {
			if (o.length < width) {
				output += Array(width - o.length + 1).join(pad_char)
			}
			output += o
		}
	}

	if (arg_index < arguments.length) {
		output += "%!(EXTRA "
		while (arg_index < arguments.length) {
			var arg = arguments[arg_index]
			output += typeof(arg) + "=" + default_format(arg)
			if (arg_index < arguments.length - 1) {
				output += ", "
			}
			arg_index++
		}
		output += ")"
	}

	return output
}

function init() {
  window.requestAnimationFrame(frame)
}

</script>

</body>
</html>
    <!DOCTYPE html>
    <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <title>Running a SteamOS VM in VirtualBox</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta charset="UTF-8">
        <meta name="keywords" content="Hypervisor,Install Guide,Linux,Virtualization,Virtual Machine,VM,SteamOS Vir


^sst$`}, func(args api.OnResolveArgs) (api.OnResolveResult, error) {
					// avoid recursion
					if args.PluginData == skipResolve {
						return api.OnResolveResult{}, nil
					}
					pkg := build.Resolve("sst", esbuild.ResolveOptions{
						ResolveDir: args.ResolveDir,
						Importer:   args.Importer,
						Kind:       args.Kind,
						With:       args.With,
						PluginName: "sst-version-check",
						PluginData: skipResolve,
						Namespace:  args.Namespace,
					})
					if pkg.Path != "" {
						path, err := fs.FindUp(pkg.Path, "package.json")
						if err != nil {
							return api.OnResolveResult{}, err
						}
						var pkgjson js.PackageJson
						data, err := os.Open(path)
						if err != nil {
							return api.OnResolveResult{}, err
						}
						err = json.NewDecoder(data).Decode(&pkgjson)
						if err != nil {
							return api.OnResolveResult{}, err
						}
						if r.version != "dev" && pkgjson.Version != r.version {
							return api.OnResolveResult{}, fmt.Errorf("The sst package your application is importing (%v) does not match the sst cli version (%v). Make sure the version of sst in package.json is correct across your entire repo.", pkgjson.Version, r.version)
						}
					}
					return api.OnResolveResult{Path: pkg.Path}, nil
				})
			},
		},
	}
	if properties.Plugins != "" {
		plugins = append(plugins, plugin(properties.Plugins))
	}
	external := append(forceExternal, properties.Install...)
	external = append(external, properties.ESBuild.External...)
	options := esbuild.BuildOptions{
		EntryPoints: []string{file},
		Platform:    esbuild.PlatformNode,
		External:    external,
		Loader:      loader,
		KeepNames:   true,
		Bundle:      true,
		Splitting:   properties.Splitting,
		Metafile:    true,
		Outfile:     target,
		Plugins:     plugins,
		Sourcemap:   esbuild.SourceMapLinked,
		Write:       true,
		Format:      esbuild.FormatESModule,
		Target:      targetMap[input.Runtime],
		MainFields:  []string{"module", "main"},
		Banner: map[string]string{
			"js": strings.Join([]string{
				`import { createRequire as topLevelCreateRequire } from 'module';`,
				`const require = topLevelCreateRequire(import.meta.url);`,
				`import { fileURLToPath as topLevelFileUrlToPath, URL as topLevelURL } from "url"`,
				`const __filename = topLevelFileUrlToPath(import.meta.url)`,
				`const __dirname = topLevelFileUrlToPath(new topLevelURL(".", import.meta.url))`,
				properties.Banner,
			}, "\n"),
		},
		NodePaths: properties.ESBuild.NodePaths,
		Define:    properties.ESBuild.Define,
	}

	if !isESM {
		options.Format = esbuild.FormatCommonJS
		options.Target = targetMap[input.Runtime]
		options.Banner["js"] = properties.Banner
		options.MainFields = []string{"main"}
	}

	if properties.ESBuild.Target != 0 {
		options.Target = properties.ESBuild.Target
	}

	if properties.Splitting {
		options.Outdir = filepath.Dir(target)
		options.


ignedLong.valueOf(4000L));

    amount = controller.getMaxAmount();
    controller.prepare(amount);
    controller.onFulfill(amount);
    assertThat(controller.getMaxAmount()).isEqualTo(UnsignedLong.valueOf(8000L));
  }

  @Test
  public void doesntOverflowU64WithSlowStart() {
    this.controller = new AimdCongestionController(
        UnsignedLong.MAX_VALUE.minus(UnsignedLong.ONE),
        ONE_K,
        BigDecimal.valueOf(2L),
        StreamCodecContextFactory.oer()
    );
    this.controller.setCongestionState(CongestionState.SLOW_START);
    assertThat(controller.getCongestionState()).isEqualTo(CongestionState.SLOW_START);

    UnsignedLong amount = controller.getMaxAmount();
    controller.prepare(amount);
    controller.onFulfill(amount);
    assertThat(controller.getMaxAmount()).isEqualTo(UnsignedLong.MAX_VALUE);

    controller.prepare(amount);
    controller.onFulfill(amount);
    assertThat(controller.getMaxAmount()).isEqualTo(UnsignedLong.MAX_VALUE);
  }

  @Test
  public void additiveIncrease() {
    this.controller.setCongestionState(CongestionState.AVOID_CONGESTION);

    for (long i = 1; i <= 5; i++) {
      UnsignedLong amount = UnsignedLong.valueOf(i).times(ONE_K);
      controller.prepare(amount);
      controller.onFulfill(amount);
      assertThat(controller.getMaxAmount()).isEqualTo((ONE_K.times(UnsignedLong.valueOf(i)).plus(ONE_K)));
    }
  }

  @Test
  public void multiplicativeDecrease() {
    this.controller.setCongestionState(CongestionState.AVOID_CONGESTION);

    UnsignedLong amount = controller.getMaxAmount();
    controller.prepare(amount);
    controller.onReject(amount, T04_INSUFFICIENT_LIQUIDITY);
    assertThat(controller.getMaxAmount()).isEqualTo(UnsignedLong.valueOf(500L));

    amount = controller.getMaxAmount();
    controller.prepare(amount);
    controller.onReject(amount, T04_INSUFFICIENT_LIQUIDITY);
    assertThat(controller.getMaxAmount()).isEqualTo(UnsignedLong.valueOf(250L));

    amount = controller.getMaxAmount();
    controller.prepare(amount);
    controller.onReject(amount, T04_INSUFFICIENT_LIQUIDITY);
    assertThat(controller.getMaxAmount()).isEqualTo(UnsignedLong.valueOf(125L));

    amount = controller.getMaxAmount();
    controller.prepare(amount);
    controller.onReject(amount, T04_INSUFFICIENT_LIQUIDITY);
    assertThat(controller.getMaxAmount()).isEqualTo(UnsignedLong.valueOf(62L));

    amount = controller.getMaxAmount();
    controller.prepare(amount);
    controller.onReject(amount, T04_INSUFFICIENT_LIQUIDITY);
    assertThat(controller.getMaxAmount()).isEqualTo(UnsignedLong.valueOf(31L));

    amount = controller.getMaxAmount();
    controller.prepare(amount);
    controller.onReject(amount, T04_INSUFFICIENT_LIQUIDITY);
    assertThat(controller.getMaxAmount()).isEqualTo(UnsignedLong.valueOf(15L));

    amount = controller.getMaxAmount();
    controller.prepare(amount);
    controller.onReject(amount, T04_INSUFFICIENT_LIQUIDITY);
    assertThat(controller.getMaxAmount()).isEqualTo(UnsignedLong.valueOf(7L));

    amount = controller.getMaxAmount();
    controller.prepare(amount);
    controller.onReject(amount, T04_INSUFFICIENT_LIQUIDITY);
    assertThat(controller.getMaxAmount()).isEqualTo(UnsignedLong.valueOf(3L));

    amount = controller.getMaxAmount();
    controller.prepare(amount);
    controller


/*
 * Copyright (C) 2016-2025 Red Hat, Inc.  All rights reserved.
 *
 * Authors: Fabio M. Di Nitto <fabbione@kronosnet.org>
 *
 * This software licensed under GPL-2.0+
 */

#include "config.h"

#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

#include "libknet.h"

#include "test-common.h"

static void test(void)
{
	const char *res;

	printf("Testing knet_log_get_loglevel_name normal lookup\n");
	res = knet_log_get_loglevel_name(KNET_LOG_DEBUG);
	if (strcmp(res, "debug")) {
		printf("knet_log_get_loglevel_name failed to get correct log level name. got: %s expected: debug\n",
		       res);
		exit(FAIL);
	}

	res = knet_log_get_loglevel_name(KNET_LOG_TRACE);
	if (strcmp(res, "trace")) {
		printf("knet_log_get_loglevel_name failed to get correct log level name. got: %s expected: debug\n",
		       res);
		exit(FAIL);
	}

	printf("Testing knet_log_get_loglevel_name bad lookup\n");
	res = knet_log_get_loglevel_name(KNET_LOG_TRACE+1);
	if (strcmp(res, "ERROR")) {
		printf("knet_log_get_loglevel_name failed to get correct log level name. got: %s expected: ERROR\n",
		       res);
		exit(FAIL);
	}
}

int main(int argc, char *argv[])
{
	test();

	return PASS;
}


  } while( false )

///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_CAPTURE( varName, macroName, ... ) \
    Catch::Capturer varName( macroName##_catch_sr,        \
                             CATCH_INTERNAL_LINEINFO,     \
                             Catch::ResultWas::Info,      \
                             #__VA_ARGS__##_catch_sr );   \
    varName.captureValues( 0, __VA_ARGS__ )

///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_INFO( macroName, log ) \
    const Catch::ScopedMessage INTERNAL_CATCH_UNIQUE_NAME( scopedMessage )( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log )

///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_UNSCOPED_INFO( macroName, log ) \
    Catch::getResultCapture().emplaceUnscopedMessage( Catch::MessageBuilder( macroName##_catch_sr, CATCH_INTERNAL_LINEINFO, Catch::ResultWas::Info ) << log )

#if defined(CATCH_CONFIG_PREFIX_MESSAGES) && !defined(CATCH_CONFIG_DISABLE)

  #define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( "CATCH_INFO", msg )
  #define CATCH_UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "CATCH_UNSCOPED_INFO", msg )
  #define CATCH_WARN( msg ) INTERNAL_CATCH_MSG( "CATCH_WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )
  #define CATCH_CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CATCH_CAPTURE", __VA_ARGS__ )

#elif defined(CATCH_CONFIG_PREFIX_MESSAGES) && defined(CATCH_CONFIG_DISABLE)

  #define CATCH_INFO( msg )          (void)(0)
  #define CATCH_UNSCOPED_INFO( msg ) (void)(0)
  #define CATCH_WARN( msg )          (void)(0)
  #define CATCH_CAPTURE( ... )       (void)(0)

#elif !defined(CATCH_CONFIG_PREFIX_MESSAGES) && !defined(CATCH_CONFIG_DISABLE)

  #define INFO( msg ) INTERNAL_CATCH_INFO( "INFO", msg )
  #define UNSCOPED_INFO( msg ) INTERNAL_CATCH_UNSCOPED_INFO( "UNSCOPED_INFO", msg )
  #define WARN( msg ) INTERNAL_CATCH_MSG( "WARN", Catch::ResultWas::Warning, Catch::ResultDisposition::ContinueOnFailure, msg )
  #define CAPTURE( ... ) INTERNAL_CATCH_CAPTURE( INTERNAL_CATCH_UNIQUE_NAME(capturer), "CAPTURE", __VA_ARGS__ )

#elif !defined(CATCH_CONFIG_PREFIX_MESSAGES) && defined(CATCH_CONFIG_DISABLE)

  #define INFO( msg )          (void)(0)
  #define UNSCOPED_INFO( msg ) (void)(0)
  #define WARN( msg )          (void)(0)
  #define CAPTURE( ... )       (void)(0)

#endif // end of user facing macro declarations

#endif // CATCH_MESSAGE_HPP_INCLUDED

//              Copyright Catch2 Authors
// Distributed under the Boost Software License, Version 1.0.
//   (See accompanying file LICENSE.txt or copy at
//        https://www.boost.org/LICENSE_1_0.txt)

// SPDX-License-Identifier: BSL-1.0
#ifndef CATCH_CONFIG_HPP_INCLUDED
#define CATCH_CONFIG_HPP_INCLUDED

#include <catch2/catch_test_spec.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp>
#include <catch2/internal/catch_unique_ptr.hpp>
#include <catch2/internal/catch_optional.hpp>
#include <catch2/internal/catch_stringref.hpp>
#include <catch2/internal/catch_random_seed_generation.hpp>
#include <catch2/internal/catch_reporter_spec_parser.hpp>

#include <chrono>


xad,0x05,0x14,0xf2]
          vunpcklpd %xmm18, %xmm26, %xmm30 {%k5}

// CHECK: vunpcklpd %xmm18, %xmm26, %xmm30 {%k5} {z}
// CHECK:  encoding: [0x62,0x21,0xad,0x85,0x14,0xf2]
          vunpcklpd %xmm18, %xmm26, %xmm30 {%k5} {z}

// CHECK: vunpcklpd (%rcx), %xmm26, %xmm30
// CHECK:  encoding: [0x62,0x61,0xad,0x00,0x14,0x31]
          vunpcklpd (%rcx), %xmm26, %xmm30

// CHECK: vunpcklpd 291(%rax,%r14,8), %xmm26, %xmm30
// CHECK:  encoding: [0x62,0x21,0xad,0x00,0x14,0xb4,0xf0,0x23,0x01,0x00,0x00]
          vunpcklpd 291(%rax,%r14,8), %xmm26, %xmm30

// CHECK: vunpcklpd (%rcx){1to2}, %xmm26, %xmm30
// CHECK:  encoding: [0x62,0x61,0xad,0x10,0x14,0x31]
          vunpcklpd (%rcx){1to2}, %xmm26, %xmm30

// CHECK: vunpcklpd 2032(%rdx), %xmm26, %xmm30
// CHECK:  encoding: [0x62,0x61,0xad,0x00,0x14,0x72,0x7f]
          vunpcklpd 2032(%rdx), %xmm26, %xmm30

// CHECK: vunpcklpd 2048(%rdx), %xmm26, %xmm30
// CHECK:  encoding: [0x62,0x61,0xad,0x00,0x14,0xb2,0x00,0x08,0x00,0x00]
          vunpcklpd 2048(%rdx), %xmm26, %xmm30

// CHECK: vunpcklpd -2048(%rdx), %xmm26, %xmm30
// CHECK:  encoding: [0x62,0x61,0xad,0x00,0x14,0x72,0x80]
          vunpcklpd -2048(%rdx), %xmm26, %xmm30

// CHECK: vunpcklpd -2064(%rdx), %xmm26, %xmm30
// CHECK:  encoding: [0x62,0x61,0xad,0x00,0x14,0xb2,0xf0,0xf7,0xff,0xff]
          vunpcklpd -2064(%rdx), %xmm26, %xmm30

// CHECK: vunpcklpd 1016(%rdx){1to2}, %xmm26, %xmm30
// CHECK:  encoding: [0x62,0x61,0xad,0x10,0x14,0x72,0x7f]
          vunpcklpd 1016(%rdx){1to2}, %xmm26, %xmm30

// CHECK: vunpcklpd 1024(%rdx){1to2}, %xmm26, %xmm30
// CHECK:  encoding: [0x62,0x61,0xad,0x10,0x14,0xb2,0x00,0x04,0x00,0x00]
          vunpcklpd 1024(%rdx){1to2}, %xmm26, %xmm30

// CHECK: vunpcklpd -1024(%rdx){1to2}, %xmm26, %xmm30
// CHECK:  encoding: [0x62,0x61,0xad,0x10,0x14,


 re);
			ErrorHandler.Recover(this, re);
		}
		finally {
			ExitRule();
		}
		return _localctx;
	}

	public partial class UrlContext : ParserRuleContext {
		[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode SINGLE_QUOTED_STRING() { return GetToken(FmlMappingParser.SINGLE_QUOTED_STRING, 0); }
		[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DOUBLE_QUOTED_STRING() { return GetToken(FmlMappingParser.DOUBLE_QUOTED_STRING, 0); }
		public UrlContext(ParserRuleContext parent, int invokingState)
			: base(parent, invokingState)
		{
		}
		public override int RuleIndex { get { return RULE_url; } }
		[System.Diagnostics.DebuggerNonUserCode]
		public override void EnterRule(IParseTreeListener listener) {
			IFmlMappingListener typedListener = listener as IFmlMappingListener;
			if (typedListener != null) typedListener.EnterUrl(this);
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public override void ExitRule(IParseTreeListener listener) {
			IFmlMappingListener typedListener = listener as IFmlMappingListener;
			if (typedListener != null) typedListener.ExitUrl(this);
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public override TResult Accept<TResult>(IParseTreeVisitor<TResult> visitor) {
			IFmlMappingVisitor<TResult> typedVisitor = visitor as IFmlMappingVisitor<TResult>;
			if (typedVisitor != null) return typedVisitor.VisitUrl(this);
			else return visitor.VisitChildren(this);
		}
	}

	[RuleVersion(0)]
	public UrlContext url() {
		UrlContext _localctx = new UrlContext(Context, State);
		EnterRule(_localctx, 20, RULE_url);
		int _la;
		try {
			EnterOuterAlt(_localctx, 1);
			{
			State = 190;
			_la = TokenStream.LA(1);
			if ( !(_la==SINGLE_QUOTED_STRING || _la==DOUBLE_QUOTED_STRING) ) {
			ErrorHandler.RecoverInline(this);
			}
			else {
				ErrorHandler.ReportMatch(this);
			    Consume();
			}
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			ErrorHandler.ReportError(this, re);
			ErrorHandler.Recover(this, re);
		}
		finally {
			ExitRule();
		}
		return _localctx;
	}

	public partial class IdentifierContext : ParserRuleContext {
		[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode ID() { return GetToken(FmlMappingParser.ID, 0); }
		[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode IDENTIFIER() { return GetToken(FmlMappingParser.IDENTIFIER, 0); }
		[System.Diagnostics.DebuggerNonUserCode] public ITerminalNode DELIMITED_IDENTIFIER() { return GetToken(FmlMappingParser.DELIMITED_IDENTIFIER, 0); }
		public IdentifierContext(ParserRuleContext parent, int invokingState)
			: base(parent, invokingState)
		{
		}
		public override int RuleIndex { get { return RULE_identifier; } }
		[System.Diagnostics.DebuggerNonUserCode]
		public override void EnterRule(IParseTreeListener listener) {
			IFmlMappingListener typedListener = listener as IFmlMappingListener;
			if (typedListener != null) typedListener.EnterIdentifier(this);
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public override void ExitRule(IParseTreeListener listener) {
			IFmlMappingListener typedListener = listener as IFmlMappingListener;
			if (typedListener != null) typedListener.ExitIdentifier(this);
		}


 29},
		{-77, -79}, {-50, -49}, {31, 39}, {32, 35},
		{33, 34}, {-78, -46}, {-82, -88}, {36, 37},
		{-83, -48}, {-47, 38}, {-86, -85}, {40, 47},
		{41, 44}, {42, 43}, {-80, -44}, {-43, -42},
		{45, 46}, {-39, -87}, {-84, -40}, {48, 55},
		{49, 52}, {50, 51}, {-95, -94}, {-93, -92},
		{53, 54}, {-91, -90}, {-89, -81}, {56, 59},
		{57, 58}, {-45, -41}, {-38, -37}, {60, 61},
		{-36, -35}, {-34, -33}
	};

	int[][] T_HUFFMAN_ENV_BAL_3_0DB = {
		{-64, 1}, {-63, 2}, {-65, 3}, {-66, 4},
		{-62, 5}, {-61, 6}, {-67, 7}, {-68, 8},
		{-60, 9}, {10, 16}, {11, 13}, {-69, 12},
		{-76, -75}, {14, 15}, {-74, -73}, {-72, -71},
		{17, 20}, {18, 19}, {-70, -59}, {-58, -57},
		{21, 22}, {-56, -55}, {-54, 23}, {-53, -52}
	};
	int[][] F_HUFFMAN_ENV_BAL_3_0DB = {
		{-64, 1}, {-65, 2}, {-63, 3}, {-66, 4},
		{-62, 5}, {-61, 6}, {-67, 7}, {-68, 8},
		{-60, 9}, {10, 13}, {-69, 11}, {-59, 12},
		{-58, -76}, {14, 17}, {15, 16}, {-75, -74},
		{-73, -72}, {18, 21}, {19, 20}, {-71, -70},
		{-57, -56}, {22, 23}, {-55, -54}, {-53, -52}
	};

	int[][] T_HUFFMAN_NOISE_3_0DB = {
		{-64, 1}, {-63, 2}, {-65, 3}, {-66, 4},
		{-62, 5}, {-67, 6}, {7, 8}, {-61, -68},
		{9, 30}, {10, 15}, {-60, 11}, {-69, 12},
		{13, 14}, {-59, -53}, {-95, -94}, {16, 23},
		{17, 20}, {18, 19}, {-93, -92}, {-91, -90},
		{21, 22}, {-89, -88}, {-87, -86}, {24, 27},
		{25, 26}, {-85, -84}, {-83, -82}, {28, 29},
		{-81, -80}, {-79, -78}, {31, 46}, {32, 39},
		{33, 36}, {34, 35}, {-77, -76}, {-75, -74},
		{37, 38}, {-73, -72}, {-71, -70}, {40, 43},
		{41, 42}, {-58, -57}, {-56, -55}, {44, 45},
		{-54, -52}, {-51, -50}, {47, 54}, {48, 51},
		{49, 50}, {-49, -48}, {-47, -46}, {52, 53},
		{-45, -44}, {-43, -42}, {55, 58}, {56, 57},
		{-41, -40}, {-39, -38}, {59, 60}, {-37, -36},
		{-35, 61}, {-34, -33}
	};

	int[][] T_HUFFMAN_NOISE_BAL_3_0DB = {
		{-64, 1}, {-65, 2}, {-63, 3}, {4, 9},
		{-66, 5}, {-62, 6}, {7, 8}, {-76, -75},
		{-74, -73},


.h)
# CHECK-NEXT: 1e00c0c0 { v0.h = vdeal(v0.h) }

//  V6_vdealvdd
//  Vdd32=vdeal(Vu32,Vv32,Rt8)
    v1:0=vdeal(v0,v0,r0)
# CHECK-NEXT: 1b00e080 { v1:0 = vdeal(v0,v0,r0) }

//  V6_vdelta
//  Vd32=vdelta(Vu32,Vv32)
    v0=vdelta(v0,v0)
# CHECK-NEXT: 1f20c020 { v0 = vdelta(v0,v0) }

//  V6_vdmpybus
//  Vd32.h=vdmpy(Vu32.ub,Rt32.b)
    v0.h=vdmpy(v0.ub,r0.b)
# CHECK-NEXT: 1900c0c0 { v0.h = vdmpy(v0.ub,r0.b) }

//  V6_vdmpybus_acc
//  Vx32.h+=vdmpy(Vu32.ub,Rt32.b)
    v0.h+=vdmpy(v0.ub,r0.b)
# CHECK-NEXT: 1900e0c0 { v0.h += vdmpy(v0.ub,r0.b) }

//  V6_vdmpybus_dv
//  Vdd32.h=vdmpy(Vuu32.ub,Rt32.b)
    v1:0.h=vdmpy(v1:0.ub,r0.b)
# CHECK-NEXT: 1900c0e0 { v1:0.h = vdmpy(v1:0.ub,r0.b) }

//  V6_vdmpybus_dv_acc
//  Vxx32.h+=vdmpy(Vuu32.ub,Rt32.b)
    v1:0.h+=vdmpy(v1:0.ub,r0.b)
# CHECK-NEXT: 1900e0e0 { v1:0.h += vdmpy(v1:0.ub,r0.b) }

//  V6_vdmpyhb
//  Vd32.w=vdmpy(Vu32.h,Rt32.b)
    v0.w=vdmpy(v0.h,r0.b)
# CHECK-NEXT: 1900c040 { v0.w = vdmpy(v0.h,r0.b) }

//  V6_vdmpyhb_acc
//  Vx32.w+=vdmpy(Vu32.h,Rt32.b)
    v0.w+=vdmpy(v0.h,r0.b)
# CHECK-NEXT: 1900e060 { v0.w += vdmpy(v0.h,r0.b) }

//  V6_vdmpyhb_dv
//  Vdd32.w=vdmpy(Vuu32.h,Rt32.b)
    v1:0.w=vdmpy(v1:0.h,r0.b)
# CHECK-NEXT: 1920c080 { v1:0.w = vdmpy(v1:0.h,r0.b) }

//  V6_vdmpyhb_dv_acc
//  Vxx32.w+=vdmpy(Vuu32.h,Rt32.b)
    v1:0.w+=vdmpy(v1:0.h,r0.b)
# CHECK-NEXT: 1920e080 { v1:0.w += vdmpy(v1:0.h,r0.b) }

//  V6_vdmpyhisat
//  Vd32.w=vdmpy(Vuu32.h,Rt32.h):sat
    v0.w=vdmpy(v1:0.h,r0.h):sat
# CHECK-NEXT: 1920c060 { v0.w = vdm


, .08), 0px 0px 1px 0px rgba(0, 0, 0, .08);--box-shadow-s3: 0px 12px 40px -4px rgba(0, 0, 0, .14), 0px 0px 2px 0px rgba(0, 0, 0, .08);font-family:monica-ext-font_YIBBBFG,-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,Noto Sans JP,Noto Sans KR,sans-serif,"Apple Color Emoji","Segoe UI Emoji";position:relative;width:100%;border-radius:8px;border:1px solid #dadce0;background:#fff;display:flex;flex-direction:column;pointer-events:all}.monica-video-summary-FAQw2l .header-vIBYuE{height:56px;display:flex;box-sizing:border-box;padding:0 16px;position:relative}.monica-video-summary-FAQw2l .header-vIBYuE .lt-x9hrZ1{display:inline-flex;align-items:center;gap:6px}.monica-video-summary-FAQw2l .header-vIBYuE .lt-x9hrZ1 .title-suJS83{display:inline-flex;align-items:center;cursor:pointer;gap:6px}.monica-video-summary-FAQw2l .header-vIBYuE .lt-x9hrZ1 .title-suJS83 span{font-size:15px;color:#000;font-weight:700}.monica-video-summary-FAQw2l .header-vIBYuE .lt-x9hrZ1 .setting-d06jAX{display:inline-flex;align-items:center;cursor:pointer}.monica-video-summary-FAQw2l .header-vIBYuE .lt-x9hrZ1 .setting-d06jAX:hover{color:#3872e0}.monica-video-summary-FAQw2l .header-vIBYuE .rt-NIfOSM{flex:1;display:flex;justify-content:flex-end;align-items:center;gap:8px}.monica-video-summary-FAQw2l .header-vIBYuE .rt-NIfOSM .mode-5RR2FI{height:24px}.monica-video-summary-FAQw2l .header-vIBYuE .rt-NIfOSM .mode-5RR2FI .mode-box-MQLK7I{display:flex;flex-direction:row;align-items:center;justify-content:center;font-size:13px;box-sizing:border-box;border:1px solid #611fec;box-shadow:0 2px #611fec;border-radius:6px;background:rgba(255,255,255,.45);transition:background-color .2s ease,top .1s ease,box-shadow .1s ease;color:#212b36;cursor:pointer;user-select:none;-webkit-user-drag:none;-webkit-tap-highlight-color:transparent;position:relative;top:-1px}.monica-video-summary-FAQw2l .header-vIBYuE .rt-NIfOSM .mode-5RR2FI .mode-box-MQLK7I:active,.monica-video-summary-FAQw2l .header-vIBYuE .rt-NIfOSM .mode-5RR2FI .mode-box-MQLK7I.dropdown-open-vtO1MH{top:0;box-shadow:none}.monica-video-summary-FAQw2l .header-vIBYuE .rt-NIfOSM .mode-5RR2FI .mode-box-MQLK7I .title-suJS83{flex:1;height:100%;line-height:24px;font-weight:700;


));

        ptr = ptr.tail();
        assertNotNull(ptr);
        assertFalse(ptr.matches());
        assertEquals(-1, ptr.getMatchingIndex());
        assertEquals("til~de", ptr.getMatchingProperty());
        assertEquals("/til~0de", ptr.head().toString());
        assertEquals("/til~0de/~1ab", ptr.toString());

        ptr = ptr.tail();
        assertNotNull(ptr);
        assertFalse(ptr.matches());
        assertEquals(-1, ptr.getMatchingIndex());
        assertEquals("/ab", ptr.getMatchingProperty());
        assertEquals("/~1ab", ptr.toString());
        assertEquals("", ptr.head().toString());

        // done!
        ptr = ptr.tail();
        assertTrue(ptr.matches());
        assertNull(ptr.tail());
    }

    // [core#133]
    public void testLongNumbers() throws Exception
    {
        final long LONG_ID = ((long) Integer.MAX_VALUE) + 1L;

        final String INPUT = "/User/"+LONG_ID;

        JsonPointer ptr = JsonPointer.compile(INPUT);
        assertEquals("User", ptr.getMatchingProperty());
        assertEquals(INPUT, ptr.toString());

        ptr = ptr.tail();
        assertNotNull(ptr);
        assertFalse(ptr.matches());
        /* 14-Mar-2014, tatu: We do not support array indexes beyond 32-bit
         *    range; can still match textually of course.
         */
        assertEquals(-1, ptr.getMatchingIndex());
        assertEquals(String.valueOf(LONG_ID), ptr.getMatchingProperty());

        // done!
        ptr = ptr.tail();
        assertTrue(ptr.matches());
        assertNull(ptr.tail());
    }
}

/*
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
 */

package org.apache.commons.codec.digest;

import static java.lang.Integer.rotateLeft;

import java.util.zip.Checksum;

/**
 * Implementation of the xxhash32 hash algorithm.
 *
 *
Copied from Commons Compress 1.14 https://git-wip-us.apache.org/repos/asf?p=commons-compress.git;a=blob;f=src/main/java/org/apache/commons/compress/compressors/lz4/XXHash32.java;h=a406ffc197449be594d46f0d2712b2d4786a1e68;hb=HEAD
 *
 *
NotThreadSafe
 *
 * @see xxHash
 * @since 1.11
 */
public class XXHash32 implements Checksum {

    private static final int BUF_SIZE = 16;
    private static final int ROTATE_BITS = 13;

    private static final int PRIME1 = (int) 2654435761L;
    private static final int PRIME2 = (int) 2246822519L;
    private static final int PRIME3 = (int) 3266489917L;
    private static final int PRIME4 = 668265263;
    private static final int PRIME5 = 374761393;

    private final byte[] oneByte = new byte[1];
    private final int[] state = new int[4];
    private final byte[] buffer = new byte[BUF_SIZE];


*********************
*
*  nkc_tolower: convert character to lower case
*  # G
*
*  The counterpart of nkc_toupper(). A character is converted to lower case.
*
*  In:   D0.B           any character
*
*  Out:  D0.B           character converted to lower case
*
*  Reg:  D:01234567   A:01234567   CCR
*          U**.....     **......    *
*
****************************************************************************
*END

nkc_tolower:   lea      tolower,a0           ; ^lower case translation table
               and      #$ff,d0              ; high byte = 0 for word operation
               move.b   (a0,d0),d0           ; convert
               rts                           ; bye

****************************************************************************
*                            LOCAL DATA SECTION                            *
****************************************************************************

               .data

*  exception scan code table for cursor block keys
*
*  first entry.B:  NKCC key code
*  second entry.B: scan code returned by TOS
*
*  the table is terminated with both entries -1

xscantab:      .dc.b    NK_UP       ,  $48   ; cursor up
               .dc.b    NK_DOWN     ,  $50   ; cursor down
               .dc.b    NK_LEFT     ,  $4b   ; cursor left
               .dc.b    NK_LEFT     ,  $73   ; Control cursor left
               .dc.b    NK_RIGHT    ,  $4d   ; cursor right
               .dc.b    NK_RIGHT    ,  $74   ; Control cursor right
               .dc.b    NK_INS      ,  $52   ; Insert
               .dc.b    NK_CLRHOME  ,  $47   ; ClrHome
               .dc.b    NK_CLRHOME  ,  $77   ; Control ClrHome
               .dc.b    NK_HELP     ,  $62   ; Help
               .dc.b    NK_UNDO     ,  $61   ; Undo
               .dc.w    -1

*  deadkey table
*
*  first entry.B:  deadkey option mask (NKSf_D_...), 16 bits shifted down
*  second entry.W: ASCII code of deadkey
*  third entry.L:  ^deadkey match table
*
*  the table is terminated with an option mask of 0

deadtab:       .dc.w    NKSf_D_CIRCUM >> 16
               .dc.w    '^'
               .dc.l    d_circum

               .dc.w    NKSf_D_TILDE >> 16
               .dc.w    '~'
               .dc.l    d_tilde

               .dc.w    NKSf_D_AGUI >> 16
               .dc.w    '\''
               .dc.l    d_agui

               .dc.w    NKSf_D_GRAVE >> 16
               .dc.w    '`'
               .dc.l    d_grave

               .dc.w    NKSf_D_UMLAUT >> 16
               .dc.w    ''
               .dc.l    d_umlaut

               .dc.w    NKSf_D_QUOTE >> 16
               .dc.w    '\"'
               .dc.l    d_umlaut

               .dc.w    NKSf_D_SMOERE >> 16
               .dc.w    ''
               .dc.l    d_smoere

               .dc.w    NKSf_D_CEDIL >> 16
               .dc.w    ','
               .dc.l    d_cedil

               .dc.w    NKSf_D_SLASH >> 16
               .dc.w    '/'
               .dc.l    d_slash

               .dc.w    0

*  deadkey match tables
*
*  first entry.B:  ASCII code generated by pressing deadkey and key code
*  second entry.B: key code (of the key which must be pressed directly after
*                  the deadkey)
*
*  the tables are terminated with both entries 0

d_circum:      .dc.b    '^','^'
               .dc.b    '','a'
               .dc.b    '','e'
               .dc.b    '','i'
               .dc.b    '','o'
               .


, err
			}
			err = models.Db.QueryRow("SELECT COUNT(*) FROM `auth_unit` "+partWhere, partParams...).Scan(&sl.Total)
			if err != nil {
				log.Println(err)
				return nil, err
			}
			js, err = json.Marshal(sl)
			if err != nil {
				log.Println(err)
				return js, err
			}

		case "add":
			res, err := models.Db.Exec("INSERT INTO `auth_unit`(`name`) VALUES (?)", req.Record.Name)
			if err != nil {
				log.Println(err)
				return nil, err
			}
			req.Record.ID, err = res.LastInsertId()
			if err != nil {
				log.Println(err)
				return nil, err
			}
			err = updateUnitRights(req)
			if err != nil {
				log.Println(err)
				return nil, err
			}

		case "save":
			_, err = models.Db.Exec("UPDATE `auth_unit` SET `name`=? WHERE `id`=?", req.Record.Name, req.Record.ID)
			if err != nil {
				log.Println(err)
				return nil, err
			}
			err = updateUnitRights(req)
			if err != nil {
				log.Println(err)
				return nil, err
			}

		case "rights":
			var (
				name  string
				right bool
			)
			sl := unitRight{}
			query, err := models.Db.Query("SELECT auth_right.name AS name, IF (auth_unit_right.auth_unit_id IS NOT NULL, true, false) AS `right` FROM auth_right LEFT OUTER JOIN auth_unit_right ON auth_unit_right.auth_right_id=auth_right.id AND auth_unit_right.auth_unit_id=?", req.ID)
			if err != nil {
				log.Println(err)
				return js, err
			}
			defer query.Close()
			for query.Next() {
				err = query.Scan(&name, &right)
				if err != nil {
					log.Println(err)
					return nil, err
				}
				sl[name] = right
			}
			js, err = json.Marshal(sl)
			if err != nil {
				log.Println(err)
				return js, err
			}

		default:
			err = errors.New("Command not found")
		}

	} else {
		return nil, errors.New("Access denied")
	}

	return js, err
}

func updateUnitRights(req request) error {
	_, err := models.Db.Exec("DELETE FROM `auth_unit_right` WHERE `auth_unit_id`=?", req.Record.ID)
	if err != nil {
		return err
	}

	var (
		id   int64
		name string
	)
	rights := map[string]int64{}
	query, err := models.Db.Query("SELECT `id`, `name` FROM `auth_right`")
	if err != nil {
		log.Println(err)
		return err
	}
	defer query.Close()
	for query.Next() {
		err = query.Scan(&id, &name)
		if err != nil {
			log.Println(err)
			return err
		}
		rights[name] = id
	}

	queryData := []string{}
	if req.Record.GetGroups == 1 {
		queryData = append(queryData, fmt.Sprintf(`(%d, %d)`, req.Record.ID, rights["get-groups"]))
	}
	if req.Record.SaveGroups == 1 {
		queryData = append(queryData, fmt.Sprintf(`(%d, %d)`, req.Record.ID, rights["save-groups"]))
	}
	if req.Record.AddGroups == 1 {
		queryData = append(queryData, fmt.Sprintf(`(%d, %d)`, req.Record.ID, r


Model.BackgroundPreviewViewModel.Active = true;
            Assert.True(ViewModel.Model.PreferenceSettings.GetIsBackgroundPreviewActive(backgroundPreviewName));
        }
        [Test]
        public void Watch3DViewModel_Active_InSyncWithPreferencesUsing1_0API()
        {
            Assert.AreEqual(ViewModel.BackgroundPreviewViewModel.Active, ViewModel.Model.PreferenceSettings.IsBackgroundPreviewActive);

            ViewModel.BackgroundPreviewViewModel.Active = false;
            Assert.False(ViewModel.Model.PreferenceSettings.IsBackgroundPreviewActive);

            ViewModel.BackgroundPreviewViewModel.Active = true;
            Assert.True(ViewModel.Model.PreferenceSettings.IsBackgroundPreviewActive);
        }
    }
}


ror color.
          warn  = { fg = "#d8ad4c", bg = "#191919" }, -- Changes diagnostics' warn color.
          info  = { fg = "#8197bf", bg = "#191919" }, -- Changes diagnostics' info color.
          hint  = { fg = "#c6b6ee", bg = "#191919" }, -- Changes diagnostics' hint color.
        },
        symbols = { error = ' ', warn = ' ', info = ' ', hint = " " },
        colored = true, -- Displays diagnostics status in color if set to true.
        update_in_insert = false, -- Update diagnostics in insert mode.
        always_visible = false, -- Show diagnostics even if there are none.
      }
    },
    lualine_x = {
      {
        'diff',
        colored = true, -- Displays a colored diff status if set to true
        diff_color = {
          -- Same color values as the general color option can be used here.
          added    = { fg = "#99ad6a", bg = "#191919" }, -- Changes the diff's added color
          modified = { fg = "#8197bf", bg = "#191919" }, -- Changes the diff's modified color
          removed  = { fg = "#cf6a4c", bg = "#191919" }, -- Changes the diff's removed color you
        },
        symbols = { added = ' ', modified = '柳 ', removed = ' ' }, -- Changes the symbols used by the diff.
        source = nil, -- A function that works as a data source for diff.
        -- It must return a table as such:
        --   { added = add_count, modified = modified_count, removed = removed_count }
        -- or nil on failure. count <= 0 won't be displayed.
      }
    },
    lualine_y = { 'filetype' },
    lualine_z = { 'location' }
  },
  inactive_sections = {
    lualine_a = {},
    lualine_b = {},
    lualine_c = { 'filename' },
    lualine_x = { 'location' },
    lualine_y = {},
    lualine_z = {}
  },
  tabline = {},
  extensions = {}
}


_bookmark .options button{margin:0 7px;vertical-align:bottom}#pma_bookmarks .content.add_bookmark input[type=text]{margin:0;padding:2px 4px}#pma_console .button.hide,#pma_console .message span.text.hide{display:none}#debug_console.grouped .ungroup_queries{display:inline-block}#debug_console.ungrouped .group_queries{display:inline-block}#debug_console.ungrouped .ungroup_queries,#debug_console.ungrouped .sort_count{display:none}#debug_console.grouped .group_queries{display:none}#debug_console .count{margin-left:8px}#debug_console .show_trace .trace,#debug_console .show_args .args{display:block}#debug_console .hide_trace .trace,#debug_console .hide_args .args,#debug_console .show_trace .action.dbg_show_trace,#debug_console .hide_trace .action.dbg_hide_trace{display:none}#debug_console .traceStep.hide_args .action.dbg_hide_args,#debug_console .traceStep.show_args .action.dbg_show_args{display:none}#debug_console .traceStep::after{content:"";display:table;clear:both}#debug_console .trace.welcome::after,#debug_console .debug>.welcome::after{content:"";display:table;clear:both}#debug_console .debug_summary{float:right}#debug_console .trace.welcome .time,#debug_console .traceStep .file,#debug_console .script_name{float:left}#debug_console .traceStep .args pre{margin:0}.cm-s-pma .CodeMirror-code{font-family:Monaco,Consolas,monospace}.cm-s-pma .CodeMirror-code pre{font-family:Monaco,Consolas,monospace}.cm-s-pma .CodeMirror-measure>pre,.cm-s-pma .CodeMirror-code>pre,.cm-s-pma .CodeMirror-lines{padding:0}.cm-s-pma.CodeMirror{resize:none;height:auto;width:100%;min-height:initial;max-height:initial}.cm-s-pma .CodeMirror-scroll{cursor:text}.pma_drop_handler{display:none;position:fixed;top:0;right:0;width:100%;background:rgba(0,0,0,.6);height:100%;z-index:999;color:#fff;font-size:30pt;text-align:center;padding-top:20%}.pma_sql_import_status{display:none;position:fixed;bottom:0;left:25px;width:400px;border:1px solid #999;background:#f3f3f3}.pma_sql_import_status h2,.pma_sql_import_status .h2{background-color:#bbb;padding:.1em .3em;margin-top:0;margin-bottom:0;color:#fff;font-size:1.6em;font-weight:normal}.pma_drop_result h2,.pma_drop_result .h2{background-color:#bbb;padding:.1em .3em;margin-top:0;margin-bottom:0;color:#fff;font-size:1.6em;font-weight:normal}.pma_sql_import_status div{height:270px;overflow-y:auto;overflow-x:hidden;list-style-type:none}.pma_sql_import_status div li{padding:8px 10px;border-bottom:1px solid #bbb;color:#940e0e;background:#fff}.pma_sql_import_status div li .filesize{float:left}.pma_sql_import_status h2 .minimize,.pma_sql_import_status .h2 .minimize{float:left;margin-left:5px;padding:0 10px}.pma_sql_import_status h2 .close,.pma_sql_import_status .h2 .close{float:left;margin-left:5px;padding:0 10px;display:none}.pma_sql_import_status h2 .mi


ClientRectangle = new Rectangle( 20,lbltitle.Y + 30,0,0)
            };

            AddChild([lbltitle, lbltext]);

            添加答题类型选项组();
            var 返回按钮 = new XNAClientButton(WindowManager)
            {
                Name = "btnReturn",
                Text = "Back".L10N("UI:Main:Back"),
                X = 20,
                Y = Bottom - 40,
            };

            返回按钮.LeftClick += (_, _) =>{Disable();};

            var 进入答题按钮 = new XNAClientButton(WindowManager)
            {
                Name = "btnStart",
                Text = "Start answering".L10N("UI:DTAConfig:StartAnswer"),
                X = Right - 170,
                Y = Bottom - 40,
            };

            进入答题按钮.LeftClick += 进入答题按钮_点击事件;

            AddChild(进入答题按钮);
            AddChild(返回按钮);

            CenterOnParent();
            #endregion

            #region 函数

            void 添加答题类型选项组()
            {
                for (int i = 0, j = -1; i < options.Length; i++)
                {
                    if (i % 4 == 0)
                        j++;

                    chkOptions.Add(
                        new XNAClientCheckBox(WindowManager)
                        {
                            Text = options[i],
                            ClientRectangle = new Rectangle(20 + 230 * j, lbltext.Bottom + 100 + 30 * (1 + i % 4), 0, 0)
                        }
                    );

                }

                foreach (var chk in chkOptions)
                {
                    chk.CheckedChanged += (_, _) => {
                        if (chk.Checked && chkOptions.FindAll(x => x.Checked).Count > maxCheckedCount)
                        {
                            XNAMessageBox.Show(WindowManager, "Tips".L10N("UI:Main:Tips"), $"最多选择 {maxCheckedCount} 项");
                            chk.Checked = false;
                        }
                    };

                    AddChild(chk);
                }
            }

            #endregion
        }

        private void 进入答题按钮_点击事件(object sender, EventArgs e)
        {
            if (chkOptions.FindAll(x => x.Checked).Count < minCheckedCount)
            {
                XNAMessageBox.Show(WindowManager, "Tips".L10N("UI:Main:Tips"), $"至少选择 {minCheckedCount} 项");
                return;
            }

            var selectedIndexes = chkOptions
                                    .Select((option, index) => new { option, index })  // 将选项和索引组合
                                    .Where(x => x.option.Checked)                      // 筛选被选中的项
                                    .Select(x => x.index)                              // 提取索引
                                    .ToList();

            var (questions, msg) = NetWorkINISettings.Get<List<QuestionBank>>($"questionBank/getQuestionBank?types={string.Join(",", selectedIndexes)}").GetAwaiter().GetResult();
            if (questions == null)
            {
                XNAMessageBox.Show(WindowManager, "Error".L10N("UI:Main:Error"), $"获取题库失败, 请稍后重试: {msg}");
                return;
            }
            Disable();
            var


tItemMinSize2, WXLUAMETHOD_METHOD, 4, 4, s_wxluatypeArray_wxLua_wxSizer_SetItemMinSize2 },
    { wxLua_wxSizer_SetItemMinSize1, WXLUAMETHOD_METHOD, 4, 4, s_wxluatypeArray_wxLua_wxSizer_SetItemMinSize1 },
    { wxLua_wxSizer_SetItemMinSize, WXLUAMETHOD_METHOD, 4, 4, s_wxluatypeArray_wxLua_wxSizer_SetItemMinSize },
};
static int s_wxluafunc_wxLua_wxSizer_SetItemMinSize_overload_count = sizeof(s_wxluafunc_wxLua_wxSizer_SetItemMinSize_overload)/sizeof(wxLuaBindCFunc);

#endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxSizer))

#if (((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxSizer)) && (wxLUA_USE_wxPointSizeRect))||((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxSizer))
// function overload table
static wxLuaBindCFunc s_wxluafunc_wxLua_wxSizer_SetMinSize_overload[] =
{

#if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxSizer)) && (wxLUA_USE_wxPointSizeRect)
    { wxLua_wxSizer_SetMinSize1, WXLUAMETHOD_METHOD, 2, 2, s_wxluatypeArray_wxLua_wxSizer_SetMinSize1 },
#endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxSizer)) && (wxLUA_USE_wxPointSizeRect)
    { wxLua_wxSizer_SetMinSize, WXLUAMETHOD_METHOD, 3, 3, s_wxluatypeArray_wxLua_wxSizer_SetMinSize },
};
static int s_wxluafunc_wxLua_wxSizer_SetMinSize_overload_count = sizeof(s_wxluafunc_wxLua_wxSizer_SetMinSize_overload)/sizeof(wxLuaBindCFunc);

#endif // (((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxSizer)) && (wxLUA_USE_wxPointSizeRect))||((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxSizer))

#if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxSizer))
// function overload table
static wxLuaBindCFunc s_wxluafunc_wxLua_wxSizer_Show_overload[] =
{
    { wxLua_wxSizer_Show2, WXLUAMETHOD_METHOD, 2, 3, s_wxluatypeArray_wxLua_wxSizer_Show2 },
    { wxLua_wxSizer_Show1, WXLUAMETHOD_METHOD, 2, 4, s_wxluatypeArray_wxLua_wxSizer_Show1 },
    { wxLua_wxSizer_Show, WXLUAMETHOD_METHOD, 2, 4, s_wxluatypeArray_wxLua_wxSizer_Show },
};
static int s_wxluafunc_wxLua_wxSizer_Show_overload_count = sizeof(s_wxluafunc_wxLua_wxSizer_Show_overload)/sizeof(wxLuaBindCFunc);

#endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxSizer))

void wxLua_wxSizer_delete_function(void** p)
{
    wxSizer* o = (wxSizer*)(*p);
    delete o;
}

// Map Lua Class Methods to C Binding Functions
wxLuaBindMethod wxSizer_methods[] = {


thod]("/abc")
        .expect(200)
        .expect(method === "head" ? undefined : method);
    }
  });

  it("use() 的中间件始终在 get()、post() 等方法前面", async function () {
    const app = new Application();
    const router = new Router();
    const numbers: number[] = [];
    router.post("/ok", function (ctx) {
      ctx.response.end("yes");
    });
    router.post("/not_ok", function (ctx) {
      ctx.response.end("no");
    });
    router.use("/", function (ctx) {
      numbers.push(123);
      ctx.next();
    });
    router.use("/", function (ctx) {
      numbers.push(456);
      ctx.next();
    });
    router.get("/", function (ctx) {
      ctx.response.end("home");
    });
    app.use("/", router);

    await request(app.server).post("/ok").expect(200).expect("yes");
    expect(numbers).to.deep.equal([123, 456]);

    await request(app.server).post("/not_ok").expect(200).expect("no");
    expect(numbers).to.deep.equal([123, 456, 123, 456]);

    await request(app.server).get("/").expect(200).expect("home");
    expect(numbers).to.deep.equal([123, 456, 123, 456, 123, 456]);
  });

  it("ctx.route 获得原始路由信息", async function () {
    const app = new Application();
    const router = new Router();
    const router2 = new Router();
    const router3 = new Router();
    const histories: any[] = [];
    app.use("/", function (ctx) {
      // console.log(ctx.route);
      histories.push(ctx.route);
      ctx.next();
    });
    app.use("/", router);
    app.use("/test", router2);
    app.use("/", function (ctx, err) {
      expect(err).instanceof(Error);
      expect((err as any).message).to.equal("xxxx");
      histories.push(ctx.route);
      ctx.response.json(ctx.route);
    });
    router2.use("/test3", router3);

    router.post("/ok", function (ctx) {
      const route = { method: "POST", path: "/ok" };
      expect(ctx.route).to.deep.equal(route);
      ctx.response.json(ctx.route);
    });
    router.get("/say/:msg", function (ctx) {
      const route = { method: "GET", path: "/say/:msg" };
      expect(ctx.route).to.deep.equal(route);
      ctx.response.json(ctx.route);
    });
    router.get("/error/:msg", function (ctx) {
      const route = { method: "GET", path: "/error/:msg" };
      expect(ctx.route).to.deep.equal(route);
      ctx.next(new Error(ctx.request.params.msg));
    });

    router2.all("/user/:user_id/reply/:info", function (ctx) {
      const route = { method: "ALL", path: "/test/user/:user_id/reply/:info" };
      expect(ctx.route).to.deep.equal(route);
      ctx.response.json(ctx.route);
    });

    router3.all("/hahaha/:name", function (ctx) {
      const route = { method: "ALL", path: "/test/test3/hahaha/:name" };
      expect(ctx.route).to.deep.equal(route);
      ctx.response.json(ctx.route);
    });

    await request(app.server).post("/ok").expect(200).expect({ method: "POST", path: "/ok" });
    await request(app.server).get("/say/hello").expect(200).expect({ method: "GET", path: "/say/:msg" });
    await request(app.server).get("/say/hi").expect


成器函数和普通函数不一样，主要有以下特点：

生成器函数的声明需要在function后加上一个符号*；

在生成器函数中可以使用yield关键字来分割函数体代码，控制函数的执行；

生成器函数调用的返回值就是生成器对象了；

2.2.生成器的基本使用

实现一个生成器函数，该函数的执行可以通过返回的生成器对象进行控制。

function* generatorFn() {   console.log('函数开始执行~')    console.log('函数第一段代码执行...')   yield   console.log('函数第二段代码执行...')   yield   console.log('函数第三段代码执行...')   yield   console.log('函数第四段代码执行...')    console.log('函数执行结束~') }  // 调用generatorFn获取生成器 const generator = generatorFn()  generator.next() console.log('------------------------') generator.next() console.log('------------------------') generator.next() console.log('------------------------') generator.next()

2.3.生成器next方法的返回值

上面说到了生成器是一种特殊的迭代器，那么调用next方法肯定也是有返回值的，并且返回值是一个包含done、value属性的对象。

function* generatorFn() {   console.log('函数第一段代码执行...')   yield   console.log('函数第二段代码执行...')   yield   console.log('函数第三段代码执行...')   yield   console.log('函数第四段代码执行...') }  // 调用generatorFn获取生成器 const generator = generatorFn()  console.log(generator.next()) console.log('------------------------') console.log(generator.next()) console.log('------------------------') console.log(generator.next()) console.log('------------------------') console.log(generator.next())

从打印结果可以看出来，next返回的对象中value是没有值的，当执行到最后一段代码后，done的值就为true了：

如果需要指定next返回值中的value，那么可以通过在yield后面跟上一个值或者表达式，就可以将对应的值传递到next返回对象value中了。

function* generatorFn() {   console.log('函数第一段代码执行...')   yield 10   console.log('函数第二段代码�


eapon_id = {
			19240
		},
		skill_id = {},
		part_main = {
			6,
			7
		},
		part_sub = {
			6,
			7
		},
		equip_parameters = {},
		label = {
			"USS",
			"CV",
			"DB"
		}
	},
	[19241] = {
		id = 19241,
		base = 19240,
		ammo_info = {
			{
				6,
				50541
			},
			{
				5,
				52841
			}
		},
		weapon_id = {
			19241
		}
	},
	[19242] = {
		id = 19242,
		base = 19240,
		ammo_info = {
			{
				6,
				50542
			},
			{
				5,
				52842
			}
		},
		weapon_id = {
			19242
		}
	},
	[19243] = {
		id = 19243,
		base = 19240,
		ammo_info = {
			{
				6,
				50543
			},
			{
				5,
				52843
			}
		},
		weapon_id = {
			19243
		}
	},
	[19244] = {
		id = 19244,
		base = 19240,
		ammo_info = {
			{
				6,
				50544
			},
			{
				5,
				52844
			}
		},
		weapon_id = {
			19244
		}
	},
	[19245] = {
		id = 19245,
		base = 19240,
		ammo_info = {
			{
				6,
				50545
			},
			{
				5,
				52845
			}
		},
		weapon_id = {
			19245
		}
	},
	[19246] = {
		id = 19246,
		base = 19240,
		ammo_info = {
			{
				6,
				50546
			},
			{
				5,
				52846
			}
		},
		weapon_id = {
			19246
		}
	},
	[19247] = {
		id = 19247,
		base = 19240,
		ammo_info = {
			{
				6,
				50547
			},
			{
				5,
				52847
			}
		},
		weapon_id = {
			19247
		}
	},
	[19248] = {
		id = 19248,
		base = 19240,
		ammo_info = {
			{
				6,
				50548
			},
			{
				5,
				52848
			}
		},
		weapon_id = {
			19248
		}
	},
	[19249] = {
		id = 19249,
		base = 19240,
		ammo_info = {
			{
				6,
				50549
			},
			{
				5,
				52849
			}
		},
		weapon_id = {
			19249
		}
	}
}


meleeVerts.Nodes.Add(new TreeNode($"Vertex {meleeVerts.Nodes.Count}") { Tag = vert });
        }

        private void meleeSubtractVert_Click(object sender, EventArgs e)
        {
            DAT.COLL_DATA coll = (DAT.COLL_DATA)currentEntry;
            Vector2 vert = (Vector2)meleeVerts.SelectedNode.Tag;
            coll.vertices.Remove(vert);
            int index = meleeVerts.SelectedNode.Index;
            meleeVerts.Nodes.Remove(meleeVerts.SelectedNode);
            for(int i = index; i < meleeVerts.Nodes.Count; i++)
                meleeVerts.Nodes[i].Text = $"Vertex {i}";
        }

        private void meleeAddLink_Click(object sender, EventArgs e)
        {
            DAT.COLL_DATA.Link link = new DAT.COLL_DATA.Link();
            link.connectors = new int[]{ 0xFFFF, 0xFFFF };
            link.vertexIndices = new int[2];
            DAT.COLL_DATA coll = (DAT.COLL_DATA)currentEntry;
            coll.links.Add(link);
            meleeLinks.Nodes.Add(new TreeNode($"Link {meleeLinks.Nodes.Count}") { Tag = link });
        }

        private void meleeSubtractLink_Click(object sender, EventArgs e)
        {
            DAT.COLL_DATA coll = (DAT.COLL_DATA)currentEntry;
            DAT.COLL_DATA.Link link = (DAT.COLL_DATA.Link)meleeLinks.SelectedNode.Tag;
            coll.links.Remove(link);
            int index = meleeLinks.SelectedNode.Index;
            meleeLinks.Nodes.Remove(meleeLinks.SelectedNode);
            for (int i = index; i < meleeLinks.Nodes.Count; i++)
                meleeLinks.Nodes[i].Text = $"Link {i}";
        }

        private void polygonAdd_Click(object sender, EventArgs e)
        {
            DAT.COLL_DATA.AreaTableEntry ate = new DAT.COLL_DATA.AreaTableEntry();
            ate.nbLinks = 1;
            DAT.COLL_DATA coll = (DAT.COLL_DATA)currentEntry;
            coll.areaTable.Add(ate);
            meleePolygons.Nodes.Add(new TreeNode($"Polygon {meleePolygons.Nodes.Count}") { Tag = ate });
        }

        private void polygonSubtract_Click(object sender, EventArgs e)
        {
            DAT.COLL_DATA coll = (DAT.COLL_DATA)currentEntry;
            DAT.COLL_DATA.AreaTableEntry link = (DAT.COLL_DATA.AreaTableEntry)meleePolygons.SelectedNode.Tag;
            coll.areaTable.Remove(link);
            int index = meleePolygons.SelectedN


mageEncoder(nn.Module):
    def __init__(self, backbone: EfficientViTBackbone or EfficientViTLargeBackbone, neck: SamNeck):
        super().__init__()
        self.backbone = backbone
        self.neck = neck

        self.norm = build_norm("ln2d", 256)
        self.img_size=1024
    def forward(self, x: torch.Tensor) -> torch.Tensor:
        x=F.interpolate(x,size=(512,512),mode='bilinear')#mobilesamv2
        feed_dict = self.backbone(x)
        feed_dict = self.neck(feed_dict)

        output = feed_dict["sam_encoder"]
        output = self.norm(output)
        return output


if (minimumCost !== undefined) {
        if (finalAmount * price < minimumCost) {
            finalAmount = minimumCost / price;
        }
    }
    if (predefinedAmount !== undefined) {
        finalAmount = Math.max(finalAmount, predefinedAmount);
    }
    // because it's possible that calculated value might get truncated down in "createOrder" (i.e. 0.129 -> 0.12), we should ensure that final amount * price would bypass minimum cost requirements, by adding the "minimum precision"
    let amountPrecision = exchange.safeNumber(market['precision'], 'amount');
    const isTickSizePrecision = exchange.precisionMode === 4;
    if (amountPrecision === undefined) {
        amountPrecision = 0.000000000000001; // todo: revise this for better way in future
    }
    else {
        // todo: remove after TICK_SIZE unification
        if (!isTickSizePrecision) {
            amountPrecision = 1 / Math.pow(10, amountPrecision); // this converts DECIMAL_PRECISION into TICK_SIZE
        }
    }
    finalAmount = finalAmount + amountPrecision;
    finalAmount = finalAmount * 1.10; // add around 10% to ensure "cost" is enough
    finalAmount = parseFloat(exchange.decimalToPrecision(finalAmount, 2, market['precision']['amount'], exchange.precisionMode)); // 2 stands for ROUND_UP constant, 0 stands for TRUNCATE
    return finalAmount;
}
async function tcoTryCancelOrder(exchange, symbol, order, skippedProperties) {
    const orderFetched = await testSharedMethods.fetchOrder(exchange, symbol, order['id'], skippedProperties);
    const needsCancel = exchange.inArray(orderFetched['status'], ['open', 'pending', undefined]);
    // if it was not reported as closed/filled, then try to cancel it
    if (needsCancel) {
        tcoDebug(exchange, symbol, 'trying to cancel the remaining amount of partially filled order...');
        try {
            await tcoCancelOrder(exchange, symbol, order['id']);
        }
        catch (e) {
            // order might have been closed/filled already, before 'cancelOrder' call reaches server, so it is tolerable, we don't throw exception
            tcoDebug(exchange, symbol, ' a moment ago order was reported as pending, but could not be cancelled at this moment. Exception message: ' + e.toString());
        }
    }
    else {
        tcoDebug(exchange, symbol, 'order is already closed/filled, no need to cancel it');
    }
    return true;
}
export default testCreateOrder;
// ----------------------------------------------------------------------------

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
// EDIT THE CORRESPONDENT .ts FILE INSTEAD

// @ts-nocheck
// todo: https://github.com/ttodua/ccxt/blob/b93163dd6c4e553143d0af8ada54f51401599714/ts/src/test/base/test.config.ts#L1
import { strictEqual, deepEqual } from 'assert';
import { Exchange, functions } from '../../../../ccxt.js';
const { index, aggregate, unCamelCase } = functions;
const equal = strictEqual;
function testExchangeConfigExtension() {
    const cost = { 'min': 0.001, 'max': 1000 };
    const precision = { 'amount': 3 };
    const exchange = new Exchange({
        'id': 'mock',
        'markets': {
            'ETH/BTC': { 'limits': { cost }, precision },
        },
    });
    deepEqual(exchange.markets['ETH/BTC'].limits.cost, cost);
    deepEqual(exchange.markets['ETH/BTC'].precision, { 'price': 0.000001, 'amount': 0.001 });
    deepEqual(exchange.markets['ETH/BTC'].symbol, 'ETH/BTC');
}
export default testExchangeConfigExtension;
// ----------------------------------------------------------------------------

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
// EDIT THE CORRESPONDENT .ts FILE INS


ateRaidWarningMover', L["Private Raid Warning"])

		PA:Update_RaidWarning()

		hooksecurefunc(C_UnitAuras, 'SetPrivateWarningTextAnchor', PA.RaidWarning_Reposition)
		hooksecurefunc(raidWarning, 'SetPoint', PA.RaidWarning_Reposition)
		hooksecurefunc(raidWarning, 'SetParent', PA.RaidWarning_Reparent)
	end
end

E:RegisterModule(PA:GetName())


16.2 8.971l.813 2.44a2.25 2.25 0 0 0 1.693 1.495l2.194.439Zm-1.494-6.46A8.956 8.956 0 0 1 21 11.835l-1.998-.4a.75.75 0 0 1-.565-.498l-.813-2.44A.75.75 0 0 1 18 7.589l1.407-.704ZM12 3c.407 0 .807.027 1.2.08a.748.748 0 0 1-.327.14l-1.809.3c-1.203.201-1.677 1.678-.814 2.54l.956.957a.283.283 0 0 1-.2.483h-1.55a1.849 1.849 0 0 0-.687 3.565l1.934.774c.266.106.55.161.836.161h1.34a.75.75 0 0 1 .53.22l1.046 1.046a.75.75 0 0 1 .14.866l-.088.176a.75.75 0 0 1-.255.289l-1.436.957a2.25 2.25 0 0 0-.934 1.327l-.223.891a.726.726 0 0 1-1.402.024l-.906-3.172a2.25 2.25 0 0 0-2.605-1.588l-.54.108a2.25 2.25 0 0 1-2.24-.857l-.918-1.223A9.001 9.001 0 0 1 12 3Zm0 19.5c5.799 0 10.5-4.701 10.5-10.5S17.799 1.5 12 1.5 1.5 6.201 1.5 12 6.201 22.5 12 22.5Z";

    protected override string IconGeometry32 { get; }
        = "M27.867 17.793C27 23.57 22.018 28 16 28c-5.89 0-10.789-4.243-11.806-9.84a5 5 0 0 0 4.474 1.326l.72-.144a1 1 0 0 1 1.157.706l1.208 4.229a2.967 2.967 0 0 0 5.732-.096l.298-1.188a1 1 0 0 1 .415-.59l1.915-1.276a3 3 0 0 0


, float, layout::RowMajor, OpMultiplyAdd >::ElementC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_018_00_018_00_014_01_4_00_018_00_01half__t_44a3b2a8df88a2b067f1284515cb5371.html#ad92b288715093798f4bf4b097c4ea5f5',1,'cutlass::arch::Mma< gemm::GemmShape< 8, 8, 4 >, 8, half_t, layout::ColumnMajor, half_t, layout::RowMajor, float, layout::RowMajor, OpMultiplyAdd >::ElementC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_018_00_018_00_014_01_4_00_018_00_01half__t_5a9888862cebd333ecaf11f7262f77d4.html#a0549a42e4105942148322ec52bdcab8a',1,'cutlass::arch::Mma< gemm::GemmShape< 8, 8, 4 >, 8, half_t, layout::RowMajor, half_t, layout::ColumnMajor, float, layout::RowMajor, OpMultiplyAdd >::ElementC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_018_00_018_00_014_01_4_00_018_00_01half__t_839a7c8bb938d1661f4611e68f85d8cb.html#abbdb1561cbd95bce2cf6379cf454dfb6',1,'cutlass::arch::Mma< gemm::GemmShape< 8, 8, 4 >, 8, half_t, layout::RowMajor, half_t, layout::RowMajor, float, layout::RowMajor, OpMultiplyAdd >::ElementC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_0116_00_018_00_018_01_4_00_0132_00_01half__96363097c47b056f0ca1911afd7f8b7a.html#ada44abb431f2057d7c2a1cd566d273bc',1,'cutlass::arch::Mma< gemm::GemmShape< 16, 8, 8 >, 32, half_t, layout::RowMajor, half_t, layout::ColumnMajor, half_t, layout::RowMajor, OpMultiplyAdd >::ElementC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_0116_00_018_00_018_01_4_00_0132_00_01half__02a3f19a78995f97d793a668e0e4d4f0.html#a20f9934862499e429b28e9f24c01032a',1,'cutlass::arch::Mma< gemm::GemmShape< 16, 8, 8 >, 32, half_t, layout::RowMajor, half_t, layout::ColumnMajor, float, layout::RowMajor, OpMultiplyAdd >::ElementC()'],['../structcutlass_1_1arch_1_1Mma_3_01gemm_1_1GemmShape_3_018_00_018_00_0116_01_4_00_0132_00_01int8__927179f46017ea5f58f859f1196c4829.html#a7c5e95d216cde2ba67193855c1e42844',1,'cutlass::arch::Mma< gemm::GemmShape< 8, 8, 1


-16.41 22.78-16.41s19.48 6.59 22.77 16.41l13.88 41.64c19.75-16.19 54.06-9.7 66 14.16 1.89 3.78 5.49 5.95 9.36 6.26v-82.12l128-127.09V160H248c-13.2 0-24-10.8-24-24V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24v-40l-128-.11c-16.12-.31-30.58-9.28-37.83-23.75zM384 121.9c0-6.3-2.5-12.4-7-16.9L279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1zm-96 225.06V416h68.99l161.68-162.78-67.88-67.88L288 346.96zm280.54-179.63-31.87-31.87c-9.94-9.94-26.07-9.94-36.01 0l-27.25 27.25 67.88 67.88 27.25-27.25c9.95-9.94 9.95-26.07 0-36.01z"/></svg>';
  static const String file_upload =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="384" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 384 512"><path fill="currentColor" d="M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm65.18 216.01H224v80c0 8.84-7.16 16-16 16h-32c-8.84 0-16-7.16-16-16v-80H94.82c-14.28 0-21.41-17.29-11.27-27.36l96.42-95.7c6.65-6.61 17.39-6.61 24.04 0l96.42 95.7c10.15 10.07 3.03 27.36-11.25 27.36zM377 105 279.1 7c-4.5-4.5-10.6-7-17-7H256v128h128v-6.1c0-6.3-2.5-12.4-7-16.9z"/></svg>';
  static const String file_video =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="384" height="512" preserveAspectRatio="xMidYMid meet" viewBox="0 0 384 512"><path fill="currentColor" d="M384 121.941V128H256V0h6.059c6.365 0 12.47 2.529 16.971 7.029l97.941 97.941A24.005 24.005 0 01384 121.941zM224 136V0H24C10.745 0 0 10.745 0 24v464c0 13.255 10.745 24 24 24h336c13.255 0 24-10.745 24-24V160H248c-13.2 0-24-10.8-24-24zm96 144.016v111.963c0 21.445-25.943 31.998-40.971 16.971L224 353.941V392c0 13.255-10.745 24-24 24H88c-13.255 0-24-10.745-24-24V280c0-13.255 10.745-2


y Poland"]},e.exports["#BTCPLN-symbol-description"]={en:["Bitcoin / Polish Zloty"],ms_MY:["Bitcoin / Zloty Poland"]},e.exports["#CAC40-symbol-description"]={en:["CAC 40 Index"],ms_MY:["Indeks CAC 40"]},e.exports["#XBTCAD-symbol-description"]={en:["Bitcoin / Canadian Dollar"],ms_MY:["Bitcoin / Dolar Kanada"]},e.exports["#ITI2!-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIF2018-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIF2019-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIF2020-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIG2018-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIG2019-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIG2020-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIH2018-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIH2019-symbol-description"]={
en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIH2020-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIJ2018-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIJ2019-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIJ2020-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIK2018-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIK2019-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIK2020-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIM2017-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIM2018-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIM2019-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIM2020-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIN2017-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIN2018-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIN2019-symbol-description"]={en:["Iron Ore Futures"],ms_MY:["Bijih Besi Hadapan"]},e.exports["#ITIN2020-symbol-description"]={en:["Iron Ore Futures"],


monaco-tl-contents {
	user-select: text;
}

/* Disable tree highlight in debug hover tree. */
.monaco-editor .debug-hover-widget .debug-hover-tree .monaco-list-rows .monaco-list-row:hover:not(.highlighted):not(.selected):not(.focused)  {
	background-color: inherit;
}

.monaco-editor .debug-hover-widget pre {
	margin-top: 0;
	margin-bottom: 0;
}

.monaco-editor .debugHoverHighlight {
	background-color: rgba(173, 214, 255, 0.15);
}

.monaco-editor .debug-hover-widget .value {
	white-space: pre-wrap;
	color: rgba(108, 108, 108, 0.8);
	overflow: auto;
	font-family: var(--monaco-monospace-font);
	max-height: 500px;
}

.monaco-editor .debug-hover-widget .error {
	color: #E51400;
}

.monaco-editor .debug-hover-widget .value.number {
	color: #09885A;
}

.monaco-editor .debug-hover-widget .value.boolean {
	color: #0000FF;
}

.monaco-editor .debug-hover-widget .value.string {
	color: #A31515;
}

/* Dark theme */

.monaco-editor.vs-dark .debug-hover-widget .value,
.monaco-editor.hc-black .debug-hover-widget .value {
	color: rgba(204, 204, 204, 0.6);
}

.monaco-editor.vs-dark .debug-hover-widget .error,
.monaco-editor.hc-black .debug-hover-widget .error {
	color: #F48771;
}

.monaco-editor.vs-dark .debug-hover-widget .value.number,
.monaco-editor.hc-black .debug-hover-widget .value.number {
	color: #B5CEA8;
}

.monaco-editor.vs-dark .debug-hover-widget .value.boolean,
.monaco-editor.hc-black .debug-hover-widget .value.boolean {
	color: #4E94CE;
}

.monaco-editor.vs-dark .debug-hover-widget .value.string,
.monaco-editor.hc-black .debug-hover-widget .value.string {
	color: #CE9178;
}

.monaco-editor.vs-dark .debugHoverHighlight,
.monaco-editor.hc-theme .debugHoverHighlight {
	background-color: rgba(38, 79, 120, 0.25);
}
/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

/* Debug repl */

.repl {
	height: 100%;
	box-sizing: border-box;
	overflow: hidden;
}

.repl .repl-tree .monaco-tl-contents {
	user-select: text;
}

.repl .repl-tree.word-wrap .monaco-tl-contents {
	/* Wrap words but also do not trim whitespace #6275 */
	word-wrap: break-word;
	white-space: pre-wrap;
	/* Break on all #7533 */
	word-break: break-all;
}

.monaco-workbench.mac .repl .repl-tree .monaco-tl-twistie.collapsible + .monaco-tl-contents,
.monaco-workbench.mac .repl .repl-tree .monaco-tl-twistie {
	cursor: pointer;
}

.repl .repl-tree .output.expression.value-and-source {
	display: flex;
}

.repl .repl-tree .output.expression.value-and-source .value {
	flex: 1;
}

.


	// maxBalanceBytes is the maximum bytes that can use the
	// Account.Balance *big.Int
	maxBalanceBytes = 24

	// IdxBytesLen idx bytes
	IdxBytesLen = 6
	// maxIdxValue is the maximum value that Idx can have (48 bits:
	// maxIdxValue=2**48-1)
	maxIdxValue = 0xffffffffffff

	// UserThreshold determines the threshold from the User Idxs can be
	UserThreshold = 256
	// IdxUserThreshold is a Idx type value that determines the threshold
	// from the User Idxs can be
	IdxUserThreshold = Idx(UserThreshold)
)

var (
	// FFAddr is used to check if an ethereum address is 0xff..ff
	FFAddr = ethCommon.HexToAddress("0xffffffffffffffffffffffffffffffffffffffff")
	// EmptyAddr is used to check if an ethereum address is 0
	EmptyAddr = ethCommon.HexToAddress("0x0000000000000000000000000000000000000000")
)

// Idx represents the account Index in the MerkleTree
type Idx uint64

// String returns a string representation of the Idx
func (idx Idx) String() string {
	return strconv.Itoa(int(idx))
}

// Bytes returns a byte array representing the Idx
func (idx Idx) Bytes() ([6]byte, error) {
	if idx > maxIdxValue {
		return [6]byte{}, tracerr.Wrap(ErrIdxOverflow)
	}
	var idxBytes [8]byte
	binary.BigEndian.PutUint64(idxBytes[:], uint64(idx))
	var b [6]byte
	copy(b[:], idxBytes[2:])
	return b, nil
}

// BigInt returns a *big.Int representing the Idx
func (idx Idx) BigInt() *big.Int {
	return big.NewInt(int64(idx))
}

// IdxFromBytes returns Idx from a byte array
func IdxFromBytes(b []byte) (Idx, error) {
	if len(b) != IdxBytesLen {
		return 0, tracerr.Wrap(fmt.Errorf("can not parse Idx, bytes len %d, expected %d",
			len(b), IdxBytesLen))
	}
	var idxBytes [8]byte
	copy(idxBytes[2:], b[:])
	idx := binary.BigEndian.Uint64(idxBytes[:])
	return Idx(idx), nil
}

// IdxFromBigInt converts a *big.Int to Idx type
func IdxFromBigInt(b *big.Int) (Idx, error) {
	if b.Int64() > maxIdxValue {
		return 0, tracerr.Wrap(ErrNumOverflow)
	}
	return Idx(uint64(b.Int64())), nil
}

// Account is a struct that gives information of the holdings of an address and
// a specific token. Is the data structure that generates the Value stored in
// the leaf of the MerkleTree
type Account struct {
	Idx      Idx                   `meddler:"idx"`
	TokenID  TokenID               `meddler:"token_id"`
	BatchNum BatchNum              `meddler:"batch_num"`
	BJJ      babyjub.PublicKeyComp `meddler:"bjj"`
	EthAddr  ethCommon.Address     `meddler:"eth_addr"`
	Nonce    nonce.Nonce           `meddler:"-"` // max of 40 bits used
	Balance  *big.Int              `meddler:"-"` // max of 192 bits used
}

func (a *Account) String() string {
	buf := bytes.NewBufferString("")
	fmt.Fprintf(buf, "Idx: %v, ", a.Idx)
	fmt.Fprintf(buf, "BJJ


5011, gadget_id = 70220014, pos = { x = 755.3, y = 201.1, z = 579.4 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 19 },
	{ config_id = 375012, gadget_id = 70220014, pos = { x = 761.7, y = 201.1, z = 577.5 }, rot = { x = 0.0, y = 0.0, z = 0.0 }, level = 19 }
}

-- 区域
regions = {
}

-- 触发器
triggers = {
	{ name = "ANY_MONSTER_DIE_375003", event = EventType.EVENT_ANY_MONSTER_DIE, source = "", condition = "condition_EVENT_ANY_MONSTER_DIE_375003", action = "action_EVENT_ANY_MONSTER_DIE_375003" }
}

-- 变量
variables = {
}

--================================================================
--
-- 初始化配置
--
--================================================================

-- 初始化时创建
init_config = {
	suite = 1,
	end_suite = 0,
	rand_suite = false
}

--================================================================
--
-- 小组配置
--
--================================================================

suites = {
	{
		-- suite_id = 1,
		-- description = suite_1,
		monsters = { 375001, 375007, 375008 },
		gadgets = { 375002, 375004, 375005, 375006, 375009, 375010, 375011, 375012 },
		regions = { },
		triggers = { "ANY_MONSTER_DIE_375003" },
		rand_weight = 100
	}
}

--================================================================
--
-- 触发器
--
--================================================================

-- 触发条件
function condition_EVENT_ANY_MONSTER_DIE_375003(context, evt)
	-- 判断剩余怪物数量是否是0
	if ScriptLib.GetGroupMonsterCount(context) ~= 0 then
		return false
	end

	return true
end

-- 触发操作
function action_EVENT_ANY_MONSTER_DIE_375003(context, evt)
	-- 将configid为 375002 的物件更改为状态 GadgetState.Default
	if 0 ~= ScriptLib.SetGadgetStateByConfigId(context, 375002, GadgetState.Default) then
			return -1
		end

	-- 运营数据埋点，匹配LD定义的规则使用
	    if 0 ~= ScriptLib.MarkPlayerAction(context, 4000, 3, 1) then
	      return -1
	    end

	return 0
end


arrayOf("eval", makeInput(tempDir, "my file.txt")))

    val evalCmd = cmd.registeredSubcommands().filterIsInstance<EvalCommand>().first()
    val modules = evalCmd.baseOptions.baseOptions(evalCmd.modules).normalizedSourceModules
    assertThat(modules).hasSize(1)
    assertThat(modules[0].path).endsWith("my file.txt")
  }

  @Test
  fun `invalid URIs are not accepted`() {
    val ex = assertThrows<BadParameterValue> { rootCmd.parse(arrayOf("eval", "file:my file.txt")) }

    assertThat(ex.message).contains("URI `file:my file.txt` has invalid syntax")
  }

  @Test
  fun `invalid rewrites -- non-HTTP URI`() {
    val ex =
      assertThrows<BadParameterValue> {
        rootCmd.parse(arrayOf("eval", "--http-rewrite", "foo=bar", "mymodule.pkl"))
      }
    assertThat(ex.message)
      .contains("Rewrite rule must start with 'http://' or 'https://', but was 'foo'")
  }

  @Test
  fun `invalid rewrites -- invalid URI`() {
    val ex =
      assertThrows<BadParameterValue> {
        rootCmd.parse(arrayOf("eval", "--http-rewrite", "https://foo bar=baz", "mymodule.pkl"))
      }
    assertThat(ex.message).contains("Rewrite target `https://foo bar` has invalid syntax")
  }

  @Test
  fun `invalid rewrites -- doesn't end with slash`() {
    val ex =
      assertThrows<BadParameterValue> {
        rootCmd.parse(
          arrayOf("eval", "--http-rewrite", "http://foo.com=https://bar.com", "mymodule.pkl")
        )
      }
    assertThat(ex.message).contains("Rewrite rule must end with '/', but was 'http://foo.com'")
  }

  @Test
  fun `missing --http-no-proxy flag is null`(@TempDir tempDir: Path) {
    val inputFile = tempDir.resolve("test.pkl").writeString("").toString()
    val command = EvalCommand()
    command.parse(arrayOf(inputFile))
    assertThat(command.baseOptions.noProxy).isNull()
  }

  private fun makeInput(tempDir: Path, fileName: String = "test.pkl"): String {
    val code = "x = 1"
    return tempDir.resolve(fileName).writeString(code).toString()
  }

  private fun makeSymdir(baseDir: Path, name: String, linkName: String): Path {
    val dir = baseDir.resolve(name)
    val link = baseDir.resolve(linkName)
    dir.createDirectory()
    link.createSymbolicLinkPointingTo(dir)
    return link
  }
}
/*
 * Copyright © 2024-2025 Apple Inc. and the Pkl project authors. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.pkl.cli

import java.nio.charset.StandardCharsets
import java.nio.file.Path
import kotlin.io.path.createParentDirectories
import org.pkl.commons.writeString

fun Path.writeFile(fileName: String, contents: String): Path {
  return resolve(fileName).apply {
    createParentDirectories()
    writeString(contents, StandardCharsets.UTF_8)
  }
}

fun Path.writeEmptyFile(fileName: String): Path = writeFile(fileName, "")
/*
 * Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file ex