f_00006c 17.4 KB
Newer Older
1
define(['dart_sdk'], (function load__packages__flutter__src__foundation__licenses_dart(dart_sdk) {
Lubber's avatar
Lubber committed
2 3 4 5
  'use strict';
  const core = dart_sdk.core;
  const _interceptors = dart_sdk._interceptors;
  const _internal = dart_sdk._internal;
6 7
  const _js_helper = dart_sdk._js_helper;
  const async = dart_sdk.async;
Lubber's avatar
Lubber committed
8 9
  const dart = dart_sdk.dart;
  const dartx = dart_sdk.dartx;
10 11 12 13 14 15
  var licenses = Object.create(dart.library);
  var $substring = dartx.substring;
  var $add = dartx.add;
  var $isNotEmpty = dartx.isNotEmpty;
  var $join = dartx.join;
  var $trimLeft = dartx.trimLeft;
Lubber's avatar
Lubber committed
16 17
  var $clear = dartx.clear;
  var $_get = dartx._get;
18
  var $truncate = dartx.truncate;
Lubber's avatar
Lubber committed
19 20
  dart._checkModuleNullSafetyMode(false);
  var T = {
21
    _LicenseEntryWithLineBreaksParserStateL: () => (T._LicenseEntryWithLineBreaksParserStateL = dart.constFn(dart.legacy(licenses._LicenseEntryWithLineBreaksParserState)))(),
Lubber's avatar
Lubber committed
22
    JSArrayOfString: () => (T.JSArrayOfString = dart.constFn(_interceptors.JSArray$(core.String)))(),
23 24 25 26 27 28 29
    VoidTovoid: () => (T.VoidTovoid = dart.constFn(dart.fnType(dart.void, [])))(),
    VoidToLicenseParagraph: () => (T.VoidToLicenseParagraph = dart.constFn(dart.fnType(licenses.LicenseParagraph, [])))(),
    SyncIterableOfLicenseParagraph: () => (T.SyncIterableOfLicenseParagraph = dart.constFn(_js_helper.SyncIterable$(licenses.LicenseParagraph)))(),
    StreamOfLicenseEntry: () => (T.StreamOfLicenseEntry = dart.constFn(async.Stream$(licenses.LicenseEntry)))(),
    VoidToStreamOfLicenseEntry: () => (T.VoidToStreamOfLicenseEntry = dart.constFn(dart.fnType(T.StreamOfLicenseEntry(), [])))(),
    JSArrayOfVoidToStreamOfLicenseEntry: () => (T.JSArrayOfVoidToStreamOfLicenseEntry = dart.constFn(_interceptors.JSArray$(T.VoidToStreamOfLicenseEntry())))(),
    _AsyncStarImplOfLicenseEntry: () => (T._AsyncStarImplOfLicenseEntry = dart.constFn(async._AsyncStarImpl$(licenses.LicenseEntry)))()
Lubber's avatar
Lubber committed
30 31 32 33 34 35 36 37 38 39 40 41 42
  };
  var T$Eval = Object.assign({
    _: () => T$Eval
  }, T);
  var S = {
    _: () => S
  };
  var S$Eval = Object.assign({
    _: () => S$Eval
  }, S);
  const CT = Object.create({
    _: () => (C, CT)
  });
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
  dart.defineLazy(CT, {
    get C0() {
      return C[0] = dart.const({
        __proto__: licenses._LicenseEntryWithLineBreaksParserState.prototype,
        [_name$]: "_LicenseEntryWithLineBreaksParserState.beforeParagraph",
        index: 0
      });
    },
    get C1() {
      return C[1] = dart.const({
        __proto__: licenses._LicenseEntryWithLineBreaksParserState.prototype,
        [_name$]: "_LicenseEntryWithLineBreaksParserState.inParagraph",
        index: 1
      });
    },
    get C2() {
      return C[2] = dart.constList([C[0] || CT.C0, C[1] || CT.C1], T._LicenseEntryWithLineBreaksParserStateL());
    }
  }, false);
  var C = Array(3).fill(void 0);
Lubber's avatar
Lubber committed
63
  var I = [
64 65
    "file:///C:/_libs/flutter/packages/flutter/lib/src/foundation/licenses.dart",
    "package:flutter/src/foundation/licenses.dart"
Lubber's avatar
Lubber committed
66
  ];
67 68 69 70 71
  var text$ = dart.privateName(licenses, "LicenseParagraph.text");
  var indent$ = dart.privateName(licenses, "LicenseParagraph.indent");
  licenses.LicenseParagraph = class LicenseParagraph extends core.Object {
    get text() {
      return this[text$];
Lubber's avatar
Lubber committed
72
    }
73 74
    set text(value) {
      super.text = value;
Lubber's avatar
Lubber committed
75
    }
76 77
    get indent() {
      return this[indent$];
Lubber's avatar
Lubber committed
78
    }
79 80
    set indent(value) {
      super.indent = value;
Lubber's avatar
Lubber committed
81 82
    }
  };
83 84 85 86 87
  (licenses.LicenseParagraph.new = function(text, indent) {
    if (text == null) dart.nullFailed(I[0], 15, 31, "text");
    if (indent == null) dart.nullFailed(I[0], 15, 42, "indent");
    this[text$] = text;
    this[indent$] = indent;
Lubber's avatar
Lubber committed
88
    ;
89 90 91 92 93 94 95 96
  }).prototype = licenses.LicenseParagraph.prototype;
  dart.addTypeTests(licenses.LicenseParagraph);
  dart.addTypeCaches(licenses.LicenseParagraph);
  dart.setLibraryUri(licenses.LicenseParagraph, I[1]);
  dart.setFieldSignature(licenses.LicenseParagraph, () => ({
    __proto__: dart.getFields(licenses.LicenseParagraph.__proto__),
    text: dart.finalFieldType(core.String),
    indent: dart.finalFieldType(core.int)
Lubber's avatar
Lubber committed
97
  }));
98 99 100
  dart.defineLazy(licenses.LicenseParagraph, {
    /*licenses.LicenseParagraph.centeredIndent*/get centeredIndent() {
      return -1;
Lubber's avatar
Lubber committed
101
    }
102 103 104 105 106 107 108 109 110 111
  }, false);
  licenses.LicenseEntry = class LicenseEntry extends core.Object {};
  (licenses.LicenseEntry.new = function() {
    ;
  }).prototype = licenses.LicenseEntry.prototype;
  dart.addTypeTests(licenses.LicenseEntry);
  dart.addTypeCaches(licenses.LicenseEntry);
  dart.setLibraryUri(licenses.LicenseEntry, I[1]);
  var _name$ = dart.privateName(licenses, "_name");
  licenses._LicenseEntryWithLineBreaksParserState = class _LicenseEntryWithLineBreaksParserState extends core.Object {
Lubber's avatar
Lubber committed
112
    toString() {
113
      return this[_name$];
Lubber's avatar
Lubber committed
114 115
    }
  };
116 117 118 119 120
  (licenses._LicenseEntryWithLineBreaksParserState.new = function(index, _name) {
    if (index == null) dart.nullFailed(I[0], 56, 6, "index");
    if (_name == null) dart.nullFailed(I[0], 56, 6, "_name");
    this.index = index;
    this[_name$] = _name;
Lubber's avatar
Lubber committed
121
    ;
122 123 124 125 126 127 128 129
  }).prototype = licenses._LicenseEntryWithLineBreaksParserState.prototype;
  dart.addTypeTests(licenses._LicenseEntryWithLineBreaksParserState);
  dart.addTypeCaches(licenses._LicenseEntryWithLineBreaksParserState);
  dart.setLibraryUri(licenses._LicenseEntryWithLineBreaksParserState, I[1]);
  dart.setFieldSignature(licenses._LicenseEntryWithLineBreaksParserState, () => ({
    __proto__: dart.getFields(licenses._LicenseEntryWithLineBreaksParserState.__proto__),
    index: dart.finalFieldType(core.int),
    [_name$]: dart.finalFieldType(core.String)
Lubber's avatar
Lubber committed
130
  }));
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
  dart.defineExtensionMethods(licenses._LicenseEntryWithLineBreaksParserState, ['toString']);
  licenses._LicenseEntryWithLineBreaksParserState.beforeParagraph = C[0] || CT.C0;
  licenses._LicenseEntryWithLineBreaksParserState.inParagraph = C[1] || CT.C1;
  licenses._LicenseEntryWithLineBreaksParserState.values = C[2] || CT.C2;
  var packages$ = dart.privateName(licenses, "LicenseEntryWithLineBreaks.packages");
  var text$0 = dart.privateName(licenses, "LicenseEntryWithLineBreaks.text");
  licenses.LicenseEntryWithLineBreaks = class LicenseEntryWithLineBreaks extends licenses.LicenseEntry {
    get packages() {
      return this[packages$];
    }
    set packages(value) {
      super.packages = value;
    }
    get text() {
      return this[text$0];
    }
    set text(value) {
      super.text = value;
    }
    get paragraphs() {
      return new (T.SyncIterableOfLicenseParagraph()).new((function* paragraphs() {
        let lineStart = 0;
        let currentPosition = 0;
        let lastLineIndent = 0;
        let currentLineIndent = 0;
        let currentParagraphIndentation = null;
        let state = licenses._LicenseEntryWithLineBreaksParserState.beforeParagraph;
        let lines = T.JSArrayOfString().of([]);
        const addLine = () => {
          if (!(lineStart < currentPosition)) dart.assertFailed(null, I[0], 152, 14, "lineStart < currentPosition");
          lines[$add](this.text[$substring](lineStart, currentPosition));
        };
        dart.fn(addLine, T.VoidTovoid());
        function getParagraph() {
          if (!dart.test(lines[$isNotEmpty])) dart.assertFailed(null, I[0], 157, 14, "lines.isNotEmpty");
          if (!(currentParagraphIndentation != null)) dart.assertFailed(null, I[0], 158, 14, "currentParagraphIndentation != null");
          let result = new licenses.LicenseParagraph.new(lines[$join](" "), dart.nullCheck(currentParagraphIndentation));
          if (!(result.text[$trimLeft]() === result.text)) dart.assertFailed(null, I[0], 160, 14, "result.text.trimLeft() == result.text");
          if (!result.text[$isNotEmpty]) dart.assertFailed(null, I[0], 161, 14, "result.text.isNotEmpty");
          lines[$clear]();
          return result;
        }
        dart.fn(getParagraph, T.VoidToLicenseParagraph());
        while (currentPosition < this.text.length) {
          switch (state) {
            case C[0] || CT.C0:
            {
              if (!(lineStart === currentPosition)) dart.assertFailed(null, I[0], 169, 18, "lineStart == currentPosition");
              let labelState = this.text[$_get](currentPosition);
              SL0:
                while (true) {
                  switch (labelState) {
                    case " ":
                    {
                      lineStart = currentPosition + 1;
                      currentLineIndent = currentLineIndent + 1;
                      state = licenses._LicenseEntryWithLineBreaksParserState.beforeParagraph;
                      break SL0;
                    }
                    case "\t":
                    {
                      lineStart = currentPosition + 1;
                      currentLineIndent = currentLineIndent + 8;
                      state = licenses._LicenseEntryWithLineBreaksParserState.beforeParagraph;
                      break SL0;
                    }
                    case "\r":
                    case "\n":
                    case "\f":
                    {
                      if (dart.test(lines[$isNotEmpty])) {
                        yield getParagraph();
                      }
                      if (this.text[$_get](currentPosition) === "\r" && currentPosition < this.text.length - 1 && this.text[$_get](currentPosition + 1) === "\n") {
                        currentPosition = currentPosition + 1;
                      }
                      lastLineIndent = 0;
                      currentLineIndent = 0;
                      currentParagraphIndentation = null;
                      lineStart = currentPosition + 1;
                      state = licenses._LicenseEntryWithLineBreaksParserState.beforeParagraph;
                      break SL0;
                    }
                    case "[":
                    {
                      currentLineIndent = currentLineIndent + 1;
                      labelState = Symbol('_default');
                      continue SL0;
                    }
                    default:
                    {
                      if (dart.test(lines[$isNotEmpty]) && currentLineIndent > lastLineIndent) {
                        yield getParagraph();
                        currentParagraphIndentation = null;
                      }
                      if (currentParagraphIndentation == null) {
                        if (currentLineIndent > 10)
                          currentParagraphIndentation = -1;
                        else
                          currentParagraphIndentation = (currentLineIndent / 3)[$truncate]();
                      }
                      state = licenses._LicenseEntryWithLineBreaksParserState.inParagraph;
                      break SL0;
                    }
                  }
                  break;
                }
              break;
            }
            case C[1] || CT.C1:
            {
              switch (this.text[$_get](currentPosition)) {
                case "\n":
                {
                  addLine();
                  lastLineIndent = currentLineIndent;
                  currentLineIndent = 0;
                  lineStart = currentPosition + 1;
                  state = licenses._LicenseEntryWithLineBreaksParserState.beforeParagraph;
                  break;
                }
                case "\f":
                {
                  addLine();
                  yield getParagraph();
                  lastLineIndent = 0;
                  currentLineIndent = 0;
                  currentParagraphIndentation = null;
                  lineStart = currentPosition + 1;
                  state = licenses._LicenseEntryWithLineBreaksParserState.beforeParagraph;
                  break;
                }
                default:
                {
                  state = licenses._LicenseEntryWithLineBreaksParserState.inParagraph;
                }
              }
              break;
            }
            default:
            {
              dart.throw(new _internal.ReachabilityError.new("`null` encountered as case in a switch expression with a non-nullable enum type."));
            }
          }
          currentPosition = currentPosition + 1;
        }
        switch (state) {
          case C[0] || CT.C0:
          {
            if (dart.test(lines[$isNotEmpty])) {
              yield getParagraph();
            }
            break;
          }
          case C[1] || CT.C1:
          {
            addLine();
            yield getParagraph();
            break;
          }
          default:
          {
            dart.throw(new _internal.ReachabilityError.new("`null` encountered as case in a switch expression with a non-nullable enum type."));
          }
        }
      }).bind(this));
Lubber's avatar
Lubber committed
297 298
    }
  };
299 300 301 302 303 304
  (licenses.LicenseEntryWithLineBreaks.new = function(packages, text) {
    if (packages == null) dart.nullFailed(I[0], 121, 41, "packages");
    if (text == null) dart.nullFailed(I[0], 121, 56, "text");
    this[packages$] = packages;
    this[text$0] = text;
    licenses.LicenseEntryWithLineBreaks.__proto__.new.call(this);
Lubber's avatar
Lubber committed
305
    ;
306 307 308 309 310 311
  }).prototype = licenses.LicenseEntryWithLineBreaks.prototype;
  dart.addTypeTests(licenses.LicenseEntryWithLineBreaks);
  dart.addTypeCaches(licenses.LicenseEntryWithLineBreaks);
  dart.setGetterSignature(licenses.LicenseEntryWithLineBreaks, () => ({
    __proto__: dart.getGetters(licenses.LicenseEntryWithLineBreaks.__proto__),
    paragraphs: core.Iterable$(licenses.LicenseParagraph)
Lubber's avatar
Lubber committed
312
  }));
313 314 315 316 317
  dart.setLibraryUri(licenses.LicenseEntryWithLineBreaks, I[1]);
  dart.setFieldSignature(licenses.LicenseEntryWithLineBreaks, () => ({
    __proto__: dart.getFields(licenses.LicenseEntryWithLineBreaks.__proto__),
    packages: dart.finalFieldType(core.List$(core.String)),
    text: dart.finalFieldType(core.String)
Lubber's avatar
Lubber committed
318
  }));
319 320 321 322 323 324 325 326 327 328 329 330 331 332
  licenses.LicenseRegistry = class LicenseRegistry extends core.Object {
    static addLicense(collector) {
      if (collector == null) dart.nullFailed(I[0], 303, 48, "collector");
      licenses.LicenseRegistry._collectors == null ? licenses.LicenseRegistry._collectors = T.JSArrayOfVoidToStreamOfLicenseEntry().of([]) : null;
      dart.nullCheck(licenses.LicenseRegistry._collectors)[$add](collector);
    }
    static get licenses() {
      return new (T._AsyncStarImplOfLicenseEntry()).new(function* licenses$(stream) {
        if (licenses.LicenseRegistry._collectors == null) return;
        for (let collector of dart.nullCheck(licenses.LicenseRegistry._collectors)) {
          if (stream.addStream(collector())) return;
          yield;
        }
      }).stream;
Lubber's avatar
Lubber committed
333
    }
334 335
    static reset() {
      licenses.LicenseRegistry._collectors = null;
Lubber's avatar
Lubber committed
336 337
    }
  };
338
  (licenses.LicenseRegistry.__ = function() {
Lubber's avatar
Lubber committed
339
    ;
340 341 342 343 344 345 346
  }).prototype = licenses.LicenseRegistry.prototype;
  dart.addTypeTests(licenses.LicenseRegistry);
  dart.addTypeCaches(licenses.LicenseRegistry);
  dart.setLibraryUri(licenses.LicenseRegistry, I[1]);
  dart.defineLazy(licenses.LicenseRegistry, {
    /*licenses.LicenseRegistry._collectors*/get _collectors() {
      return null;
Lubber's avatar
Lubber committed
347
    },
348
    set _collectors(_) {}
Lubber's avatar
Lubber committed
349
  }, false);
350 351
  dart.trackLibraries("packages/flutter/src/foundation/licenses.dart", {
    "package:flutter/src/foundation/licenses.dart": licenses
Lubber's avatar
Lubber committed
352
  }, {
353
  }, '{"version":3,"sourceRoot":"","sources":["licenses.dart"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiBe;;;;;;IAYH;;;;;;;4CAfkB,MAAW;QAAX;QAAW;IAAX;IAAW;;EAAO;;;;;;;;;;MAkB7B,wCAAc;;;;;;;EAYX;;;;;;;;IActB;;;QAHK;;;;;EAGL;;;;;;;;;;;;;;;;IAiEqB;;;;;;IAeN;;;;;;;AAG6B;AACpC,wBAAY;AACZ,8BAAkB;AAClB,6BAAiB;AACjB,gCAAoB;AACnB;AACkC,oBAA+C;AACnE,oBAAgB;AAEnC,cAAK;AACH,gBAAO,AAAU,SAAD,GAAG,eAAe;AACmB,UAArD,AAAM,KAAD,OAAK,AAAK,sBAAU,SAAS,EAAE,eAAe;;;AAGrD,iBAAiB;AACf,yBAAO,AAAM,KAAD;AACZ,gBAAO,AAA4B,2BAAD;AACX,uBAAS,kCAAiB,AAAM,KAAD,QAAM,MAAiC,eAA3B,2BAA2B;AAC7F,gBAAO,AAAO,AAAK,AAAW,MAAjB,uBAAoB,AAAO,MAAD;AACvC,eAAO,AAAO,AAAK,MAAN;AACA,UAAb,AAAM,KAAD;AACL,gBAAO,OA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/C;;;;AAES,kBAAT,OAAO;AACP,wBAAM,YAAY;AACA,kBAAlB,iBAAiB;AACI,kBAArB,oBAAoB;AACc,kBAAlC,8BAA8B;AACC,kBAA/B,YAAY,AAAgB,eAAD,GAAG;AACgC,kBAA9D,QAA+C;AAC/C;;;;AAE0D,kBAA1D,QAA+C;;;AAEnD;;;;AA7EJ;;;AA+EoB,UAApB,kBAAA,AAAgB,eAAD,GAAI;;AAErB,gBAAQ,KAAK;;;AAET,0BAAI,AAAM,KAAD;AACP,oBAAM,YAAY;;AAEpB;;;;AAES,YAAT,OAAO;AACP,kBAAM,YAAY;AAClB;;;;AATJ;;;MAWF;;;sDA1IsC,UAAe;QAAf;QAAe;IAAf;IAAe;AAA/C;;EAAoD;;;;;;;;;;;;;;;UAsLb;AACF,MAAzC,AAAY,+CAAA,uCAA2B,iDAA3B;AACe,MAAhB,AAAE,eAAb,4CAAiB,SAAS;IAC5B;;AAKyC;AACvC,YAAI,AAAY,8CACd;AACF,iBAAiC,YAAwB,gBAAX,uCAC5C;+BAAO,AAAS,SAAA;UAAhB;;MACJ;;;AAMoB,MAAlB,uCAAc;IAChB;;;;EA/BmB;;;;;MAEiB,oCAAW","file":"../../../../../../../packages/flutter/src/foundation/licenses.dart.lib.js"}');
Lubber's avatar
Lubber committed
354 355
  // Exports:
  return {
356
    src__foundation__licenses: licenses
Lubber's avatar
Lubber committed
357 358 359
  };
}));

360
//# sourceMappingURL=licenses.dart.lib.js.map