@mark1russell7/packing 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.d.ts CHANGED
@@ -415,6 +415,110 @@ export declare function turnRegion(region: Region, h: number): Region;
415
415
  * The ports, the shape and the margin turn with the item. The function does not change its argument.
416
416
  */
417
417
  export declare function turnItem(item: Item): Item;
418
+ /** The direction of a measure: `lower` when a lower value is better, `higher` when a higher value is better. */
419
+ type Direction = "lower" | "higher";
420
+ /** The family of a measure. Each family has a section in `docs/MEASURES.md`. */
421
+ type MeasureFamily = "density" | "aspect" | "order" | "raggedness" | "overflow" | "stability" | "determinism" | "speed";
422
+ /** The id of a measure of the packer. The ids are those of `docs/FORMAT.md`, and `highways` uses the same ids. */
423
+ type MeasureId = "pack.area" | "pack.fill" | "pack.whitespace" | "pack.aspect" | "pack.aspectError" | "pack.order.inversions" | "pack.order.breaks" | "pack.raggedness" | "pack.overflow" | "pack.stability.moved" | "pack.stability.mean" | "pack.stability.q95" | "pack.deterministic" | "pack.search.widths" | "pack.search.ms";
424
+ /** The facts of one measure: its family, its unit, its direction and its range. */
425
+ interface MeasureSpec {
426
+ id: MeasureId;
427
+ family: MeasureFamily;
428
+ unit: string;
429
+ direction: Direction;
430
+ /** The lowest value. */
431
+ min: number;
432
+ /** The highest value. The value `Infinity` tells that the measure has no upper limit. */
433
+ max: number;
434
+ }
435
+ /** The measures of one layout, by id. `measure` gives them. The values are not rounded. */
436
+ interface LayoutMeasures {
437
+ "pack.area": number;
438
+ "pack.fill": number;
439
+ "pack.whitespace": number;
440
+ "pack.aspect": number;
441
+ "pack.aspectError": number;
442
+ "pack.order.inversions": number;
443
+ "pack.order.breaks": number;
444
+ "pack.raggedness": number;
445
+ "pack.overflow": number;
446
+ "pack.search.widths": number;
447
+ "pack.search.ms": number;
448
+ }
449
+ /** The stability measures of a change pair, by id. `measureChange` gives them. The values are not rounded. */
450
+ interface ChangeMeasures {
451
+ "pack.stability.moved": number;
452
+ "pack.stability.mean": number;
453
+ "pack.stability.q95": number;
454
+ }
455
+ /** The options of `measure`. */
456
+ interface MeasureOptions {
457
+ /**
458
+ * A box joins a row when its top is this close to the top of the first box of the row. The rows give
459
+ * `pack.raggedness`. The default is half the median height of the boxes.
460
+ */
461
+ rowTolerance?: number;
462
+ }
463
+ /** The facts of each measure, by id. `docs/MEASURES.md` gives the full definitions. */
464
+ export declare const MEASURE_SPECS: Readonly<Record<MeasureId, MeasureSpec>>;
465
+ /**
466
+ * This function gives the measures of one layout, by the ids of `docs/MEASURES.md`. The values are not rounded. A
467
+ * record rounds them with `roundMeasures`.
468
+ *
469
+ * - The boxes are the placed items with a width and a height above 0. The hull is the smallest rectangle around them.
470
+ * - An empty layout gives the area 0, the aspect 1 and the aspect error 0. Its fill is 0 and its whitespace is 1.
471
+ * - The time `pack.search.ms` comes from the trace. It is not part of the determinism rule.
472
+ *
473
+ * @example
474
+ * ```ts
475
+ * const m = measure(input, packWith("shelf", input));
476
+ * m["pack.fill"]; // the area of the boxes divided by the area of the hull
477
+ * ```
478
+ */
479
+ export declare function measure(input: PackInput, output: PackOutput, options?: MeasureOptions): LayoutMeasures;
480
+ /**
481
+ * This function gives the stability measures of a change pair: the run on the base input and the run on the changed
482
+ * input. The items match by id. The values are not rounded.
483
+ *
484
+ * - An item stays when both inputs have it and both outputs place it. The added and the removed items do not count.
485
+ * - A staying item moved when its `x` or its `y` changed by more than `RECORD_EPS`, or when its turn changed.
486
+ * - The distance of an item is the length of the move of its top-left corner. The unit is the width `W`.
487
+ * - `W` is the larger width of the 2 output sizes. A `W` of 0 becomes 1, so the unit is then the unit of the input.
488
+ * - No staying item gives 0 for each measure.
489
+ */
490
+ export declare function measureChange(baseInput: PackInput, baseOutput: PackOutput, changeInput: PackInput, changeOutput: PackOutput): ChangeMeasures;
491
+ /**
492
+ * This function gives the measure `pack.deterministic` of two runs with the same input, options and seed. It gives
493
+ * `true` when the runs have the same placements, overflow, size and moved obstacles.
494
+ *
495
+ * - The placements match by id, so their order in the list does not count. The numbers must be equal.
496
+ * - The trace is not part of the rule, because its times change each time.
497
+ */
498
+ export declare function isDeterministic(first: PackOutput, second: PackOutput): boolean;
499
+ /**
500
+ * This function rounds each number of a record of measures with `round3`, as `docs/FORMAT.md` tells. A half goes up,
501
+ * and `-0` becomes 0. The function keeps the other values, and it does not change its argument.
502
+ */
503
+ export declare function roundMeasures<T extends object>(measures: T): T;
504
+ /**
505
+ * This function gives the paired ratio of a measure on one input: the value of the candidate against the value of the
506
+ * current default. A ratio above 1 is worse, in the direction of the measure.
507
+ *
508
+ * - For `lower`, the ratio is `candidate / current`. For `higher`, it is `current / candidate`.
509
+ * - When both values are 0, the ratio is 1. When only the divisor is 0, the ratio is `Infinity`.
510
+ * - The values are 0 or more. A negative value or `NaN` throws a `RangeError`.
511
+ */
512
+ export declare function pairedRatio(candidate: number, current: number, direction: Direction): number;
513
+ /**
514
+ * This function gives the quantile `q` of a list of numbers, with linear interpolation between the sorted values. The
515
+ * position in the sorted list is `(n - 1) * q`. An empty list or a `q` outside 0 to 1 throws a `RangeError`.
516
+ */
517
+ export declare function quantile(values: readonly number[], q: number): number;
518
+ /** This function gives the median of the paired ratios of a corpus: the quantile 0.5. It is not a ratio of two medians. */
519
+ export declare function medianRatio(ratios: readonly number[]): number;
520
+ /** This function gives the share of the paired ratios above a limit. An empty list throws a `RangeError`. */
521
+ export declare function tailShare(ratios: readonly number[], limit: number): number;
418
522
  /** For each dimension of the taxonomy, the values that a strategy supports. `docs/research/TAXONOMY.md` gives the values. */
