SkGifCodec::SkGifCodec(SkEncodedInfo&& encodedInfo, SkGifImageReader* reader)
    : INHERITED(std::move(encodedInfo), skcms_PixelFormat_RGBA_8888, nullptr)
    , fReader(reader)
    , fTmpBuffer(nullptr)
    , fSwizzler(nullptr)
    , fCurrColorTable(nullptr)
    , fCurrColorTableIsReal(false)
    , fFilledBackground(false)
    , fFirstCallToIncrementalDecode(false)
    , fDst(nullptr)
    , fDstRowBytes(0)
    , fRowsDecoded(0)
{
    reader->setClient(this);
}

int SkGifCodec::onGetFrameCount() {
    fReader->parse(SkGifImageReader::SkGIFFrameCountQuery);
    return fReader->imagesCount();
}

bool SkGifCodec::onGetFrameInfo(int i, SkCodec::FrameInfo* frameInfo) const {
    if (i >= fReader->imagesCount()) {
        return false;
    }

    const SkGIFFrameContext* frameContext = fReader->frameContext(i);
    SkASSERT(frameContext->reachedStartOfData());

    if (frameInfo) {
        frameInfo->fDuration = frameContext->getDuration();
        frameInfo->fRequiredFrame = frameContext->getRequiredFrame();
        frameInfo->fFullyReceived = frameContext->isComplete();
        frameInfo->fAlphaType = frameContext->hasAlpha() ? kUnpremul_SkAlphaType
                                                         : kOpaque_SkAlphaType;
        frameInfo->fDisposalMethod = frameContext->getDisposalMethod();
    }
    return true;
}

int SkGifCodec::onGetRepetitionCount() {
    fReader->parse(SkGifImageReader::SkGIFLoopCountQuery);
    return fReader->loopCount();
}

static constexpr SkColorType kXformSrcColorType = kRGBA_8888_SkColorType;

void SkGifCodec::initializeColorTable(const SkImageInfo& dstInfo, int frameIndex) {
    SkColorType colorTableColorType = dstInfo.colorType();
    if (this->colorXform()) {
        colorTableColorType = kXformSrcColorType;
    }

    sk_sp<SkColorTable> currColorTable = fReader->getColorTable(colorTableColorType, frameIndex);
    fCurrColorTableIsReal = static_cast<bool>(currColorTable);
    if (!fCurrColorTableIsReal) {
        // This is possible for an empty frame. Create a dummy with one value (transparent).
        SkPMColor color = SK_ColorTRANSPARENT;
        fCurrColorTable.reset(new SkColorTable(&color, 1));
    } else if (this->colorXform() && !this->xformOnDecode()) {
        SkPMColor dstColors[256];
        this->applyColorXform(dstColors, currColorTable->readColors(),
                              currColorTable->count());
        fCurrColorTable.reset(new SkColorTable(dstColors, currColorTable->count()));
    } else {
        fCurrColorTable = std::move(currColorTable);
    }
}

SkCodec::Result SkGifCodec::prepareToDecode(const SkImageInfo& dstInfo, const Options& opts) {
    if (opts.fSubset) {
        return gif_error("Subsets not supported.\n", kUnimplemented);
    }

    const int frameIndex = opts.fFrameIndex;
    if (frameIndex > 0 && kRGB_565_SkColorType == dstInfo.colorType()) {
        // FIXME: In theory, we might be able to support this, but it's not clear that it
        // is necessary (Chromium does not decode to 565, and Android does not decode
        // frames beyond the first). Disabling it because it is somewhat difficult:
        // - If there is a transparent pixel, and this frame draws on top of another frame
        //   (if the frame is independent with a transparent pixel, we should not decode to
        //   565 anyway, since it is not opaque), we need to skip drawing the trans


-----------------------------------
 unsafe  false         true
$ stack java.lang.System gc
Press Ctrl+C to abort.
Affect(class-cnt:1 , method-cnt:1) cost in 50 ms.
ts=2019-01-20 21:14:05;thread_name=main;id=1;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@14dad5dc
    @java.lang.System.gc()
        at com.lz.test.Test.main(Test.java:322)

```
首先输入options unsafe true允许我们对jdk增强，然后对System.gc进行进行监视，然后记录当前的堆栈来获取是什么位置进行的调用。

## 2.7 如何重定义某个类?
有些时候我们找了所有的命令，发现和我们的需求并不符合的时候，那么这个时候我们可以重新定义这个类，我们可以用使用下面的命令。

#### 2.7.1 redefine
redefine命令提供了我们可以重新定义jvm中的class，但是使用这个命令之后class不可恢复。我们首先需要把重写的class编译出来，然后上传到我们指定的目录，进行下面的操作:

```
 redefine -p /tmp/Test.class
```
可以重定义我们的Test.class。从而修改逻辑，完成我们自定义的需求。

## 2.8 Arthas小结
上面介绍了7种Arthas比较常见的场景和命令。当然这个命令还远远不止这么点，每个命令的用法也没有局限于我介绍的。尤其是开源以后更多的开发者参与了进来，现在也将其优化成可以有界面的，在线排查问题的方式，来解决去线上安装的各种不便。

更多的命令可以参考Arthas的用户文档:https://alibaba.github.io/arthas/index.html。

# 3.jvm-sandbox
上面已经给大家介绍了强大的Arthas，有很多人也想做一个可以动态替换Class的工具，但是这种东西过于底层，比较小众，入门的门槛相对来说比较高。但是jvm-sandbox，给我们提供了用通俗易懂的编码方式来动态替换Class。

## 3.1 AOP
对于AOP来说大家肯定对其不陌生,在Spring中我们可以很方便的实现一个AOP，但是这样有两个缺点:一个是只能针对Spring中的Bean进行增强，还有个是增强之后如果要修改增强内容那么就只能重写然后发布项目，不能动态的增强。

## 3.2 sanbox能带来什么
JVM Sandbox 利用 HotSwap 技术在不重启 JVM的情况下实现：

- 在运行期完成对 JVM 中任意类里的任意方法的 AOP 增强
- 可以动态热插拔扩展模块
- 通过扩展模块改变任意方法执行的流程

也就是我们可以通过这种技术来完成我们在arthas的命令。
一般来说sandbox的适用场景如下:
- 线上故障定位
- 线上系统流控
- 线上故障模拟
- 方法请求录制和结果回放
- 动态日志打印
- ...

当然还有更多的场景，他能做什么完全取决于你的想象，只要你想得出来他就能做到。

## 3.3 sandbox例子
sandbox提供了Module的概念，每个Module都是一个AOP的实例。
比如我们想完成一个打印所有jdbc statement sql日


 'fas';
var iconName = 'map-marked-alt';
var width = 576;
var height = 512;
var ligatures = [];
var unicode = 'f5a0';
var svgPathData = 'M288 0c-69.59 0-126 56.41-126 126 0 56.26 82.35 158.8 113.9 196.02 6.39 7.54 17.82 7.54 24.2 0C331.65 284.8 414 182.26 414 126 414 56.41 357.59 0 288 0zm0 168c-23.2 0-42-18.8-42-42s18.8-42 42-42 42 18.8 42 42-18.8 42-42 42zM20.12 215.95A32.006 32.006 0 0 0 0 245.66v250.32c0 11.32 11.43 19.06 21.94 14.86L160 448V214.92c-8.84-15.98-16.07-31.54-21.25-46.42L20.12 215.95zM288 359.67c-14.07 0-27.38-6.18-36.51-16.96-19.66-23.2-40.57-49.62-59.49-76.72v182l192 64V266c-18.92 27.09-39.82 53.52-59.49 76.72-9.13 10.77-22.44 16.95-36.51 16.95zm266.06-198.51L416 224v288l139.88-55.95A31.996 31.996 0 0 0 576 426.34V176.02c0-11.32-11.43-19.06-21.94-14.86z';

exports.definition = {
  prefix: prefix,
  iconName: iconName,
  icon: [
    width,
    height,
    ligatures,
    unicode,
    svgPathData
  ]};

exports.faMapMarkedAlt = exports.definition;
exports.prefix = prefix;
exports.iconName = iconName;
exports.width = width;
exports.height = height;
exports.ligatures = ligatures;
exports.unicode = unicode;
exports.svgPathData = svgPathData;'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var prefix = 'fas';
var iconName = 'truck';
var width = 640;
var height = 512;
var ligatures = [];
var unicode = 'f0d1';
var svgPathData = 'M624 352h-16V243.9c0-12.7-5.1-24.9-14.1-33.9L494 110.1c-9-9-21.2-14.1-33.9-14.1H416V48c0-26.5-21.5-48-48-48H48C21.5 0 0 21.5 0 48v320c0 26.5 21.5 48 48 48h16c0 53 43 96 96 96s96-43 96-96h128c0 53 43 96 96 96s96-43 96-96h48c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zM160 464c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm320 0c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm80-208H416V144h44.1l99.9 99.9V256z';

exports.definition = {
  prefix: prefix,
  iconName: iconName,
  icon: [
    width,
    height,
    ligatures,
    unicode,
    svgPathData
  ]};

exports.faTruck = exports.definition;
exports.prefix = prefix;
exports.iconName = iconName;
exports.width = width;
exports.height = height;
exports.ligatures = ligatures;
exports.unicode = unicode;
exports.svg


com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<StateMessage> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<StateMessage> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.functions.v2.StateMessage getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
/*
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/functions/v2/functions.proto

// Protobuf Java Version: 3.25.8
package com.google.cloud.functions.v2;

public interface BuildConfigOrBuilder
    extends
    // @@protoc_insertion_point(interface_extends:google.cloud.functions.v2.BuildConfig)
    com.google.protobuf.MessageOrBuilder {

  /**
   * .google.cloud.functions.v2.AutomaticUpdatePolicy automatic_update_policy = 40;
   *
   * @return Whether the automaticUpdatePolicy field is set.
   */
  boolean hasAutomaticUpdatePolicy();

  /**
   * .google.cloud.functions.v2.AutomaticUpdatePolicy automatic_update_policy = 40;
   *
   * @return The automaticUpdatePolicy.
   */
  com.google.cloud.functions.v2.AutomaticUpdatePolicy getAutomaticUpdatePolicy();

  /** .google.cloud.functions.v2.AutomaticUpdatePolicy automatic_update_policy = 40; */
  com.google.cloud.functions.v2.AutomaticUpdatePolicyOrBuilder getAutomaticUpdatePolicyOrBuilder();

  /**
   * .google.cloud.functions.v2.OnDeployUpdatePolicy on_deploy_update_policy = 41;
   *
   * @return Whether the onDeployUpdatePolicy field is set.
   */
  boolean hasOnDeployUpdatePolicy();

  /**
   * .google.cloud.functions.v2.OnDeployUpdatePolicy on_deploy_update_policy = 41;
   *
   * @return The onDeployUpdatePolicy.
   */
  com.google.cloud.functions.v2.OnDeployUpdatePolicy getOnDeployUpdatePolicy();

  /** .google.cloud.functions.v2.OnDeployUpdatePolicy on_deploy_update_policy = 41; */
  com.google.cloud.functions.v2.OnDeployUpdatePolicyOrBuilder getOnDeployUpdatePolicyOrBuilder();

  /**
   *
   *
   *

   * Outpu


鷲",nil},
[2972] = {"小科多獸",nil},
[2973] = {"雄科多獸",nil},
[2974] = {"科多獸族母",nil},
[2975] = {"風險投資公司雇員",nil},
[2976] = {"風險投資公司苦力",nil},
[2977] = {"風險投資公司監工",nil},
[2978] = {"風險投資公司工人",nil},
[2979] = {"風險投資公司主官",nil},
[2980] = {"格盧爾·鷹風",nil},
[2981] = {"鷹風酋長",nil},
[2982] = {"灰舌先知",nil},
[2983] = {"平原上的幻象",nil},
[2984] = {"先知智慧行者",nil},
[2985] = {"盧爾·鷹爪",nil},
[2986] = {"多恩·平原巡者",nil},
[2987] = {"伊恩·鷹爪",nil},
[2988] = {"摩林·雲巡者",nil},
[2989] = {"巴爾丹掘地工",nil},
[2990] = {"巴爾丹鑒定官",nil},
[2991] = {"主母鷹風",nil},
[2992] = {"治療結界 V",nil},
[2993] = {"貝恩·血蹄",nil},
[2994] = {"先祖之魂",nil},
[2995] = {"塔爾","雙足飛龍管理員"},
[2996] = {"托恩","銀行職員"},
[2997] = {"吉恩·石蹄","武器商"},
[2998] = {"卡恩·石蹄","鍛造訓練師"},
[2999] = {"陶爾·石蹄","鍛造供應商"},
[3000] = {"吉波爾特","武器商"},
[3001] = {"布瑞克·石蹄","採礦訓練師"},
[3002] = {"卡姆·石蹄","採礦供應商"},
[3003] = {"法爾·迷霧行者","麵包商"},
[3004] = {"坦帕","裁縫訓練師"},
[3005] = {"曼胡","製皮供應商"},
[3007] = {"猶納","製皮訓練師"},
[3008] = {"麥克","見習製皮師"},
[3009] = {"貝娜·冬蹄","鍊金術訓練師"},
[3010] = {"曼尼·冬蹄","鍊金術供應商"},
[3011] = {"泰戈·晨行者","附魔訓練師"},
[3012] = {"納塔·晨行者","附魔供應商"},
[3013] = {"克米恩·冬蹄","草藥學訓練師"},
[3014] = {"尼達·冬蹄","草藥學供應商"},
[3015] = {"庫納·雷角","弓箭商"},
[3016] = {"坦德","�


�'},
{'45331',	'焦焕成',	'焦焕成'},
{'45332',	'教徒',	'教徒'},
{'45333',	'教徒人权',	'教徒人权'},
{'45334',	'阶级敌人',	'阶级敌人'},
{'45335',	'接班',	'接班'},
{'45336',	'接班群体',	'接班群体'},
{'45337',	'揭个黑幕',	'揭个黑幕'},
{'45338',	'姐姐开苞',	'姐姐开苞'},
{'45339',	'姐疼',	'姐疼'},
{'45340',	'姐痛',	'姐痛'},
{'45341',	'解放军的最新式军服=>*@*',	'解放军的最新式军服=>*@*'},
{'45342',	'解厚铨',	'解厚铨'},
{'45343',	'解碼器',	'解碼器'},
{'45344',	'解体的命运',	'解体的命运'},
{'45345',	'解学智',	'解学智'},
{'45346',	'解振华',	'解振华'},
{'45347',	'今有广东',	'今有广东'},
{'45348',	'金舜禹',	'金舜禹'},
{'45349',	'金银焕',	'金银焕'},
{'45350',	'金澤文子',	'金澤文子'},
{'45351',	'津人治津',	'津人治津'},
{'45352',	'近親',	'近親'},
{'45353',	'禁断少女',	'禁断少女'},
{'45354',	'禁忌试玩',	'禁忌试玩'},
{'45355',	'禁忌試玩',	'禁忌試玩'},
{'45356',	'禁看',	'禁看'},
{'45357',	'禁室培欲6赤色杀意',	'禁室培欲6赤色杀意'},
{'45358',	'禁网禁片',	'禁网禁片'},
{'45359',	'京夫子',	'京夫子'},
{'45360',	'京郊旅游',	'京郊旅游'},
{'45361',	'经典语录',	'经典语录'},
{'45362',	'经租房',	'经租房'},
{'45363',	'惊暴双乳',	'惊暴双乳'},
{'45364',	'惊悚空间',	'惊悚空间'},
{'45365',	'晶白体',	'晶白体'},
{'45366',	'精确答案',	'精确答案'},
{'45367',	'驚悚空間',	'驚悚空間'},
{'45368',	'警/用钱包',	'警/用钱包'},
{'45369',	'警花肉搏强奸党',	'警花肉搏强奸党'},
{'45370',	'警用教材',	'警用教材'},
{'45371',	'净白体',	'净白体'},
{


// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

#nullable enable

using System;
using System.Collections.Generic;
using System.Diagnostics.Metrics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using AwesomeAssertions;
using Google.Protobuf.WellKnownTypes;
using Microsoft.ApplicationInsights.Channel;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.Azure.WebJobs.Script.Diagnostics;
using Microsoft.Extensions.Options;
using Moq;
using Xunit;

namespace Microsoft.Azure.WebJobs.Script.Tests.Diagnostics
{
    public sealed class ApplicationInsightsMetricExporterTests : IDisposable
    {
        private const string InstrumentName = "test.instrument";
        private readonly TelemetryConfiguration _config;
        private readonly List<ITelemetry> _items = [];

        public ApplicationInsightsMetricExporterTests()
        {
            Mock<ITelemetryChannel> mockChannel = new();
            mockChannel.Setup(c => c.Send(It.IsAny<ITelemetry>()))
                .Callback<ITelemetry>(_items.Add);

            _config = new TelemetryConfiguration
            {
                ConnectionString = "InstrumentationKey=00000000-0000-0000-0000-000000000000",
                TelemetryChannel = mockChannel.Object
            };
        }

        public static Dictionary<string, Action<Meter>> InstrumentActions { get; } = new()
        {
            ["Counter{byte}"] = (meter) => meter.CreateCounter<byte>(InstrumentName).Add(1),
            ["Counter{short}"] = (meter) => meter.CreateCounter<short>(InstrumentName).Add(1),
            ["Counter{int}"] = (meter) => meter.CreateCounter<int>(InstrumentName).Add(1),
            ["Counter{long}"] = (meter) => meter.CreateCounter<long>(InstrumentName).Add(1),
            ["Counter{float}"] = (meter) => meter.CreateCounter<float>(InstrumentName).Add(1),
            ["Counter{double}"] = (meter) => meter.CreateCounter<double>(InstrumentName).Add(1),
            ["Counter{decimal}"] = (meter) => meter.CreateCounter<decimal>(InstrumentName).Add(1),
            ["Histogram{byte}"] = (meter) => meter.CreateHistogram<byte>(InstrumentName).Record(1),
            ["Histogram{short}"] = (meter) => meter.CreateHistogram<short>(InstrumentName).Record(1),
            ["Histogram{int}"] = (meter) => meter.CreateHistogram<int>(InstrumentName).Record(1),
            ["Histogram{long}"] = (meter) => meter.CreateHistogram<long>(InstrumentName).Record(1),
            ["Histogram{float}"] = (meter) => meter.CreateHistogram<float>(InstrumentName).Record(1),
            ["Histogram{double}"] = (meter) => meter.CreateHistogram<double>(InstrumentName).Record(1),
            ["Histogram{decimal}"] = (meter) => meter.CreateHistogram<decimal>(InstrumentName).Record(1),
        };

        public static IEnumerable<object[]> InstrumentTests => I


fill)){.filepond--image-preview-overlay-idle{mix-blend-mode:normal}}.filepond--image-preview-wrapper{-webkit-user-select:none;user-select:none;background:#00000003;border-radius:.45em;height:100%;margin:0;position:absolute;top:0;left:0;right:0;overflow:hidden}.filepond--image-preview{z-index:1;pointer-events:none;will-change:transform,opacity;background:#222;align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.filepond--image-clip{margin:0 auto;position:relative;overflow:hidden}.filepond--image-clip[data-transparency-indicator=grid] img,.filepond--image-clip[data-transparency-indicator=grid] canvas{background-color:#fff;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg' fill='%23eee'%3E%3Cpath d='M0 0 H50 V50 H0'/%3E%3Cpath d='M50 50 H100 V100 H50'/%3E%3C/svg%3E");background-size:1.25em 1.25em}.filepond--image-bitmap,.filepond--image-vector{will-change:transform;position:absolute;top:0;left:0}.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview-wrapper{border-radius:0}.filepond--root[data-style-panel-layout~=integrated] .filepond--image-preview{justify-content:center;align-items:center;height:100%;display:flex}.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-wrapper{border-radius:99999rem}.filepond--root[data-style-panel-layout~=circle] .filepond--image-preview-overlay{top:auto;bottom:0;transform:scaleY(-1)}.filepond--root[data-style-panel-layout~=circle] .filepond--file .filepond--file-action-button[data-align*=bottom]:not([data-align*=center]){margin-bottom:.325em}.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=left]{left:calc(50% - 3em)}.filepond--root[data-style-panel-layout~=circle] .filepond--file [data-align*=right]{right:calc(50% - 3em)}.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=left],.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=right]{margin-bottom:.5125em}.filepond--root[data-style-panel-layout~=circle] .filepond--progress-indicator[data-align*=bottom][data-align*=center]{margin-top:0;margin-bottom:.1875em;margin-left:.1875em}.filepond--media-preview audio{display:none}.filepond--media-preview .audioplayer{width:calc(100% - 1.4em);margin:2.3em auto auto}.filepond--media-preview .playpausebtn{float:left;cursor:pointer;background-position:50%;background-repeat:no-repeat;border:none;border-radius:25px;outline:none;width:25px;height:


	'noaccess'        : 'ප්‍රවේශයක් නොමැත',
			'and'             : 'සහ',
			'unknown'         : 'නොහඳුනයි',
			'selectall'       : 'සියලු ගොනු තෝරන්න',
			'selectfiles'     : 'ගොනු(ව) තෝරන්න',
			'selectffile'     : 'පළමු ගොනුව තෝරන්න',
			'selectlfile'     : 'අවසාන ගොනුව තෝරන්න',
			'viewlist'        : 'ලැයිස්තු අාකාරය',
			'viewicons'       : 'අයිකන අාකාරය',
			'places'          : 'Places',
			'calc'            : 'ගණනය කරන්න',
			'path'            : 'මාර්ගය',
			'aliasfor'        : 'Alias for',
			'locked'          : 'අගුළු දමා ඇත',
			'dim'             : 'මාන(Dimensions)',
			'files'           : 'ගොනු',
			'folders'         : 'ෆෝල්ඩර',
			'items'           : 'අයිතම(Items)',
			'yes'             : 'ඔව්',
			'no'              : 'නැත',
			'link'            : 'Link',
			'searcresult'     : 'සෙවුම් ප්‍රතිඵල',
			'selected'        : 'තෝරාගත් අයිතම(items)',
			'about'           : 'මේ ගැන',
			'shortcuts'       : 'කෙටිමං',
			'help'            : 'උදව්',
			'webfm'           : 'වෙබ් ගොනු කළමනාකරු',
			'ver'             : 'Version',
			'protocolver'     : 'protocol version',
			'homepage'        : 'Project home',
			'docs'            : 'ලේඛනගත කිරීම',
			'github'          : 'Fork us on Github',
			'twitter'         : 'Follow us on twitter',
			'facebook'        : 'Join us on facebook',
			'team'            : 'කණ්ඩායම',
			'chiefdev'        : 'ප්‍රධාන සංවර්ධකයා(chief developer)',
			'developer'       : 'සංවර්ධකයා(developer)',
			'contributor'     : 'දායකයා(contributor)',
			'maintainer'      : 'නඩත්තු කරන්නා(maintainer)


       is EnableRecoveryProgress.Done -> {
                buf.putInt(6)
                FfiConverterString.write(value.`recoveryKey`, buf)
                Unit
            }
        }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ }
    }
}

sealed class EncryptedMessage {

    data class OlmV1Curve25519AesSha2(
        /**
         * The Curve25519 key of the sender.
         */
        val `senderKey`: kotlin.String) : EncryptedMessage() {
        companion object
    }

    data class MegolmV1AesSha2(
        /**
         * The ID of the session used to encrypt the message.
         */
        val `sessionId`: kotlin.String,
        /**
         * What we know about what caused this UTD. E.g. was this event sent
         * when we were not a member of this room?
         */
        val `cause`: UtdCause) : EncryptedMessage() {
        companion object
    }

    object Unknown : EncryptedMessage()

    companion object
}

/**
 * @suppress
 */
public object FfiConverterTypeEncryptedMessage : FfiConverterRustBuffer<EncryptedMessage>{
    override fun read(buf: ByteBuffer): EncryptedMessage {
        return when(buf.getInt()) {
            1 -> EncryptedMessage.OlmV1Curve25519AesSha2(
                FfiConverterString.read(buf),
                )
            2 -> EncryptedMessage.MegolmV1AesSha2(
                FfiConverterString.read(buf),
                FfiConverterTypeUtdCause.read(buf),
                )
            3 -> EncryptedMessage.Unknown
            else -> throw RuntimeException("invalid enum value, something is very wrong!!")
        }
    }

    override fun allocationSize(value: EncryptedMessage) = when(value) {
        is EncryptedMessage.OlmV1Curve25519AesSha2 -> {
            // Add the size for the Int that specifies the variant plus the size needed for all fields
            (
                4UL
                + FfiConverterString.allocationSize(value.`senderKey`)
            )
        }
        is EncryptedMessage.MegolmV1AesSha2 -> {
            // Add the size for the Int that specifies the variant plus the size needed for all fields
            (
                4UL
                + FfiConverterString.allocationSize(value.`sessionId`)
                + FfiConverterTypeUtdCause.allocationSize(value.`cause`)
            )
        }
        is EncryptedMessage.Unknown -> {
            // Add the size for the Int that specifies the variant plus the size needed for all fields
            (
                4UL
            )
        }
    }

    override fun write(value: EncryptedMessage, buf: ByteBuffer) {
        when(value) {
            is EncryptedMessage.OlmV1Curve25519AesSha2 -> {
                buf.putInt(1)
                FfiConverterString.write(value.`senderKey`, buf)
                Unit
            }
            is EncryptedMessage.MegolmV1AesSha2 -> {
                buf.putInt(2)
                FfiConverterString.write(value.`sessionId`, buf)
                FfiConverterTypeUtdCause.write(value.`cause`, buf)
                Unit
            }
            is EncryptedMessage.Unknown -> {
                buf.putInt(3)
                Unit
            }
        }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ }
    }
}

sealed class ErrorKind {

    /**
     * `M_BAD_ALIAS`
     *
     * One or more [room aliases] within the `m.room.canonical_alias` event do
     * not point to the room ID for which the state event is to be sent to.
     *
     * [room aliases]: https://spec.matrix.org/latest/client-server-api/#room-aliases
     */
    object BadAlias : ErrorKind()

    /**
     * `M_BAD_JSON`
     *
     * The request contained valid JSON, but it was malformed in some way, e.g.
     * missing required keys, invalid values for keys.
     */
    object BadJson : ErrorKind()


# This file is not meant for public use and will be removed in SciPy v2.0.0.
# Use the `scipy.fftpack` namespace for importing the functions
# included below.

import warnings
from . import _helper

__all__ = [  # noqa: F822
    'fftshift', 'ifftshift', 'fftfreq', 'rfftfreq', 'next_fast_len'
]

def __dir__():
    return __all__

def __getattr__(name):
    if name not in __all__:
        raise AttributeError(
            "scipy.fftpack.helper is deprecated and has no attribute "
            f"{name}. Try looking in scipy.fftpack instead.")

    warnings.warn(f"Please use `{name}` from the `scipy.fftpack` namespace, "
                  "the `scipy.fftpack.helper` namespace is deprecated.",
                  category=DeprecationWarning, stacklevel=2)

    return getattr(_helper, name)


Amount1Change(
                            v, loanType, price, stableCoinPrice, decimals),
                      ),
                      Padding(
                        padding: EdgeInsets.only(top: 16),
                        child: Text(dic['loan.amount.debit']),
                      ),
                      TextFormField(
                        decoration: InputDecoration(
                          hintText: assetDic['amount'],
                          labelText:
                              '${assetDic['amount']}(${dic['loan.max']}: $maxToBorrow)',
                        ),
                        inputFormatters: [UI.decimalInputFormatter(decimals)],
                        controller: _amountCtrl2,
                        keyboardType:
                            TextInputType.numberWithOptions(decimal: true),
                        validator: (v) =>
                            _validateAmount2(v, maxToBorrow, decimals),
                        onChanged: (v) =>
                            _onAmount2Change(v, loanType, decimals),
                      ),
                    ],
                  ),
                ),
              ),
              Padding(
                padding: EdgeInsets.all(16),
                child: RoundedButton(
                  text: I18n.of(context).home['submit.tx'],
                  onPressed: () {
                    if (_formKey.currentState.validate()) {
                      _onSubmit(pageTitle, loanType, decimals);
                    }
                  },
                ),
              ),
            ],
          ),
        );
      }),
    );
  }
}
import 'package:app/pages/assets/ethTransfer/ethTxConfirmPage.dart';
import 'package:app/service/index.dart';
import 'package:app/service/walletApi.dart';
import 'package:polkawallet_plugin_evm/polkawallet_plugin_evm.dart';
import 'package:polkawallet_sdk/api/eth/apiAccountEth.dart';
import 'package:polkawallet_sdk/api/types/evmTxData.dart';
import 'package:polkawallet_ui/utils/format.dart';

class ApiAssets {
  ApiAssets(this.apiRoot);

  final AppService apiRoot;

  Future<Map> updateTxs(int page) async {
    final acc = apiRoot.keyring.current;
    Map res = await apiRoot.subScan.fetchTransfersAsync(
      acc.address,
      page,
      network: apiRoot.plugin.basic.name == 'bifrost'
          ? 'bifrost-kusama'
          : apiRoot.plugin.basic.name,
    );

    if (page == 0) {
      apiRoot.store.assets.clearTxs();
    }
    // cache first page of txs
    await apiRoot.store.assets.addTxs(
      res,
      acc,
      apiRoot.plugin.basic.name,
      shouldCache: page == 0,
    );

    return res;
  }

  Future<List<EvmTxData>> updateEvmTxs(String tokenId) async {
    final address = apiRoot.keyringEVM.current.address;
    if (address == null) {
      return null;
    }
    final data = await WalletApi.getEvmTokenTxs(
        (apiRoot.plugin as PluginEvm).network, address,
        contractAddress: tokenId.startsWith('0x') ? tokenId : null);
    if (data != null && data['result'] != null) {
      final list =
          (data['result'] as List).map((e) => EvmTxData.fromJson(e)).toList();
      apiRoot.store.assets.setEvmTxs(list, tokenId, address);
      return list;
    }
    return null;
  }

  Future<void> fetchMarketPrices(List<String> tokens) async {
    if (tokens == null) return;

    final res = await Future.wait([
      WalletApi.getTokenPrices(tokens),
      WalletApi.getTokenPriceFromSub


eTo(19.488f, 10.98f)
                arcToRelative(1.02f, 1.02f, 0.0f, true, true, -0.001f, 2.042f)
                arcToRelative(1.02f, 1.02f, 0.0f, false, true, 0.0f, -2.042f)
                close()
                moveTo(15.695f, 11.861f)
                arcToRelative(1.02f, 1.02f, 0.0f, true, true, -0.119f, 2.038f)
                arcToRelative(1.02f, 1.02f, 0.0f, false, true, 0.12f, -2.038f)
                close()
                moveTo(9.253f, 13.727f)
                arcToRelative(1.021f, 1.021f, 0.0f, true, true, -0.001f, 2.042f)
                arcToRelative(1.021f, 1.021f, 0.0f, false, true, 0.0f, -2.042f)
                close()
                moveTo(12.821f, 14.61f)
                arcToRelative(1.02f, 1.02f, 0.0f, true, true, 0.12f, 2.038f)
                arcToRelative(1.02f, 1.02f, 0.0f, false, true, -0.12f, -2.038f)
                close()
                moveTo(5.586f, 14.726f)
                arcToRelative(1.02f, 1.02f, 0.0f, false, true, 0.44f, 1.904f)
                arcToRelative(1.022f, 1.022f, 0.0f, true, true, -0.44f, -1.904f)
                close()
                moveTo(18.413f, 14.726f)
                arcToRelative(1.022f, 1.022f, 0.0f, true, true, 0.142f, 2.038f)
                arcToRelative(1.022f, 1.022f, 0.0f, false, true, -0.142f, -2.038f)
                close()
                moveTo(8.184f, 17.466f)
                arcToRelative(1.021f, 1.021f, 0.0f, true, true, 0.142f, 2.038f)
                arcToRelative(1.021f, 1.021f, 0.0f, false, true, -0.142f, -2.038f)
                close()
                moveTo(15.814f, 17.466f)
                arcToRelative(1.02f, 1.02f, 0.0f, false, true, 0.44f, 1.904f)
                arcToRelative(1.022f, 1.022f, 0.0f, true, true, -0.44f, -1.904f)
                close()
                moveTo(12.0f, 18.463f)
                arcToRelative(1.022f, 1.022f, 0.0f, true, true, 0.0f, 2.045f)
                arcToRelative(1.022f, 1.022f, 0.0f, false, true, 0.0f, -2.045f)
                close()
            }
        }
        .build()
        return _photocrowd!!
    }

private var _photocrowd: ImageVector? = null
package compose.icons.simpleicons

import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.PathFillType.Companion.NonZero
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.StrokeCap.Companion.Butt
import androidx.compose.ui.graphics.StrokeJoin.Companion.Miter
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.


/*
 * Copyright (C) 2005-2013 MaNGOS <http://getmangos.com/>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#ifndef _FOLLOWERREFERENCE_H
#define _FOLLOWERREFERENCE_H

#include "Utilities/LinkedReference/Reference.h"

class TargetedMovementGeneratorBase;
class Unit;

class MANGOS_DLL_SPEC FollowerReference : public Reference<Unit, TargetedMovementGeneratorBase>
{
protected:
    void targetObjectBuildLink() override;
    void targetObjectDestroyLink() override;
    void sourceObjectDestroyLink() override;
};
#endif


 can use for you jail at the end of the "Jail Setup" section

As of Jellyfin >= 10.7.7, installation requires `pkg` >= 1.17.0. This is for the newer `.pkg` format.
As of Jellyfin >= 10.8.9, an official port exists.

## The Easy Way

1. Use the Community Plugin

---

## The Advanced Way

### Jail Setup

1. From the main screen select Jails

2. Click ADD

3. Click Advanced Jail Creation

4. Name (any name will work): Jellyfin

5. Jail Type: Default (Clone Jail)

6. Release: 13.1-Release (or newer)

7. Configure Basic Properties to your liking but add AT LEAST ONE of
- [x] VNET
- [X] IPv6

  * (Not having VNET means things like DLNA will not work)
  * (You may also encouter other networking issues! See: troubleshooting)
  * (The service file will try and work around user configuration issues but is not perfect)

8. Configure Jail Properties to your liking but add
- [x] allow_raw_sockets

  * (Highly suggested for easier troubleshooting)
- [x] allow_mlock

  * (This is REQUIRED)

9. Configure Network Properties to your liking

10. Configure Custom Properties to your liking

11. Click Save

Summary for base FreeBSD users:

Required:
- Unprivileged mlock (usually allow_mlock=1, allow.mlock=1, or security.bsd.unprivileged_mlock: 1)
- At least one of:
  - VNET (usually, vnet=1 or security.jail.vnet: 1)
  - If using IPv6: ip6=inherit

Suggested:
- raw sockets (usually allow_raw_sockets=1 or security.jail.allow_raw_sockets: 1)

## Jellyfin Installation

Back on the jails list find your newly created jail for jellyfin and click "Shell"

`pkg install jellyfin`

Don't close the shell out yet we still have a few more things!

## Configuring Jellyfin

Now that we have it installed a few more steps are required.

### User and Group Setup
Creation of a user and group is handled by the package on installation but if you want to use your own, set that up now.

We still are not done with the shell!

### Service Setup

Time to enable the service

`sysrc jellyfin_enable=TRUE`

If you want to use a different UID/GID please change that now:

`sysrc jellyfin_user="USER_YOU_WANT"`

`sysrc jellyfin_group="GROUP_YOU_WANT"`

Almost done, let's start the service:

`service jellyfin start`

If everything went according to plan then jellyfin should be up and running on the IP of the jail (port 8096)!

(You can now safely close the shell)

## Updating Jellyfin Installation

This is similar to installing Jellyfin but with fewer steps:

- Stop the current jellyfin server inside the jail shell (NOT THE JAIL) (`service jellyfin stop`)

- `pkg upgrade`

- Start the jellyfin server (`service jellyfin start`)

## Hardware encoding (Intel)

### Packages and script to add inside the Jail

- Back on the jails list find your newly created jail for jellyfin and click "Shell" :
  - Install vautils : `pkg install libva-utils`
  - Install intel driver : [VAAPI driver support page](https://github.com/intel/media-driver#decodingencoding-features)
    - 4th gen and older : `pkg install libva-intel-driver`
    - 5th gen and newer : `pkg install libva-intel-media-driver`

  - Add lffmpeg script to add missing VAAPI command

     Create the lffmpeg script file (available here : [url](scripts/lffmpeg))

     ```
     cd /usr/local/bin
     ee lffmpeg
     ```

     Paste the file content :


5-1.52.303-2.28.456l-2.325.47-1.374.278c-.016.003-.032.01-.048.013-.277.077-.377.203-.39.49-.002.042 0 .086 0 .13-.002 2.602 0 5.204-.003 7.805 0 .42-.047.836-.215 1.227-.278.64-.77 1.04-1.434 1.233-.35.1-.71.16-1.075.172-.96.036-1.755-.6-1.92-1.544-.14-.812.23-1.685 1.154-2.075.357-.15.73-.232 1.108-.31.287-.06.575-.116.86-.177.383-.083.583-.323.6-.714v-.15c0-2.96 0-5.922.002-8.882 0-.123.013-.25.042-.37.07-.285.273-.448.546-.518.255-.066.515-.112.774-.165.733-.15 1.466-.296 2.2-.444l2.27-.46c.67-.134 1.34-.27 2.01-.403.22-.043.442-.088.663-.106.31-.025.523.17.554.482.008.073.012.148.012.223.002 1.91.002 3.822 0 5.732z"/></svg>';
  static const String applenews =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M0 12.94c2.726 4.673 6.394 8.385 11.039 11.058H1.416A1.416 1.416 0 010 22.582V12.94ZM0 1.414C0 .634.632.002 1.412.002H6.22L24 17.758v4.773c0 .39-.154.762-.43 1.038a1.467 1.467 0 01-1.037.43H17.76L0 6.241M12.963.002h9.619A1.419 1.419 0 0124 1.42v9.625C21.265 6.494 17.616 2.775 12.963.002Z"/></svg>';
  static const String applepay =
      '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path fill="currentColor" d="M2.15 4.318a42.16 42.16 0 00-.454.003c-.15.005-.303.013-.452.04a1.44 1.44 0 00-1.06.772c-.07.138-.114.278-.14.43-.028.148-.037.3-.04.45A10.2 10.2 0 000 6.222v11.557c0 .07.002.138.003.207.004.15.013.303.04.452.027.15.072.291.142.429a1.436 1.436 0 00.63.63c.138.07.278.115.43.142.148.027.3.036.45.04l.208.003h20.194l.207-.003c.15-.004.303-.013.452-.04.15-.027.291-.071.428-.141a1.432 1.432 0 00.631-.631c.07-.138.115-.278.141-.43.027-.148.036-.3.04-.45.002-.07.003-.138.003-.208l.001-.246V6.221c0-.07-.002-.138-.004-.207a2.995 2.


 gsSPEndDisplayList, gsDPPipeSync, gsDPSetCombineMode,
    gsSPClearGeometryMode, gsDPSetTile, gsSPTexture, gsDPTileSync, gsDPSetTileSize,
    gsSPDisplayList, gsSPSetGeometryMode,
    G_IM_FMT_RGBA, G_IM_SIZ_16b, CALC_DXT, G_TX_LOADTILE, G_IM_SIZ_16b_BYTES, G_CC_MODULATERGB,
    G_SHADING_SMOOTH, G_TX_WRAP, G_TX_NOMIRROR, G_TX_NOMASK, G_TX_NOLOD, G_TX_RENDERTILE, G_ON,
    G_TEXTURE_IMAGE_FRAC, G_OFF, G_CC_SHADE
} from "../../../../../include/gbi"
import { grass_09009800 } from "../../../../../textures/grass"

const wf_seg7_lights_070056C0 = gdSPDefLights1(
    0x66, 0x66, 0x66,
    0xff, 0xff, 0xff, 0x28, 0x28, 0x28
);

// 0x070056D8 - 0x070057C8
const wf_seg7_vertex_070056D8 = [
    [[  -153,     77,   -255], 0, [  2012,  -4734], [0x00, 0x7f, 0x00, 0xff]],
    [[  -204,     77,   -255], 0, [  2012,  -4938], [0x00, 0x7f, 0x00, 0xff]],
    [[  -153,     77,    256], 0, [     0,  -4734], [0x00, 0x7f, 0x00, 0xff]],
    [[  -256,    102,    256], 0, [     0,  -5142], [0x00, 0x7f, 0x00, 0xff]],
    [[  -204,    102,    256], 0, [     0,  -4938], [0x00, 0x7f, 0x00, 0xff]],
    [[  -256,    102,   -255], 0, [  2012,  -5142], [0x00, 0x7f, 0x00, 0xff]],
    [[  -204,    102,   -255], 0, [  2012,  -4938], [0x00, 0x7f, 0x00, 0xff]],
    [[   255,   -127,   -255], 0, [  2012,  -3098], [0x00, 0x7f, 0x00, 0xff]],
    [[   204,   -127,   -255], 0, [  2012,  -3302], [0x00, 0x7f, 0x00, 0xff]],
    [[   255,   -127,    256], 0, [     0,  -3098], [0x00, 0x7f, 0x00, 0xff]],
    [[   204,   -127,    256], 0, [     0,  -3302], [0x00, 0x7f, 0x00, 0xff]],
    [[  -256,    128,    256], 0, [     0,  -2076], [0x7f, 0x00, 0x00, 0xff]],
    [[  -256,    102,    256], 0, [     0,  -1872], [0x7f, 0x00, 0x00, 0xff]],
    [[  -256,    128,   -255], 0, [  4056,  -2076], [0x7f, 0x00, 0x00, 0xff]],
    [[  -256,    102,   -255], 0, [  4056,  -1872], [0x7f, 0x00, 0x00, 0xff]],
];

// 0x070057C8 - 0x070058B8
const wf_seg7_vertex_070057C8 = [


f03f96-cdfd-44fc-a22c-64950a001209"][0x14] = "RpcAsyncClosePrinter"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x15] = "RpcAsyncAddForm"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x16] = "RpcAsyncDeleteForm"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x17] = "RpcAsyncGetForm"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x18] = "RpcAsyncSetForm"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x19] = "RpcAsyncEnumForms"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x1a] = "RpcAsyncGetPrinterDriver"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x1b] = "RpcAsyncEnumPrinterData"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x1c] = "RpcAsyncEnumPrinterDataEx"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x1d] = "RpcAsyncEnumPrinterKey"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x1e] = "RpcAsyncDeletePrinterData"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x1f] = "RpcAsyncDeletePrinterDataEx"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x20] = "RpcAsyncDeletePrinterKey"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x21] = "RpcAsyncXcvData"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x22] = "RpcAsyncSendRecvBidiData"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x23] = "RpcAsyncCreatePrinterIC"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x24] = "RpcAsyncPlayGdiScriptOnPrinterIC"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x25] = "RpcAsyncDeletePrinterIC"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x26] = "RpcAsyncEnumPrinters"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x27] = "RpcAsyncAddPrinterDriver"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x28] = "RpcAsyncEnumPrinterDrivers"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x29] = "RpcAsyncGetPrinterDriverDirectory"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x2a] = "RpcAsyncDeletePrinterDriver"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a001209"][0x2b] = "RpcAsyncDeletePrinterDriverEx"
opCodeMap["76f03f96-cdfd-44fc-a22c-64950a0012


uble atheta = Math.atan2(dx,dy)-Math.PI/2;
        AffineTransform at = AffineTransform.getTranslateInstance(edgeShape.getX1(),edgeShape.getY1());
        at.rotate(-atheta);
        return at;
    }

    /**
     * divide a Line2D into 2 new Line2Ds that are returned
     * in the passed left and right instances, if non-null
     * @param src the line to divide
     * @param left the left side, or null
     * @param right the right side, or null
     */
    protected void subdivide(Line2D src,
            Line2D left,
            Line2D right) {
        double x1 = src.getX1();
        double y1 = src.getY1();
        double x2 = src.getX2();
        double y2 = src.getY2();

        double mx = x1 + (x2-x1)/2.0;
        double my = y1 + (y2-y1)/2.0;
        if (left != null) {
            left.setLine(x1, y1, mx, my);
        }
        if (right != null) {
            right.setLine(mx, my, x2, y2);
        }
    }

}
/*
 * Copyright (c) 2005, the JUNG Project and the Regents of the University of
 * California All rights reserved.
 *
 * This software is open-source under the BSD license; see either "license.txt"
 * or http://jung.sourceforge.net/license.txt for a description.
 *
 * Created on Aug 23, 2005
 */
package edu.uci.ics.jung.visualization.renderers;

import java.awt.Dimension;
import java.awt.Paint;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.geom.RectangularShape;

import javax.swing.JComponent;

import edu.uci.ics.jung.algorithms.layout.Layout;
import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.util.Context;
import edu.uci.ics.jung.graph.util.EdgeType;
import edu.uci.ics.jung.graph.util.Pair;
import edu.uci.ics.jung.visualization.Layer;
import edu.uci.ics.jung.visualization.RenderContext;
import edu.uci.ics.jung.visualization.transform.LensTransformer;
import edu.uci.ics.jung.visualization.transform.MutableTransformer;
import edu.uci.ics.jung.visualization.transform.shape.TransformingGraphics;

/**
 * uses a flatness argument to break edges into
 * smaller segments. This produces a more detailed
 * transformation of the edge shape
 *
 * @author Tom Nelson - tomnelson@dev.java.net
 *
 * @param <V>
 * @param <E>
 */
public class ReshapingEdgeRenderer<V,E> extends BasicEdgeRenderer<V,E>
	implements Renderer.Edge<V,E> {

    /**
     * Draws the edge e, whose endpoints are at (x1,y1)
     * and (x2,y2), on the graphics context g.
     * The Shape provided by the EdgeShapeFunction instance
     * is scaled in the x-direction so that its width is equal to the distance between
     * (x1,y1) and (x2,y2).
     */
    protected void drawSimpleEdge(RenderContext<V,E> rc, Layout<V,E> layout, E e) {

    	TransformingGraphics g = (TransformingGraphics)rc.getGraphicsContext();
        Graph<V,E> graph = layout.getGraph();
        Pair<V> endpoints = graph.getEndpoints(e);
        V v1 =


	Self::Unset   => "appearance:unset;-webkit-appearance:unset;-moz-appearance:unset;".fmt(f),
			Self::None    => "appearance:none;-webkit-appearance:none;-moz-appearance:none;".fmt(f),
			Self::Auto    => "appearance:auto;-webkit-appearance:auto;-moz-appearance:auto;".fmt(f),
		}
	}
}

#[macro_export]
macro_rules! appearance {
	(initial) => {$crate::Property::Appearance($crate::Appearance::Initial)};
	(inherit) => {$crate::Property::Appearance($crate::Appearance::Inherit)};
	(unset)   => {$crate::Property::Appearance($crate::Appearance::Unset)};
	(none)    => {$crate::Property::Appearance($crate::Appearance::None)};
	(auto)    => {$crate::Property::Appearance($crate::Appearance::Auto)};
}

#[test]
fn appearance_values() {
	assert_eq!(appearance!(initial).to_string(), "appearance:initial;-webkit-appearance:initial;-moz-appearance:initial;");
	assert_eq!(appearance!(inherit).to_string(), "appearance:inherit;-webkit-appearance:inherit;-moz-appearance:inherit;");
	assert_eq!(appearance!(unset).to_string(), "appearance:unset;-webkit-appearance:unset;-moz-appearance:unset;");
	assert_eq!(appearance!(none).to_string(), "appearance:none;-webkit-appearance:none;-moz-appearance:none;");
	assert_eq!(appearance!(auto).to_string(), "appearance:auto;-webkit-appearance:auto;-moz-appearance:auto;");
}
use yew::prelude::*;
use yew::Properties;

pub enum SettingsMsg {}

pub enum FieldType {
    IntField,
}

pub struct IntFieldData {
    pub min: i32,
    pub max: i32,
}

pub struct Setting {
    pub field: String,
    pub field_type: FieldType,
}

pub struct Settings {
    pub link: ComponentLink<Self>,
}

#[derive(Clone, Properties)]
pub struct Props {}

    /*
impl SettingComponent for IntFieldData {
    fn render(&mut self) -> {

    }
}
    */
impl Component for Settings {
    type Message = SettingsMsg;
    type Properties = Props;

    fn create(props: Self::Properties, link: ComponentLink<Self>) -> Self {
        Self { link: link }
    }

    fn change(&mut self, props: Self::Properties) -> bool {
        false
    }

    fn update(&mut self, msg: Self::Message) -> bool {
        false
    }

    fn view(&self) -> Html {
        html! {
            <div>
            {"Settings"}
            </div>
        }
    }
}
//! `Formula` stores the result of a parsing as the tree of its "syntactic proof"
//! The formula nodes are the equivalent of MMJ2's `ParseNode`s, and the formula
//! itself the equivalent of MMJ2's `ParseTree`

// There are several improvements which could be made to this implementation,
// without changing the API:
//
// - `sub_eq`:
//      We could compute a hash of a formula and store it in every node, to
//      speed up equality testing.
// - `substitute`:
//      A more advanced implementation of `substitute` may act directly on the
//      slice backing the formula to first copy in bulk the formula tree, which
//      will remain mostly intact, then the substitutions, and then
//      only change the nodes where the formula points to the substitutions.
//      It would even be possible to reuse the nodes, pointing several times
//      to the same node if a substituted variable appears several t


ParseECPublicKeyFromPEM([]byte(c.Certificate))
		case jwt.SigningMethodRS256.Alg():
			return jwt.ParseRSAPublicKeyFromPEM([]byte(c.Certificate))
		case jwt.SigningMethodRS512.Alg():
			return jwt.ParseRSAPublicKeyFromPEM([]byte(c.Certificate))
		default:
			return nil, fmt.Errorf("unsupported signing method: %v", token.Header["alg"])
		}
	})

	if t != nil {
		if claims, ok := t.Claims.(*Claims); ok && t.Valid {
			return claims, nil
		}
	}

	return nil, err
}
// Copyright 2023 The Casdoor 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
//
//      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 casdoorsdk

import (
	"testing"
)

func TestRole(t *testing.T) {
	InitConfig(TestCasdoorEndpoint, TestClientId, TestClientSecret, TestJwtPublicKey, TestCasdoorOrganization, TestCasdoorApplication)

	name := getRandomName("Role")

	// Add a new object
	role := &Role{
		Owner:       "admin",
		Name:        name,
		CreatedTime: GetCurrentTime(),
		DisplayName: name,
		Description: "Casdoor Website",
	}
	_, err := AddRole(role)
	if err != nil {
		t.Fatalf("Failed to add object: %v", err)
	}

	// Get all objects, check if our added object is inside the list
	roles, err := GetRoles()
	if err != nil {
		t.Fatalf("Failed to get objects: %v", err)
	}
	found := false
	for _, item := range roles {
		if item.Name == name {
			found = true
			break
		}
	}
	if !found {
		t.Fatalf("Added object not found in list")
	}

	// Get the object
	role, err = GetRole(name)
	if err != nil {
		t.Fatalf("Failed to get object: %v", err)
	}
	if role.Name != name {
		t.Fatalf("Retrieved object does not match added object: %s != %s", role.Name, name)
	}

	// Update the object
	updatedDescription := "Updated Casdoor Website"
	role.Description = updatedDescription
	_, err = UpdateRole(role)
	if err != nil {
		t.Fatalf("Failed to update object: %v", err)
	}

	// Validate the update
	updatedRole, err := GetRole(name)
	if err != nil {
		t.Fatalf("Failed to get updated object: %v", err)
	}
	if updatedRole.Description != updatedDescription {
		t.Fatalf("Failed to update object, description mismatch: %s != %s", updatedRole.Description, updatedDescription)
	}

	// Delete the object
	_, err = DeleteRole(role)
	if err != nil {
		t.Fatalf("Failed to delete object: %v", err)
	}

	// Validate the deletion
	deletedRole, err := GetRole(name)
	if err != nil || deletedRole != nil {
		t.Fatalf("Failed to delete object, it's still retrievable")
	}
}
// Copyright 2021 The Casdoor 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
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distribut


0x03,// HasVPrefix, SameAsPrev

	// EVEX_Vfmadd132ps_zmm_k1z_zmm_zmmm512b32_er
	0x03,// HasVPrefix, SameAsPrev

	// EVEX_Vfmadd132pd_xmm_k1z_xmm_xmmm128b64
	0x01,// HasVPrefix
	0x95, 0x08,// 1045 = "vfmadd132pd"

	// EVEX_Vfmadd132pd_ymm_k1z_ymm_ymmm256b64
	0x03,// HasVPrefix, SameAsPrev

	// EVEX_Vfmadd132pd_zmm_k1z_zmm_zmmm512b64_er
	0x03,// HasVPrefix, SameAsPrev

	// VEX_Vfmadd132ss_xmm_xmm_xmmm32
	0x01,// HasVPrefix
	0x96, 0x08,// 1046 = "vfmadd132ss"

	// VEX_Vfmadd132sd_xmm_xmm_xmmm64
	0x01,// HasVPrefix
	0x97, 0x08,// 1047 = "vfmadd132sd"

	// EVEX_Vfmadd132ss_xmm_k1z_xmm_xmmm32_er
	0x01,// HasVPrefix
	0x96, 0x08,// 1046 = "vfmadd132ss"

	// EVEX_Vfmadd132sd_xmm_k1z_xmm_xmmm64_er
	0x01,// HasVPrefix
	0x97, 0x08,// 1047 = "vfmadd132sd"

	// VEX_Vfmsub132ps_xmm_xmm_xmmm128
	0x01,// HasVPrefix
	0x98, 0x08,// 1048 = "vfmsub132ps"

	// VEX_Vfmsub132ps_ymm_ymm_ymmm256
	0x03,// HasVPrefix, SameAsPrev

	// VEX_Vfmsub132pd_xmm_xmm_xmmm128
	0x01,// HasVPrefix
	0x99, 0x08,// 1049 = "vfmsub132pd"

	// VEX_Vfmsub132pd_ymm_ymm_ymmm256
	0x03,// HasVPrefix, SameAsPrev

	// EVEX_Vfmsub132ps_xmm_k1z_xmm_xmmm128b32
	0x01,// HasVPrefix
	0x98, 0x08,// 1048 = "vfmsub132ps"

	// EVEX_Vfmsub132ps_ymm_k1z_ymm_ymmm256b32
	0x03,// HasVPrefix, SameAsPrev

	// EVEX_Vfmsub132ps_zmm_k1z_zmm_zmmm512b32_er
	0x03,// HasVPrefix, SameAsPrev

	// EVEX_Vfmsub132pd_xmm_k1z_xmm_xmmm128b64
	0x01,// HasVPrefix
	0x99, 0x08,// 1049 = "vfmsub132pd"

	// EVEX_Vfmsub132pd_ymm_k1z_ymm_ymmm256b64
	0x03,// HasVPrefix, SameAsPrev

	// EVEX_Vfmsub132pd_zmm_k1z_zmm_zmmm512b64_er
	0x03,// HasVPrefix, SameAsPrev

	// EVEX_V4fmaddps_zmm_k1z_zmmp3_m128
	0x01,// HasVPrefix
	0x9A, 0x08,// 1050 = "v4fmaddps"

	// VEX_Vfmsub132ss_xmm_xmm_xmmm32
	0x01,// HasVPrefix
	0x9B, 0x08,// 1051 = "vfmsub132ss"

	// VEX_Vfmsub132sd_xmm_xmm_xmmm64
	0x01,// Has


			},
			{
				1,
				1
			},
			{
				0,
				0
			}
		},
		chapter_buff = {},
		alarm_cell = {},
		weather_grids = {}
	}
	uv0.chapter_template[10401] = {
		collection_team = 0,
		progress_boss = 34,
		oil = 10,
		is_limit_move = 0,
		mine_id = 2001,
		activate_time = 0,
		story_refresh_boss = "",
		is_ambush = 1,
		ammo_cost = 1,
		pos_x = "0.17578125",
		special_operation_list = "",
		air_dominance = 190,
		best_air_dominance = 250,
		id = 10401,
		count = 0,
		icon_outline = 0,
		bg = "",
		pre_chapter = 0,
		formation = 204,
		bgm = "",
		star_require_1 = 1,
		pos_y = "0.313541667",
		pop_pic = "",
		num_1 = 1,
		model = 1,
		investigation_ratio = 18,
		wall_prefab = "",
		num_2 = 15,
		ammo_submarine = 0,
		land_based = "",
		num_3 = 1,
		is_ai = 0,
		map = 204,
		unlocklevel = 30,
		chapter_tag = 0,
		chapter_fx = "",
		uifx = "UIhuohua2",
		ItemTransformPattern = "",
		name = "午夜惊魂",
		chapter_name = "4–1",
		type = 2,
		act_id = 0,
		enter_story = "",
		boss_refresh = 3,
		event_skip = 0,
		lose_condition_display = "lose_condition_display_quanmie",
		is_air_attack = 1,
		friendly_id = 0,
		mitigation_rate = 2,
		mitigation_level = 5,
		ammo_total = 5,
		group_num = 2,
		enter_story_limit = "",
		star_require_3 = 3,
		profiles = "由于重樱不断的骚扰导致我方补给物资无法运往萨沃岛，司令部派我军执行护航任务，保证航路安全。",
		difficulty = 3,
		avoid_ratio = 8,
		star_require_2 = 2,
		time = 43200,
		win_condition_display = "win_condition_display_qijian",
		submarine_num = 0,
		avoid_require = 82,
		scale = {
			0.34,
			0.61,
			1.5
		},
		limitation = {
			{
				{
					5,
					5,
					0
				},
				{
					3,
					1,
					0
				}
			},
			{
				{
					7,
					0,
					0
				},
				{
					2,
					1,
					0
				}
			}
		},
		property_limitation = {
			{
				"level",
				1,
				44
			},
			{
				"torpedo",
				1,
				250
			},
			{
				"dodge",
				1,
				70
			}
		},
		expedition_id_weight_list = {
			{
				10401010,
				10,
				0
			},
			{
				10401020,
				28,
				0
			},
			{
				10401030,
				25,
				1
			},
			{
				10401040,
				12,
				0
			},
			{
				10401050,


, '蛋糕', '音乐', '爱', '胜利', '赞', '鄙视', 'OK'],
            tab6:['男兜', '女兜', '开心', '乖乖', '偷笑', '大笑', '抽泣', '大哭', '无奈', '滴汗', '叹气', '狂晕', '委屈', '超赞', '??', '疑问', '飞吻', '天使', '撒花', '生气', '被砸', '口水', '泪奔', '吓傻', '吐舌头', '点头', '随意吐', '旋转', '困困', '鄙视', '狂顶', '篮球', '再见', '欢迎光临', '恭喜发财', '稍等', '我在线', '恕不议价', '库房有货', '货在路上']
        }
    };
</script>
</body>
</html><!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Interactive BOM for KiCAD</title>
  <style type="text/css">
:root {
  --pcb-edge-color: black;
  --pad-color: #878787;
  --pad-hole-color: #CCCCCC;
  --pad-color-highlight: #D04040;
  --pad-color-highlight-both: #D0D040;
  --pad-color-highlight-marked: #44a344;
  --pin1-outline-color: #ffb629;
  --pin1-outline-color-highlight: #ffb629;
  --pin1-outline-color-highlight-both: #fcbb39;
  --pin1-outline-color-highlight-marked: #fdbe41;
  --silkscreen-edge-color: #aa4;
  --silkscreen-polygon-color: #4aa;
  --silkscreen-text-color: #4aa;
  --fabrication-edge-color: #907651;
  --fabrication-polygon-color: #907651;
  --fabrication-text-color: #a27c24;
  --track-color: #def5f1;
  --track-color-highlight: #D04040;
  --zone-color: #def5f1;
  --zone-color-highlight: #d0404080;
}

html,
body {
  margin: 0px;
  height: 100%;
  font-family: Verdana, sans-serif;
}

.dark.topmostdiv {
  --pc


/* Normalization of Unicode strings.
   Copyright (C) 2009-2024 Free Software Foundation, Inc.
   Written by Bruno Haible <bruno@clisp.org>, 2009.

   This file is free software: you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1 of the
   License, or (at your option) any later version.

   This file is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public License
   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */

#include "unitypes.h"

/* Complete definition of normalization form descriptor.  */
struct unicode_normalization_form
{
  /* Bit mask containing meta-information.
     This must be the first field.  */
  unsigned int description;
  #define NF_IS_COMPAT_DECOMPOSING  (1 << 0)
  #define NF_IS_COMPOSING           (1 << 1)
  /* Function that decomposes a Unicode character.  */
  int (*decomposer) (ucs4_t uc, ucs4_t *decomposition);
  /* Function that combines two Unicode characters, a starter and another
     character.  */
  ucs4_t (*composer) (ucs4_t uc1, ucs4_t uc2);
  /* Decomposing variant.  */
  const struct unicode_normalization_form *decomposing_variant;
};


illboardMtx = this->GetBillboardMtx ( billboardMtx );
		gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM, billboardMtx );
	}
	else {
		gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM, this->GetLocalToWorldMtx ());
	}

	MOAIGrid& grid = *this->mGrid;

	float tileWidth = grid.GetTileWidth ();
	float tileHeight = grid.GetTileHeight ();

	if ( subPrimID == MOAIProp::NO_SUBPRIM_ID ) {

		MOAICellCoord c0;
		MOAICellCoord c1;

		this->GetGridBoundsInView ( c0, c1 );

		for ( int y = c0.mY; y <= c1.mY; ++y ) {
			for ( int x = c0.mX; x <= c1.mX; ++x ) {

				MOAICellCoord wrap = grid.WrapCellCoord ( x, y );
				u32 idx = grid.GetTile ( wrap.mX, wrap.mY );

				MOAICellCoord coord ( x, y );
				USVec2D loc = grid.GetTilePoint ( coord, MOAIGridSpace::TILE_CENTER );

				this->mDeck->Draw ( idx, this->mRemapper, loc.mX, loc.mY, 0.0f, tileWidth, tileHeight, 1.0f );
			}
		}
	}
	else {

		MOAICellCoord coord = grid.GetCellCoord ( subPrimID );

		u32 idx = grid.GetTile ( coord.mX, coord.mY );
		USVec2D loc = grid.GetTilePoint ( coord, MOAIGridSpace::TILE_CENTER );

		this->mDeck->Draw ( idx, this->mRemapper, loc.mX, loc.mY, 0.0f, tileWidth, tileHeight, 1.0f );
	}
}

//----------------------------------------------------------------//
void MOAIProp::DrawItem () {

	MOAIGfxDevice& gfxDevice = MOAIGfxDevice::Get ();

	if ( this->mFlags & FLAGS_BILLBOARD ) {
		USAffine3D billboardMtx;
		billboardMtx.Init ( gfxDevice.GetBillboardMtx ());
		billboardMtx = this->GetBillboardMtx ( billboardMtx );
		gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM, billboardMtx );
	}
	else {
		gfxDevice.SetVertexTransform ( MOAIGfxDevice::VTX_WORLD_TRANSFORM, this->GetLocalToWorldMtx ());
	}

	this->mDeck->Draw ( this->mIndex, this->mRemapper );
}

//----------------------------------------------------------------//
void MOAIProp::ExpandForSort ( MOAIPartitionResultBuffer& buffer ) {

	if (( this->mFlags & FLAGS_EXPAND_FOR_SORT ) && this->mGrid ) {

		// add a sub-prim for each visible grid cell
		const USAffine3D& mtx = this->GetLocalToWorldMtx ();

		MOAIGrid* grid = this->mGrid;

		MOAICellCoord c0;
		MOAICellCoord c1;

		this->GetGridBoundsInView ( c0, c1 );
		float zLoc = this->GetWorldZLoc ();

		for ( int y = c0.mY; y <= c1.mY; ++y ) {
			for ( int x = c0.mX; x <= c1.mX; ++x ) {

				u32 idx = grid->GetTile ( x, y );
				if ( !idx || ( idx & MOAITileFlags::HIDDEN )) continue;

				MOAICellCoord coord ( x, y );
				int subPrimID = grid->GetCellAddr ( coord );

				USVec2D loc = grid->GetTilePoint ( coord, MOAIGridSpace::TILE_CENTER );
				mtx.Transform ( loc );

				buffer.PushResult ( *this, subPrimID, this


endermint/privval"
	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestRawDataSignBytes(t *testing.T) {
	const (
		testPrefix   = RawBytesSignBytesPrefix
		testChainID  = "test-chain"
		testUniqueID = "unique-id-123"
	)

	testCases := []struct {
		name        string
		chainID     string
		uniqueID    string
		rawBytes    []byte
		expectError bool
	}{
		{
			name:        "success with normal inputs",
			chainID:     testChainID,
			uniqueID:    testUniqueID,
			rawBytes:    []byte("test data"),
			expectError: false,
		},
		{
			name:        "error with empty chain ID",
			chainID:     "",
			uniqueID:    testUniqueID,
			rawBytes:    []byte("test data"),
			expectError: true,
		},
		{
			name:        "error with empty unique ID",
			chainID:     testChainID,
			uniqueID:    "",
			rawBytes:    []byte("test data"),
			expectError: true,
		},
		{
			name:        "error with empty raw bytes",
			chainID:     testChainID,
			uniqueID:    testUniqueID,
			rawBytes:    []byte{},
			expectError: true,
		},
		{
			name:        "error with nil raw bytes",
			chainID:     testChainID,
			uniqueID:    testUniqueID,
			rawBytes:    nil,
			expectError: true,
		},
	}

	for _, tc := range testCases {
		t.Run(tc.name, func(t *testing.T) {
			signBytes, err := RawBytesMessageSignBytes(tc.chainID, tc.uniqueID, tc.rawBytes)

			if tc.expectError {
				assert.Error(t, err)
				return
			}

			require.NoError(t, err)

			// Create expected sign bytes manually for comparison
			expectedReq := &privval.SignRawBytesRequest{
				ChainId:  tc.chainID,
				UniqueId: tc.uniqueID,
				RawBytes: tc.rawBytes,
			}
			expectedProtoBytes, err := protoio.MarshalDelimited(expectedReq)
			require.NoError(t, err)

			expectedSignBytes := append([]byte(testPrefix), expectedProtoBytes...)

			// Verify the result has the expected prefix
			prefixLen := len(testPrefix)
			assert.True(t, bytes.Equal([]byte(testPrefix), signBytes[:prefixLen]),
				"sign bytes should start with the expected prefix")

			// Verify the entire sign bytes match the expected result
			assert.Equal(t, expectedSignBytes, signBytes,
				"sign bytes should match the expected format")

			// Additional verification: unmarshal the protobuf part and check fields
			protoBytes := signBytes[prefixLen:]
			unmarshalledReq := &privval.SignRawBytesRequest{}
			err = protoio.UnmarshalDelimited(protoBytes, unmarshalledReq)
			require.NoError(t, err, "should be able to unmarshal the protobuf bytes")

			assert.Equal(t, tc.chainID, unmarshalledReq.ChainId)
			assert.Equal(t, tc.uniqueID, unmarshalledReq.UniqueId)
			assert.Equal(t, tc.rawBytes, unmarshalledReq.RawBytes)
		})
	}
}
package types

import (
	"fmt"
	"os"
	"path/filepath"
	"reflect"
)

// Go lacks a simple and safe way to see if something is a typed nil.
// See:
//   - https://dave.cheney.net/2017/08/09/typed-nils-in-go-2
//   - https://groups.google.com/forum/#!topic/golang-nuts/wnH302gBa4I/discussion
//


-- chunkname: @scripts/extension_systems/unit_data/player_husk_hud_data_component_config.lua

local PlayerUnitData = require("scripts/extension_systems/unit_data/utilities/player_unit_data")
local husk_hud_data_component_config = {
	action_module_position_finder = {
		"position",
		"normal",
		"position_valid",
	},
	action_module_target_finder = {
		"target_unit_1",
		"target_unit_2",
		"target_unit_3",
	},
	warp_charge = {
		"current_percentage",
	},
	shooting_status = {
		"shooting_end_time",
	},
	inventory = {
		"slot_grenade_ability",
		"slot_luggable",
	},
	slot_primary = {
		"overheat_state",
	},
	slot_secondary = {
		"overheat_state",
	},
	talent_resource = {
		current_resource = "talent_resource",
		max_resource = "talent_resource",
	},
	disabled_character_state = {
		"is_disabled",
		"disabling_t


$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.deepCopy] instead. '
      'Will be removed in next major version')
  CustomMetric clone() => CustomMetric()..mergeFromMessage(this);
  @$core.Deprecated('Using this can add significant overhead to your binary. '
      'Use [GeneratedMessageGenericExtensions.rebuild] instead. '
      'Will be removed in next major version')
  CustomMetric copyWith(void Function(CustomMetric) updates) =>
      super.copyWith((message) => updates(message as CustomMetric))
          as CustomMetric;

  $pb.BuilderInfo get info_ => _i;

  @$core.pragma('dart2js:noInline')
  static CustomMetric create() => CustomMetric._();
  CustomMetric createEmptyInstance() => create();
  static $pb.PbList<CustomMetric> createRepeated() =>
      $pb.PbList<CustomMetric>();
  @$core.pragma('dart2js:noInline')
  static CustomMetric getDefault() => _defaultInstance ??=
      $pb.GeneratedMessage.$_defaultFor<CustomMetric>(create);
  static CustomMetric? _defaultInstance;

  CustomMetric_TargetSpec whichTargetSpec() =>
      _CustomMetric_TargetSpecByTag[$_whichOneof(0)]!;
  void clearTargetSpec() => clearField($_whichOneof(0));

  /// The name of the metric.
  @$pb.TagNumber(1)
  $core.String get metricName => $_getSZ(0);
  @$pb.TagNumber(1)
  set metricName($core.String v) {
    $_setString(0, v);
  }

  @$pb.TagNumber(1)
  $core.bool hasMetricName() => $_has(0);
  @$pb.TagNumber(1)
  void clearMetricName() => clearField(1);

  /// The type of the metric. Must be a string representing a Stackdriver
  /// metric type e.g. GAGUE, DELTA_PER_SECOND, etc.
  @$pb.TagNumber(2)
  $core.String get targetType => $_getSZ(1);
  @$pb.TagNumber(2)
  set targetType($core.String v) {
    $_setString(1, v);
  }

  @$pb.TagNumber(2)
  $core.bool hasTargetType() => $_has(1);
  @$pb.TagNumber(2)
  void clearTargetType() => clearField(2);

  /// The target value for the metric.
  @$pb.TagNumber(3)
  $core.double get targetUtilization => $_getN(2);
  @$pb.TagNumber(3)
  set targetUtilization($core.double v) {
    $_setDouble(2, v);
  }

  @$pb.TagNumber(3)
  $core.bool hasTargetUtilization() => $_has(2);
  @$pb.TagNumber(3)
  void clearTargetUtilization() => clearField(3);

  /// May be used instead of `target_utilization` when an instance can handle a
  /// specific amount of work/resources and the metric value is equal to the
  /// current amount of work remaining. The autoscaler will try to keep the
  /// number of instances equal to the metric value divided by
  /// `single_instance_assignment`.
  @$pb.TagNumber(4)
  $core.double get singleInstanceAssignment => $_getN(3);
  @$pb.TagNumber(4)
  set singleInstanceAssignment($core.double v) {
    $_setDouble(3, v);
  }

  @$pb.TagNumber(4)
  $core.bool hasSingleInstanceAssignment() => $_has(3);
  @$pb.TagNumber(4)
  void clearSingleInstanceAssignment() => clearField(4);

  /// Allows filtering on the metric's fields.
  @$pb.TagNumber(5)
  $core.String get filter => $_getSZ(4);
  @$pb.TagNumber(5)
  set filter($core.String v) {
    $_setString(4, v);
  }

  @$pb.TagNumber(5)
  $core.bool hasFilter() => $_has(4);
  @$pb.TagNumber(5)
  void clearFilter() => clearField(5);
}


_counter = {
      cmd = cmd.eval,
      cmd_data = "UPDATE entries SET count = count + 1 WHERE id == :entry_id;",
    },
  },
  timestamps = {
    add = {
      cmd = cmd.eval,
      cmd_data = "INSERT INTO timestamps (entry_id, timestamp) values(:entry_id, julianday('now'));",
    },
    delete = {
      cmd = cmd.delete,
      cmd_data = db_table.timestamps,
    },
    get = {
      cmd = cmd.select,
      cmd_data = db_table.timestamps,
    },
    get_ages = {
      cmd = cmd.eval,
      cmd_data = "SELECT id, entry_id, CAST((julianday('now') - julianday(timestamp)) * 24 * 60 AS FLOAT) AS age FROM timestamps WHERE entry_id == :entry_id;",
    },
    delete_before_id = {
      cmd = cmd.eval,
      cmd_data = "DELETE FROM timestamps WHERE id < :id and entry_id == :entry_id;",
    },
  },
}

M.queries = queries

--

local function row_id(entry)
  return (not vim.tbl_isempty(entry)) and entry[1].id or nil
end

-- next two needed due to https://github.com/kkharji/sqlite.lua/issues/150
-- they replace some chars with their hex representation prefixed with a precent sign
local function escape_chars(value)
  local val, _ = value:gsub("[%%()<>]", function(c)
    local encoding = string.format("%2x", c:byte())
    return "%" .. encoding
  end)
  return val
end

local function parse_escaped_chars(value)
  local val, _ = value:gsub("%%..", function(match)
    local s = match:sub(2)
    local c = string.char(tonumber(s, 16))
    return c
  end)
  return val
end

function M:get_or_insert(table_commands, row, additional_values)
  additional_values = additional_values or {}
  local id
  id = row_id(self:do_transaction(table_commands.get, { where = row }))
  if not id then
    row = vim.tbl_extend("keep", row, additional_values)
    self:do_transaction(table_commands.add, row)
    id = row_id(self:do_transaction(table_commands.get, { where = row }))
  end
  return id
end

-- entry: { value: str, picker: {cwd: str, name: str}}
function M:update_entry(entry)
  -- get or insert picker and entry
  local picker_id = self:get_or_insert(queries.pickers, entry.picker)
  local table_entry = { value = escape_chars(entry.value), picker_id = picker_id }
  local entry_id = self:get_or_insert(queries.entries, table_entry, { count = 0 })
  -- update entry counter
  self:do_transaction(queries.entries.update_counter, { entry_id = entry_id })
  -- register timestamp for this update
  self:do_transaction(queries.timestamps.add, { entry_id = entry_id })
  return entry_id
end

function M:trim_timestamps(entry_id)
  -- trim timestamps to MAX_TIMESTAMPS per entry (there should be up to MAX_TS + 1 at this point)
  local timestamps = self:do_transaction(queries.timestamps.get, { where = { entry_id = entry_id } })
  local trim_at = timestamps[(#timestamps - MAX_TIMESTAMPS) + 1]
  if trim_at then
    self:do_transaction(queries


il.UnstableApi
import androidx.media3.session.CommandButton
import androidx.media3.session.MediaLibraryService
import androidx.media3.session.MediaSession
import androidx.media3.session.SessionCommand
import androidx.media3.session.SessionError
import androidx.media3.session.SessionResult
import com.google.common.util.concurrent.Futures
import com.google.common.util.concurrent.ListenableFuture

/** A [MediaLibraryService.MediaLibrarySession.Callback] implementation. */
@UnstableApi
open class AudioProMediaLibrarySessionCallback : MediaLibraryService.MediaLibrarySession.Callback {

	private val nextButton = CommandButton.Builder(CommandButton.ICON_NEXT)
		.setDisplayName("Next")
		.setSessionCommand(
			SessionCommand(
				CUSTOM_COMMAND_NEXT,
				Bundle.EMPTY
			)
		)
		.build()

	private val prevButton = CommandButton.Builder(CommandButton.ICON_PREVIOUS)
		.setDisplayName("Previous")
		.setSessionCommand(
			SessionCommand(
				CUSTOM_COMMAND_PREV,
				Bundle.EMPTY
			)
		)
		.build()

	private val skipForwardButton = CommandButton.Builder(CommandButton.ICON_SKIP_FORWARD)
		.setDisplayName("Skip Forward")
		.setSessionCommand(
			SessionCommand(
				CUSTOM_COMMAND_SKIP_FORWARD,
				Bundle.EMPTY
			)
		)
		.build()

	private val skipBackwardButton = CommandButton.Builder(CommandButton.ICON_SKIP_BACK)
		.setDisplayName("Skip Backward")
		.setSessionCommand(
			SessionCommand(
				CUSTOM_COMMAND_SKIP_BACKWARD,
				Bundle.EMPTY
			)
		)
		.build()

	private fun getCommandButtons(): List<CommandButton> {
		val buttons = mutableListOf<CommandButton>()

		// Always provide 15-/30-second skip controls
		buttons.add(skipBackwardButton)
		buttons.add(skipForwardButton)

		if (AudioProController.settingShowNextPrevControls) {
			AudioProController.log("Next/Prev controls are enabled")
			buttons.add(nextButton)
			buttons.add(prevButton)
		} else {
			AudioProController.log("Next/Prev controls are disabled")
		}

		return buttons
	}

	companion object {
		private const val CUSTOM_COMMAND_NEXT =
			"dev.rnap.reactnativeaudiopro.NEXT"
		private const val CUSTOM_COMMAND_PREV =
			"dev.rnap.reactnativeaudiopro.PREV"
		private const val CUSTOM_COMMAND_SKIP_FORWARD =
			"dev.rnap.reactnativeaudiopro.SKIP_FORWARD"
		private const val CUSTOM_COMMAND_SKIP_BACKWARD =
			"dev.rnap.reactnativeaudiopro.SKIP_BACKWARD"
	}

	@OptIn(UnstableApi::class) // MediaSession.ConnectionResult.DEFAULT_SESSION_AND_LIBRARY_COMMANDS
	val mediaNotificationSessionCommands
		get() = MediaSession.ConnectionResult.DEFAULT_SESSION_AND_LIBRARY_COMMANDS.buildUpon()
			.also { builder ->
				// Add custom commands based on settings
				if (AudioProController.settingShowNextPrevControls) {
					// Add next and previous commands
					builder.add(SessionCommand(CUSTOM_COMMAND_NEXT, Bundle.EMPTY))
					builder.add(SessionCommand(CUSTOM_COMMAND_PREV, Bundle.EMPTY))
				} else if (AudioProController.settingShowSkipControls) {
					// Add skip forward and skip backward commands
					builder.add(SessionCommand(CUSTOM_COMMAND_SKIP_FORWARD, Bundle.EMPTY))
					builder.add(SessionCommand(CUSTOM_COMMAND_SKIP_BACKWARD, Bundle.EMPTY))
				}
				// If both settings are false, no custom commands are added, only default commands
			}
			.build()

	@OptIn(UnstableApi::class)
	override fun onConnect(
		session: MediaSession,
		controller: MediaSession.ControllerInfo,
	): MediaSession.ConnectionResult {


rrival.split(':'))

        min_arrival = arr_hour * 60 + arr_minutes
        min_now = now.hour * 60 + now.minute

        minutes = max(min_arrival, min_now) - min(min_now, min_arrival)
        return '%02d:%02d' % (
            minutes // 60,
            int(minutes % 60),
        )

def get_transport_info():
    info = get_wifi_info()
    if info.get('SSID') == 'myAustrian FlyNet':
        info = AustrianPlaneInfo()
    elif info.get('SSID') == 'Telekom_FlyNet':
        info = LufthansaPlaneInfo()
    elif info.get('SSID') == 'Aeroflot.entertainment':
        info = AeroflotPlaneInfo()
    elif info.get('SSID') == 'ACWiFi':
        info = AirCanadaPlaneInfo()
    elif info.get('SSID') == 'OEBB':
        info = OebbTrainInfo()
    else:
        return
    if info.is_available:
        return info

def prompt():
    info = get_transport_info()
    if info is None:
        return
    def _handle_match(m):
        x = m.group(1)
        if x == 'not_online_marker':
            if not info.is_online:
                return ' OFFLINE'
            return ''
        return str(getattr(info, x, None) or '')
    print(_pattern_re.sub(_handle_match, info.get_template()))

if __name__ == '__main__':
    prompt()


/* SPDX-License-Identifier: GPL-2.0 */
#ifndef RELOCS_H
#define RELOCS_H

#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <elf.h>
#include <byteswap.h>
#define USE_BSD
#include <endian.h>
#include <regex.h>

void die(char *fmt, ...);

#ifndef EM_LOONGARCH
#define EM_LOONGARCH	258
#endif
#define R_LARCH_NONE				0
#define R_LARCH_32 				1
#define R_LARCH_64				2
#define R_LARCH_MARK_LA				20
#define R_LARCH_MARK_PCREL			21
#define R_LARCH_SOP_PUSH_PCREL			22
#define R_LARCH_SOP_PUSH_ABSOLUTE		23
#define R_LARCH_SOP_PUSH_PLT_PCREL		29
#define R_LARCH_SOP_SUB				32
#define R_LARCH_SOP_SL				33
#define R_LARCH_SOP_SR				34
#define R_LARCH_SOP_ADD				35
#define R_LARCH_SOP_AND				36
#define R_LARCH_SOP_IF_ELSE			37
#define R_LARCH_SOP_POP_32_U_10_12		39
#define R_LARCH_SOP_POP_32_S_10_12		40
#define R_LARCH_SOP_POP_32_S_10_16		41
#define R_LARCH_SOP_POP_32_S_10_16_S2		42
#define R_LARCH_SOP_POP_32_S_5_20		43
#define R_LARCH_SOP_POP_32_S_0_5_10_16_S2	44
#define R_LARCH_SOP_POP_32_S_0_10_10_16_S2	45
#define R_LARCH_SOP_POP_32_U			46
#define R_LARCH_ADD32				50
#define R_LARCH_ADD64				51
#define R_LARCH_SUB32				55
#define R_LARCH_SUB64				56

#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))

enum symtype {
	S_ABS,
	S_REL,
	S_SEG,
	S_LIN,
	S_NSYMTYPES
};

void process_32(FILE *fp, int as_text, int as_bin,
		int show_reloc_info, int keep_relocs);
void process_64(FILE *fp, int as_text, int as_bin,
		int show_reloc_info, int keep_relocs);
#endif /* RELOCS_H */


 10)
        spaces = 3;
      else if (inst_offset < 100)
        spaces = 2;
      else if (inst_offset < 1000)
        spaces = 1;
      line.clear();
      llvm::raw_string_ostream line_strm(line);
      line_strm << llvm::formatv("{0:X+}: <{1}> {2} {3,12} {4}", inst_addr,
                                 inst_offset, llvm::fmt_repeat(' ', spaces), m,
                                 o);

      // If there is a comment append it starting at column 60 or after one
      // space past the last char
      const uint32_t comment_row = std::max(line_strm.str().size(), (size_t)60);
      if (c && c[0]) {
        if (line.size() < comment_row)
          line_strm.indent(comment_row - line_strm.str().size());
        line_strm << " # " << c;
      }
      src_strm << line_strm.str() << "\n";
      source.addr_to_line[inst_addr] = i + 1;
    }
    // Flush the source stream
    src_strm.str();
    auto sourceReference = VSCode::GetNextSourceReference();
    g_vsc.source_map[sourceReference] = std::move(source);
    g_vsc.addr_to_source_ref[low_pc] = sourceReference;
    object.try_emplace("sourceReference", sourceReference);
  }
  return llvm::json::Value(std::move(object));
}

// "StackFrame": {
//   "type": "object",
//   "description": "A Stackframe contains the source location.",
//   "properties": {
//     "id": {
//       "type": "integer",
//       "description": "An identifier for the stack frame. It must be unique
//                       across all threads. This id can be used to retrieve
//                       the scopes of the frame with the 'scopesRequest' or
//                       to restart the execution of a stackframe."
//     },
//     "name": {
//       "type": "string",
//       "description": "The name of the stack frame, typically a method name."
//     },
//     "source": {
//       "$ref": "#/definitions/Source",
//       "description": "The optional source of the frame."
//     },
//     "line": {
//       "type": "integer",
//       "description": "The line within the file of the frame. If source is
//                       null or doesn't exist, line is 0 and must be ignored."
//     },
//     "column": {
//       "type": "integer",
//       "description": "The column within the line. If source is null or
//                       doesn't exist, column is 0 and must be ignored."
//     },
//     "endLine": {
//       "type": "integer",
//       "description": "An optional end line of the range covered by the
//                       stack frame."
//     },
//     "endColumn": {
//       "type": "integer",
//       "description": "An optional end column of the range covered by the
//                       stack frame."
//     },
//     "moduleId": {
//       "type": ["integer", "string"],
//       "description": "The module associated with this frame, if any."
//     },
//     "presentationHint": {
//       "type": "string",
//       "enum": [ "normal", "label", "subtle" ],
//       "description": "An optional hint for how to present this frame in
//                       the UI. A value of 'label' can be used to indicate
//                       that the frame is an artificial frame that is used
//                       as a visual label or separator. A value of 'subtle'
//                       can be used to change the appearance of a frame in
//                       a 'subtle' way."
//     }
//   },
//   "required": [ "id", "name", "line", "column" ]
// }
llvm::json::Val


.isArchived || now - it.lastViewedAt > AUTO_RESCHEDULE_WINDOW_MS }
                        .forEach { entry ->
                            kotlin.runCatching { ThreadMonitorWorker.cancelByKey(this@MyApplication, entry.key) }
                        }

                    active.forEach { entry ->
                        kotlin.runCatching { ThreadMonitorWorker.schedule(this@MyApplication, entry.url) }
                    }
                }
        }
    }

    /**
     * OkHttp の内部コンポーネント（例: PublicSuffixDatabase）を事前初期化する。
     * 実通信は行わず、起動直後の初回アクセスで発生する遅延を低減する目的。
     */
    private fun initializeOkHttpSafely() {
        // アプリケーションスコープのコルーチンで非同期に実行
        applicationScope.launch {
            try {
                // ダミーの OkHttpClient を生成して内部初期化を促進（実通信は行わない）
                val dummyClient = okhttp3.OkHttpClient.Builder().build()
                // 実際にリクエストは送らず、初期化だけを行う
                Log.d("MyApplication", "OkHttp initialized successfully")
            } catch (e: Exception) {
                // エラーはログに留め、アプリは継続（非クリティカル）
                Log.w("MyApplication", "OkHttp initialization warning (non-critical)", e)
            }
        }
    }

    /**
     * WorkManager の構成を提供する。
     * HiltWorkerFactory を設定し、ビルド種類に応じたログレベルとデフォルトのプロセス名を指定。
     *
     * @return WorkManager のグローバル構成
     */
    override val workManagerConfiguration: Configuration
        get() {
            val isDebug = (applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE) != 0
            return Configuration.Builder()
                .setWorkerFactory(workerFactory)
                // Suppress WorkManager's informational logs in release builds.
                .setMinimumLoggingLevel(if (isDebug) Log.DEBUG else Log.ERROR)
                .setDefaultProcessName(packageName) // マルチプロセス想定時のための設定
                .build()
        }

    /**
     * Coil の ImageLoader を構築して提供する。
     * - GIF/動画フレーム/SVG のデコードは対応モジュールの自動登録に任せる構成
     * - メモリ/ディスクキャッシュを調整し、再利用性を高める
     * - デバッグロガーを有効化（失敗理由の追跡に有用）
     *
     * @param context アプリケーションコンテキスト
     * @return 構成済みの `ImageLoader`
     */
    override fun newImageLoader(context: Context): ImageLoader {
        val isDebug = (context.applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE) != 0
        return ImageLoader.Builder(context)
            .components {
                // OkHttp を使用したネットワークフェッチャーを追加（Coil 3 では必須）
                add(
                    OkHttpNetworkFetcherFactory(
                        callFactory = { coilOkHttpClient }
                    )
                )
                // GIF / 動画 / SVG のデコーダは拡張モジュール（coil-gif / coil-video / coil-svg）
                // を依存関係に追加すると自動登録されるため、手動追加は不要。
            }
            // メモリ/ディスクキャッシュを明示設定（ディスクキャッシュを優先、メモリ使用量を抑制）
            .memoryCache(
                MemoryCache.Builder()
                    .maxSizePercent(context, 0.10) // メモリの10


neWidth:_}=f;return(0,a.default)({motionDurationFast:`${(s+l).toFixed(1)}s`,motionDurationMid:`${(s+l*2).toFixed(1)}s`,motionDurationSlow:`${(s+l*3).toFixed(1)}s`,lineWidthBold:_+1},(0,n.default)(g))}return di}var Pr={},Rr={},ef;function yb(){if(ef)return Rr;ef=1,Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.getSolidColor=Rr.getAlphaColor=void 0;var i=Zr;const a=(c,f)=>new i.TinyColor(c).setAlpha(f).toRgbString();Rr.getAlphaColor=a;const n=(c,f)=>new i.TinyColor(c).darken(f).toHexString();return Rr.getSolidColor=n,Rr}var tf;function bb(){if(tf)return Pr;tf=1,Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.generateNeutralColorPalettes=Pr.generateColorPalettes=void 0;var i=Pi,a=yb();const n=f=>{const l=(0,i.generate)(f);return{1:l[0],2:l[1],3:l[2],4:l[3],5:l[4],6:l[5],7:l[6],8:l[4],9:l[5],10:l[6]}};Pr.generateColorPalettes=n;const c=(f,l)=>{const s=f||"#fff",g=l||"#000";return{colorBgBase:s,colorTextBase:g,colorText:(0,a.getAlphaColor)(g,.88),colorTextSecondary:(0,a.getAlphaColor)(g,.65),colorTextTertiary:(0,a.getAlphaColor)(g,.45),colorTextQuaternary:(0,a.getAlphaColor)(g,.25),colorFill:(0,a.getAlphaColor)(g,.15),colorFillSecondary:(0,a.getAlphaColor)(g,.06),colorFillTertiary:(0,a.getAlphaColor)(g,.04),colorFillQuaternary:(0,a.getAlphaColor)(g,.02),colorBgLayout:(0,a.getSolidColor)(s,4),colorBgContainer:(0,a.getSolidColor)(s,0),colorBgElevated:(0,a.getSolidColor)(s,0),colorBgSpotlight:(0,a.getAlphaColor)(g,.85),colorBorder:(0,a.getSolidColor)(s,15),colorBorderSecondary:(0,a.getSolidColor)(s,6)}};return Pr.generateNeutralColorPalettes=c,Pr}var kn={},pi={},rf;function Sb(){if(rf)return pi;rf=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.default=i;function i(a){const n=new Array(10).fill(null).map((c,f)=>{const l=f-1,s=a*Math.pow(2.71828,l/5),g=f>1?Math.floor(s):Math.ceil(s);return Math.floor(g/2)*2});return n[1]=a,n.map(c=>{const f=c+8;return{size:c,lineHeight:f/c}})}return pi}var nf;function Cb(){if(nf)return kn;nf=1;var i=ae;Object.defineProperty(kn,"__esModule",{value:!0}),kn.default=void 0;var a=i(Sb());const n=c=>{const f=(0,a.default)(c),l=f.map(g=>g.size),s=f.map(g=>g.lineHeight);return{fontSizeSM:l[0],fontSize:l[1],fontSizeLG:l[2],fontSizeXL:l[3],fontSizeHeading1:l[6],fontSizeHeading2:l[5],fontSizeHeading3:l[4],fontSizeHeading4:l[3],


	.ulf-about-section+.ulf-about-section .is-section-header {
		padding-bottom: 32px;
	}

	.ulf-about-section .column[class*="background-color"],
	.ulf-about-section .column.has-border {
		padding-top: 32px;
	}

	.ulf-about-section .column.is-edge-to-edge {
		padding: 0;
	}

	.ulf-about-section .column p:first-of-type {
		margin-top: 0;
	}

	.ulf-about-section .column p:last-of-type {
		margin-bottom: 0;
	}

	.ulf-about-section .has-text-columns {
		columns: 2;
		column-gap: 64px;
	}

	.ulf-about-section .is-section-header {
		margin-bottom: 0;
		padding: 32px 32px 0;
	}

	.ulf-about-section .is-section-header p:last-child {
		margin-bottom: 0;
	}

	/* Section header is alone in a container. */
	.ulf-about-section .is-section-header:first-child:last-child {
		padding: 0;
	}

	.ulf-about-section.is-feature {
		padding: 32px;
	}

	.ulf-about-section.is-feature p {
		margin: 0;
	}

	.ulf-about-section.is-feature p+p {
		margin-top: 1rem;
	}

	.ulf-about-section.has-1-column {
		margin-left: auto;
		margin-right: auto;
		max-width: 36em;
	}

	.ulf-about-section.has-2-columns,
	.ulf-about-section.has-3-columns,
	.ulf-about-section.has-4-columns,
	.ulf-about-section.has-overlap-style {
		display: -ms-grid;
		display: grid;
	}

	.ulf-about-section.has-gutters {
		gap: 16px;
	}

	.ulf-about-section.has-2-columns {
		-ms-grid-columns: 1fr 1fr;
		grid-template-columns: 1fr 1fr;
	}

	.ulf-about-section.has-2-columns.is-wider-right {
		-ms-grid-columns: 1fr 2fr;
		grid-template-columns: 1fr 2fr;
	}

	.ulf-about-section.has-2-columns.is-wider-left {
		-ms-grid-columns: 2fr 1fr;
		grid-template-columns: 2fr 1fr;
	}

	.ulf-about-section.has-2-columns .is-section-header {
		-ms-grid-column: 1;
		grid-column-start: 1;
		-ms-grid-column-span: 2;
		grid-column-end: span 2;
	}

	.ulf-about-section.has-2-columns .column:nth-of-type(2n+1) {
		-ms-grid-column: 1;
		grid-column-start: 1;
	}

	.ulf-about-section.has-2-columns .column:nth-of-type(2n) {
		-ms-grid-column: 2;
		grid-column-start: 2;
	}

	.ulf-about-section.has-3-columns {
		grid-template-columns: repeat(3, 1fr);
	}

	.ulf-about-section.has-3-columns .is-section-header {
		-ms-grid-column: 1;
		grid-column-start: 1;
		-ms-grid-column-span: 3;
		grid-column-end: span 3;
	}

	.ulf-about-section.has-3-columns .column:nth-of-type(3n+1) {
		-ms-grid-column: 1;
		grid-column-start: 1;
	}

	.ulf-about-section.has-3-columns .column:nth-of-type


"] = new Year();
            Functions["time"] = new Time();
            Functions["hour"] = new Hour();
            Functions["minute"] = new Minute();
            Functions["second"] = new Second();
            Functions["weeknum"] = new Weeknum();
            Functions["weekday"] = new Weekday();


mpty line
                content = Cons.lineBreak,
                contentLen = 1
            )
        }

    }

    /**
     * return true if this line number means should restore last edited or viewed position
     */
    fun shouldRestoreLastPosition(lineNumWillCheck:Int) :Boolean {
        return lineNumWillCheck == lastPosition || (lineNumWillCheck != EOF.LINE_NUM && lineNumWillCheck <= 0)
    }
}
package com.catpuppyapp.puppygit.git

class Upstream {
    //配置文件里的值
    var remote=""  //配置文件key branch.<yourbranchname>.remote，值，举例：origin
    var branchRefsHeadsFullRefSpec=""  //配置文件key branch.<yourbranchname>.merge，值，举例：refs/heads/main

    //方便我使用的值
    var remoteBranchShortRefSpec=""  // 远程分支短名，eg: origin/main
    var remoteBranchRefsRemotesFullRefSpec=""  // 远程分支完整名，eg: refs/remotes/origin/main
    var downstreamLocalBranchShortRefSpec=""  //本地分支短名，eg: main
    var downstreamLocalBranchRefsHeadsFullRefSpec=""  //本地分支完整名，eg: refs/heads/main
    var pushRefSpec=""  // 本地分支和远程分支的完整名组成的refspec。 eg: refs/heads/main:refs/heads/main，冒号左边是本地分支，右边是远程分支，两个名字可以不一样
    var isPublished=false  //分支是否已经发布

    //和BranchNameAndTypeDto.remotePrefixFromShortName有所不同！这里的这个值几乎不会解析失败，因为上游在配置文件中指定了remote，所以除非remote无效，否则，remote不会存在歧义，因此这个值也百分百能解析出来
    var remoteBranchShortRefSpecNoPrefix=""  //移除 origin/main 中 origin/ 之后，余下的部分，例如 remoteBranchShortRefSpec=origin/main，则此变量应为 main（或者是移除远程分支refs/heads/之后余下的部分，例如branchFullRefSpec=refs/heads/main，则此值应为main）

    var localOid:String=""  //本地分支的最新commit hash
    var remoteOid:String=""  //远程分支的最新commit hash

}
package com.catpuppyapp.puppygit.git

import androidx.compose.runtime.Immutable
import androidx.compose.runtime.Stable
import androidx.compose.ui.graphics.BlendMode
import androidx.compose.ui.graphics.Color
import com.catpuppyapp.puppygit.dto.Box
import com.catpuppyapp.puppygit.ui.theme.Theme
import com.catpuppyapp.puppygit.utils.UIHelper
import com.catpuppyapp.puppygit.utils.forEachBetter
import io.ktor.util.collections.ConcurrentMap

// 0-255，越小越透明
private const val alpha = 80;
// alpha / 255，把int的alpha换算成小数
private const val alphaFloat = alpha / 255f;

// 本地领先远程的未推送的节点的线的颜色
private val unPushedColorLight = Color.Gray.copy(alpha = alphaFloat)
private val unPushedColorDark = Color.LightGray.copy(alpha = alphaFloat)

// 避免并发冲突，没用普通的list
private val cachedColors = ConcurrentMap<Int, Color>().apply {
    put(0, Color(red = 0xF, green = 0xA2, blue = 0x72, alpha = alpha))
    put(1, Color(red = 0xE0, green = 0x62, blue = 0x56, alpha = alpha))
    put(2, Color(red = 0xB6, green = 0x9F, blue = 0xB, alpha = alpha))
    put(3, Color(red = 0xB6, green = 0xB, blue = 0x69, alpha = alpha))
    put(4, Color(red = 0xB6, green = 0x55, blue = 0xB, alpha = alpha))
    put(5, Color(red = 0x5C, green = 0x18, blue = 0x8C, alpha = alpha))
    put(6, Color(red = 0xB, green = 0xB0, blue = 0xB6, alpha = alpha))
    put(7, Color(red = 0xA7, green = 0x3B, blue


_ASSOCIATION_TYPE* type);

        /// <inheritdoc cref="ABI.Microsoft.Graphics.Canvas.ICanvasImageInterop.GetD2DImage"/>
        [return: NativeTypeName("HRESULT")]
        int GetD2DImage(
            ICanvasDevice* device,
            ID2D1DeviceContext* deviceContext,
            WIN2D_GET_D2D_IMAGE_FLAGS flags,
            float targetDpi,
            float* realizeDpi,
            ID2D1Image** ppImage);

        /// <summary>
        /// The vtable type for <see cref="ICanvasImageInterop"/>.
        /// </summary>
        public struct Vftbl
        {
            /// <summary>
            /// Allows CsWinRT to retrieve a pointer to the projection vtable (the name is hardcoded by convention).
            /// </summary>
            public static readonly IntPtr AbiToProjectionVftablePtr = InitVtbl();

            /// <summary>
            /// Builds the custom method table pointer for <see cref="ICanvasImageInterop"/>.
            /// </summary>
            /// <returns>The method table pointer for <see cref="ICanvasImageInterop"/>.</returns>
            private static IntPtr InitVtbl()
            {
                Vftbl* lpVtbl = (Vftbl*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), sizeof(Vftbl));

                lpVtbl->IUnknownVftbl = IUnknownVftbl.AbiToProjectionVftbl;
                lpVtbl->GetDevice = &GetDeviceFromAbi;
                lpVtbl->GetD2DImage = &GetD2DImageFromAbi;

                return (IntPtr)lpVtbl;
            }

            /// <summary>
            /// The IUnknown vtable.
            /// </summary>
            private IUnknownVftbl IUnknownVftbl;

            /// <summary>
            /// Function pointer for <see cref="GetDeviceFromAbi"/>.
            /// </summary>
            private delegate* unmanaged[MemberFunction]<IntPtr, ICanvasDevice**, WIN2D_GET_DEVICE_ASSOCIATION_TYPE*, int> GetDevice;

            /// <summary>
            /// Function pointer f


 ctClass: CtClass ->
        "${extension.runtimePackage}.${ctClass.packageName}._${ctClass.simpleName}"
    }

    var mapClassName = defaultMapClassName

    fun mapClassName(function: BiFunction<RetropilerExtension, CtClass, String>) {
        mapClassName = function
    }
}
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import me.modmuss50.mpp.ModPublishExtension
import me.modmuss50.mpp.PublishModTask

plugins {
    me.modmuss50.`mod-publish-plugin`
}

configure<ModPublishExtension> {
    changelog = providers.environmentVariable("CHANGELOG")
        .map { it.trim() }
        .getOrElse("No changelog provided")
    type = if (rootProject.ext["snapshot"] == true) BETA else STABLE
    dryRun = !hasProperty("noDryPublish")

    // if there is no publishing platform set, assume this is the root task
    // which is used to support github releases properly
    if (!hasProperty("publishing.platform")) {
        github {
            accessToken = providers.environmentVariable("GITHUB_API_TOKEN")
            repository = providers.environmentVariable("GITHUB_REPOSITORY")
            commitish = providers.environmentVariable("GITHUB_REF_NAME")
            tagName = version.map { "v${it}" }
            displayName = version

            // won't be empty, just so the publishing plugin won't complain
            allowEmptyFiles = true
        }

        // iterate through all subprojects and search for configured release files
        subprojects.filter { it.hasProperty("publishing.platform") }.forEach {
            // add main platform publishing file after project has finished evaluating
            it.afterEvaluate {
                additionalFiles.from(publishMods.file)
            }
        }
    } else {
        if (!hasProperty("publishing.skip_files")) {
            // setup files for this platform
            file = tasks.named<ShadowJar>("shadowJar").flatMap { it.archiveFile }
            additionalFiles.from(tasks.named<Jar>("sourcesJar").flatMap { it.archiveFile })
        }

        val platform = property("publishing.platform").toString()
        val fancyPlatform = platform.replaceFirstChar { it.titlecaseChar() }

        // setup per-platform modrinth publishing
        modrinth {
            accessToken = providers.environmentVariable("MODRINTH_API_TOKEN")
            var versionBob = "${rootProject.ext["fullVersion"]}+${platform}"
            if (rootProject.ext["snapshot"] == true) {
                // e.g. "0.0.0+platform.abcdefg"
                version = "${versionBob}.${rootProject.ext["commitHash"]}"
            } else {
                // e.g. "0.0.0+platform"
                version = versionBob
            }
            displayName = "${rootProject.ext["publishing.display_name"]} ${rootProject.version} ${fancyPlatform}"
            projectId = property("publishing.modrinth.project").toString()
            minecraftVersionRange {
                start = property("publishing.modrinth.version.start").toString()
                end = property("publishing.modrinth.version.end").toString()
            }
            val loadersStr = property("publishing.modrinth.loaders").toString()
            modLoaders.addAll(loadersStr.split(","))
        }
    }
}

if (hasProperty("publishing.platform")
    && !hasProperty("publishing.skip_files")
) {
    tasks.withType<PublishModTask> {
        dependsOn(tasks.named<ShadowJar>("shadowJar"))
        dependsOn(tasks.named<Jar>("sourcesJar"))
    }
}
/*
 * This file is part of packet


 val bluetoothManager: BluetoothManager = appContext.getSystemService(
        BluetoothManager::class.java
    )

    private val bluetoothAdapter: BluetoothAdapter? = bluetoothManager.adapter

    private val onUuidAllocatedListener = OnUuidAllocatedListener { uuid ->
        val serverSocket: BluetoothServerSocket? = try {
            bluetoothAdapter?.listenUsingInsecureRfcommWithServiceRecord("ustad", uuid)
        }catch(e: SecurityException) {
            null
        }

        val clientSocket: BluetoothSocket? = try {
            Log.d(LOG_TAG, "Listening for data request on $uuid")
            serverSocket?.accept(SOCKET_ACCEPT_TIMEOUT) //Can add timeout here
        }catch (e: IOException) {
            Log.e(LOG_TAG, "Exception accepting socket", e)
            null
        }

        clientSocket?.also { socket ->
            Log.d(LOG_TAG, "client connected to $uuid")
            try {
                val inStream = socket.inputStream
                val outStream = socket.outputStream
                while(isStarted.get()) {
                    val request = rawHttp.parseRequest(inStream)
                    val response = handleRequest(socket.remoteDevice.address, request)
                    response.writeTo(outStream)
                    outStream.flush()
                }
            }catch(e: Exception) {
                Log.w(LOG_TAG, "Exception handling socket $uuid", e)
            } finally {
                Log.d(LOG_TAG, "Closing server socket on $uuid")
                serverSocket?.close()
            }
        }
    }

    private val uuidAllocationServer = uuidAllocationServerFactory(
        appContext,
        allocationServiceUuid,
        allocationCharacteristicUuid,
        MNetLoggerStdout(),
        maxClients,
        onUuidAllocatedListener,
    )

    init {

    }

    fun start() {
        if(isClosed.get())
            throw IllegalStateException("HttpOverBluetoothServer is closed.")
        isStarted.set(true)
        uuidAllocationServer.start()
    }

    fun stop() {
        isStarted.set(false)
        uuidAllocationServer.stop()
    }

    fun close() {
        if(!isClosed.getAndSet(true)) {
            Log.d(LOG_TAG, "Closing BluetoothOverHttpServer")
            uuidAllocationServer.close()
        }
    }

    abstract fun handleRequest(
        remoteDeviceAddress: String,
        request: RawHttpRequest,
    ): RawHttpResponse<*>

    companion object {

        const val SOCKET_ACCEPT_TIMEOUT = 12000

    }
}package com.ustadmobile.meshrabiya.vnet.wifi

import java.nio.ByteBuffer
import java.nio.ByteOrder

data class LocalHotspotResponse(
    val responseToMessageId: Int,
    val errorCode: Int,
    val config: WifiConnectConfig?,
    val redirectAddr: Int,
) {

    val sizeInBytes: Int
        //Size = responseToMessageId + errorCode + (1 byte indicating if there is a config) + config bytes + redirect addr
        get() = 4 + 4 + 1 + (config?.sizeInBytes ?: 0) + 4

    fun toBytes(): ByteArray {
        return ByteArray(sizeInBytes).also {
            toBytes(it, 0)
        }
    }

    fun toBytes(
        byteArray: ByteArray,
        offset: Int
    ) {
        val byteBuf = ByteBuffer.wrap(byteArray, offset, byteArray.size - offset)
            .order(ByteOrder.BIG_ENDIAN)
        byteBuf.putInt(responseToMessageId)
        byteBuf.putInt(errorCode)
        byteBuf.put(if(config != null) 1.toByte() else 0.toByte())
        if(config != null) {
            val configOffset = offset + CONFIG_OFFSET