419
523
  interface Supports {
420
524
  containerSize: ("fixed" | "freeHeight" | "freeWidth" | "freeAspect" | "freeArea")[];
@@ -595,5 +699,187 @@ interface HardBreaks {
595
699
  * The rules read a shape of the container or of an obstacle as its bounding box. The result has no tolerance in it.
596
700
  */
597
701
  export declare function checkHard(input: PackInput, output: PackOutput, tolerance?: Pick<Tolerance, "overlap">): HardBreaks;
598
- export type { Cell, Container, Dimension, DimensionValue, FreeWidthOptions, FreeWidthResult, FreeWidthTry, HardBreaks, Item, LayoutStrategyOptions, Margin, MetricsOptions, Obstacle, PackContext, PackInput, PackLayoutOptions, PackOptions, PackOutput, PackingMetrics, Placement, Port, PushOptions, PushStrategyOptions, Region, ShelfOptions, SizeSearch, SortOrder, StageTrace, Strategy, Supports, Tolerance };
702
+ /** An edge between two boxes. The router reads it, and the packer ignores it. */
703
+ interface Edge {
704
+ id: string;
705
+ source: string;
706
+ target: string;
707
+ sourcePort?: string;
708
+ targetPort?: string;
709
+ }
710
+ /** The parameters of a generator: a name and a string or a number for each parameter. */
711
+ type GeneratorParams = Record<string, string | number>;
712
+ /** The stamp of a generated input: the generator, its version, the full parameters and the seed. */
713
+ interface GeneratorStamp {
714
+ name: string;
715
+ version: number;
716
+ params: GeneratorParams;
717
+ seed: number;
718
+ }
719
+ /** One input file `layout-input/1`. `docs/FORMAT.md` gives each field. */
720
+ interface LayoutInput {
721
+ schema: "layout-input/1";
722
+ id: string;
723
+ set: string;
724
+ family: string;
725
+ seed: number;
726
+ /** The origin: `made-up`, `published:<set>` or `known-best:<construction>`. */
727
+ source: string;
728
+ /** The generator of a generated input. A hand-made or published input has `null`. */
729
+ generator: GeneratorStamp | null;
730
+ container: Container;
731
+ obstacles?: Obstacle[];
732
+ gap?: number;
733
+ boxes: Item[];
734
+ edges: Edge[];
735
+ base?: string;
736
+ change?: string;
737
+ step?: number;
738
+ /** The first 16 hex characters of the SHA-256 of the canonical form of the other fields. */
739
+ hash: string;
740
+ }
741
+ /** The layout of the obstacles (`docs/research/TAXONOMY.md`, dimension 3). */
742
+ type ObstacleLayout = "none" | "center" | "scattered" | "wall" | "corridors" | "touching" | "edge";
743
+ /** The distribution of the sizes of the items (`docs/research/TAXONOMY.md`, dimension 6). */
744
+ type SizeDistribution = "identical" | "nearIdentical" | "uniform" | "heavyTail" | "bimodal" | "extremeAspect";
745
+ /** The scale of the count of the items (`docs/research/TAXONOMY.md`, dimension 7). */
746
+ type CountScale = "1" | "10" | "100" | "1k" | "10k";
747
+ /**
748
+ * The cell of a generated input: one value for each dimension of the packer. The cell of `cellOf` has the dimensions
749
+ * that the input tells. The generator adds the layout of the obstacles, the sizes, the count and the mode.
750
+ */
751
+ interface CorpusCell extends Cell {
752
+ obstacles: ObstacleLayout;
753
+ sizes: SizeDistribution;
754
+ count: CountScale;
755
+ mode: "offline" | "online" | "incremental";
756
+ }
757
+ /** This function gives the `fnv1a32` hash of the UTF-8 bytes of a string, as `docs/FORMAT.md` gives it. */
758
+ export declare function fnv1a32(text: string): number;
759
+ /** This function rounds the numbers of a file to 3 decimals. A half goes up, and the value `-0` becomes 0. */
760
+ export declare function round3(x: number): number;
761
+ /**
762
+ * This function gives the canonical form of a value: sorted keys, no whitespace and the numbers of `JSON.stringify`
763
+ * after `round3`. A key with the value `undefined` is not in the form.
764
+ */
765
+ export declare function canonicalJson(value: unknown): string;
766
+ /** This function gives the hash of an input file: the first 16 hex characters of the SHA-256 of its canonical form without `hash`. */
767
+ export declare function hashInput(file: Omit<LayoutInput, "hash"> | LayoutInput): string;
768
+ /** This function gives the scale of a count: the nearest of 1, 10, 100, 1000 and 10000 on a log scale. The count 0 gives `1`. */
769
+ export declare function countCell(count: number): CountScale;
770
+ /** This function gives the packing input of a file. The boxes become the items, and the edges go. */
771
+ export declare function toPackInput(file: Pick<LayoutInput, "container" | "boxes" | "obstacles" | "gap">): PackInput;
772
+ /** A seeded generator of `layout-input/1` files. The same version, parameters and seed give the same file, byte for byte. */
773
+ interface CorpusGenerator<P extends GeneratorParams = GeneratorParams> {
774
+ /** The name. The file writes it in `generator.name`. */
775
+ readonly name: string;
776
+ /** The version. A change of the output of a generator needs a new version. */
777
+ readonly version: number;
778
+ /** The default set of an input, when the call gives no set. */
779
+ readonly set: string;
780
+ /** The default parameters. */
781
+ readonly defaults: Readonly<P>;
782
+ /** For each parameter with a list of values, the values that the generator accepts. */
783
+ readonly values: { readonly [K in keyof P]?: readonly P[K][]; };
784
+ /** This method gives the full parameters: the defaults with the given parameters over them. It throws a `RangeError` for a bad parameter. */
785
+ withDefaults(params?: Partial<P>): P;
786
+ /** This method gives the cell of each input of the parameters. The cell does not depend on the seed. */
787
+ cell(params?: Partial<P>): CorpusCell;
788
+ /** This method gives the input file of a seed. The `id` is `<set>/<family>/s<seed>`. */
789
+ generate(seed: number, params?: Partial<P>, set?: string): LayoutInput;
790
+ }
791
+ /** The parameters of `rect-scattered`. */
792
+ type RectScatteredParams = {
793
+ count: number;
794
+ };
795
+ /** The shared generator `rect-scattered` of `docs/FORMAT.md`, version 1: rectangle obstacles at random places in a fixed rectangle. */
796
+ export declare const rectScattered: CorpusGenerator<RectScatteredParams>;
797
+ /** The parameters of `rect-grid`: one value for each dimension of the taxonomy that it covers. */
798
+ type RectGridParams = {
799
+ containerSize: DimensionValue<"containerSize">;
800
+ containerShape: DimensionValue<"containerShape">;
801
+ obstacles: ObstacleLayout;
802
+ sizes: SizeDistribution;
803
+ count: number;
804
+ };
805
+ /**
806
+ * The generator `rect-grid`, version 1: rectangle boxes for each value of `containerSize`, `containerShape`, `obstacles`
807
+ * and `sizes`, with each count. The container is a nominal rectangle of 600 to 1000 by 400 to 800.
808
+ */
809
+ export declare const rectGrid: CorpusGenerator<RectGridParams>;
810
+ /** The parameters of a family of a user interface. */
811
+ type UiParams = {
812
+ containerSize: DimensionValue<"containerSize">;
813
+ count: number;
814
+ };
815
+ /** The generator `gallery`, version 1: thumbnails with one size and one aspect (1, 4:3, 3:2 or 16:9). The default container has a fixed width. */
816
+ export declare const gallery: CorpusGenerator<UiParams>;
817
+ /** The generator `dashboard`, version 1: tiles in 6 standard sizes, from 1 by 1 to 4 by 2 grid units of 60 to 100. */
818
+ export declare const dashboard: CorpusGenerator<UiParams>;
819
+ /** The generator `cards`, version 1: cards with one width from 200 to 320, and a height from 120 to 420 each. */
820
+ export declare const cards: CorpusGenerator<UiParams>;
821
+ /** The generator `word-cloud`, version 1: boxes of text. The height comes from 6 font sizes, the width from 3 to 12 letters. */
822
+ export declare const wordCloud: CorpusGenerator<UiParams>;
823
+ /** The cases of `edge-cases`. */
824
+ type EdgeCase = "empty" | "one" | "oversize" | "exactTiling" | "touchObstacles";
825
+ /** The parameters of `edge-cases`. The cases `empty` and `one` ignore `count`. */
826
+ type EdgeCaseParams = {
827
+ case: EdgeCase;
828
+ count: number;
829
+ };
830
+ /**
831
+ * The generator `edge-cases`, version 1. Each case has a fixed rectangle container.
832
+ *
833
+ * - `empty`: no box.
834
+ * - `one`: one box.
835
+ * - `oversize`: `count` boxes. One box is wider than the container.
836
+ * - `exactTiling`: `count` identical boxes that fill the container with no free space.
837
+ * - `touchObstacles`: a locked box on the top of an obstacle, and boxes as wide as the path between 2 obstacles.
838
+ */
839
+ export declare const edgeCases: CorpusGenerator<EdgeCaseParams>;
840
+ /** Each generator of the package. */
841
+ export declare const generators: readonly CorpusGenerator[];
842
+ /** This function gives the generator with a name. It throws a `RangeError` for a name that the package does not have. */
843
+ export declare function generator(name: string): CorpusGenerator;
844
+ /** One spec of a corpus: a generator, its parameters and its seeds. */
845
+ interface CorpusSpec {
846
+ /** The name of the generator. */
847
+ generator: string;
848
+ /** The version of the generator. Without it, the spec uses the version of the package. A different version is an error. */
849
+ version?: number;
850
+ /** The parameters over the defaults of the generator. */
851
+ params?: GeneratorParams;
852
+ seeds: readonly number[];
853
+ }
854
+ /** One input in the index of a manifest. */
855
+ interface CorpusEntry {
856
+ id: string;
857
+ hash: string;
858
+ cell: CorpusCell;
859
+ }
860
+ /** The manifest `corpus.json` of a corpus. */
861
+ interface CorpusManifest {
862
+ schema: "layout-corpus/1";
863
+ /** The name of the corpus. Each input has it in `set`. */
864
+ corpus: string;
865
+ /** The specs, each with its version and its full parameters. */
866
+ specs: {
867
+ generator: string;
868
+ version: number;
869
+ params: GeneratorParams;
870
+ seeds: number[];
871
+ }[];
872
+ inputs: CorpusEntry[];
873
+ }
874
+ /** A corpus: the manifest and the input files, in the order of the specs and the seeds. */
875
+ interface Corpus {
876
+ manifest: CorpusManifest;
877
+ inputs: LayoutInput[];
878
+ }
879
+ /**
880
+ * This function generates a corpus from specs. Each input gets the name of the corpus as its set. The function throws a
881
+ * `RangeError` for an unknown generator, a different version or 2 inputs with the same id.
882
+ */
883
+ export declare function corpus(name: string, specs: readonly CorpusSpec[]): Corpus;
884
+ export type { Cell, ChangeMeasures, Container, Corpus, CorpusCell, CorpusEntry, CorpusGenerator, CorpusManifest, CorpusSpec, CountScale, Dimension, DimensionValue, Direction, Edge, EdgeCase, EdgeCaseParams, FreeWidthOptions, FreeWidthResult, FreeWidthTry, GeneratorParams, GeneratorStamp, HardBreaks, Item, LayoutInput, LayoutMeasures, LayoutStrategyOptions, Margin, MeasureFamily, MeasureId, MeasureOptions, MeasureSpec, MetricsOptions, Obstacle, ObstacleLayout, PackContext, PackInput, PackLayoutOptions, PackOptions, PackOutput, PackingMetrics, Placement, Port, PushOptions, PushStrategyOptions, RectGridParams, RectScatteredParams, Region, ShelfOptions, SizeDistribution, SizeSearch, SortOrder, StageTrace, Strategy, Supports, Tolerance, UiParams };
599
885
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/vector.ts","../src/rect.ts","../src/order.ts","../src/pack.ts","../src/skyline.ts","../src/shelf.ts","../src/free.ts","../src/push.ts","../src/metrics.ts","../src/contract.ts","../src/strategy.ts","../src/adapters.ts","../src/convert.ts","../src/registry.ts","../src/check.ts"],"mappings":";qBACa;;EAIX,YAAY,YAAO;;MAMf;MACA,EAAE;;MAEF;MACA,EAAE;;EAGN,IAAI,WAAW;;EAMf,MAAM,GAAG;;EAMT,IAAI,OAAO,SAAS;;EAKpB;;EAKA,SAAS;;EAKT,MAAM,KAAK,QAAQ,KAAK,SAAS;;SAQ1B,GAAG,iBAAiB;;SAKpB,IAAI,SAAS,WAAW;;SASxB,IAAI,SAAS,WAAW;;aASpB,YAAY;;;qBCxEZ,KAAK;;;EAKhB,KAAK;;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ACP,QAAQ;;;UAIO;;EAEf;;EAEA;;EAEA;IAAW;IAAa;;;EAExB,WAAW;;;UAII,SAAS;;EAExB;;EAEA;;EAEA;;EAEA,UAAU;;EAEV,UAAU;;EAEV;;EAEA,KAAK,OAAO,WAAW,SAAS,GAAG,SAAS,cAAc;;;UAI3C;EACf;;EAEA,OAAO,OAAO,WAAW,OAAO,UAAU,SAAS,aAAa,oBAAoB;;;;;;qBAOzE,wBAAwB;;WAE1B,WAAW;;WAEX;EAET,YAAY,WAAW,WAAW;;;wBASpB,WAAW;;wBAWX,cAAc,eAAU,OAAM,KAAK,+BAAoC;;;;;;;;;;wBAwDvE,OAAO,OAAO,YAAY;;wBAqC1B,cAAc,UAAU,UAAU,MAAM,QAAQ,OAAO;EAAwB,WAAW;EAAW;;;wBAUrG,aAAa,UAAU,UAAU,MAAM,QAAQ,OAAO;;wBAKtD,gBAAgB,UAAU,UAAU,OAAO;;UCrM1C;;EAEf,WAAW;;EAEX;;;UAIe;;EAEf,WAAW;;EAEX;;;;;;qBAwEW,MAAM,SAAS;;;;;qBASf,SAAS,SAAS;;;;;qBASlB,OAAO,SAAS;;;;;qBAShB,UAAU;;;;;;qBAkHV,MAAM,SAAS;;;;;;;;wBCpOZ,UAAU,GAAG,gBAAgB,KAAK,MAAM,OAAO,KAAK,KAAK;;;;;wBAwBzD,QAAQ,GAAG,QAAQ,YAAY,OAAO,KAAK,MAAM,OAAO,KAAK,KAAK,KAAK;;qBC7B1E,qBAAqB;;wBAGlB,SAAS,aAAa;;;;;wBAUtB,SAAS,YAAY,OAAO,WAAW,mBAAmB,gBAAW;;UCdpE;EACf;EACA;EACA;EACA;;;;;;;;;;;;wBA0Bc,UAAU,OAAO,WAAW,QAAQ,YAAY,YAAW,KAAK,wBAA4C"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/vector.ts","../src/rect.ts","../src/order.ts","../src/pack.ts","../src/skyline.ts","../src/shelf.ts","../src/free.ts","../src/push.ts","../src/metrics.ts","../src/contract.ts","../src/measures.ts","../src/strategy.ts","../src/adapters.ts","../src/convert.ts","../src/registry.ts","../src/check.ts","../src/layout-input.ts","../src/generators.ts","../src/corpus.ts"],"mappings":";qBACa;;EAIX,YAAY,YAAO;;MAMf;MACA,EAAE;;MAEF;MACA,EAAE;;EAGN,IAAI,WAAW;;EAMf,MAAM,GAAG;;EAMT,IAAI,OAAO,SAAS;;EAKpB;;EAKA,SAAS;;EAKT,MAAM,KAAK,QAAQ,KAAK,SAAS;;SAQ1B,GAAG,iBAAiB;;SAKpB,IAAI,SAAS,WAAW;;SASxB,IAAI,SAAS,WAAW;;aASpB,YAAY;;;qBCxEZ,KAAK;;;EAKhB,KAAK;;EAEL;;EAEA;;EAEA;;;;;EAKA;;MAGI,YAAY;;MAEZ,QAAQ;;EAGZ;;EAEA;;EAGA,WAAW;;EAOX,YAAY,QAAQ;;EAMpB;;SAGO,OAAO,GAAG,OAAO,KAAK,OAAO,KAAK;;SAKlC,SAAS,GAAG,OAAO,KAAK,OAAO,KAAK;;SAKpC,YAAY,GAAG,OAAO,KAAK;;SAK3B,SAAS,GAAG,OAAO,KAAK;;SAKxB,UAAU,GAAG,OAAO,KAAK;;;;;;KC/DtB;;qBAGC,sBAAsB;;wBAGnB,aAAa,OAAO,aAAa,GAAG,GAAG,KAAK,IAAI,GAAG,KAAK;;UCLvD;;EAEf,YAAY;;;UAIG,0BAA0B;;;;;EAKzC;;;;;;;wBAsEc,SAAS,GAAG,OAAO,KAAK,MAAM,OAAO,KAAK,IAAI,UAAS,cAAmB,KAAK;;;;;;;;;;;wBAiB/E,KAAK,GAAG,OAAO,KAAK,MAAM,QAAO,KAAK,IAAiB,UAAS,oBAAyB,KAAK;;;;;;wBCjG9F,aAAa,SAAS,mBAAmB,eAAe;EAAe;EAAW;;;;;;;;;;;;;;wBAiClF,YAAY,GAAG,OAAO,KAAK,MAAM,OAAO,KAAK,IAAI;EAAW,YAAY;IAAmB,KAAK;;UCrC/F;;EAEf,YAAY;;;;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