@nstudio/nativescript-compiler 9.2.0-alpha.17 → 9.2.0-alpha.19

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.
Files changed (207) hide show
  1. package/README.md +3 -0
  2. package/config.js +1 -0
  3. package/dist/kotlin/access.js +8 -7
  4. package/dist/kotlin/arguments.js +6 -0
  5. package/dist/kotlin/assignment.js +22 -13
  6. package/dist/kotlin/builtins.js +67 -0
  7. package/dist/kotlin/calls.js +3 -2
  8. package/dist/kotlin/class-declaration.js +4 -9
  9. package/dist/kotlin/class-methods.js +2 -2
  10. package/dist/kotlin/core-api.js +1 -1
  11. package/dist/kotlin/declarations.js +1 -1
  12. package/dist/kotlin/expression-statements.js +13 -1
  13. package/dist/kotlin/functions.js +1 -0
  14. package/dist/kotlin/literals.js +4 -8
  15. package/dist/kotlin/names.js +4 -4
  16. package/dist/kotlin/native/api.js +1 -1
  17. package/dist/kotlin/operators.js +25 -25
  18. package/dist/kotlin/optional-chains.js +1 -1
  19. package/dist/kotlin/overrides.js +3 -3
  20. package/dist/kotlin/state-backend.js +6 -2
  21. package/dist/kotlin/translator.js +1 -1
  22. package/dist/kotlin/types.js +4 -4
  23. package/dist/semantics/classes.js +15 -0
  24. package/dist/semantics/conversion.js +9 -1
  25. package/dist/semantics/facts.js +1 -1
  26. package/dist/semantics/lang.js +10 -0
  27. package/dist/semantics/lower.js +54 -0
  28. package/dist/semantics/lowering-methods.js +5 -0
  29. package/dist/semantics/placement.js +9 -3
  30. package/dist/semantics/runtime.js +1 -0
  31. package/dist/semantics/signals.js +11 -0
  32. package/dist/semantics/states/missing.js +7 -0
  33. package/dist/semantics/tdz.js +54 -15
  34. package/dist/semantics/throws.js +2 -2
  35. package/dist/semantics/translator-methods.js +1 -1
  36. package/dist/swift/access.js +7 -9
  37. package/dist/swift/arguments.js +14 -9
  38. package/dist/swift/assignment.js +26 -15
  39. package/dist/swift/calls.js +13 -5
  40. package/dist/swift/class-methods.js +2 -1
  41. package/dist/swift/classes.js +7 -9
  42. package/dist/swift/components.js +3 -3
  43. package/dist/swift/control-flow.js +1 -1
  44. package/dist/swift/conversion.js +5 -2
  45. package/dist/swift/core-api.js +2 -2
  46. package/dist/swift/declarations.js +1 -1
  47. package/dist/swift/expressions.js +6 -2
  48. package/dist/swift/from-any.js +1 -1
  49. package/dist/swift/functions.js +5 -6
  50. package/dist/swift/global-calls.js +1 -1
  51. package/dist/swift/lenient.js +1 -6
  52. package/dist/swift/library.js +2 -2
  53. package/dist/swift/literals.js +8 -3
  54. package/dist/swift/method-values.js +2 -1
  55. package/dist/swift/modules.js +3 -3
  56. package/dist/swift/names.js +7 -7
  57. package/dist/swift/native/calls.js +10 -4
  58. package/dist/swift/object-classes.js +84 -1
  59. package/dist/swift/operators.js +31 -29
  60. package/dist/swift/placement.js +22 -6
  61. package/dist/swift/state-backend.js +3 -2
  62. package/dist/swift/static-calls.js +3 -4
  63. package/dist/swift/syntax.js +10 -6
  64. package/dist/swift/translator.js +1 -1
  65. package/dist/swift/type-facts.js +3 -3
  66. package/dist/swift/types.js +5 -5
  67. package/dist/targets/ios/build.js +1 -1
  68. package/kit-android/generated/kotlin/org/nativescript/kit/__Modules.kt +1 -0
  69. package/kit-android/generated/kotlin/org/nativescript/kit/__Objects.kt +525 -99
  70. package/kit-android/generated/kotlin/org/nativescript/kit/accessibility_accessibility_common.kt +2 -2
  71. package/kit-android/generated/kotlin/org/nativescript/kit/application_application_common.kt +29 -6
  72. package/kit-android/generated/kotlin/org/nativescript/kit/application_helpers_common.kt +14 -0
  73. package/kit-android/generated/kotlin/org/nativescript/kit/color_color_utils.kt +3 -3
  74. package/kit-android/generated/kotlin/org/nativescript/kit/css_mediaquery_index.kt +49 -1
  75. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_array_index.kt +0 -8
  76. package/kit-android/generated/kotlin/org/nativescript/kit/data_observable_index.kt +0 -16
  77. package/kit-android/generated/kotlin/org/nativescript/kit/data_virtual_array_index.kt +6 -4
  78. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_index.kt +19 -7
  79. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_http_request_internal_common.kt +14 -0
  80. package/kit-android/generated/kotlin/org/nativescript/kit/http_http_request_internal_index.kt +19 -10
  81. package/kit-android/generated/kotlin/org/nativescript/kit/matrix_index.kt +17 -29
  82. package/kit-android/generated/kotlin/org/nativescript/kit/media_query_list_index.kt +144 -22
  83. package/kit-android/generated/kotlin/org/nativescript/kit/npm_css_what_src_parse.kt +8 -3
  84. package/kit-android/generated/kotlin/org/nativescript/kit/org.nativescript.NativeScriptLifecycleCallbacks.kt +2 -10
  85. package/kit-android/generated/kotlin/org/nativescript/kit/ui_builder_index.kt +0 -2
  86. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_bindable_expression_parser.kt +6 -10
  87. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_properties_index.kt +531 -8
  88. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_view_base_index.kt +0 -9
  89. package/kit-android/generated/kotlin/org/nativescript/kit/ui_core_weak_event_listener_index.kt +3 -3
  90. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_index.kt +19 -0
  91. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_properties.kt +5 -2
  92. package/kit-android/generated/kotlin/org/nativescript/kit/ui_styling_style_scope.kt +232 -174
  93. package/kit-android/generated/kotlin/org/nativescript/kit/ui_text_view_text_view_common.kt +1 -1
  94. package/kit-android/generated/kotlin/org/nativescript/kit/utils_android_runtime_version.kt +75 -0
  95. package/kit-android/generated/manifest.json +21 -18
  96. package/kit-android/generated/source-lines.json +1 -1
  97. package/kit-android/src/fromcore/kotlin/org/nativescript/kit/NativeScriptApplication.kt +9 -0
  98. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Array.kt +497 -42
  99. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Intl.kt +1 -1
  100. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/JSON.kt +22 -2
  101. package/kit-android/src/main/kotlin/org/nativescript/kit/runtime/Strings.kt +32 -18
  102. package/kit-apple/Overlays/xml-free/Core/ui.builder.index.swift +7 -3
  103. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity1.swift +14 -10
  104. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity2.swift +3 -9
  105. package/kit-apple/Sources/NativeScriptKit/Core/FunctionCells.Arity3Plus.swift +20 -21
  106. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_index_section_view_ios_android.swift +5 -7
  107. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_ios_android_.swift +130 -0
  108. package/kit-apple/Sources/NativeScriptKit/Core/Object_eventName_object_oldIndex_newIndex.swift +2 -4
  109. package/kit-apple/Sources/NativeScriptKit/Core/Object_specified_substituted_reads.swift +115 -0
  110. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads.swift +113 -0
  111. package/kit-apple/Sources/NativeScriptKit/Core/Object_substituted_values_reads_.swift +113 -0
  112. package/kit-apple/Sources/NativeScriptKit/Core/application.application-common.swift +348 -330
  113. package/kit-apple/Sources/NativeScriptKit/Core/application.application.ios.swift +358 -359
  114. package/kit-apple/Sources/NativeScriptKit/Core/application.helpers-common.swift +47 -29
  115. package/kit-apple/Sources/NativeScriptKit/Core/connectivity.index.ios.swift +3 -1
  116. package/kit-apple/Sources/NativeScriptKit/Core/css-mediaquery.index.swift +95 -53
  117. package/kit-apple/Sources/NativeScriptKit/Core/css.CSS3Parser.swift +1 -1
  118. package/kit-apple/Sources/NativeScriptKit/Core/css.parser.swift +1 -1
  119. package/kit-apple/Sources/NativeScriptKit/Core/data.observable-array.index.swift +3 -3
  120. package/kit-apple/Sources/NativeScriptKit/Core/file-system.file-system-access.ios.swift +58 -49
  121. package/kit-apple/Sources/NativeScriptKit/Core/file-system.index.swift +10 -10
  122. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.http-request-internal-common.swift +18 -0
  123. package/kit-apple/Sources/NativeScriptKit/Core/http.http-request-internal.index.ios.swift +67 -52
  124. package/kit-apple/Sources/NativeScriptKit/Core/http.index.swift +3 -3
  125. package/kit-apple/Sources/NativeScriptKit/Core/image-source.index.ios.swift +69 -53
  126. package/kit-apple/Sources/NativeScriptKit/Core/js-libs.easysax.easysax.swift +4 -22
  127. package/kit-apple/Sources/NativeScriptKit/Core/kit-index.json +144 -32
  128. package/kit-apple/Sources/NativeScriptKit/Core/manifest.json +30 -19
  129. package/kit-apple/Sources/NativeScriptKit/Core/media-query-list.index.swift +190 -78
  130. package/kit-apple/Sources/NativeScriptKit/Core/native-window.native-window.ios.swift +1 -1
  131. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.parse.swift +205 -201
  132. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.stringify.swift +41 -42
  133. package/kit-apple/Sources/NativeScriptKit/Core/npm.css-what.src.types.swift +1 -1
  134. package/kit-apple/Sources/NativeScriptKit/Core/trace.index.swift +2 -2
  135. package/kit-apple/Sources/NativeScriptKit/Core/ui.action-bar.index.ios.swift +33 -21
  136. package/kit-apple/Sources/NativeScriptKit/Core/ui.activity-indicator.index.ios.swift +12 -6
  137. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.index.ios.swift +77 -65
  138. package/kit-apple/Sources/NativeScriptKit/Core/ui.animation.keyframe-animation.swift +1 -1
  139. package/kit-apple/Sources/NativeScriptKit/Core/ui.builder.index.swift +10 -6
  140. package/kit-apple/Sources/NativeScriptKit/Core/ui.button.index.ios.swift +14 -13
  141. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.properties.index.swift +1273 -824
  142. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view-base.index.swift +2 -2
  143. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.index.ios.swift +87 -67
  144. package/kit-apple/Sources/NativeScriptKit/Core/ui.core.view.view-common.swift +1 -1
  145. package/kit-apple/Sources/NativeScriptKit/Core/ui.date-picker.index.ios.swift +17 -16
  146. package/kit-apple/Sources/NativeScriptKit/Core/ui.dialogs.index.ios.swift +2 -2
  147. package/kit-apple/Sources/NativeScriptKit/Core/ui.editable-text-base.index.ios.swift +27 -18
  148. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.frame-common.swift +2 -1
  149. package/kit-apple/Sources/NativeScriptKit/Core/ui.frame.index.ios.swift +6 -6
  150. package/kit-apple/Sources/NativeScriptKit/Core/ui.html-view.index.ios.swift +9 -9
  151. package/kit-apple/Sources/NativeScriptKit/Core/ui.image.index.ios.swift +6 -6
  152. package/kit-apple/Sources/NativeScriptKit/Core/ui.label.index.ios.swift +8 -8
  153. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.flexbox-layout.index.ios.swift +22 -21
  154. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.layout-base.ios.swift +4 -3
  155. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass-container.index.ios.swift +1 -1
  156. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.liquid-glass.index.ios.swift +1 -1
  157. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.index.ios.swift +2 -2
  158. package/kit-apple/Sources/NativeScriptKit/Core/ui.layouts.root-layout.root-layout-common.swift +9 -9
  159. package/kit-apple/Sources/NativeScriptKit/Core/ui.list-picker.index.ios.swift +9 -6
  160. package/kit-apple/Sources/NativeScriptKit/Core/ui.list-view.index.ios.swift +38 -20
  161. package/kit-apple/Sources/NativeScriptKit/Core/ui.page.index.ios.swift +204 -190
  162. package/kit-apple/Sources/NativeScriptKit/Core/ui.progress.index.ios.swift +12 -10
  163. package/kit-apple/Sources/NativeScriptKit/Core/ui.repeater.index.swift +2 -6
  164. package/kit-apple/Sources/NativeScriptKit/Core/ui.scroll-view.index.ios.swift +18 -9
  165. package/kit-apple/Sources/NativeScriptKit/Core/ui.search-bar.index.ios.swift +28 -18
  166. package/kit-apple/Sources/NativeScriptKit/Core/ui.segmented-bar.index.ios.swift +19 -12
  167. package/kit-apple/Sources/NativeScriptKit/Core/ui.slider.index.ios.swift +14 -12
  168. package/kit-apple/Sources/NativeScriptKit/Core/ui.split-view.index.ios.swift +17 -12
  169. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.background.ios.swift +2 -2
  170. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.clip-path-function.swift +1 -1
  171. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-animation-parser.swift +1 -1
  172. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.css-selector.swift +2 -2
  173. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.font-common.swift +2 -2
  174. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style-scope.swift +869 -838
  175. package/kit-apple/Sources/NativeScriptKit/Core/ui.styling.style.index.swift +46 -31
  176. package/kit-apple/Sources/NativeScriptKit/Core/ui.switch.index.ios.swift +12 -10
  177. package/kit-apple/Sources/NativeScriptKit/Core/ui.tab-view.index.ios.swift +36 -20
  178. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.formatted-string.swift +3 -4
  179. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.index.ios.swift +25 -22
  180. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-base.text-base-common.swift +2 -3
  181. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-field.index.ios.swift +21 -14
  182. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.index.ios.swift +33 -21
  183. package/kit-apple/Sources/NativeScriptKit/Core/ui.text-view.text-view-common.swift +1 -1
  184. package/kit-apple/Sources/NativeScriptKit/Core/ui.time-picker.index.ios.swift +22 -18
  185. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.index.ios.swift +2 -2
  186. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.modal-transition.ios.swift +4 -4
  187. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.page-transition.ios.swift +2 -2
  188. package/kit-apple/Sources/NativeScriptKit/Core/ui.transition.shared-transition-helper.ios.swift +32 -32
  189. package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.index.ios.swift +1 -1
  190. package/kit-apple/Sources/NativeScriptKit/Core/ui.web-view.web-view-common.swift +2 -2
  191. package/kit-apple/Sources/NativeScriptKit/Core/utils.android-runtime-version.swift +77 -0
  192. package/kit-apple/Sources/NativeScriptKit/Core/utils.debug-source.swift +2 -2
  193. package/kit-apple/Sources/NativeScriptKit/Core/utils.index.ios.swift +2 -2
  194. package/kit-apple/Sources/NativeScriptKit/Core/xhr.index.swift +62 -61
  195. package/kit-apple/Sources/NativeScriptKit/Runtime/Array.swift +4 -0
  196. package/kit-apple/Sources/NativeScriptKit/Runtime/Dynamic.swift +2 -0
  197. package/kit-apple/Sources/NativeScriptKit/Runtime/Interop.swift +1 -1
  198. package/kit-apple/Sources/NativeScriptKit/Runtime/Intl.swift +1 -1
  199. package/kit-apple/Sources/NativeScriptKit/Runtime/Iterators.swift +1 -1
  200. package/kit-apple/Sources/NativeScriptKit/Runtime/JSON.swift +280 -9
  201. package/kit-apple/Sources/NativeScriptKit/Runtime/Lowering.swift +3 -2
  202. package/kit-apple/Sources/NativeScriptKit/Runtime/Native.swift +2 -1
  203. package/kit-apple/Sources/NativeScriptKit/Runtime/Prototypes.swift +1 -0
  204. package/kit-apple/Sources/NativeScriptKit/Runtime/Symbol.swift +1 -0
  205. package/kit-apple/Sources/NativeScriptKit/Runtime/Values.swift +1 -0
  206. package/kit-apple/Sources/NativeScriptKit/Runtime/Views.swift +2 -0
  207. package/package.json +6 -4
@@ -28,22 +28,22 @@ open class CSSSource: JSDynamic, JSStringConvertible, JSExpando, JSStaticKeyed {
28
28
  self._url = _url
29
29
  self._file = _file
30
30
  self._source = _source
31
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:289)
31
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:243)
32
32
  try self.parse()
33
33
  }
34
34
  #sourceLocation()
35
35
  open var selectors: JSArray<RuleSet>? {
36
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:386)
36
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:340)
37
37
  return self._selectors
38
38
  }
39
39
  #sourceLocation()
40
40
  open var keyframes: JSArray<Any?>? {
41
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:390)
41
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:344)
42
42
  return self._keyframes
43
43
  }
44
44
  #sourceLocation()
45
45
  open var source: String {
46
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:394)
46
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:348)
47
47
  return self._source
48
48
  }
49
49
  #sourceLocation()
@@ -57,246 +57,246 @@ open class CSSSource: JSDynamic, JSStringConvertible, JSExpando, JSStaticKeyed {
57
57
  open func jsDeleteOwn(_ key: String) -> Bool { jsExpando?.delete(key) ?? true }
58
58
  open class func fromDetect(_ cssOrAst: Any?, _ fileName: String? = nil) throws -> CSSSource? {
59
59
  var cssOrAst = cssOrAst
60
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:293)
60
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:247)
61
61
  if jsStringEquals(jsTypeof(cssOrAst), "string") {
62
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:295)
62
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:249)
63
63
  return try CSSSource.fromSource(jsLenientString(cssOrAst), fileName)
64
64
  } else if jsStringEquals(jsTypeof(cssOrAst), "object") {
65
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:297)
65
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:251)
66
66
  if try jsTruthy(jsGet(cssOrAst, "default")) {
67
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:298)
67
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:252)
68
68
  cssOrAst = try jsGet(cssOrAst, "default")
69
69
  }
70
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:301)
70
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:255)
71
71
  if try
72
72
  ((jsStrictEquals(jsGet(cssOrAst, "type"), "stylesheet") && jsTruthy(jsGet(cssOrAst, "stylesheet")))
73
73
  && jsTruthy(jsGet(jsGet(cssOrAst, "stylesheet"), "rules")))
74
74
  {
75
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:303)
75
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:257)
76
76
  return try CSSSource.fromAST(cssOrAst, fileName)
77
77
  }
78
78
  }
79
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:308)
79
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:262)
80
80
  return try CSSSource.fromSource(jsConvertedString(jsCallMethod(cssOrAst, "toString")), fileName)
81
81
  }
82
82
  #sourceLocation()
83
83
  open class func fromURI(_ uri: String) throws -> CSSSource? {
84
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:313)
84
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:267)
85
85
  let appRelativeUri: String = try CSSSource.pathRelativeToApp(uri)
86
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:314)
86
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:268)
87
87
  let sanitizedModuleName: String = try Core_utils_common.sanitizeModuleName(appRelativeUri)
88
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:315)
88
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:269)
89
89
  let resolvedModuleName: String? = try Core_module_name_resolver_index.resolveModuleName(
90
90
  sanitizedModuleName, "css")
91
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:317)
91
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:271)
92
92
  do {
93
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:318)
93
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:272)
94
94
  let cssOrAst: Any? = try jsCallMethod(jsGlobalThis, "loadModule", (resolvedModuleName as Any?), true)
95
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:319)
95
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:273)
96
96
  if jsTruthy(cssOrAst) {
97
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:320)
97
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:274)
98
98
  return try CSSSource.fromDetect(cssOrAst, resolvedModuleName)
99
99
  }
100
100
  } catch {
101
101
  #sourceLocation()
102
102
  let e: Any? = jsCaught(error)
103
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:323)
103
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:277)
104
104
  if NativeScriptKit.Trace.isEnabled() {
105
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:324)
105
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:278)
106
106
  try NativeScriptKit.Trace.write(
107
107
  "Could not load CSS from \(uri): \(jsToStringThrowing(e))", NativeScriptKit.Trace.categories.Error,
108
108
  NativeScriptKit.Trace.messageType.warn)
109
109
  }
110
110
  }
111
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:328)
111
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:282)
112
112
  return try CSSSource.fromFile(appRelativeUri)
113
113
  }
114
114
  #sourceLocation()
115
115
  open class func pathRelativeToApp(_ uri: String) throws -> String {
116
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:332)
116
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:286)
117
117
  if !(jsStartsWith(uri, "/", nil)) {
118
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:333)
118
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:287)
119
119
  return uri
120
120
  }
121
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:336)
121
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:290)
122
122
  let appPath: String = try jsUnwrap(NativeScriptKit.knownFolders.currentApp(), "path").path
123
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:337)
123
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:291)
124
124
  if !jsStartsWith(uri, appPath, nil) {
125
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:338)
125
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:292)
126
126
  try NativeScriptKit.Trace.write(
127
127
  "\(uri) does not start with \(appPath)", NativeScriptKit.Trace.categories.Error,
128
128
  NativeScriptKit.Trace.messageType.error)
129
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:340)
129
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:294)
130
130
  return uri
131
131
  }
132
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:343)
132
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:297)
133
133
  let relativeUri: String = ".\(jsSubstring(uri, Double(appPath.utf16.count), nil))"
134
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:345)
134
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:299)
135
135
  return relativeUri
136
136
  }
137
137
  #sourceLocation()
138
138
  open class func fromFile(_ url: String) throws -> CSSSource? {
139
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:350)
139
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:304)
140
140
  let cssFileUrl: String = jsReplace(url, jsRegExpLiteral("\\..\\w+$", ""), ".css")
141
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:351)
141
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:305)
142
142
  if !jsStringEquals(cssFileUrl, url) {
143
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:352)
143
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:306)
144
144
  let cssFile: String = try CSSSource.resolveCSSPathFromURL(cssFileUrl)
145
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:353)
145
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:307)
146
146
  if jsTruthy(cssFile) {
147
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:354)
147
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:308)
148
148
  return try CSSSource(nil, url, cssFile, "")
149
149
  }
150
150
  }
151
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:358)
151
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:312)
152
152
  let file: String = try CSSSource.resolveCSSPathFromURL(url)
153
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:360)
153
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:314)
154
154
  return try CSSSource(nil, url, file, "")
155
155
  }
156
156
  #sourceLocation()
157
157
  open class func fromFileImport(_ url: String, _ importSource: String) throws -> CSSSource? {
158
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:364)
158
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:318)
159
159
  let file: String = try CSSSource.resolveCSSPathFromURL(url, importSource)
160
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:366)
160
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:320)
161
161
  return try CSSSource(nil, url, file, "")
162
162
  }
163
163
  #sourceLocation()
164
164
  open class func resolveCSSPathFromURL(_ url: String, _ importSource: String? = nil) throws -> String {
165
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:371)
165
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:325)
166
166
  let app: String = try jsUnwrap(NativeScriptKit.knownFolders.currentApp(), "path").path
167
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:372)
167
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:326)
168
168
  let file: String? = try Core_ui_styling_style_scope.resolveFileNameFromUrl(
169
169
  url, app, FunctionCell_String_to_Bool.declared("File.exists", File.exists), importSource)
170
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:374)
170
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:328)
171
171
  return (file ?? "undefined")
172
172
  }
173
173
  #sourceLocation()
174
174
  open class func fromSource(_ source: String, _ url: String? = nil) throws -> CSSSource? {
175
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:378)
175
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:332)
176
176
  return try CSSSource(nil, (url ?? "undefined"), "", source)
177
177
  }
178
178
  #sourceLocation()
179
179
  open class func fromAST(_ ast: Any?, _ url: String? = nil) throws -> CSSSource? {
180
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:382)
180
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:336)
181
181
  return try CSSSource(ast, (url ?? "undefined"), "", "")
182
182
  }
183
183
  #sourceLocation()
184
184
  open func load() throws {
185
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:399)
185
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:353)
186
186
  let file: File? = try File.fromPath(self._file)
187
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:400)
187
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:354)
188
188
  self._source = try jsUnwrap(file, "readTextSync").readTextSync()
189
189
  }
190
190
  #sourceLocation()
191
191
  open func parse() throws {
192
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:405)
192
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:359)
193
193
  do {
194
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:406)
194
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:360)
195
195
  if !jsTruthy(self._ast) {
196
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:407)
196
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:361)
197
197
  if !jsTruthy(self._source) && jsTruthy(self._file) {
198
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:408)
198
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:362)
199
199
  try self.load()
200
200
  }
201
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:411)
201
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:365)
202
202
  if jsTruthy(self._source) && !jsStringEquals(self.source, "[object Object]") {
203
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:412)
203
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:366)
204
204
  try self.parseCSSAst()
205
205
  }
206
206
  }
207
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:415)
207
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:369)
208
208
  if jsTruthy(self._ast) {
209
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:416)
209
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:370)
210
210
  try self.createSelectorsAndKeyframes()
211
211
  } else {
212
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:418)
212
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:372)
213
213
  self._selectors = JSArray<RuleSet>()
214
214
  }
215
215
  } catch {
216
216
  #sourceLocation()
217
217
  let e: Any? = jsCaught(error)
218
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:421)
218
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:375)
219
219
  if NativeScriptKit.Trace.isEnabled() {
220
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:422)
220
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:376)
221
221
  try NativeScriptKit.Trace.write(
222
222
  "Css styling failed: " + jsToStringDefaultThrowing(e), NativeScriptKit.Trace.categories.Style,
223
223
  NativeScriptKit.Trace.messageType.error)
224
224
  }
225
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:424)
225
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:378)
226
226
  self._selectors = JSArray<RuleSet>()
227
227
  }
228
228
  }
229
229
  #sourceLocation()
230
230
  open func parseCSSAst() throws {
231
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:430)
231
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:384)
232
232
  if jsTruthy(self._source) {
233
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:433)
233
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:387)
234
234
  do {
235
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:434)
235
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:388)
236
236
  let cssparser: CSS3Parser = CSS3Parser(self._source)
237
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:435)
237
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:389)
238
238
  let stylesheet: Any? = try cssparser.parseAStylesheet()
239
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:436)
239
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:390)
240
240
  let cssNS: CSSNativeScript = CSSNativeScript()
241
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:437)
241
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:391)
242
242
  self._ast = try cssNS.parseStylesheet(stylesheet)
243
243
  }
244
244
  }
245
245
  }
246
246
  #sourceLocation()
247
247
  open func createSelectorsAndKeyframes() throws {
248
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:446)
248
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:400)
249
249
  if jsTruthy(self._ast) {
250
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:447)
250
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:401)
251
251
  let nodes: Any? = try jsGet(jsGet(self._ast, "stylesheet"), "rules")
252
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:449)
252
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:403)
253
253
  let rulesets: JSArray<RuleSet> = JSArray<RuleSet>()
254
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:450)
254
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:404)
255
255
  let keyframes: JSArray<Any?> = JSArray<Any?>()
256
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:453)
256
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:407)
257
257
  try Core_ui_styling_style_scope.populateRulesFromImports(
258
258
  jsArrayOrNil(nodes, as: JSArray<Any?>.self, { $0 }), rulesets, keyframes)
259
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:454)
259
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:408)
260
260
  try Core_ui_styling_style_scope._populateRules(
261
261
  jsArrayOrNil(nodes, as: JSArray<Any?>.self, { $0 }), rulesets, keyframes)
262
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:456)
262
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:410)
263
263
  if jsTruthy(rulesets) && jsTruthy(rulesets.length) {
264
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:457)
264
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:411)
265
265
  try rulesets.forEach({ (rule: RuleSet?) throws -> Void in
266
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:458)
266
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:412)
267
267
  try jsUnwrap(rule, setting: "animationsSymbol")[
268
268
  jsKey: Core_ui_styling_style_scope.animationsSymbol.key] =
269
269
  (CssAnimationParser.keyframeAnimationsFromCSSDeclarations(
270
270
  try jsArrayFrom(jsUnwrap(rule, "declarations").declarations) {
271
271
  try jsObjectRequired(jsShaped($0) { NativeScriptKit.KeyframeDeclaration() })
272
272
  }) as Any?)
273
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:459)
273
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:413)
274
274
  if try
275
275
  (jsTruthy(
276
276
  jsUnwrap(rule, "animationsSymbol")[jsKey: Core_ui_styling_style_scope.animationsSymbol.key])
277
277
  && jsUnwrap(jsUnwrap(rule, "declarations").declarations, "some").some({
278
278
  (declaration: Any?) throws -> Bool in
279
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:459)
279
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:413)
280
280
  return try Core_ui_styling_style_scope.isAnimationDeclaration(declaration)
281
281
  && Core_ui_core_properties_index.isCssVariableExpression(
282
282
  jsConvertedString(jsGet(declaration, "value")))
283
283
  }))
284
284
  {
285
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:460)
285
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:414)
286
286
  try jsUnwrap(rule, setting: "animationVariablesSymbol")[
287
287
  jsKey: Core_ui_styling_style_scope.animationVariablesSymbol.key] = true
288
288
  }
289
289
  })
290
290
  }
291
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:465)
291
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:419)
292
292
  self._selectors = rulesets
293
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:466)
293
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:420)
294
294
  self._keyframes = keyframes
295
295
  }
296
296
  }
297
297
  #sourceLocation()
298
298
  open func toString() -> String {
299
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:471)
299
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:425)
300
300
  return
301
301
  ({ () -> String in
302
302
  let __v_10 =
@@ -485,10 +485,10 @@ open class CssState: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JSSt
485
485
  }
486
486
  public init(_ viewRef: JSWeakRef<ViewBase>?) {
487
487
  self.viewRef = viewRef
488
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:786)
488
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:746)
489
489
  self._onDynamicStateChangeHandler = { [weak self] () throws -> Void in
490
490
  guard let self else { return }
491
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:786)
491
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:746)
492
492
  try self.updateDynamicState()
493
493
  }
494
494
  if jsMadeBits0 & (1 << 0) == 0 { jsMadeNote(&jsMadeBits0, &jsMade, 1 << 0, "_onDynamicStateChangeHandler") }
@@ -505,44 +505,44 @@ open class CssState: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JSSt
505
505
  /// Called when a change had occurred that may invalidate the statically matching selectors (class, id, ancestor selectors).
506
506
  /// As a result, at some point in time, the selectors matched have to be requerried from the style scope and applied to the view.
507
507
  open func onChange() throws {
508
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:794)
508
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:754)
509
509
  let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
510
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:795)
510
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:755)
511
511
  if try (jsTruthy(view as Any?) && jsUnwrap(view, "isLoaded").isLoaded) {
512
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:798)
512
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:758)
513
513
  try self.updateMatch()
514
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:800)
514
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:760)
515
515
  if try
516
516
  !(Core_ui_styling_style_scope.changeMapsEqual(
517
517
  self._appliedChangeMap, jsUnwrap(self._match, "changeMap").changeMap))
518
518
  {
519
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:801)
519
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:761)
520
520
  try self.unsubscribeFromDynamicUpdates()
521
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:802)
521
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:762)
522
522
  try self.subscribeForDynamicUpdates()
523
523
  }
524
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:805)
524
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:765)
525
525
  try self.updateDynamicState()
526
526
  } else {
527
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:807)
527
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:767)
528
528
  self._matchInvalid = true
529
529
  }
530
530
  }
531
531
  #sourceLocation()
532
532
  /// Checks whether style scope and CSS state selectors are in sync.
533
533
  open func isSelectorsLatestVersionApplied() throws -> Bool {
534
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:815)
534
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:775)
535
535
  let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
536
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:816)
536
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:776)
537
537
  if !jsTruthy(view as Any?) {
538
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:817)
538
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:777)
539
539
  try NativeScriptKit.Trace.write(
540
540
  "isSelectorsLatestVersionApplied returns default value \"false\" because \"this.viewRef\" cleared.",
541
541
  NativeScriptKit.Trace.categories.Style, NativeScriptKit.Trace.messageType.warn)
542
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:819)
542
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:779)
543
543
  return false
544
544
  }
545
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:822)
545
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:782)
546
546
  return try jsUnwrap(
547
547
  jsUnwrap(jsUnwrap(self.viewRef, "get").get(), "_styleScope")._styleScope, "getSelectorsVersion"
548
548
  ).getSelectorsVersion() == self._appliedSelectorsVersion
@@ -551,19 +551,19 @@ open class CssState: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JSSt
551
551
  /// The value the cascade last resolved for a longhand, `undefined` if it resolved none.
552
552
  /// Recorded even while a local value suppresses the write.
553
553
  open func _getAppliedPropertyValue(_ property: String) throws -> Any? {
554
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:830)
554
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:790)
555
555
  return try jsUnwrap(self._appliedPropertyValues, "property")[entry: property]
556
556
  }
557
557
  #sourceLocation()
558
558
  open func onLoaded() throws {
559
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:834)
559
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:794)
560
560
  if self._matchInvalid {
561
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:835)
561
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:795)
562
562
  try self.updateMatch()
563
563
  }
564
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:837)
564
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:797)
565
565
  try self.subscribeForDynamicUpdates()
566
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:838)
566
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:798)
567
567
  try self.updateDynamicState()
568
568
  }
569
569
  #sourceLocation()
@@ -571,164 +571,164 @@ open class CssState: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JSSt
571
571
  try CoreLifetimes.cssStateUnloaded(self)
572
572
  }
573
573
  open func updateMatch() throws {
574
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:848)
574
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:808)
575
575
  let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
576
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:849)
576
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:809)
577
577
  if try (jsTruthy(view as Any?) && jsTruthy(jsUnwrap(view, "_styleScope")._styleScope)) {
578
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:850)
578
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:810)
579
579
  self._match =
580
580
  try
581
581
  (jsUnwrap(jsUnwrap(view, "_styleScope")._styleScope, "matchSelectors").matchSelectors((view as Any?))
582
582
  ?? CssState.emptyMatch)
583
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:851)
583
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:811)
584
584
  self._appliedSelectorsVersion = try jsUnwrap(
585
585
  jsUnwrap(view, "_styleScope")._styleScope, "getSelectorsVersion"
586
586
  ).getSelectorsVersion()
587
587
  } else {
588
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:853)
588
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:813)
589
589
  self._match = CssState.emptyMatch
590
590
  }
591
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:856)
591
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:816)
592
592
  self._matchInvalid = false
593
593
  }
594
594
  #sourceLocation()
595
595
  open func updateDynamicState() throws {
596
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:861)
596
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:821)
597
597
  let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
598
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:862)
598
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:822)
599
599
  if !jsTruthy(view as Any?) {
600
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:863)
600
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:823)
601
601
  try NativeScriptKit.Trace.write(
602
602
  "updateDynamicState not executed to view because \".viewRef\" is cleared",
603
603
  NativeScriptKit.Trace.categories.Style, NativeScriptKit.Trace.messageType.warn)
604
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:865)
604
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:825)
605
605
  return
606
606
  }
607
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:868)
607
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:828)
608
608
  let selectors: JSArray<SelectorCore>? = try jsUnwrap(self._match, "selectors").selectors
609
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:869)
609
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:829)
610
610
  let matchingSelectors: JSArray<SelectorCore> = JSArray<SelectorCore>()
611
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:870)
611
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:830)
612
612
  var i: Double = 0
613
613
  let length: Double = try jsUnwrap(selectors, "length").length
614
614
  while i < length {
615
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:871)
615
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:831)
616
616
  let sel: SelectorCore? = try jsUnwrap(selectors, "i").element(i)
617
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:872)
617
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:832)
618
618
  if try !(jsUnwrap(sel, "dynamic").dynamic) || jsUnwrap(sel, "match").match((view as Any?)) {
619
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:873)
619
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:833)
620
620
  _ = try matchingSelectors.push(jsObjectRequired(sel))
621
621
  }
622
622
  i += 1
623
623
  }
624
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:884)
624
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:844)
625
625
  _ = try jsUnwrap(view, "_batchUpdate")._batchUpdate(
626
626
  FunctionCell_none_to_AnyOpt.adapting({ () throws -> Void in
627
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:885)
627
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:845)
628
628
  try self.stopKeyframeAnimations()
629
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:886)
629
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:846)
630
630
  try self.setPropertyValues(matchingSelectors)
631
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:887)
631
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:847)
632
632
  try self.playKeyframeAnimations(matchingSelectors)
633
633
  }))
634
634
  }
635
635
  #sourceLocation()
636
636
  open func playKeyframeAnimations(_ matchingSelectors: JSArray<SelectorCore>?) throws {
637
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:892)
637
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:852)
638
638
  let animations: JSArray<KeyframeAnimation> = JSArray<KeyframeAnimation>()
639
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:894)
639
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:854)
640
640
  try jsUnwrap(matchingSelectors, "forEach").forEach({ (selector: SelectorCore?) throws -> Void in
641
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:895)
641
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:855)
642
642
  let ruleset: RuleSet? = try jsUnwrap(selector, "ruleset").ruleset
643
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:896)
643
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:856)
644
644
  var ruleAnimations: JSArray<KeyframeAnimationInfo>? = try jsArrayOrNil(
645
645
  ruleset?[jsKey: Core_ui_styling_style_scope.animationsSymbol.key],
646
646
  as: JSArray<KeyframeAnimationInfo>.self,
647
647
  { try jsObjectRequired(jsShaped($0) { NativeScriptKit.KeyframeAnimationInfo() }) })
648
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:897)
648
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:857)
649
649
  if try
650
650
  (jsTruthy(ruleAnimations)
651
651
  && jsTruthy(
652
652
  jsUnwrap(ruleset, "animationVariablesSymbol")[
653
653
  jsKey: Core_ui_styling_style_scope.animationVariablesSymbol.key]))
654
654
  {
655
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:898)
655
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:858)
656
656
  ruleAnimations = try self.resolveAnimationVariables(ruleset)
657
657
  }
658
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:900)
658
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:860)
659
659
  if jsTruthy(ruleAnimations) {
660
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:901)
660
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:861)
661
661
  for __item1 in try jsIterated(ruleAnimations, "ruleAnimations is not iterable") {
662
662
  var animationInfo: KeyframeAnimationInfo? = __item1
663
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:902)
663
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:862)
664
664
  if try jsTruthy(
665
665
  jsUnwrap(animationInfo, "keyframeVariablesSymbol")[
666
666
  jsKey: Core_ui_styling_style_scope.keyframeVariablesSymbol.key])
667
667
  {
668
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:903)
668
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:863)
669
669
  animationInfo = try self.resolveKeyframeVariables(animationInfo)
670
670
  }
671
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:905)
671
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:865)
672
672
  let animation: KeyframeAnimation? = try KeyframeAnimation.keyframeAnimationFromInfo(animationInfo)
673
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:906)
673
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:866)
674
674
  if jsTruthy(animation as Any?) {
675
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:907)
675
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:867)
676
676
  _ = try animations.push(jsObjectRequired(animation))
677
677
  }
678
678
  }
679
679
  }
680
680
  })
681
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:913)
681
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:873)
682
682
  if ({ () -> Bool in
683
683
  let __assigned1: Bool = animations.length > 0
684
684
  self._playsKeyframeAnimations = __assigned1
685
685
  return __assigned1
686
686
  }()) {
687
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:914)
687
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:874)
688
688
  let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
689
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:915)
689
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:875)
690
690
  if !jsTruthy(view as Any?) {
691
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:916)
691
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:876)
692
692
  try NativeScriptKit.Trace.write(
693
693
  "KeyframeAnimations cannot play because \".viewRef\" is cleared",
694
694
  NativeScriptKit.Trace.categories.Animation, NativeScriptKit.Trace.messageType.warn)
695
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:918)
695
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:878)
696
696
  return
697
697
  }
698
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:921)
698
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:881)
699
699
  _ = try (animations as JSArray<KeyframeAnimation>).map({
700
700
  (animation: KeyframeAnimation?) throws -> JSPromise<Void> in
701
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:921)
701
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:881)
702
702
  return try jsObjectRequired(jsUnwrap(animation, "play").play((view as? View)))
703
703
  })
704
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:922)
704
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:882)
705
705
  _ = jsFreeze(animations)
706
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:923)
706
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:883)
707
707
  self._appliedAnimations = animations
708
708
  }
709
709
  }
710
710
  #sourceLocation()
711
711
  open func resolveAnimationVariables(_ ruleset: RuleSet?) throws -> JSArray<KeyframeAnimationInfo>? {
712
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:928)
712
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:888)
713
713
  let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
714
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:929)
714
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:889)
715
715
  let scope: StyleScope? = view?._styleScope
716
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:930)
716
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:890)
717
717
  if !jsTruthy(scope as Any?) {
718
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:931)
718
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:891)
719
719
  return JSArray<KeyframeAnimationInfo>()
720
720
  }
721
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:934)
721
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:894)
722
722
  let declarations: JSArray<KeyframeDeclaration>? = try
723
723
  (jsUnwrap(
724
724
  jsUnwrap(jsUnwrap(ruleset, "declarations").declarations, "filter").filter(
725
725
  Core_ui_styling_style_scope.isAnimationDeclaration), "map") as JSArray<Any?>).map({
726
726
  (__p0: Any?) throws -> KeyframeDeclaration in
727
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:934)
727
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:894)
728
728
  let __p0 = try jsDestructured(__p0, "property")
729
729
  let property: String = (try jsConvertedString((try jsGet(__p0, "property"))))
730
730
  let value: Any? = (try jsGet(__p0, "value"))
731
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:934)
731
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:894)
732
732
  return try
733
733
  ({ () throws -> KeyframeDeclaration in
734
734
  let __literal4 = KeyframeDeclaration(jsLiteral: ())
@@ -738,94 +738,94 @@ open class CssState: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JSSt
738
738
  return __literal4
739
739
  }())
740
740
  })
741
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:935)
741
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:895)
742
742
  let animations: JSArray<KeyframeAnimationInfo>? = try CssAnimationParser.keyframeAnimationsFromCSSDeclarations(
743
743
  declarations)
744
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:936)
744
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:896)
745
745
  if jsTruthy(animations as Any?) {
746
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:937)
746
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:897)
747
747
  for animation in try jsIterated(jsImplicit(animations), "animations is not iterable") {
748
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:938)
748
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:898)
749
749
  try jsUnwrap(scope, "_applyKeyframes")._applyKeyframes(animation)
750
750
  }
751
751
  }
752
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:942)
752
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:902)
753
753
  return jsImplicit(animations)
754
754
  }
755
755
  #sourceLocation()
756
756
  open func resolveKeyframeVariables(_ animation: KeyframeAnimationInfo?) throws -> KeyframeAnimationInfo? {
757
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:946)
757
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:906)
758
758
  let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
759
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:947)
759
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:907)
760
760
  let resolved: KeyframeAnimationInfo? = try jsShaped(
761
761
  jsObjectAssign(KeyframeAnimationInfo(), jsObjectRequired(animation))
762
762
  ) { NativeScriptKit.KeyframeAnimationInfo() }
763
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:948)
763
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:908)
764
764
  try jsUnwrap(resolved, setting: "keyframes").keyframes =
765
765
  (jsTruthy(view as Any?)
766
766
  ? Core_ui_styling_style_scope.keyframesArrayFromCSS(
767
767
  jsUnwrap(animation, "keyframeVariablesSymbol")[
768
768
  jsKey: Core_ui_styling_style_scope.keyframeVariablesSymbol.key], view) : nil)
769
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:950)
769
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:910)
770
770
  return resolved
771
771
  }
772
772
  #sourceLocation()
773
773
  open func stopKeyframeAnimations() throws {
774
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:954)
774
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:914)
775
775
  if !self._playsKeyframeAnimations {
776
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:955)
776
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:915)
777
777
  return
778
778
  }
779
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:958)
779
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:918)
780
780
  try jsUnwrap(
781
781
  jsUnwrap(self._appliedAnimations, "filter").filter({ (animation: KeyframeAnimation?) throws -> Bool in
782
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:958)
782
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:918)
783
783
  return try jsUnwrap(animation, "isPlaying").isPlaying
784
784
  }), "forEach"
785
785
  ).forEach({ (animation: KeyframeAnimation?) throws -> Void in
786
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:958)
786
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:918)
787
787
  try jsUnwrap(animation, "cancel").cancel()
788
788
  })
789
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:959)
789
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:919)
790
790
  self._appliedAnimations = CssState.emptyAnimationArray
791
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:961)
791
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:921)
792
792
  let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
793
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:962)
793
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:922)
794
794
  if jsTruthy(view as Any?) {
795
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:963)
795
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:923)
796
796
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "keyframe:rotate")[jsKey: "keyframe:rotate"] =
797
797
  Core_ui_core_properties_property_shared.unsetValue
798
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:964)
798
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:924)
799
799
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "keyframe:rotateX")[jsKey: "keyframe:rotateX"] =
800
800
  Core_ui_core_properties_property_shared.unsetValue
801
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:965)
801
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:925)
802
802
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "keyframe:rotateY")[jsKey: "keyframe:rotateY"] =
803
803
  Core_ui_core_properties_property_shared.unsetValue
804
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:966)
804
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:926)
805
805
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "keyframe:scaleX")[jsKey: "keyframe:scaleX"] =
806
806
  Core_ui_core_properties_property_shared.unsetValue
807
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:967)
807
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:927)
808
808
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "keyframe:scaleY")[jsKey: "keyframe:scaleY"] =
809
809
  Core_ui_core_properties_property_shared.unsetValue
810
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:968)
810
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:928)
811
811
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "keyframe:translateX")[jsKey: "keyframe:translateX"] =
812
812
  Core_ui_core_properties_property_shared.unsetValue
813
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:969)
813
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:929)
814
814
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "keyframe:translateY")[jsKey: "keyframe:translateY"] =
815
815
  Core_ui_core_properties_property_shared.unsetValue
816
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:970)
816
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:930)
817
817
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "keyframe:backgroundColor")[
818
818
  jsKey: "keyframe:backgroundColor"] = Core_ui_core_properties_property_shared.unsetValue
819
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:971)
819
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:931)
820
820
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "keyframe:opacity")[jsKey: "keyframe:opacity"] =
821
821
  Core_ui_core_properties_property_shared.unsetValue
822
822
  } else {
823
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:973)
823
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:933)
824
824
  try NativeScriptKit.Trace.write(
825
825
  "KeyframeAnimations cannot be stopped because \".viewRef\" is cleared",
826
826
  NativeScriptKit.Trace.categories.Animation, NativeScriptKit.Trace.messageType.warn)
827
827
  }
828
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:976)
828
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:936)
829
829
  self._playsKeyframeAnimations = false
830
830
  }
831
831
  #sourceLocation()
@@ -834,37 +834,37 @@ open class CssState: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JSSt
834
834
  /// Apply the values and ensure each property setter is called at most once to avoid excessive change notifications.
835
835
  /// @param matchingSelectors
836
836
  open func setPropertyValues(_ matchingSelectors: JSArray<SelectorCore>?) throws {
837
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:986)
837
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:946)
838
838
  let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
839
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:987)
839
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:947)
840
840
  if !jsTruthy(view as Any?) {
841
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:988)
841
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:948)
842
842
  try NativeScriptKit.Trace.write(
843
843
  "\(jsToString(matchingSelectors)) not set to view's property because \".viewRef\" is cleared",
844
844
  NativeScriptKit.Trace.categories.Style, NativeScriptKit.Trace.messageType.warn)
845
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:989)
845
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:949)
846
846
  return
847
847
  }
848
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:992)
848
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:952)
849
849
  let newPropertyValues: JSRecord<Any?> = try jsRecordOf(
850
850
  NativeScriptKit.jsConstruct(jsUnwrap(jsUnwrap(view, "style").style, "PropertyBag").PropertyBag),
851
851
  as: JSRecord<Any?>.self
852
852
  ) { $0 }
853
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:993)
853
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:953)
854
854
  var i: Double = 0
855
855
  let length: Double = try jsUnwrap(matchingSelectors, "length").length
856
856
  while i < length {
857
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:994)
857
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:954)
858
858
  let ruleset: RuleSet? = try jsUnwrap(jsUnwrap(matchingSelectors, "i").element(i), "ruleset").ruleset
859
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:995)
859
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:955)
860
860
  try jsUnwrap(ruleset, "expandLateShorthands").expandLateShorthands()
861
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:996)
861
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:956)
862
862
  let declarations: JSArray<Any?>? = try jsUnwrap(ruleset, "declarations").declarations
863
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:997)
863
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:957)
864
864
  var j: Double = 0
865
865
  let count: Double = try jsUnwrap(declarations, "length").length
866
866
  while j < count {
867
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:998)
867
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:958)
868
868
  try newPropertyValues[
869
869
  jsConvertedString(jsGet((jsUnwrap(declarations, "j").element(j) ?? nil), "property"))] = jsGet(
870
870
  (jsUnwrap(declarations, "j").element(j) ?? nil), "value")
@@ -872,212 +872,215 @@ open class CssState: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JSSt
872
872
  }
873
873
  i += 1
874
874
  }
875
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1002)
875
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:962)
876
876
  let oldProperties: JSRecord<Any?>? = self._appliedPropertyValues
877
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1005)
877
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:965)
878
878
  let localValueVersion: Double = try jsUnwrap(jsUnwrap(view, "style").style, "_localValueVersion")
879
879
  ._localValueVersion
880
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1006)
880
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:966)
881
881
  let verifyApplied: Bool = !jsLenientNumberEquals(localValueVersion, self._appliedLocalValueVersion)
882
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1009)
882
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:969)
883
883
  try jsUnwrap(jsUnwrap(view, "style").style, "resetScopedCssVariables").resetScopedCssVariables()
884
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1011)
884
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:971)
885
885
  var valuesToApply: JSRecord<Any?>?
886
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1012)
886
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:972)
887
887
  var cssExpsProperties: JSRecord<String>?
888
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1013)
888
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:973)
889
889
  var pendingProperties: JSRecord<CssPendingSubstitution>?
890
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1015)
890
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:975)
891
891
  for property in jsKeysOf(newPropertyValues) {
892
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1016)
892
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:976)
893
893
  let value: Any? = newPropertyValues[entry: property]
894
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1018)
894
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:978)
895
895
  if Core_ui_core_properties_index._isCssPendingSubstitution(value) {
896
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1020)
896
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:980)
897
897
  if !jsTruthy(pendingProperties) {
898
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1021)
898
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:981)
899
899
  pendingProperties = JSRecord<CssPendingSubstitution>()
900
900
  }
901
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1023)
901
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:983)
902
902
  try jsUnwrap(pendingProperties, setting: "property")[property] =
903
903
  (jsCastPresent(value) as CssPendingSubstitution)
904
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1024)
904
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:984)
905
905
  continue
906
906
  }
907
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1028)
907
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:988)
908
908
  let isCssExp: Bool =
909
909
  jsStringEquals(jsTypeof(value), "string")
910
910
  && (Core_ui_core_properties_index.isCssVariableExpression(jsLenientString(value))
911
911
  || Core_ui_core_properties_index.isCssCalcExpression(jsLenientString(value)))
912
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1030)
912
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:990)
913
913
  if isCssExp {
914
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1032)
914
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:992)
915
915
  if !jsTruthy(cssExpsProperties) {
916
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1033)
916
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:993)
917
917
  cssExpsProperties = JSRecord<String>()
918
918
  }
919
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1035)
919
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:995)
920
920
  try jsUnwrap(cssExpsProperties, setting: "property")[property] = jsLenientString(value)
921
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1036)
921
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:996)
922
922
  continue
923
923
  }
924
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1040)
924
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1000)
925
925
  let hadOldValue: Bool = jsHasKey(oldProperties, property)
926
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1041)
926
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1001)
927
927
  let unchanged: Bool =
928
928
  try hadOldValue && jsStrictEquals(jsUnwrap(oldProperties, "property")[entry: property], value)
929
929
  && (!verifyApplied
930
930
  || Core_ui_core_properties_index._isCssValueStillApplied(
931
931
  jsUnwrap(view, "style").style, property, value))
932
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1042)
932
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1002)
933
933
  if hadOldValue {
934
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1043)
934
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1003)
935
935
  _ = try jsUnwrap(oldProperties, "property").delete(property)
936
936
  }
937
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1046)
937
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1006)
938
938
  if Core_ui_core_properties_index.isCssVariable(property) {
939
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1048)
939
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1008)
940
940
  try jsUnwrap(jsUnwrap(view, "style").style, "setScopedCssVariable").setScopedCssVariable(
941
941
  property, try jsConvertedString(value))
942
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1049)
942
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1009)
943
943
  _ = newPropertyValues.delete(property)
944
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1050)
944
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1010)
945
945
  continue
946
946
  }
947
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1053)
947
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1013)
948
948
  if unchanged {
949
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1054)
949
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1014)
950
950
  continue
951
951
  }
952
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1057)
952
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1017)
953
953
  if !jsTruthy(valuesToApply) {
954
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1058)
954
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1018)
955
955
  valuesToApply = JSRecord<Any?>()
956
956
  }
957
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1060)
957
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1020)
958
958
  try jsUnwrap(valuesToApply, setting: "property")[property] = value
959
959
  }
960
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1063)
960
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1023)
961
961
  if jsTruthy(cssExpsProperties) {
962
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1064)
962
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1024)
963
963
  try Core_ui_styling_style_scope.settleCssVariables(view, cssExpsProperties)
964
964
  }
965
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1066)
965
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1026)
966
966
  for property in jsKeysOf(cssExpsProperties) {
967
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1067)
967
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1027)
968
968
  let hadOldValue: Bool = jsHasKey(oldProperties, property)
969
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1068)
969
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1028)
970
970
  let oldValue: Any? = try (hadOldValue ? jsUnwrap(oldProperties, "property")[entry: property] : nil)
971
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1069)
971
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1029)
972
972
  if hadOldValue {
973
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1070)
973
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1030)
974
974
  _ = try jsUnwrap(oldProperties, "property").delete(property)
975
975
  }
976
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1073)
976
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1033)
977
977
  if Core_ui_core_properties_index.isCssVariable(property) {
978
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1074)
978
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1034)
979
979
  _ = newPropertyValues.delete(property)
980
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1075)
980
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1035)
981
981
  continue
982
982
  }
983
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1078)
984
- let value: Any? = try Core_ui_styling_style_scope.evaluateCssExpressions(
983
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1038)
984
+ let value: Any? = try Core_ui_core_properties_index._evaluateCssExpressions(
985
985
  view, property, (jsUnwrap(cssExpsProperties, "property")[property] ?? ""))
986
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1080)
986
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1040)
987
987
  if jsStrictEquals(value, Core_ui_core_properties_property_shared.unsetValue) {
988
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1081)
988
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1041)
989
989
  _ = newPropertyValues.delete(property)
990
990
  } else {
991
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1084)
991
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1044)
992
992
  newPropertyValues[property] = value
993
993
  }
994
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1087)
994
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1047)
995
995
  if try hadOldValue && jsStrictEquals(oldValue, value)
996
996
  && (!verifyApplied
997
997
  || Core_ui_core_properties_index._isCssValueStillApplied(
998
998
  jsUnwrap(view, "style").style, property, value))
999
999
  {
1000
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1088)
1000
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1048)
1001
1001
  continue
1002
1002
  }
1003
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1091)
1003
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1051)
1004
1004
  if !jsTruthy(valuesToApply) {
1005
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1092)
1005
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1052)
1006
1006
  valuesToApply = JSRecord<Any?>()
1007
1007
  }
1008
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1094)
1008
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1054)
1009
1009
  try jsUnwrap(valuesToApply, setting: "property")[property] = value
1010
1010
  }
1011
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1097)
1011
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1057)
1012
1012
  var resolvedShorthands: JSMap<CssPendingSubstitution, JSRecord<Any?>>? = nil
1013
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1098)
1013
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1058)
1014
1014
  for property in jsKeysOf(pendingProperties) {
1015
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1099)
1015
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1059)
1016
1016
  let pending: CssPendingSubstitution? = try jsUnwrap(pendingProperties, "property")[property]
1017
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1101)
1017
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1061)
1018
1018
  if !jsTruthy(resolvedShorthands as Any?) {
1019
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1102)
1019
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1062)
1020
1020
  resolvedShorthands = JSMap<CssPendingSubstitution, JSRecord<Any?>>()
1021
1021
  }
1022
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1105)
1022
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1065)
1023
1023
  var resolved: JSRecord<Any?>? = try (pending as CssPendingSubstitution?).flatMap {
1024
1024
  try jsUnwrap(resolvedShorthands, "get").get($0)
1025
1025
  }
1026
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1106)
1026
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1066)
1027
1027
  if !jsTruthy(resolved as Any?) {
1028
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1107)
1029
- resolved = try Core_ui_styling_style_scope.resolvePendingSubstitution(view, pending)
1030
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1108)
1028
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1067)
1029
+ resolved = try jsRecordOf(
1030
+ jsGet(Core_ui_core_properties_index._substituteCssShorthand(view, pending), "values"),
1031
+ as: JSRecord<Any?>.self
1032
+ ) { $0 }
1033
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1068)
1031
1034
  _ = try jsUnwrap(resolvedShorthands, "set").set(jsObjectRequired(pending), jsObjectRequired(resolved))
1032
1035
  }
1033
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1111)
1036
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1071)
1034
1037
  let value: Any? =
1035
1038
  try
1036
1039
  (jsHasKey((resolved as Any?), property)
1037
1040
  ? jsUnwrap(resolved, "property")[entry: property] : Core_ui_core_properties_property_shared.unsetValue)
1038
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1113)
1041
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1073)
1039
1042
  let hadOldValue: Bool = jsHasKey(oldProperties, property)
1040
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1114)
1043
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1074)
1041
1044
  let oldValue: Any? = try (hadOldValue ? jsUnwrap(oldProperties, "property")[entry: property] : nil)
1042
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1115)
1045
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1075)
1043
1046
  if hadOldValue {
1044
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1116)
1047
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1076)
1045
1048
  _ = try jsUnwrap(oldProperties, "property").delete(property)
1046
1049
  }
1047
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1119)
1050
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1079)
1048
1051
  if jsStrictEquals(value, Core_ui_core_properties_property_shared.unsetValue) {
1049
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1120)
1052
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1080)
1050
1053
  _ = newPropertyValues.delete(property)
1051
1054
  } else {
1052
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1122)
1055
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1082)
1053
1056
  newPropertyValues[property] = value
1054
1057
  }
1055
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1125)
1058
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1085)
1056
1059
  if try hadOldValue && jsStrictEquals(oldValue, value)
1057
1060
  && (!verifyApplied
1058
1061
  || Core_ui_core_properties_index._isCssValueStillApplied(
1059
1062
  jsUnwrap(view, "style").style, property, value))
1060
1063
  {
1061
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1126)
1064
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1086)
1062
1065
  continue
1063
1066
  }
1064
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1129)
1067
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1089)
1065
1068
  if !jsTruthy(valuesToApply) {
1066
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1130)
1069
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1090)
1067
1070
  valuesToApply = JSRecord<Any?>()
1068
1071
  }
1069
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1132)
1072
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1092)
1070
1073
  try jsUnwrap(valuesToApply, setting: "property")[property] = value
1071
1074
  }
1072
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1137)
1075
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1097)
1073
1076
  for property in jsKeysOf(oldProperties) {
1074
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1138)
1077
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1098)
1075
1078
  if try jsHasKey(jsUnwrap(view, "style").style, property) {
1076
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1139)
1079
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1099)
1077
1080
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "`css:${property}`")[jsKey: "css:\(property)"] =
1078
1081
  Core_ui_core_properties_property_shared.unsetValue
1079
1082
  } else {
1080
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1141)
1083
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1101)
1081
1084
  let camelCasedProperty: String = try jsReplace(property, Core_ui_styling_style_scope.kebabCasePattern) {
1082
1085
  (__m: JSMatch) throws -> String in
1083
1086
  jsToString(
@@ -1086,18 +1089,18 @@ open class CssState: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JSSt
1086
1089
  "", 1, Core_ui_styling_style_scope.kebabCaseReplacementFunc),
1087
1090
  spread: __m.replacerArguments))
1088
1091
  }
1089
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1142)
1092
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1102)
1090
1093
  try jsUnwrap(view, setting: "camelCasedProperty")[jsKey: camelCasedProperty] =
1091
1094
  Core_ui_core_properties_property_shared.unsetValue
1092
1095
  }
1093
1096
  }
1094
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1146)
1097
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1106)
1095
1098
  for property in jsKeysOf(valuesToApply) {
1096
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1147)
1099
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1107)
1097
1100
  let value: Any? = try jsUnwrap(valuesToApply, "property")[entry: property]
1098
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1148)
1101
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1108)
1099
1102
  let inStyle: Bool = try jsHasKey(jsUnwrap(view, "style").style, property)
1100
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1149)
1103
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1109)
1101
1104
  let camelCasedProperty: String? =
1102
1105
  try
1103
1106
  (inStyle
@@ -1109,36 +1112,36 @@ open class CssState: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JSSt
1109
1112
  "", 1, Core_ui_styling_style_scope.kebabCaseReplacementFunc),
1110
1113
  spread: __m.replacerArguments))
1111
1114
  })
1112
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1150)
1115
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1110)
1113
1116
  do {
1114
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1151)
1117
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1111)
1115
1118
  if inStyle {
1116
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1152)
1119
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1112)
1117
1120
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "`css:${property}`")[
1118
1121
  jsKey: "css:\(property)"] = value
1119
1122
  } else {
1120
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1154)
1123
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1114)
1121
1124
  try jsUnwrap(view, setting: "camelCasedProperty")[jsKey: jsToString(camelCasedProperty as Any?)] =
1122
1125
  value
1123
1126
  }
1124
1127
  } catch {
1125
1128
  #sourceLocation()
1126
1129
  let e: Any? = jsCaught(error)
1127
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1157)
1130
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1117)
1128
1131
  try NativeScriptKit.Trace.write(
1129
1132
  "Failed to apply property [\(property)] with value [\(jsToStringThrowing(value))] to \(jsToStringThrowing((view as Any?))). \(jsToStringThrowing(jsGet(e, "stack")))",
1130
1133
  NativeScriptKit.Trace.categories.Error, NativeScriptKit.Trace.messageType.error)
1131
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1158)
1134
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1118)
1132
1135
  _ = newPropertyValues.delete(property)
1133
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1159)
1136
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1119)
1134
1137
  do {
1135
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1160)
1138
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1120)
1136
1139
  if inStyle {
1137
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1161)
1140
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1121)
1138
1141
  try jsUnwrap(jsUnwrap(view, "style").style, setting: "`css:${property}`")[
1139
1142
  jsKey: "css:\(property)"] = Core_ui_core_properties_property_shared.unsetValue
1140
1143
  } else {
1141
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1163)
1144
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1123)
1142
1145
  try jsUnwrap(view, setting: "camelCasedProperty")[
1143
1146
  jsKey: jsToString(camelCasedProperty as Any?)] =
1144
1147
  Core_ui_core_properties_property_shared.unsetValue
@@ -1146,119 +1149,124 @@ open class CssState: JSDynamic, JSStringConvertible, JSExpando, JSKeysMade, JSSt
1146
1149
  } catch {
1147
1150
  #sourceLocation()
1148
1151
  let e: Any? = jsCaught(error)
1149
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1166)
1152
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1126)
1150
1153
  try NativeScriptKit.Trace.write(
1151
1154
  "Failed to unset property [\(property)] on \(jsToStringThrowing((view as Any?))). \(jsToStringThrowing(jsGet(e, "stack")))",
1152
1155
  NativeScriptKit.Trace.categories.Error, NativeScriptKit.Trace.messageType.error)
1153
1156
  }
1154
1157
  }
1155
1158
  }
1156
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1171)
1159
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1131)
1157
1160
  self._appliedPropertyValues = newPropertyValues
1158
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1172)
1161
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1132)
1159
1162
  self._appliedLocalValueVersion = try jsUnwrap(jsUnwrap(view, "style").style, "_localValueVersion")
1160
1163
  ._localValueVersion
1164
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1135)
1165
+ if try jsTruthy(jsUnwrap(jsUnwrap(view, "style").style, "_localCssExpressions")._localCssExpressions) {
1166
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1136)
1167
+ try Core_ui_core_properties_index._reevaluateLocalCssExpressions(view)
1168
+ }
1161
1169
  }
1162
1170
  #sourceLocation()
1163
1171
  open func subscribeForDynamicUpdates() throws {
1164
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1176)
1172
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1141)
1165
1173
  let changeMap: Any? = try jsUnwrap(self._match, "changeMap").changeMap
1166
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1177)
1174
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1142)
1167
1175
  try jsCallMethod(
1168
1176
  changeMap, "forEach",
1169
1177
  FunctionCell_AnyOpt_ViewBaseOpt_to_Void.scriptOrNil(
1170
1178
  "", 2,
1171
1179
  { (changes: Any?, view: ViewBase?) throws -> Void in
1172
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1178)
1180
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1143)
1173
1181
  if try jsTruthy(jsGet(changes, "attributes")) {
1174
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1179)
1182
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1144)
1175
1183
  try jsUnwrap(jsGet(changes, "attributes") as? JSSet<String>, "forEach").forEach {
1176
1184
  (attribute: String, _: String) throws -> Void in
1177
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1180)
1185
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1145)
1178
1186
  try jsUnwrap(view, "addEventListener").addEventListener(
1179
1187
  attribute + "Change",
1180
1188
  FunctionCell_EventDataOpt_to_Void.adapting(
1181
1189
  FunctionCell_none_to_Void.present(self._onDynamicStateChangeHandler)))
1182
1190
  }
1183
1191
  }
1184
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1183)
1192
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1148)
1185
1193
  if try jsTruthy(jsGet(changes, "pseudoClasses")) {
1186
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1184)
1194
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1149)
1187
1195
  try jsUnwrap(jsGet(changes, "pseudoClasses") as? JSSet<String>, "forEach").forEach {
1188
1196
  (pseudoClass: String, _: String) throws -> Void in
1189
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1185)
1197
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1150)
1190
1198
  let eventName: String = ":" + pseudoClass
1191
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1186)
1199
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1151)
1192
1200
  try jsUnwrap(view, "addEventListener").addEventListener(
1193
1201
  ":" + pseudoClass,
1194
1202
  FunctionCell_EventDataOpt_to_Void.adapting(
1195
1203
  FunctionCell_none_to_Void.present(self._onDynamicStateChangeHandler)))
1196
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1187)
1204
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1152)
1197
1205
  if try jsTruthy(jsUnwrap(view, "eventName")[jsKey: eventName]) {
1198
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1188)
1206
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1153)
1199
1207
  _ = try jsCallMethod(jsUnwrap(view, "eventName"), eventName, true)
1200
1208
  }
1201
1209
  }
1202
1210
  }
1203
1211
  }))
1204
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1193)
1212
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1158)
1205
1213
  self._appliedChangeMap = changeMap
1206
1214
  }
1207
1215
  #sourceLocation()
1208
1216
  open func unsubscribeFromDynamicUpdates() throws {
1209
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1197)
1217
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1162)
1210
1218
  try jsCallMethod(
1211
1219
  self._appliedChangeMap, "forEach",
1212
1220
  FunctionCell_AnyOpt_ViewBaseOpt_to_Void.scriptOrNil(
1213
1221
  "", 2,
1214
1222
  { (changes: Any?, view: ViewBase?) throws -> Void in
1215
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1198)
1223
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1163)
1216
1224
  if try jsTruthy(jsGet(changes, "attributes")) {
1217
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1199)
1225
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1164)
1218
1226
  try jsUnwrap(jsGet(changes, "attributes") as? JSSet<String>, "forEach").forEach {
1219
1227
  (attribute: String, _: String) throws -> Void in
1220
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1200)
1228
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1165)
1221
1229
  try jsUnwrap(view, "removeEventListener").removeEventListener(
1222
1230
  attribute + "Change",
1223
1231
  FunctionCell_EventDataOpt_to_Void.adaptingOrNil(self._onDynamicStateChangeHandler))
1224
1232
  }
1225
1233
  }
1226
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1203)
1234
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1168)
1227
1235
  if try jsTruthy(jsGet(changes, "pseudoClasses")) {
1228
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1204)
1236
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1169)
1229
1237
  try jsUnwrap(jsGet(changes, "pseudoClasses") as? JSSet<String>, "forEach").forEach {
1230
1238
  (pseudoClass: String, _: String) throws -> Void in
1231
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1205)
1239
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1170)
1232
1240
  let eventName: String = ":" + pseudoClass
1233
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1206)
1241
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1171)
1234
1242
  try jsUnwrap(view, "removeEventListener").removeEventListener(
1235
1243
  eventName,
1236
1244
  FunctionCell_EventDataOpt_to_Void.adaptingOrNil(self._onDynamicStateChangeHandler))
1237
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1207)
1245
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1172)
1238
1246
  if try jsTruthy(jsUnwrap(view, "eventName")[jsKey: eventName]) {
1239
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1208)
1247
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1173)
1240
1248
  _ = try jsCallMethod(jsUnwrap(view, "eventName"), eventName, false)
1241
1249
  }
1242
1250
  }
1243
1251
  }
1244
1252
  }))
1245
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1213)
1253
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1178)
1246
1254
  self._appliedChangeMap = CssState.emptyChangeMap
1247
1255
  }
1248
1256
  #sourceLocation()
1249
1257
  open func toString() throws -> String {
1250
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1217)
1258
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1182)
1251
1259
  let view: ViewBase? = try jsUnwrap(self.viewRef, "get").get()
1252
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1218)
1260
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1183)
1253
1261
  if !jsTruthy(view as Any?) {
1254
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1219)
1262
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1184)
1255
1263
  try NativeScriptKit.Trace.write(
1256
1264
  "toString() of CssState cannot execute correctly because \".viewRef\" is cleared",
1257
1265
  NativeScriptKit.Trace.categories.Animation, NativeScriptKit.Trace.messageType.warn)
1258
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1221)
1266
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1186)
1259
1267
  return ""
1260
1268
  }
1261
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1224)
1269
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1189)
1262
1270
  return try "\(jsToStringThrowing((view as Any?)))._cssState"
1263
1271
  }
1264
1272
  #sourceLocation()
@@ -1495,13 +1503,13 @@ open class StyleScope: JSDynamic, JSExpando, JSKeysMade, JSStaticKeyed {
1495
1503
  public init() {}
1496
1504
  open var css: String {
1497
1505
  get {
1498
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1247)
1506
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1212)
1499
1507
  return self._css
1500
1508
  }
1501
1509
  set {
1502
1510
  let value = newValue
1503
1511
  jsReport {
1504
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1251)
1512
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1216)
1505
1513
  try self.setCss(value)
1506
1514
  }
1507
1515
  }
@@ -1510,9 +1518,9 @@ open class StyleScope: JSDynamic, JSExpando, JSKeysMade, JSStaticKeyed {
1510
1518
  /// True when any selector in the scope contains an adjacent sibling ('+') combinator.
1511
1519
  open var hasAdjacentCombinatorSelectors: Bool {
1512
1520
  get throws {
1513
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1335)
1521
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1300)
1514
1522
  _ = try self.ensureSelectors()
1515
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1337)
1523
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1302)
1516
1524
  return
1517
1525
  ((((Core_ui_styling_style_scope.applicationSelectorScope as StyleSheetSelectorScope?)?
1518
1526
  .hasAdjacentCombinatorSelectors) ?? false))
@@ -1523,9 +1531,9 @@ open class StyleScope: JSDynamic, JSExpando, JSKeysMade, JSStaticKeyed {
1523
1531
  /// True when any selector in the scope contains a general sibling ('~') combinator.
1524
1532
  open var hasSiblingCombinatorSelectors: Bool {
1525
1533
  get throws {
1526
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1344)
1534
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1309)
1527
1535
  _ = try self.ensureSelectors()
1528
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1346)
1536
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1311)
1529
1537
  return
1530
1538
  ((((Core_ui_styling_style_scope.applicationSelectorScope as StyleSheetSelectorScope?)?
1531
1539
  .hasSiblingCombinatorSelectors) ?? false))
@@ -1542,255 +1550,255 @@ open class StyleScope: JSDynamic, JSExpando, JSKeysMade, JSStaticKeyed {
1542
1550
  open var jsSymbolKeys: [String] { jsExpando?.jsSymbolKeys ?? [] }
1543
1551
  open func jsDeleteOwn(_ key: String) -> Bool { jsExpando?.delete(key) ?? true }
1544
1552
  open func addCss(_ cssString: String, _ cssFileName: String? = nil) throws {
1545
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1255)
1553
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1220)
1546
1554
  try self.appendCss(cssString, (cssFileName as Any?))
1547
1555
  }
1548
1556
  #sourceLocation()
1549
1557
  open func addCssFile(_ cssFileName: String) throws {
1550
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1259)
1558
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1224)
1551
1559
  try self.appendCss("", cssFileName)
1552
1560
  }
1553
1561
  #sourceLocation()
1554
1562
  open func changeCssFile(_ cssFileName: String) throws {
1555
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1263)
1563
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1228)
1556
1564
  if !jsTruthy(cssFileName) {
1557
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1264)
1565
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1229)
1558
1566
  return
1559
1567
  }
1560
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1266)
1568
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1231)
1561
1569
  _ = try jsUnwrap(self._cssFiles, "add").add(cssFileName)
1562
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1267)
1570
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1232)
1563
1571
  Core_ui_styling_style_scope.currentScopeTag = cssFileName
1564
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1269)
1572
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1234)
1565
1573
  let cssFile: CSSSource? = try CSSSource.fromURI(cssFileName)
1566
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1271)
1574
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1236)
1567
1575
  Core_ui_styling_style_scope.currentScopeTag = ""
1568
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1272)
1576
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1237)
1569
1577
  self._css = try jsUnwrap(cssFile, "source").source
1570
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1273)
1578
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1238)
1571
1579
  self._localCssSelectors = try jsUnwrap(cssFile, "selectors").selectors
1572
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1274)
1580
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1239)
1573
1581
  self._localCssKeyframes = try jsUnwrap(cssFile, "keyframes").keyframes
1574
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1275)
1582
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1240)
1575
1583
  self._localCssSelectorVersion += 1
1576
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1276)
1584
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1241)
1577
1585
  _ = try self.ensureSelectors()
1578
1586
  }
1579
1587
  #sourceLocation()
1580
1588
  open func setCss(_ cssString: String, _ cssFileName: Any? = nil) throws {
1581
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1281)
1589
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1246)
1582
1590
  self._css = cssString
1583
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1283)
1591
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1248)
1584
1592
  let cssFile: CSSSource? = try CSSSource.fromSource(cssString, try jsConvertedStringOrNil(cssFileName))
1585
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1284)
1593
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1249)
1586
1594
  self._localCssSelectors = try jsUnwrap(cssFile, "selectors").selectors
1587
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1285)
1595
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1250)
1588
1596
  self._localCssKeyframes = try jsUnwrap(cssFile, "keyframes").keyframes
1589
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1286)
1597
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1251)
1590
1598
  self._localCssSelectorVersion += 1
1591
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1287)
1599
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1252)
1592
1600
  _ = try self.ensureSelectors()
1593
1601
  }
1594
1602
  #sourceLocation()
1595
1603
  open func appendCss(_ cssString: String, _ cssFileName: Any? = nil) throws {
1596
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1292)
1604
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1257)
1597
1605
  if !jsTruthy(cssString) && !jsTruthy(cssFileName) {
1598
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1293)
1606
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1258)
1599
1607
  return
1600
1608
  }
1601
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1295)
1609
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1260)
1602
1610
  if jsTruthy(cssFileName) {
1603
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1296)
1611
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1261)
1604
1612
  _ = try jsUnwrap(self._cssFiles, "add").add(try jsConvertedString(cssFileName))
1605
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1297)
1613
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1262)
1606
1614
  Core_ui_styling_style_scope.currentScopeTag = try jsConvertedString(cssFileName)
1607
1615
  }
1608
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1300)
1616
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1265)
1609
1617
  let cssFile: CSSSource? =
1610
1618
  try
1611
1619
  (jsTruthy(cssString)
1612
1620
  ? CSSSource.fromSource(cssString, try jsConvertedStringOrNil(cssFileName))
1613
1621
  : CSSSource.fromURI(try jsConvertedString(cssFileName)))
1614
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1302)
1622
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1267)
1615
1623
  Core_ui_styling_style_scope.currentScopeTag = ""
1616
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1303)
1624
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1268)
1617
1625
  self._css = try self._css + jsUnwrap(cssFile, "source").source
1618
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1304)
1626
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1269)
1619
1627
  _ = try jsUnwrap(self._localCssSelectors, "push").push(
1620
1628
  contentsOf: JSArray<RuleSet>(
1621
1629
  Array(jsIterated(jsUnwrap(cssFile, "selectors").selectors, "cssFile.selectors is not iterable"))))
1622
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1305)
1630
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1270)
1623
1631
  _ = try jsUnwrap(self._localCssKeyframes, "push").push(
1624
1632
  contentsOf: JSArray<Any?>(
1625
1633
  Array(jsIterated(jsUnwrap(cssFile, "keyframes").keyframes, "cssFile.keyframes is not iterable"))))
1626
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1306)
1634
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1271)
1627
1635
  self._localCssSelectorVersion += 1
1628
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1307)
1636
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1272)
1629
1637
  _ = try self.ensureSelectors()
1630
1638
  }
1631
1639
  #sourceLocation()
1632
1640
  open func getKeyframeAnimationWithName(_ animationName: String) throws -> KeyframeAnimationInfo? {
1633
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1311)
1641
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1276)
1634
1642
  if !jsTruthy(self._mergedCssKeyframes) {
1635
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1312)
1643
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1277)
1636
1644
  return nil
1637
1645
  }
1638
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1315)
1646
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1280)
1639
1647
  let keyframeRule: Any? = try self.findKeyframeRule(animationName)
1640
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1317)
1648
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1282)
1641
1649
  let animation: KeyframeAnimationInfo = KeyframeAnimationInfo()
1642
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1318)
1650
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1283)
1643
1651
  animation.keyframes =
1644
1652
  try (jsTruthy(keyframeRule) ? Core_ui_styling_style_scope.keyframesArrayFromCSS(keyframeRule) : nil)
1645
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1320)
1653
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1285)
1646
1654
  return animation
1647
1655
  }
1648
1656
  #sourceLocation()
1649
1657
  open func ensureSelectors() throws -> Double {
1650
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1324)
1658
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1289)
1651
1659
  if !self.isApplicationCssSelectorsLatestVersionApplied() || !self.isLocalCssSelectorsLatestVersionApplied() {
1652
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1325)
1660
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1290)
1653
1661
  try self._createSelectors()
1654
1662
  }
1655
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1328)
1663
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1293)
1656
1664
  return self.getSelectorsVersion()
1657
1665
  }
1658
1666
  #sourceLocation()
1659
1667
  /// Increase the application CSS selector version.
1660
1668
  open func _increaseApplicationCssSelectorVersion() {
1661
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1353)
1669
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1318)
1662
1670
  Core_ui_styling_style_scope.applicationCssSelectorVersion += 1
1663
1671
  }
1664
1672
  #sourceLocation()
1665
1673
  open func isApplicationCssSelectorsLatestVersionApplied() -> Bool {
1666
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1357)
1674
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1322)
1667
1675
  return jsLenientNumberEquals(
1668
1676
  self._applicationCssSelectorsAppliedVersion, Core_ui_styling_style_scope.applicationCssSelectorVersion)
1669
1677
  }
1670
1678
  #sourceLocation()
1671
1679
  open func isLocalCssSelectorsLatestVersionApplied() -> Bool {
1672
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1361)
1680
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1326)
1673
1681
  return jsLenientNumberEquals(self._localCssSelectorsAppliedVersion, self._localCssSelectorVersion)
1674
1682
  }
1675
1683
  #sourceLocation()
1676
1684
  open func _createSelectors() throws {
1677
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1366)
1685
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1331)
1678
1686
  let cssFiles: JSSet<String>? = self._cssFiles
1679
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1367)
1687
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1332)
1680
1688
  let applicationScope: StyleSheetSelectorScope? = try Core_ui_styling_style_scope.getApplicationSelectorScope()
1681
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1368)
1689
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1333)
1682
1690
  self._applicationCssSelectorsAppliedVersion = Core_ui_styling_style_scope.applicationCssSelectorVersion
1683
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1370)
1691
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1335)
1684
1692
  if try !self.isLocalCssSelectorsLatestVersionApplied()
1685
1693
  || (!jsTruthy(self._localSelectorScope) && jsUnwrap(self._localCssSelectors, "length").length > 0)
1686
1694
  {
1687
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1371)
1695
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1336)
1688
1696
  self._localSelectorScope =
1689
1697
  try
1690
1698
  (jsUnwrap(self._localCssSelectors, "length").length > 0
1691
1699
  ? StyleSheetSelectorScope(self._localCssSelectors, SelectorTier.Local) : nil)
1692
1700
  }
1693
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1374)
1701
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1339)
1694
1702
  self._localCssSelectorsAppliedVersion = self._localCssSelectorVersion
1695
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1375)
1703
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1340)
1696
1704
  self._hasSelectors = jsTruthy(applicationScope) || jsTruthy(self._localSelectorScope)
1697
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1377)
1705
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1342)
1698
1706
  let toMergeKeyframes: JSArray<Any?> = JSArray<Any?>()
1699
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1378)
1707
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1343)
1700
1708
  let applicationKeyframes: JSArray<Any?>? = try Core_ui_styling_style_scope.getMergedApplicationCssKeyframes()
1701
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1379)
1709
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1344)
1702
1710
  do {
1703
1711
  var i: Double = 0
1704
1712
  let length: Double = try jsUnwrap(applicationKeyframes, "length").length
1705
1713
  while i < length {
1706
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1380)
1714
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1345)
1707
1715
  let keyframe: Any? = try ((jsUnwrap(applicationKeyframes, "i").element(i) ?? nil) as Any?)
1708
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1381)
1716
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1346)
1709
1717
  if try !(jsTruthy(jsGet(keyframe, "scopedTag")))
1710
1718
  || jsUnwrap(cssFiles, "has").has(jsConvertedString(jsGet(keyframe, "scopedTag")))
1711
1719
  {
1712
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1382)
1720
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1347)
1713
1721
  _ = toMergeKeyframes.push(keyframe)
1714
1722
  }
1715
1723
  i += 1
1716
1724
  }
1717
1725
  }
1718
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1386)
1726
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1351)
1719
1727
  let localKeyframes: JSArray<Any?>? = self._localCssKeyframes
1720
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1387)
1728
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1352)
1721
1729
  do {
1722
1730
  var i: Double = 0
1723
1731
  let length: Double = try jsUnwrap(localKeyframes, "length").length
1724
1732
  while i < length {
1725
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1388)
1733
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1353)
1726
1734
  _ = try toMergeKeyframes.push(((jsUnwrap(localKeyframes, "i").element(i) ?? nil) as Any?))
1727
1735
  i += 1
1728
1736
  }
1729
1737
  }
1730
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1391)
1738
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1356)
1731
1739
  self._mergedCssKeyframes = (toMergeKeyframes.length > 0 ? toMergeKeyframes : nil)
1732
1740
  }
1733
1741
  #sourceLocation()
1734
1742
  open func matchSelectors(_ view: Any?) throws -> SelectorsMatch? {
1735
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1399)
1743
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1364)
1736
1744
  _ = try self.ensureSelectors()
1737
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1401)
1745
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1366)
1738
1746
  if !self._hasSelectors {
1739
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1402)
1747
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1367)
1740
1748
  return nil
1741
1749
  }
1742
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1406)
1750
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1371)
1743
1751
  let candidates: JSArray<SelectorCore> = JSArray<SelectorCore>()
1744
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1407)
1752
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1372)
1745
1753
  _ = try (Core_ui_styling_style_scope.applicationSelectorScope as StyleSheetSelectorScope?)?.collectCandidates(
1746
1754
  view, candidates)
1747
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1408)
1755
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1373)
1748
1756
  _ = try (self._localSelectorScope as StyleSheetSelectorScope?)?.collectCandidates(view, candidates)
1749
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1410)
1757
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1375)
1750
1758
  let match: SelectorsMatch? = try Core_ui_styling_css_selector.matchSelectorCandidates(
1751
1759
  (try jsCast(view, ViewBase.self)), candidates,
1752
1760
  (Core_ui_styling_style_scope.applicationSelectorsHaveScopedTags ? self._cssFiles : nil))
1753
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1413)
1761
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1378)
1754
1762
  try self._applyKeyframesToSelectors(jsUnwrap(match, "selectors").selectors)
1755
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1415)
1763
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1380)
1756
1764
  return match
1757
1765
  }
1758
1766
  #sourceLocation()
1759
1767
  open func query(_ node: Any?) throws -> JSArray<SelectorCore>? {
1760
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1419)
1768
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1384)
1761
1769
  _ = try self.ensureSelectors()
1762
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1421)
1770
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1386)
1763
1771
  let match: SelectorsMatch? = try self.matchSelectors(node)
1764
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1422)
1772
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1387)
1765
1773
  return try (jsTruthy(match) ? jsUnwrap(match, "selectors").selectors : JSArray<SelectorCore>())
1766
1774
  }
1767
1775
  #sourceLocation()
1768
1776
  open func getSelectorsVersion() -> Double {
1769
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1428)
1777
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1393)
1770
1778
  return 100000 * self._applicationCssSelectorsAppliedVersion + self._localCssSelectorsAppliedVersion
1771
1779
  }
1772
1780
  #sourceLocation()
1773
1781
  open func _applyKeyframesToSelectors(_ selectors: JSArray<SelectorCore>?) throws {
1774
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1432)
1782
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1397)
1775
1783
  if !jsTruthy((((selectors as JSArray<SelectorCore>?)?.length) ?? .nan)) {
1776
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1433)
1784
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1398)
1777
1785
  return
1778
1786
  }
1779
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1436)
1787
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1401)
1780
1788
  var i: Double = try jsUnwrap(selectors, "length").length - 1
1781
1789
  while i >= 0 {
1782
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1437)
1790
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1402)
1783
1791
  let ruleset: RuleSet? = try jsUnwrap(jsUnwrap(selectors, "i").element(i), "ruleset").ruleset
1784
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1438)
1792
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1403)
1785
1793
  let animations: JSArray<KeyframeAnimationInfo>? = try jsArrayOrNil(
1786
1794
  jsUnwrap(ruleset, "animationsSymbol")[jsKey: Core_ui_styling_style_scope.animationsSymbol.key],
1787
1795
  as: JSArray<KeyframeAnimationInfo>.self,
1788
1796
  { try jsObjectRequired(jsShaped($0) { NativeScriptKit.KeyframeAnimationInfo() }) })
1789
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1440)
1797
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1405)
1790
1798
  if try (animations != nil && jsTruthy(jsUnwrap(animations, "length").length)) {
1791
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1441)
1799
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1406)
1792
1800
  for animation in try jsIterated(animations, "animations is not iterable") {
1793
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1442)
1801
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1407)
1794
1802
  try self._applyKeyframes(animation)
1795
1803
  }
1796
1804
  }
@@ -1799,27 +1807,27 @@ open class StyleScope: JSDynamic, JSExpando, JSKeysMade, JSStaticKeyed {
1799
1807
  }
1800
1808
  #sourceLocation()
1801
1809
  open func _applyKeyframes(_ animation: KeyframeAnimationInfo?) throws {
1802
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1449)
1810
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1414)
1803
1811
  let keyframeRule: Any? = try self.findKeyframeRule(jsUnwrap(animation, "name").name)
1804
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1450)
1812
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1415)
1805
1813
  if try (jsTruthy(keyframeRule) && Core_ui_styling_style_scope.keyframesUseVariables(keyframeRule)) {
1806
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1451)
1814
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1416)
1807
1815
  try jsUnwrap(animation, setting: "keyframeVariablesSymbol")[
1808
1816
  jsKey: Core_ui_styling_style_scope.keyframeVariablesSymbol.key] = keyframeRule
1809
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1452)
1817
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1417)
1810
1818
  try jsUnwrap(animation, setting: "keyframes").keyframes = nil
1811
1819
  } else {
1812
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1454)
1820
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1419)
1813
1821
  try jsUnwrap(animation, setting: "keyframeVariablesSymbol")[
1814
1822
  jsKey: Core_ui_styling_style_scope.keyframeVariablesSymbol.key] = nil
1815
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1455)
1823
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1420)
1816
1824
  try jsUnwrap(animation, setting: "keyframes").keyframes =
1817
1825
  (jsTruthy(keyframeRule) ? Core_ui_styling_style_scope.keyframesArrayFromCSS(keyframeRule) : nil)
1818
1826
  }
1819
1827
  }
1820
1828
  #sourceLocation()
1821
1829
  open func getAnimations(_ ruleset: RuleSet?) throws -> JSArray<KeyframeAnimationInfo>? {
1822
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1460)
1830
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1425)
1823
1831
  return try jsArrayOrNil(
1824
1832
  jsUnwrap(ruleset, "animationsSymbol")[jsKey: Core_ui_styling_style_scope.animationsSymbol.key],
1825
1833
  as: JSArray<KeyframeAnimationInfo>.self,
@@ -1827,14 +1835,14 @@ open class StyleScope: JSDynamic, JSExpando, JSKeysMade, JSStaticKeyed {
1827
1835
  }
1828
1836
  #sourceLocation()
1829
1837
  open func findKeyframeRule(_ animationName: String) throws -> Any? {
1830
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1464)
1838
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1429)
1831
1839
  if !jsTruthy(self._mergedCssKeyframes) {
1832
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1465)
1840
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1430)
1833
1841
  return jsNull
1834
1842
  }
1835
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1469)
1843
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1434)
1836
1844
  var validatedMediaQueries: JSArray<String>? = nil
1837
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1472)
1845
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1437)
1838
1846
  var i: Double = try jsUnwrap(self._mergedCssKeyframes, "length").length - 1
1839
1847
  var __first1 = true
1840
1848
  while true {
@@ -1842,34 +1850,34 @@ open class StyleScope: JSDynamic, JSExpando, JSKeysMade, JSStaticKeyed {
1842
1850
  __first1 = false
1843
1851
  if !(i >= 0) { break }
1844
1852
  do {
1845
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1473)
1853
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1438)
1846
1854
  let rule: Any? = try ((jsUnwrap(self._mergedCssKeyframes, "i").element(i) ?? nil) as Any?)
1847
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1474)
1855
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1439)
1848
1856
  if try !jsStrictEquals(jsGet(rule, "name"), animationName) {
1849
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1475)
1857
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1440)
1850
1858
  continue
1851
1859
  }
1852
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1478)
1860
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1443)
1853
1861
  if try !(jsTruthy(jsGet(rule, "mediaQueryString"))) {
1854
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1479)
1862
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1444)
1855
1863
  return rule
1856
1864
  }
1857
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1482)
1865
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1447)
1858
1866
  if !jsTruthy(validatedMediaQueries as Any?) {
1859
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1483)
1867
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1448)
1860
1868
  validatedMediaQueries = JSArray<String>()
1861
1869
  }
1862
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1486)
1870
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1451)
1863
1871
  let isMatchingAllQueries: Bool = try Core_ui_styling_css_selector.matchMediaQueryString(
1864
1872
  jsGet(rule, "mediaQueryString"), validatedMediaQueries)
1865
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1487)
1873
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1452)
1866
1874
  if isMatchingAllQueries {
1867
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1488)
1875
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1453)
1868
1876
  return rule
1869
1877
  }
1870
1878
  }
1871
1879
  }
1872
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1492)
1880
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1457)
1873
1881
  return jsNull
1874
1882
  }
1875
1883
  #sourceLocation()
@@ -2113,21 +2121,21 @@ public enum Core_ui_styling_style_scope {
2113
2121
  public static var animationVariablesSymbol: JSSymbol!
2114
2122
  public static var keyframeVariablesSymbol: JSSymbol!
2115
2123
  public static func isAnimationDeclaration(_ declaration: Any?) throws -> Bool {
2116
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:73)
2124
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:74)
2117
2125
  return try jsStartsWith(jsConvertedString(jsGet(declaration, "property")), "animation", nil)
2118
2126
  }
2119
2127
  #sourceLocation()
2120
2128
  public static func keyframesUseVariables(_ keyframes: Any?) throws -> Bool {
2121
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:77)
2129
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:78)
2122
2130
  return try jsUnwrap(
2123
2131
  try jsArrayOrNil(
2124
2132
  jsGet(keyframes, "keyframes"), as: JSArray<UnparsedKeyframe>.self,
2125
2133
  { try jsObjectRequired(jsShaped($0) { NativeScriptKit.UnparsedKeyframe() }) }), "some"
2126
2134
  ).some({ (keyframe: UnparsedKeyframe?) throws -> Bool in
2127
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:77)
2135
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:78)
2128
2136
  return try jsUnwrap(jsUnwrap(keyframe, "declarations").declarations, "some").some({
2129
2137
  (declaration: KeyframeDeclaration?) throws -> Bool in
2130
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:77)
2138
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:78)
2131
2139
  return try jsStringEquals(jsTypeof(jsUnwrap(declaration, "value").value), "string")
2132
2140
  && Core_ui_core_properties_index.isCssVariableExpression(
2133
2141
  jsLenientString(jsUnwrap(declaration, "value").value))
@@ -2138,16 +2146,16 @@ public enum Core_ui_styling_style_scope {
2138
2146
  public static func keyframesArrayFromCSS(_ keyframes: Any?, _ view: ViewBase? = nil) throws -> JSArray<
2139
2147
  KeyframeInfo
2140
2148
  >? {
2141
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:81)
2149
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:82)
2142
2150
  var unparsed: JSArray<UnparsedKeyframe>? = try jsArrayOrNil(
2143
2151
  jsGet(keyframes, "keyframes"), as: JSArray<UnparsedKeyframe>.self,
2144
2152
  { try jsObjectRequired(jsShaped($0) { NativeScriptKit.UnparsedKeyframe() }) })
2145
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:82)
2153
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:83)
2146
2154
  if jsTruthy(view as Any?) {
2147
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:83)
2155
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:84)
2148
2156
  unparsed = try (jsUnwrap(unparsed, "map") as JSArray<UnparsedKeyframe>).map({
2149
2157
  (keyframe: UnparsedKeyframe?) throws -> UnparsedKeyframe in
2150
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:83)
2158
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:84)
2151
2159
  return try
2152
2160
  ({ () throws -> UnparsedKeyframe in
2153
2161
  let __literal1 = UnparsedKeyframe(jsLiteral: ())
@@ -2156,10 +2164,10 @@ public enum Core_ui_styling_style_scope {
2156
2164
  (jsUnwrap(jsUnwrap(keyframe, "declarations").declarations, "map")
2157
2165
  as JSArray<KeyframeDeclaration>).map({
2158
2166
  (__p0: KeyframeDeclaration) throws -> KeyframeDeclaration in
2159
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:85)
2167
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:86)
2160
2168
  let property: String = __p0.property
2161
2169
  let value: Any? = __p0.value
2162
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:85)
2170
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:86)
2163
2171
  return try
2164
2172
  ({ () throws -> KeyframeDeclaration in
2165
2173
  let __literal2 = KeyframeDeclaration(jsLiteral: ())
@@ -2174,158 +2182,89 @@ public enum Core_ui_styling_style_scope {
2174
2182
  }())
2175
2183
  })
2176
2184
  }
2177
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:89)
2185
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:90)
2178
2186
  do {
2179
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:90)
2187
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:91)
2180
2188
  return try CssAnimationParser.keyframesArrayFromCSS(unparsed)
2181
2189
  } catch {
2182
2190
  let e: Any? = jsCaught(error)
2183
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:92)
2191
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:93)
2184
2192
  try NativeScriptKit.Trace.write(
2185
2193
  "Failed to parse keyframes [\(jsConvertedString(jsGet(keyframes, "name")))]\((jsTruthy(view as Any?) ? " for \(jsToStringThrowing((view as Any?)))" : "")). \(jsToStringThrowing(e))",
2186
2194
  NativeScriptKit.Trace.categories.Animation, NativeScriptKit.Trace.messageType.warn)
2187
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:94)
2195
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:95)
2188
2196
  return nil
2189
2197
  }
2190
2198
  }
2191
2199
  #sourceLocation()
2192
2200
  public static let kebabCasePattern: JSRegExp = jsRegExpLiteral("-([a-z])", "g")
2193
2201
  public static let kebabCaseReplacementFunc: (String) throws -> String = { (g: String) throws -> String in
2194
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:98)
2202
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:99)
2195
2203
  return try jsUnwrap(jsCharAtOrUndefined(g, 1), "toUpperCase").uppercased()
2196
2204
  }
2197
2205
  #sourceLocation()
2198
2206
  public static let pattern: JSRegExp = jsRegExpLiteral("('|\")(.*?)\\1", "")
2199
- /// Parse a pending-substitution shorthand once its expression has been evaluated
2200
- /// against the view; a value that does not survive evaluation leaves its longhands unset.
2201
- public static func resolvePendingSubstitution(_ view: ViewBase?, _ pending: CssPendingSubstitution?) throws
2202
- -> JSRecord<Any?>?
2203
- {
2204
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:106)
2205
- let value: Any? = try Core_ui_styling_style_scope.evaluateCssExpressions(
2206
- view, jsUnwrap(pending, "shorthand").shorthand, jsUnwrap(pending, "value").value)
2207
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:107)
2208
- if jsStrictEquals(value, Core_ui_core_properties_property_shared.unsetValue) {
2209
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:108)
2210
- return CssState.emptyPropertyBag
2211
- }
2212
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:111)
2213
- let expanded: JSArray<(String, Any?)>? = try Core_ui_core_properties_index._expandCssShorthand(
2214
- jsUnwrap(pending, "shorthand").shorthand, try jsConvertedString(value))
2215
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:112)
2216
- if !jsTruthy(expanded) {
2217
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:113)
2218
- try NativeScriptKit.Trace.write(
2219
- "Failed to expand shorthand [\(jsUnwrap(pending, "shorthand").shorthand)] resolved to [\(jsToStringThrowing(value))] for \(jsToStringThrowing(view)).",
2220
- NativeScriptKit.Trace.categories.Style, NativeScriptKit.Trace.messageType.warn)
2221
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:115)
2222
- return CssState.emptyPropertyBag
2223
- }
2224
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:118)
2225
- let resolved: JSRecord<Any?> = JSRecord<Any?>()
2226
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:119)
2227
- var i: Double = 0
2228
- let length: Double = try jsUnwrap(expanded, "length").length
2229
- while i < length {
2230
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:120)
2231
- try resolved[jsUnwrap(jsUnwrap(expanded, "i").element(i), "0").0] =
2232
- jsUnwrap(jsUnwrap(expanded, "i").element(i), "1").1
2233
- i += 1
2234
- }
2235
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:123)
2236
- return resolved
2237
- }
2238
- #sourceLocation()
2239
- /// Evaluate css-variable and css-calc expressions
2240
- public static func evaluateCssExpressions(_ view: ViewBase?, _ property: String, _ value: String) throws -> Any? {
2241
- var value = value
2242
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:130)
2243
- let newValue: String = try Core_ui_core_properties_index._evaluateCssVariableExpression(view, property, value)
2244
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:131)
2245
- if jsStringEquals(newValue, "unset") {
2246
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:132)
2247
- return Core_ui_core_properties_property_shared.unsetValue
2248
- }
2249
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:135)
2250
- value = newValue
2251
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:137)
2252
- do {
2253
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:138)
2254
- value = try jsConvertedString(Core_ui_core_properties_index._evaluateCssCalcExpression(value))
2255
- } catch {
2256
- let e: Any? = jsCaught(error)
2257
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:140)
2258
- try NativeScriptKit.Trace.write(
2259
- "Failed to evaluate css-calc for property [\(property)] for expression [\(value)] to \(jsToStringThrowing(view)). \(jsToStringThrowing(jsGet(e, "stack")))",
2260
- NativeScriptKit.Trace.categories.Error, NativeScriptKit.Trace.messageType.error)
2261
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:142)
2262
- return Core_ui_core_properties_property_shared.unsetValue
2263
- }
2264
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:145)
2265
- return value
2266
- }
2267
- #sourceLocation()
2268
2207
  public static func evaluateCssVariable(_ view: ViewBase?, _ name: String, _ value: String) throws -> String? {
2269
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:149)
2270
- let evaluated: Any? = try Core_ui_styling_style_scope.evaluateCssExpressions(view, name, value)
2271
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:151)
2208
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:103)
2209
+ let evaluated: Any? = try Core_ui_core_properties_index._evaluateCssExpressions(view, name, value)
2210
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:105)
2272
2211
  return try jsConvertedStringOrNil(
2273
2212
  (jsStrictEquals(evaluated, Core_ui_core_properties_property_shared.unsetValue) ? jsNull : evaluated))
2274
2213
  }
2275
2214
  #sourceLocation()
2276
2215
  public static func settleCssVariables(_ view: ViewBase?, _ cssExpsProperties: JSRecord<String>?) throws {
2277
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:155)
2216
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:109)
2278
2217
  var names: JSArray<String>? = nil
2279
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:156)
2218
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:110)
2280
2219
  for property in jsKeysOf(cssExpsProperties) {
2281
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:157)
2220
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:111)
2282
2221
  if Core_ui_core_properties_index.isCssVariable(property) {
2283
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:158)
2222
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:112)
2284
2223
  if !jsTruthy(names as Any?) {
2285
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:159)
2224
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:113)
2286
2225
  names = JSArray<String>()
2287
2226
  }
2288
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:161)
2227
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:115)
2289
2228
  _ = try jsUnwrap(names, "push").push(property)
2290
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:162)
2229
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:116)
2291
2230
  try jsUnwrap(jsUnwrap(view, "style").style, "setScopedCssVariable").setScopedCssVariable(
2292
2231
  property,
2293
2232
  (Core_ui_styling_style_scope.evaluateCssVariable(
2294
2233
  view, property, (jsUnwrap(cssExpsProperties, "property")[property] ?? "")) ?? "undefined"))
2295
2234
  }
2296
2235
  }
2297
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:165)
2236
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:119)
2298
2237
  if try !jsTruthy(names as Any?) || jsUnwrap(names, "length").length < 2
2299
2238
  || !Core_ui_styling_style_scope.hasForwardCssVariableReference(names, cssExpsProperties)
2300
2239
  {
2301
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:166)
2240
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:120)
2302
2241
  return
2303
2242
  }
2304
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:169)
2243
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:123)
2305
2244
  var pass: Double = 1
2306
2245
  while try pass < jsUnwrap(names, "length").length {
2307
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:170)
2246
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:124)
2308
2247
  var changed: Bool = false
2309
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:171)
2248
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:125)
2310
2249
  for name in try jsIterated(names, "names is not iterable") {
2311
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:172)
2250
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:126)
2312
2251
  let value: String? = try Core_ui_styling_style_scope.evaluateCssVariable(
2313
2252
  view, name, (jsUnwrap(cssExpsProperties, "name")[name] ?? ""))
2314
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:173)
2253
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:127)
2315
2254
  if try !jsStringEquals(
2316
2255
  (value ?? "undefined"),
2317
2256
  (jsUnwrap(jsUnwrap(view, "style").style, "getCssVariable").getCssVariable(name) ?? "undefined"))
2318
2257
  {
2319
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:174)
2258
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:128)
2320
2259
  try jsUnwrap(jsUnwrap(view, "style").style, "setScopedCssVariable").setScopedCssVariable(
2321
2260
  name, (value ?? "undefined"))
2322
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:175)
2261
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:129)
2323
2262
  changed = true
2324
2263
  }
2325
2264
  }
2326
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:178)
2265
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:132)
2327
2266
  if !changed {
2328
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:179)
2267
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:133)
2329
2268
  return
2330
2269
  }
2331
2270
  pass += 1
@@ -2335,92 +2274,92 @@ public enum Core_ui_styling_style_scope {
2335
2274
  public static func hasForwardCssVariableReference(_ names: JSArray<String>?, _ values: JSRecord<String>?) throws
2336
2275
  -> Bool
2337
2276
  {
2338
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:185)
2277
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:139)
2339
2278
  var i: Double = 0
2340
2279
  while try i < jsUnwrap(names, "length").length {
2341
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:186)
2280
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:140)
2342
2281
  let value: String? = try jsUnwrap(values, "names[i]")[jsToString(jsUnwrap(names, "i").element(i) as Any?)]
2343
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:187)
2282
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:141)
2344
2283
  var j: Double = i + 1
2345
2284
  while try j < jsUnwrap(names, "length").length {
2346
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:188)
2285
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:142)
2347
2286
  let ref: String = try "var(\(jsToString(jsUnwrap(names, "j").element(j) as Any?))"
2348
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:189)
2287
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:143)
2349
2288
  var at: Double = try jsIndexOf(jsUnwrap(value, "indexOf"), ref, nil)
2350
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:190)
2289
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:144)
2351
2290
  while at != -1 {
2352
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:191)
2291
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:145)
2353
2292
  let next: String? = try jsCharAtOrUndefined((value ?? "undefined"), at + Double(ref.utf16.count))
2354
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:192)
2293
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:146)
2355
2294
  if jsStringEquals((next ?? "undefined"), ")") || jsStringEquals((next ?? "undefined"), ",")
2356
2295
  || jsStringEquals((next ?? "undefined"), " ") || next == nil
2357
2296
  {
2358
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:193)
2297
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:147)
2359
2298
  return true
2360
2299
  }
2361
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:195)
2300
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:149)
2362
2301
  at = try jsIndexOf(jsUnwrap(value, "indexOf"), ref, at + 1)
2363
2302
  }
2364
2303
  j += 1
2365
2304
  }
2366
2305
  i += 1
2367
2306
  }
2368
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:200)
2307
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:154)
2369
2308
  return false
2370
2309
  }
2371
2310
  #sourceLocation()
2372
2311
  /// Only marks the merged list dirty - it is rebuilt on next read, since frameworks
2373
2312
  /// register stylesheets one call at a time.
2374
2313
  public static func mergeCssSelectors() {
2375
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:208)
2314
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:162)
2376
2315
  Core_ui_styling_style_scope.mergedApplicationCssSelectorsInvalid = true
2377
2316
  }
2378
2317
  #sourceLocation()
2379
2318
  public static func mergeCssKeyframes() {
2380
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:212)
2319
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:166)
2381
2320
  Core_ui_styling_style_scope.mergedApplicationCssKeyframesInvalid = true
2382
2321
  }
2383
2322
  #sourceLocation()
2384
2323
  public static func getMergedApplicationCssSelectors() throws -> JSArray<RuleSet>? {
2385
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:216)
2324
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:170)
2386
2325
  if Core_ui_styling_style_scope.mergedApplicationCssSelectorsInvalid {
2387
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:217)
2326
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:171)
2388
2327
  Core_ui_styling_style_scope.mergedApplicationCssSelectorsInvalid = false
2389
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:218)
2328
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:172)
2390
2329
  Core_ui_styling_style_scope.mergedApplicationCssSelectors = try Core_ui_styling_style_scope.concatRuleSets(
2391
2330
  Core_ui_styling_style_scope.applicationCssSelectors,
2392
2331
  Core_ui_styling_style_scope.applicationAdditionalSelectors)
2393
2332
  }
2394
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:221)
2333
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:175)
2395
2334
  return Core_ui_styling_style_scope.mergedApplicationCssSelectors
2396
2335
  }
2397
2336
  #sourceLocation()
2398
2337
  public static func getMergedApplicationCssKeyframes() throws -> JSArray<Any?>? {
2399
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:225)
2338
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:179)
2400
2339
  if Core_ui_styling_style_scope.mergedApplicationCssKeyframesInvalid {
2401
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:226)
2340
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:180)
2402
2341
  Core_ui_styling_style_scope.mergedApplicationCssKeyframesInvalid = false
2403
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:227)
2342
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:181)
2404
2343
  Core_ui_styling_style_scope.mergedApplicationCssKeyframes = try Core_ui_styling_style_scope.concatRuleSets(
2405
2344
  Core_ui_styling_style_scope.applicationCssKeyframes,
2406
2345
  Core_ui_styling_style_scope.applicationAdditionalKeyframes)
2407
2346
  }
2408
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:230)
2347
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:184)
2409
2348
  return Core_ui_styling_style_scope.mergedApplicationCssKeyframes
2410
2349
  }
2411
2350
  #sourceLocation()
2412
2351
  public static func getApplicationSelectorScope() throws -> StyleSheetSelectorScope? {
2413
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:234)
2352
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:188)
2414
2353
  if jsLenientNumberEquals(
2415
2354
  Core_ui_styling_style_scope.applicationSelectorScopeVersion,
2416
2355
  Core_ui_styling_style_scope.applicationCssSelectorVersion)
2417
2356
  {
2418
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:235)
2357
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:189)
2419
2358
  return Core_ui_styling_style_scope.applicationSelectorScope
2420
2359
  }
2421
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:238)
2360
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:192)
2422
2361
  let rulesets: JSArray<RuleSet>? = try Core_ui_styling_style_scope.getMergedApplicationCssSelectors()
2423
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:239)
2362
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:193)
2424
2363
  let canAppend: Bool =
2425
2364
  try
2426
2365
  ({ () -> Bool in
@@ -2430,100 +2369,100 @@ public enum Core_ui_styling_style_scope {
2430
2369
  Core_ui_styling_style_scope.applicationSelectorScopeResetVersion,
2431
2370
  Core_ui_styling_style_scope.applicationSelectorsResetVersion) : jsTruthy(__v_9)
2432
2371
  }()) && jsUnwrap(rulesets, "length").length >= Core_ui_styling_style_scope.applicationSelectorScopeRuleCount
2433
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:241)
2372
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:195)
2434
2373
  if canAppend {
2435
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:242)
2374
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:196)
2436
2375
  try jsUnwrap(Core_ui_styling_style_scope.applicationSelectorScope, "appendRulesets").appendRulesets(
2437
2376
  rulesets, Core_ui_styling_style_scope.applicationSelectorScopeRuleCount)
2438
2377
  } else {
2439
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:244)
2378
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:198)
2440
2379
  Core_ui_styling_style_scope.applicationSelectorScope =
2441
2380
  try
2442
2381
  (jsUnwrap(rulesets, "length").length > 0
2443
2382
  ? StyleSheetSelectorScope(rulesets, SelectorTier.Application) : nil)
2444
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:245)
2383
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:199)
2445
2384
  Core_ui_styling_style_scope.applicationSelectorsHaveScopedTags = false
2446
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:246)
2385
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:200)
2447
2386
  Core_ui_styling_style_scope.applicationSelectorScopeRuleCount = 0
2448
2387
  }
2449
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:249)
2388
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:203)
2450
2389
  var i: Double = Core_ui_styling_style_scope.applicationSelectorScopeRuleCount
2451
2390
  let length: Double = try jsUnwrap(rulesets, "length").length
2452
2391
  while i < length {
2453
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:250)
2392
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:204)
2454
2393
  if try jsTruthy(jsUnwrap(jsUnwrap(rulesets, "i").element(i), "scopedTag").scopedTag) {
2455
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:251)
2394
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:205)
2456
2395
  Core_ui_styling_style_scope.applicationSelectorsHaveScopedTags = true
2457
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:252)
2396
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:206)
2458
2397
  break
2459
2398
  }
2460
2399
  i += 1
2461
2400
  }
2462
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:256)
2401
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:210)
2463
2402
  Core_ui_styling_style_scope.applicationSelectorScopeRuleCount = try jsUnwrap(rulesets, "length").length
2464
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:257)
2403
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:211)
2465
2404
  Core_ui_styling_style_scope.applicationSelectorScopeVersion =
2466
2405
  Core_ui_styling_style_scope.applicationCssSelectorVersion
2467
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:258)
2406
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:212)
2468
2407
  Core_ui_styling_style_scope.applicationSelectorScopeResetVersion =
2469
2408
  Core_ui_styling_style_scope.applicationSelectorsResetVersion
2470
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:260)
2409
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:214)
2471
2410
  return Core_ui_styling_style_scope.applicationSelectorScope
2472
2411
  }
2473
2412
  #sourceLocation()
2474
2413
  /// Avoids `push(...arr)`, which blows the stack past the engine's argument limit.
2475
2414
  public static func concatRuleSets<T>(_ base: JSArray<T>?, _ additional: JSArray<T>?) throws -> JSArray<T>? {
2476
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:265)
2415
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:219)
2477
2416
  let baseLength: Double = try jsUnwrap(base, "length").length
2478
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:266)
2417
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:220)
2479
2418
  let merged: JSArray<T?> = try JSArray<T?>(
2480
2419
  Array(repeating: nil, count: jsArrayLength(baseLength + jsUnwrap(additional, "length").length)))
2481
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:268)
2420
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:222)
2482
2421
  do {
2483
2422
  var i: Double = 0
2484
2423
  while i < baseLength {
2485
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:269)
2424
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:223)
2486
2425
  try merged[(i as Double)] = jsObjectRequired(jsUnwrap(base, "i").element(i))
2487
2426
  i += 1
2488
2427
  }
2489
2428
  }
2490
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:272)
2429
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:226)
2491
2430
  do {
2492
2431
  var i: Double = 0
2493
2432
  let length: Double = try jsUnwrap(additional, "length").length
2494
2433
  while i < length {
2495
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:273)
2434
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:227)
2496
2435
  try merged[(baseLength + i as Double)] = jsObjectRequired(jsUnwrap(additional, "i").element(i))
2497
2436
  i += 1
2498
2437
  }
2499
2438
  }
2500
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:276)
2439
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:230)
2501
2440
  return jsFilled(merged)
2502
2441
  }
2503
2442
  #sourceLocation()
2504
2443
  public static func populateRulesFromImports(
2505
2444
  _ nodes: JSArray<Any?>?, _ rulesets: JSArray<RuleSet>?, _ keyframes: JSArray<Any?>?
2506
2445
  ) throws {
2507
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:476)
2446
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:430)
2508
2447
  let imports: JSArray<Any?>? = try jsUnwrap(nodes, "filter").filter({ (r: Any?) throws -> Bool in
2509
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:476)
2448
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:430)
2510
2449
  return try jsStrictEquals(jsGet(r, "type"), "import")
2511
2450
  })
2512
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:477)
2451
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:431)
2513
2452
  if try !(jsTruthy(jsUnwrap(imports, "length").length)) {
2514
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:478)
2453
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:432)
2515
2454
  return
2516
2455
  }
2517
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:481)
2456
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:435)
2518
2457
  let urlFromImportObject: (Any?) throws -> String = { (importObject: Any?) throws -> String in
2519
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:482)
2458
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:436)
2520
2459
  let importItem: String = try jsConvertedString(jsGet(importObject, "import"))
2521
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:483)
2460
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:437)
2522
2461
  let urlMatch: JSMatch? = { () -> JSMatch? in
2523
2462
  let __v_12 = importItem
2524
2463
  return jsTruthy(__v_12) ? jsImplicit(jsMatch(importItem, Core_ui_styling_style_scope.pattern)) : nil
2525
2464
  }()
2526
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:485)
2465
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:439)
2527
2466
  return try
2528
2467
  ({ () throws -> String in
2529
2468
  let __v_13 = urlMatch
@@ -2531,57 +2470,57 @@ public enum Core_ui_styling_style_scope {
2531
2470
  ? try ((jsUnwrap(urlMatch, "2").values.element(2) ?? nil) ?? "undefined") : ""
2532
2471
  }())
2533
2472
  }
2534
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:488)
2473
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:442)
2535
2474
  let sourceFromImportObject: (Any?) throws -> Any? = { (importObject: Any?) throws -> Any? in
2536
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:488)
2475
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:442)
2537
2476
  return try
2538
2477
  ({ () throws -> Any? in
2539
2478
  let __v_14 = try jsGet(importObject, "position")
2540
2479
  return jsTruthy(__v_14) ? try jsGet(jsGet(importObject, "position"), "source") : __v_14
2541
2480
  }())
2542
2481
  }
2543
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:490)
2482
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:444)
2544
2483
  let toUrlSourcePair: (Any?) throws -> Object_url_source_ = {
2545
2484
  (importObject: Any?) throws -> Object_url_source_ in
2546
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:490)
2485
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:444)
2547
2486
  return try Object_url_source_(
2548
2487
  url: urlFromImportObject(importObject), source: sourceFromImportObject(importObject))
2549
2488
  }
2550
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:495)
2489
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:449)
2551
2490
  let getCssFile: (Object_url_source?) throws -> CSSSource =
2552
2491
  FunctionCell_Object_url_sourceOpt_to_CSSSource.adapting({ (__p0: Object_url_source) throws -> CSSSource in
2553
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:495)
2492
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:449)
2554
2493
  let url: Any? = __p0.url
2555
2494
  let source: Any? = __p0.source
2556
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:495)
2495
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:449)
2557
2496
  return try jsObjectRequired(
2558
2497
  (jsTruthy(source)
2559
2498
  ? jsObjectRequired(
2560
2499
  CSSSource.fromFileImport(try jsConvertedString(url), try jsConvertedString(source)))
2561
2500
  : jsObjectRequired(CSSSource.fromURI(try jsConvertedString(url)))))
2562
2501
  })
2563
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:497)
2502
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:451)
2564
2503
  let cssFiles: JSArray<CSSSource>? = try
2565
2504
  (jsUnwrap(
2566
2505
  jsUnwrap((jsUnwrap(imports, "map") as JSArray<Any?>).map(toUrlSourcePair), "filter").filter({
2567
2506
  (__p0: Object_url_source_) -> Bool in
2568
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:499)
2507
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:453)
2569
2508
  let url: String = __p0.url
2570
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:499)
2509
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:453)
2571
2510
  return jsTruthy(url)
2572
2511
  }), "map") as JSArray<Object_url_source_>).map({ (__e: Object_url_source_) throws -> CSSSource in
2573
2512
  return try (getCssFile)(Object_url_source(jsObject: __e))
2574
2513
  })
2575
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:502)
2514
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:456)
2576
2515
  for cssFile in try jsIterated(cssFiles, "cssFiles is not iterable") {
2577
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:503)
2516
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:457)
2578
2517
  if jsTruthy(cssFile) {
2579
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:504)
2518
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:458)
2580
2519
  _ = try jsUnwrap(rulesets, "push").push(
2581
2520
  contentsOf: JSArray<RuleSet>(
2582
2521
  Array(jsIterated(jsUnwrap(cssFile, "selectors").selectors, "cssFile.selectors is not iterable"))
2583
2522
  ))
2584
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:505)
2523
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:459)
2585
2524
  _ = try jsUnwrap(keyframes, "push").push(
2586
2525
  contentsOf: JSArray<Any?>(
2587
2526
  Array(jsIterated(jsUnwrap(cssFile, "keyframes").keyframes, "cssFile.keyframes is not iterable"))
@@ -2594,128 +2533,137 @@ public enum Core_ui_styling_style_scope {
2594
2533
  _ nodes: JSArray<Any?>?, _ rulesets: JSArray<RuleSet>?, _ keyframes: JSArray<Any?>?,
2595
2534
  _ mediaQueryString: Any? = nil
2596
2535
  ) throws {
2597
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:511)
2536
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:465)
2598
2537
  for node in try jsIterated(nodes, "nodes is not iterable") {
2599
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:512)
2538
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:466)
2600
2539
  if try Core_ui_styling_style_scope.isKeyframe(node) {
2601
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:513)
2540
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:467)
2602
2541
  let keyframeRule: Any? = try JSObject([
2603
2542
  ("name", jsGet(node, "name")), ("keyframes", jsGet(node, "keyframes")),
2604
2543
  ("mediaQueryString", mediaQueryString),
2605
2544
  ])
2606
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:519)
2545
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:473)
2607
2546
  _ = try jsUnwrap(keyframes, "push").push(keyframeRule)
2608
2547
  } else if try Core_ui_styling_style_scope.isMedia(node) {
2609
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:522)
2548
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:476)
2549
+ if try !(Core_css_mediaquery_index.isEvaluableMediaQuery(jsConvertedString(jsGet(node, "media")))) {
2550
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:477)
2551
+ try NativeScriptKit.Trace.write(
2552
+ "Dropping '@media \(jsToStringThrowing(jsGet(node, "media")))': the runtime cannot evaluate it",
2553
+ NativeScriptKit.Trace.categories.MediaQuery, NativeScriptKit.Trace.messageType.warn)
2554
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:478)
2555
+ continue
2556
+ }
2557
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:482)
2610
2558
  var compositeMediaQuery: Any? = nil
2611
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:524)
2559
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:484)
2612
2560
  if jsTruthy(mediaQueryString) {
2613
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:525)
2561
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:485)
2614
2562
  if jsStringEquals(jsTypeof(mediaQueryString), "string") {
2615
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:526)
2563
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:486)
2616
2564
  compositeMediaQuery = try JSArray<String>([
2617
2565
  jsLenientString(mediaQueryString), jsConvertedString(jsGet(node, "media")),
2618
2566
  ])
2619
2567
  } else {
2620
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:528)
2568
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:488)
2621
2569
  _ = try jsUnwrap(jsArrayOrNil(mediaQueryString, { jsLenientString($0) }), "push").push(
2622
2570
  jsConvertedString(jsGet(node, "media")))
2623
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:529)
2571
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:489)
2624
2572
  compositeMediaQuery = jsArrayOrNil(mediaQueryString, { jsLenientString($0) })
2625
2573
  }
2626
2574
  } else {
2627
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:532)
2575
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:492)
2628
2576
  compositeMediaQuery = try jsGet(node, "media")
2629
2577
  }
2630
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:535)
2578
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:495)
2631
2579
  try Core_ui_styling_style_scope._populateRules(
2632
2580
  jsArrayOrNil(jsGet(node, "rules"), as: JSArray<Any?>.self, { $0 }), rulesets, keyframes,
2633
2581
  compositeMediaQuery)
2634
2582
  } else if try Core_ui_styling_style_scope.isRule(node) {
2635
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:537)
2583
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:497)
2636
2584
  let ruleset: RuleSet? = try Core_ui_styling_css_selector.fromAstNode(node)
2637
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:538)
2585
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:498)
2638
2586
  try jsUnwrap(ruleset, setting: "mediaQueryString").mediaQueryString = mediaQueryString
2639
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:540)
2587
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:500)
2640
2588
  _ = try jsUnwrap(rulesets, "push").push(jsObjectRequired(ruleset))
2641
2589
  }
2642
2590
  }
2643
2591
  }
2644
2592
  #sourceLocation()
2645
2593
  public static func removeTaggedAdditionalCSS(_ tag: Any?) throws -> Bool {
2646
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:546)
2594
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:506)
2647
2595
  var selectorsChanged: Bool = false
2648
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:547)
2596
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:507)
2649
2597
  var keyframesChanged: Bool = false
2650
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:548)
2598
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:508)
2651
2599
  var updated: Bool = false
2652
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:550)
2600
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:510)
2653
2601
  do {
2654
2602
  var i: Double = 0
2655
2603
  while i < Core_ui_styling_style_scope.applicationAdditionalSelectors.length {
2656
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:551)
2604
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:511)
2657
2605
  if try jsStrictEquals(
2658
2606
  jsUnwrap(Core_ui_styling_style_scope.applicationAdditionalSelectors.element(i), "tag").tag, tag)
2659
2607
  {
2660
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:552)
2608
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:512)
2661
2609
  _ = Core_ui_styling_style_scope.applicationAdditionalSelectors.splice(i, 1)
2662
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:553)
2610
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:513)
2663
2611
  i -= 1
2664
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:554)
2612
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:514)
2665
2613
  selectorsChanged = true
2666
2614
  }
2667
2615
  i += 1
2668
2616
  }
2669
2617
  }
2670
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:558)
2618
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:518)
2671
2619
  do {
2672
2620
  var i: Double = 0
2673
2621
  while i < Core_ui_styling_style_scope.applicationAdditionalKeyframes.length {
2674
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:559)
2622
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:519)
2675
2623
  if try jsStrictEquals(
2676
2624
  jsGet((Core_ui_styling_style_scope.applicationAdditionalKeyframes.element(i) ?? nil), "tag"), tag)
2677
2625
  {
2678
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:560)
2626
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:520)
2679
2627
  _ = Core_ui_styling_style_scope.applicationAdditionalKeyframes.splice(i, 1)
2680
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:561)
2628
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:521)
2681
2629
  i -= 1
2682
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:562)
2630
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:522)
2683
2631
  keyframesChanged = true
2684
2632
  }
2685
2633
  i += 1
2686
2634
  }
2687
2635
  }
2688
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:566)
2636
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:526)
2689
2637
  if selectorsChanged {
2690
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:568)
2638
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:528)
2691
2639
  Core_ui_styling_style_scope.applicationSelectorsResetVersion += 1
2692
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:569)
2640
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:529)
2693
2641
  Core_ui_styling_style_scope.mergeCssSelectors()
2694
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:570)
2642
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:530)
2695
2643
  updated = true
2696
2644
  }
2697
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:573)
2645
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:533)
2698
2646
  if keyframesChanged {
2699
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:574)
2647
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:534)
2700
2648
  Core_ui_styling_style_scope.mergeCssKeyframes()
2701
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:575)
2649
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:535)
2702
2650
  updated = true
2703
2651
  }
2704
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:578)
2652
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:538)
2705
2653
  if updated {
2706
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:579)
2654
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:539)
2707
2655
  Core_ui_styling_style_scope.applicationCssSelectorVersion += 1
2708
2656
  }
2709
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:582)
2657
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:542)
2710
2658
  return updated
2711
2659
  }
2712
2660
  #sourceLocation()
2713
2661
  public static func addTaggedAdditionalCSS(_ cssText: String, _ tag: Any? = nil) throws -> Bool {
2714
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:586)
2662
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:546)
2715
2663
  let __d_1: CSSSource = try jsDestructured(CSSSource.fromDetect(cssText, nil), "selectors")
2716
2664
  let selectors: JSArray<RuleSet>? = __d_1.selectors
2717
2665
  let keyframes: JSArray<Any?>? = __d_1.keyframes
2718
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:587)
2666
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:547)
2719
2667
  let tagScope: String? =
2720
2668
  ({ () -> String? in
2721
2669
  let __v_15: String? =
@@ -2736,80 +2684,80 @@ public enum Core_ui_styling_style_scope {
2736
2684
  }())
2737
2685
  return jsTruthy(__v_15 as Any?) ? __v_15 : nil
2738
2686
  }())
2739
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:589)
2687
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:549)
2740
2688
  if jsTruthy(tagScope as Any?) && jsTruthy(tag) {
2741
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:590)
2689
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:550)
2742
2690
  _ = Core_ui_styling_style_scope.tagToScopeTag.set(tag, (tagScope ?? "undefined"))
2743
2691
  }
2744
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:593)
2692
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:553)
2745
2693
  var selectorsChanged: Bool = false
2746
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:594)
2694
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:554)
2747
2695
  var keyframesChanged: Bool = false
2748
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:595)
2696
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:555)
2749
2697
  var updated: Bool = false
2750
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:597)
2698
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:557)
2751
2699
  if try (jsTruthy(selectors) && jsTruthy(jsUnwrap(selectors, "length").length)) {
2752
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:598)
2700
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:558)
2753
2701
  selectorsChanged = true
2754
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:600)
2702
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:560)
2755
2703
  if !jsIsNullish(tag) || tagScope != nil {
2756
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:601)
2704
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:561)
2757
2705
  var i: Double = 0
2758
2706
  let length: Double = try jsUnwrap(selectors, "length").length
2759
2707
  while i < length {
2760
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:602)
2708
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:562)
2761
2709
  try jsUnwrap(jsUnwrap(selectors, "i").element(i), setting: "tag").tag = tag
2762
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:603)
2710
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:563)
2763
2711
  try jsUnwrap(jsUnwrap(selectors, "i").element(i), setting: "scopedTag").scopedTag =
2764
2712
  (tagScope ?? "undefined")
2765
2713
  i += 1
2766
2714
  }
2767
2715
  }
2768
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:607)
2716
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:567)
2769
2717
  _ = try Core_ui_styling_style_scope.applicationAdditionalSelectors.push(
2770
2718
  contentsOf: JSArray<RuleSet>(Array(jsIterated(selectors, "selectors is not iterable"))))
2771
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:608)
2719
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:568)
2772
2720
  Core_ui_styling_style_scope.mergeCssSelectors()
2773
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:609)
2721
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:569)
2774
2722
  updated = true
2775
2723
  }
2776
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:612)
2724
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:572)
2777
2725
  if try (jsTruthy(keyframes) && jsTruthy(jsUnwrap(keyframes, "length").length)) {
2778
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:613)
2726
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:573)
2779
2727
  keyframesChanged = true
2780
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:615)
2728
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:575)
2781
2729
  if !jsIsNullish(tag) || tagScope != nil {
2782
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:616)
2730
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:576)
2783
2731
  var i: Double = 0
2784
2732
  let length: Double = try jsUnwrap(keyframes, "length").length
2785
2733
  while i < length {
2786
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:617)
2734
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:577)
2787
2735
  try jsSet((jsUnwrap(keyframes, "i").element(i) ?? nil), "tag", tag)
2788
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:618)
2736
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:578)
2789
2737
  try jsSet((jsUnwrap(keyframes, "i").element(i) ?? nil), "scopedTag", (tagScope as Any?))
2790
2738
  i += 1
2791
2739
  }
2792
2740
  }
2793
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:622)
2741
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:582)
2794
2742
  _ = try Core_ui_styling_style_scope.applicationAdditionalKeyframes.push(
2795
2743
  contentsOf: JSArray<Any?>(Array(jsIterated(keyframes, "keyframes is not iterable"))))
2796
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:623)
2744
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:583)
2797
2745
  Core_ui_styling_style_scope.mergeCssKeyframes()
2798
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:624)
2746
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:584)
2799
2747
  updated = true
2800
2748
  }
2801
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:627)
2749
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:587)
2802
2750
  if updated {
2803
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:628)
2751
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:588)
2804
2752
  Core_ui_styling_style_scope.applicationCssSelectorVersion += 1
2805
2753
  }
2806
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:631)
2754
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:591)
2807
2755
  return updated
2808
2756
  }
2809
2757
  #sourceLocation()
2810
2758
  public static var onCssChanged: Any? = nil
2811
2759
  public static func onLiveSync(_ args: Any?) throws {
2812
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:660)
2760
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:620)
2813
2761
  _ = try jsCall(
2814
2762
  Core_ui_styling_style_scope.loadCss,
2815
2763
  jsUnwrap(Core_application_application.Application, "getCssFileName").getCssFileName(), jsNull, jsNull)
@@ -2818,43 +2766,43 @@ public enum Core_ui_styling_style_scope {
2818
2766
  public static var loadCss: Any? = nil
2819
2767
  public static var loadAppCSS: Any? = nil
2820
2768
  public static func trackedNamesEqual(_ a: JSSet<String>?, _ b: JSSet<String>?) throws -> Bool {
2821
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:725)
2769
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:685)
2822
2770
  if a === b {
2823
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:726)
2771
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:686)
2824
2772
  return true
2825
2773
  }
2826
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:729)
2774
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:689)
2827
2775
  if try !jsTruthy(a) || !jsTruthy(b)
2828
2776
  || !jsLenientNumberEquals(jsUnwrap(a, "size").size, jsUnwrap(b, "size").size)
2829
2777
  {
2830
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:730)
2778
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:690)
2831
2779
  return false
2832
2780
  }
2833
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:733)
2781
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:693)
2834
2782
  for name in try jsIterated(a, "a is not iterable") {
2835
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:734)
2783
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:694)
2836
2784
  if try !(jsUnwrap(b, "has").has(name)) {
2837
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:735)
2785
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:695)
2838
2786
  return false
2839
2787
  }
2840
2788
  }
2841
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:739)
2789
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:699)
2842
2790
  return true
2843
2791
  }
2844
2792
  #sourceLocation()
2845
2793
  /// Two empty maps compare equal even when they are different objects.
2846
2794
  public static func changeMapsEqual(_ applied: Any?, _ current: Any?) throws -> Bool {
2847
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:744)
2795
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:704)
2848
2796
  if jsStrictEquals(applied, current) {
2849
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:745)
2797
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:705)
2850
2798
  return true
2851
2799
  }
2852
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:748)
2800
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:708)
2853
2801
  if try !jsStrictEquals(jsGet(applied, "size"), jsGet(current, "size")) {
2854
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:749)
2802
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:709)
2855
2803
  return false
2856
2804
  }
2857
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:752)
2805
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:712)
2858
2806
  do {
2859
2807
  let __it1 = try jsIteratorOf(applied)
2860
2808
  var __returned1 = false
@@ -2864,9 +2812,9 @@ public enum Core_ui_styling_style_scope {
2864
2812
  let view: ViewBase? = try jsCast((try jsGet(__it1.jsCurrent, "0")), ViewBase.self)
2865
2813
  let changes: Any? = (try jsGet(__it1.jsCurrent, "1"))
2866
2814
  do {
2867
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:753)
2815
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:713)
2868
2816
  let currentChanges: Any? = try jsCallMethod(current, "get", jsObjectRequired(view))
2869
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:754)
2817
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:714)
2870
2818
  if try !jsTruthy(currentChanges)
2871
2819
  || !(Core_ui_styling_style_scope.trackedNamesEqual(
2872
2820
  (jsGet(changes, "attributes") as? JSSet<String>),
@@ -2875,7 +2823,7 @@ public enum Core_ui_styling_style_scope {
2875
2823
  (jsGet(changes, "pseudoClasses") as? JSSet<String>),
2876
2824
  (jsGet(currentChanges, "pseudoClasses") as? JSSet<String>)))
2877
2825
  {
2878
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:755)
2826
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:715)
2879
2827
  __value1 = false
2880
2828
  __returned1 = true
2881
2829
  break __for1
@@ -2889,7 +2837,7 @@ public enum Core_ui_styling_style_scope {
2889
2837
  try __it1.jsCloseChecked()
2890
2838
  if __returned1 { return __value1! }
2891
2839
  }
2892
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:759)
2840
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:719)
2893
2841
  return true
2894
2842
  }
2895
2843
  #sourceLocation()
@@ -2897,104 +2845,131 @@ public enum Core_ui_styling_style_scope {
2897
2845
  _ url: String, _ appDirectory: String, _ fileExists: @escaping (String) throws -> Bool,
2898
2846
  _ importSource: String? = nil
2899
2847
  ) throws -> String? {
2900
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1497)
2848
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1462)
2901
2849
  var fileName: String = jsTrim(url)
2902
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1498)
2850
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1463)
2903
2851
  if jsIndexOf(fileName, "~/", nil) == 0 {
2904
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1499)
2852
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1464)
2905
2853
  fileName = jsReplace(fileName, "~/", "")
2906
2854
  }
2907
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1502)
2855
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1467)
2908
2856
  let isAbsolutePath: Bool = jsIndexOf(fileName, "/", nil) == 0
2909
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1503)
2857
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1468)
2910
2858
  let absolutePath: String =
2911
2859
  try (isAbsolutePath ? fileName : NativeScriptKit.path.join(JSArray<String>([appDirectory, fileName])))
2912
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1504)
2860
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1469)
2913
2861
  if try jsCallable(fileExists, "fileExists")(absolutePath) {
2914
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1505)
2862
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1470)
2915
2863
  return absolutePath
2916
2864
  }
2917
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1508)
2865
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1473)
2918
2866
  if !isAbsolutePath {
2919
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1509)
2867
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1474)
2920
2868
  if jsStringEquals(jsCharAt(fileName, 0), "~") && !jsStringEquals(jsCharAt(fileName, 1), "/")
2921
2869
  && !jsStringEquals(jsCharAt(fileName, 1), "\"")
2922
2870
  {
2923
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1510)
2871
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1475)
2924
2872
  fileName = jsSubstring(fileName, 1, nil)
2925
2873
  }
2926
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1513)
2874
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1478)
2927
2875
  if jsTruthy(importSource as Any?) {
2928
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1514)
2876
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1479)
2929
2877
  let importFile: String = try Core_ui_styling_style_scope.resolveFilePathFromImport(
2930
2878
  (importSource ?? "undefined"), fileName)
2931
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1515)
2879
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1480)
2932
2880
  if try jsCallable(fileExists, "fileExists")(importFile) {
2933
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1516)
2881
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1481)
2934
2882
  return importFile
2935
2883
  }
2936
2884
  }
2937
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1520)
2885
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1485)
2938
2886
  let external: String = try NativeScriptKit.path.join(
2939
2887
  JSArray<String>([appDirectory, "tns_modules", fileName]))
2940
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1521)
2888
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1486)
2941
2889
  if try jsCallable(fileExists, "fileExists")(external) {
2942
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1522)
2890
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1487)
2943
2891
  return external
2944
2892
  }
2945
2893
  }
2946
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1526)
2894
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1491)
2947
2895
  return nil
2948
2896
  }
2949
2897
  #sourceLocation()
2950
2898
  public static func resolveFilePathFromImport(_ importSource: String, _ fileName: String) throws -> String {
2951
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1530)
2899
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1495)
2952
2900
  let importSourceParts: JSArray<String?>? = try jsSplit(
2953
2901
  importSource, untypedKeepingUnset: NativeScriptKit.path.separator, nil)
2954
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1531)
2902
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1496)
2955
2903
  let fileNameParts: JSArray<String?>? = try jsUnwrap(
2956
2904
  jsSplit(fileName, untypedKeepingUnset: NativeScriptKit.path.separator, nil), "filter"
2957
2905
  ).filter({ (p: String?) -> Bool in
2958
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1534)
2906
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1499)
2959
2907
  return !(Core_ui_styling_style_scope.isCurrentDirectory((p ?? "undefined")))
2960
2908
  })
2961
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1537)
2909
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1502)
2962
2910
  _ = try jsUnwrap(importSourceParts, "pop").pop()
2963
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1539)
2911
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1504)
2964
2912
  try jsUnwrap(fileNameParts, "forEach").forEach({ (p: String?) throws -> Void in
2965
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1539)
2913
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1504)
2966
2914
  try _ =
2967
2915
  ((Core_ui_styling_style_scope.isParentDirectory((p ?? "undefined"))
2968
2916
  ? ((jsUnwrap(importSourceParts, "pop").pop() as Any?) as Any?)
2969
2917
  : (jsUnwrap(importSourceParts, "push").push(p) as Any?)))
2970
2918
  })
2971
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1541)
2919
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1506)
2972
2920
  return try jsUnwrap(importSourceParts, "join").join(jsJoinSeparator(NativeScriptKit.path.separator))
2973
2921
  }
2974
2922
  #sourceLocation()
2923
+ public static var inlineStyleProperties: JSWeakMap<ViewBase, JSSet<String>>?
2924
+ public static func setInlineValue(_ view: ViewBase?, _ property: String, _ value: Any?) throws {
2925
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1513)
2926
+ if try jsHasKey(jsUnwrap(view, "style").style, property) {
2927
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1514)
2928
+ try jsUnwrap(jsUnwrap(view, "style").style, setting: "property")[jsKey: property] = value
2929
+ } else {
2930
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1516)
2931
+ try jsUnwrap(view, setting: "property")[jsKey: property] = value
2932
+ }
2933
+ }
2934
+ #sourceLocation()
2935
+ public static func unsetInlineValue(_ view: ViewBase?, _ property: String) throws {
2936
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1521)
2937
+ do {
2938
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1522)
2939
+ try Core_ui_styling_style_scope.setInlineValue(
2940
+ view, property, Core_ui_core_properties_property_shared.unsetValue)
2941
+ } catch {
2942
+ let e: Any? = jsCaught(error)
2943
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1524)
2944
+ try NativeScriptKit.Trace.write(
2945
+ "Failed to unset property [\(property)] on \(jsToStringThrowing(view)). \(jsToStringThrowing(e))",
2946
+ NativeScriptKit.Trace.categories.Error, NativeScriptKit.Trace.messageType.error)
2947
+ }
2948
+ }
2949
+ #sourceLocation()
2975
2950
  public static var applyInlineStyle: Any? = nil
2976
2951
  public static func isCurrentDirectory(_ uriPart: String) -> Bool {
2977
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1604)
2952
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1625)
2978
2953
  return jsStringEquals(uriPart, ".")
2979
2954
  }
2980
2955
  #sourceLocation()
2981
2956
  public static func isParentDirectory(_ uriPart: String) -> Bool {
2982
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1608)
2957
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1629)
2983
2958
  return jsStringEquals(uriPart, "..")
2984
2959
  }
2985
2960
  #sourceLocation()
2986
2961
  public static func isMedia(_ node: Any?) throws -> Bool {
2987
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1612)
2962
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1633)
2988
2963
  return try jsStrictEquals(jsGet(node, "type"), "media")
2989
2964
  }
2990
2965
  #sourceLocation()
2991
2966
  public static func isKeyframe(_ node: Any?) throws -> Bool {
2992
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1616)
2967
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1637)
2993
2968
  return try jsStrictEquals(jsGet(node, "type"), "keyframes")
2994
2969
  }
2995
2970
  #sourceLocation()
2996
2971
  public static func isRule(_ node: Any?) throws -> Bool {
2997
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1620)
2972
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1641)
2998
2973
  return try jsStrictEquals(jsGet(node, "type"), "rule")
2999
2974
  }
3000
2975
  }
@@ -3002,29 +2977,29 @@ public enum Core_ui_styling_style_scope {
3002
2977
  #sourceLocation()
3003
2978
  public func __init_Core_ui_styling_style_scope() {
3004
2979
  jsReport {
3005
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:27)
2980
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:28)
3006
2981
  do {
3007
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:28)
2982
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:29)
3008
2983
  if jsTruthy(CorePackages.appConfig) {
3009
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:29)
2984
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:30)
3010
2985
  if try jsStrictEquals(jsGet(CorePackages.appConfig, "cssParser"), "rework") {
3011
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:30)
2986
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:31)
3012
2987
  Core_ui_styling_style_scope.parser = "rework"
3013
2988
  } else if try jsStrictEquals(jsGet(CorePackages.appConfig, "cssParser"), "nativescript") {
3014
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:32)
2989
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:33)
3015
2990
  Core_ui_styling_style_scope.parser = "nativescript"
3016
2991
  }
3017
2992
  }
3018
2993
  } catch {
3019
2994
 
3020
2995
  }
3021
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:68)
3022
- Core_ui_styling_style_scope.animationsSymbol = jsSymbol("animations")
3023
2996
  #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:69)
3024
- Core_ui_styling_style_scope.animationVariablesSymbol = jsSymbol("animationVariables")
2997
+ Core_ui_styling_style_scope.animationsSymbol = jsSymbol("animations")
3025
2998
  #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:70)
2999
+ Core_ui_styling_style_scope.animationVariablesSymbol = jsSymbol("animationVariables")
3000
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:71)
3026
3001
  Core_ui_styling_style_scope.keyframeVariablesSymbol = jsSymbol("keyframeVariables")
3027
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:279)
3002
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:233)
3028
3003
  JSPrototypes.declare(
3029
3004
  CSSSource.self, "selectors",
3030
3005
  get: { (__this: Any?) throws -> Any? in
@@ -3043,127 +3018,127 @@ public func __init_Core_ui_styling_style_scope() {
3043
3018
  guard let __o = __this as? CSSSource else { throw JSException(JSTypeError("Illegal invocation")) }
3044
3019
  return __o.source
3045
3020
  }, set: nil)
3046
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:634)
3021
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:594)
3047
3022
  Core_ui_styling_style_scope.onCssChanged = FunctionCell_AnyOpt_to_Void.scriptOrNil(
3048
3023
  "", 1,
3049
3024
  { (args: Any?) throws -> Void in
3050
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:635)
3025
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:595)
3051
3026
  if try jsTruthy(jsGet(args, "cssText")) {
3052
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:636)
3027
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:596)
3053
3028
  let __d_2: CSSSource = try jsDestructured(
3054
3029
  CSSSource.fromSource(
3055
3030
  jsConvertedString(jsGet(args, "cssText")), jsConvertedString(jsGet(args, "cssFile"))),
3056
3031
  "selectors")
3057
3032
  let selectors: JSArray<RuleSet>? = __d_2.selectors
3058
3033
  let keyframes: JSArray<Any?>? = __d_2.keyframes
3059
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:637)
3034
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:597)
3060
3035
  var updated: Bool = false
3061
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:639)
3036
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:599)
3062
3037
  if jsTruthy(selectors) {
3063
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:640)
3038
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:600)
3064
3039
  _ = try Core_ui_styling_style_scope.applicationAdditionalSelectors.push(
3065
3040
  contentsOf: JSArray<RuleSet>(Array(jsIterated(selectors, "selectors is not iterable"))))
3066
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:641)
3041
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:601)
3067
3042
  Core_ui_styling_style_scope.mergeCssSelectors()
3068
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:642)
3043
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:602)
3069
3044
  updated = true
3070
3045
  }
3071
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:645)
3046
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:605)
3072
3047
  if jsTruthy(keyframes) {
3073
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:646)
3048
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:606)
3074
3049
  _ = try Core_ui_styling_style_scope.applicationAdditionalKeyframes.push(
3075
3050
  contentsOf: JSArray<Any?>(Array(jsIterated(keyframes, "keyframes is not iterable"))))
3076
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:647)
3051
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:607)
3077
3052
  Core_ui_styling_style_scope.mergeCssKeyframes()
3078
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:648)
3053
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:608)
3079
3054
  updated = true
3080
3055
  }
3081
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:651)
3056
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:611)
3082
3057
  if updated {
3083
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:652)
3058
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:612)
3084
3059
  Core_ui_styling_style_scope.applicationCssSelectorVersion += 1
3085
3060
  }
3086
3061
  } else if try jsTruthy(jsGet(args, "cssFile")) {
3087
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:655)
3062
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:615)
3088
3063
  _ = try jsCall(Core_ui_styling_style_scope.loadCss, jsGet(args, "cssFile"), jsNull, jsNull)
3089
3064
  }
3090
3065
  })
3091
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:663)
3066
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:623)
3092
3067
  Core_ui_styling_style_scope.loadCss = FunctionCell_String_to_Void.scriptOrNil(
3093
3068
  "", 1,
3094
3069
  { (cssModule: String) throws -> Void in
3095
3070
  var cssModule = cssModule
3096
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:664)
3071
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:624)
3097
3072
  if !jsTruthy(cssModule) {
3098
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:665)
3073
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:625)
3099
3074
  return
3100
3075
  }
3101
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:669)
3076
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:629)
3102
3077
  if jsStartsWith(cssModule, "./", nil) {
3103
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:670)
3078
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:630)
3104
3079
  cssModule = jsSubstring(cssModule, 2, nil)
3105
3080
  }
3106
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:673)
3081
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:633)
3107
3082
  let __d_3: CSSSource = try jsDestructured(CSSSource.fromURI(cssModule), "selectors")
3108
3083
  let selectors: JSArray<RuleSet>? = __d_3.selectors
3109
3084
  let keyframes: JSArray<Any?>? = __d_3.keyframes
3110
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:674)
3085
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:634)
3111
3086
  var updated: Bool = false
3112
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:677)
3087
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:637)
3113
3088
  if try jsUnwrap(selectors, "length").length > 0
3114
3089
  || jsUnwrap(Core_ui_styling_style_scope.applicationCssSelectors, "length").length > 0
3115
3090
  {
3116
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:679)
3091
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:639)
3117
3092
  Core_ui_styling_style_scope.applicationSelectorsResetVersion += 1
3118
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:680)
3093
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:640)
3119
3094
  Core_ui_styling_style_scope.applicationCssSelectors = selectors
3120
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:681)
3095
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:641)
3121
3096
  Core_ui_styling_style_scope.mergeCssSelectors()
3122
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:682)
3097
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:642)
3123
3098
  updated = true
3124
3099
  }
3125
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:686)
3100
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:646)
3126
3101
  if try jsUnwrap(keyframes, "length").length > 0
3127
3102
  || jsUnwrap(Core_ui_styling_style_scope.applicationCssKeyframes, "length").length > 0
3128
3103
  {
3129
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:687)
3104
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:647)
3130
3105
  Core_ui_styling_style_scope.applicationCssKeyframes = keyframes
3131
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:688)
3106
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:648)
3132
3107
  Core_ui_styling_style_scope.mergeCssKeyframes()
3133
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:689)
3108
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:649)
3134
3109
  updated = true
3135
3110
  }
3136
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:692)
3111
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:652)
3137
3112
  if updated {
3138
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:693)
3113
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:653)
3139
3114
  Core_ui_styling_style_scope.applicationCssSelectorVersion += 1
3140
3115
  }
3141
3116
  })
3142
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:697)
3117
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:657)
3143
3118
  _ = try jsCallMethod(
3144
3119
  jsGet(Core_globals_global_utils.getNativeScriptGlobals(), "events"), "on", "cssChanged",
3145
3120
  Core_ui_styling_style_scope.onCssChanged)
3146
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:698)
3121
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:658)
3147
3122
  _ = try jsCallMethod(
3148
3123
  jsGet(Core_globals_global_utils.getNativeScriptGlobals(), "events"), "on", "livesync",
3149
3124
  FunctionCell_AnyOpt_to_Void.script(
3150
3125
  "onLiveSync", 1,
3151
3126
  FunctionCell_AnyOpt_to_Void.declared(
3152
3127
  "Core_ui_styling_style_scope.onLiveSync", { try Core_ui_styling_style_scope.onLiveSync($0) })))
3153
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:705)
3128
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:665)
3154
3129
  Core_ui_styling_style_scope.loadAppCSS = FunctionCell_AnyOpt_to_Void.scriptOrNil(
3155
3130
  "", 1,
3156
3131
  { (args: Any?) throws -> Void in
3157
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:706)
3132
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:666)
3158
3133
  _ = try jsCall(Core_ui_styling_style_scope.loadCss, jsGet(args, "cssFile"), jsNull, jsNull)
3159
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:707)
3134
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:667)
3160
3135
  _ = try jsCallMethod(
3161
3136
  jsGet(Core_globals_global_utils.getNativeScriptGlobals(), "events"), "off", "loadAppCss",
3162
3137
  Core_ui_styling_style_scope.loadAppCSS)
3163
3138
  })
3164
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:710)
3139
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:670)
3165
3140
  if try jsUnwrap(Core_application_application.Application, "hasLaunched").hasLaunched() {
3166
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:711)
3141
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:671)
3167
3142
  _ = try jsCall(
3168
3143
  Core_ui_styling_style_scope.loadAppCSS,
3169
3144
  JSObject([
@@ -3171,18 +3146,18 @@ public func __init_Core_ui_styling_style_scope() {
3171
3146
  ("cssFile", jsUnwrap(Core_application_application.Application, "getCssFileName").getCssFileName()),
3172
3147
  ]), jsNull, jsNull)
3173
3148
  } else {
3174
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:721)
3149
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:681)
3175
3150
  _ = try jsCallMethod(
3176
3151
  jsGet(Core_globals_global_utils.getNativeScriptGlobals(), "events"), "on", "loadAppCss",
3177
3152
  Core_ui_styling_style_scope.loadAppCSS)
3178
3153
  }
3179
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:762)
3154
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:722)
3180
3155
  CssState.emptyChangeMap = jsFreeze(JSMap<Any?, Any?>())
3181
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:762)
3156
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:722)
3182
3157
  CssState.emptyAnimationArray = try jsArrayFrom(jsFreeze(JSArray<Any?>())) {
3183
3158
  try jsObjectRequired(jsShaped($0) { NativeScriptKit.KeyframeAnimation() })
3184
3159
  }
3185
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:762)
3160
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:722)
3186
3161
  CssState.emptyMatch = try { () throws -> SelectorsMatch in
3187
3162
  let __literal3 = SelectorsMatch(jsLiteral: ())
3188
3163
  __literal3.selectors = JSArray<SelectorCore>()
@@ -3204,13 +3179,13 @@ public func __init_Core_ui_styling_style_scope() {
3204
3179
  jsExpandoSet(__literal3, "properties", jsNull)
3205
3180
  return __literal3
3206
3181
  }()
3207
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1227)
3182
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1192)
3208
3183
  try jsSet(JSPrototypes.of(CssState.self), "_appliedChangeMap", CssState.emptyChangeMap)
3209
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1228)
3184
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1193)
3210
3185
  try jsSet(JSPrototypes.of(CssState.self), "_appliedAnimations", CssState.emptyAnimationArray)
3211
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1229)
3186
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1194)
3212
3187
  try jsSet(JSPrototypes.of(CssState.self), "_matchInvalid", true)
3213
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1231)
3188
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1196)
3214
3189
  JSPrototypes.declare(
3215
3190
  StyleScope.self, "css",
3216
3191
  get: { (__this: Any?) throws -> Any? in
@@ -3233,96 +3208,152 @@ public func __init_Core_ui_styling_style_scope() {
3233
3208
  guard let __o = __this as? StyleScope else { throw JSException(JSTypeError("Illegal invocation")) }
3234
3209
  return try __o.hasSiblingCombinatorSelectors
3235
3210
  }, set: nil)
3236
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1544)
3211
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1510)
3212
+ Core_ui_styling_style_scope.inlineStyleProperties = JSWeakMap<ViewBase, JSSet<String>>()
3213
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1528)
3237
3214
  Core_ui_styling_style_scope.applyInlineStyle = FunctionCell_ViewBaseOpt_String_to_Void.scriptOrNil(
3238
3215
  "", 2,
3239
3216
  { (view: ViewBase?, styleStr: String) throws -> Void in
3240
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1545)
3217
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1529)
3241
3218
  let localStyle: String = "local { \(styleStr) }"
3242
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1546)
3219
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1530)
3243
3220
  let inlineRuleSet: JSArray<RuleSet>? = try jsUnwrap(CSSSource.fromSource(localStyle), "selectors")
3244
3221
  .selectors
3245
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1549)
3222
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1531)
3223
+ let declarations: JSArray<Any?>? = try jsUnwrap(jsUnwrap(inlineRuleSet, "0").element(0), "declarations")
3224
+ .declarations
3225
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1534)
3246
3226
  try jsUnwrap(jsUnwrap(view, "style").style, "resetUnscopedCssVariables").resetUnscopedCssVariables()
3227
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1536)
3228
+ var declared: JSSet<String>? = nil
3229
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1538)
3230
+ try jsUnwrap(declarations, "forEach").forEach({ (d: Any?) throws -> Void in
3231
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1540)
3232
+ let property: String = try jsConvertedString(jsGet(d, "property"))
3233
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1541)
3234
+ if Core_ui_core_properties_index.isCssVariable(property) {
3235
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1542)
3236
+ try jsUnwrap(jsUnwrap(view, "style").style, "setUnscopedCssVariable").setUnscopedCssVariable(
3237
+ property, jsConvertedString(jsGet(d, "value")))
3238
+ } else {
3239
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1544)
3240
+ if !jsTruthy(declared as Any?) {
3241
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1545)
3242
+ declared = JSSet<String>()
3243
+ }
3244
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1547)
3245
+ _ = try jsUnwrap(declared, "add").add(property)
3246
+ }
3247
+ })
3247
3248
  #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1552)
3248
- try jsUnwrap(jsUnwrap(jsUnwrap(inlineRuleSet, "0").element(0), "declarations").declarations, "forEach")
3249
- .forEach({ (d: Any?) throws -> Void in
3250
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1554)
3251
- let property: String = try jsConvertedString(jsGet(d, "property"))
3249
+ let previous: JSSet<String>? = try jsUnwrap(Core_ui_styling_style_scope.inlineStyleProperties, "get")
3250
+ .get(jsObjectRequired(view))
3251
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1553)
3252
+ if jsTruthy(previous as Any?) {
3253
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1554)
3254
+ try jsUnwrap(previous, "forEach").forEach { (property: String, _: String) throws -> Void in
3252
3255
  #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1555)
3253
- if Core_ui_core_properties_index.isCssVariable(property) {
3256
+ if !jsTruthy((declared as JSSet<String>?)?.has(property) as Any?) {
3254
3257
  #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1556)
3255
- try jsUnwrap(jsUnwrap(view, "style").style, "setUnscopedCssVariable")
3256
- .setUnscopedCssVariable(property, jsConvertedString(jsGet(d, "value")))
3258
+ try Core_ui_styling_style_scope.unsetInlineValue(view, property)
3257
3259
  }
3258
- })
3259
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1561)
3260
- var resolvedShorthands: JSMap<CssPendingSubstitution, JSRecord<Any?>>? = nil
3261
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1563)
3262
- try jsUnwrap(jsUnwrap(jsUnwrap(inlineRuleSet, "0").element(0), "declarations").declarations, "forEach")
3263
- .forEach({ (d: Any?) throws -> Void in
3264
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1565)
3265
- let property: String = try jsConvertedString(jsGet(d, "property"))
3266
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1566)
3267
- do {
3268
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1567)
3269
- if Core_ui_core_properties_index.isCssVariable(property) {
3270
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1569)
3271
- return
3260
+ }
3261
+ }
3262
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1560)
3263
+ if jsTruthy(declared as Any?) {
3264
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1561)
3265
+ _ = try jsUnwrap(Core_ui_styling_style_scope.inlineStyleProperties, "set").set(
3266
+ jsObjectRequired(view), jsObjectRequired(declared))
3267
+ } else if jsTruthy(previous as Any?) {
3268
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1563)
3269
+ _ = try jsUnwrap(Core_ui_styling_style_scope.inlineStyleProperties, "delete").delete(
3270
+ jsObjectRequired(view))
3271
+ }
3272
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1567)
3273
+ var resolvedShorthands: JSMap<CssPendingSubstitution, Any?>? = nil
3274
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1568)
3275
+ var applied: JSSet<String>? = nil
3276
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1570)
3277
+ try jsUnwrap(declarations, "forEach").forEach({ (d: Any?) throws -> Void in
3278
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1572)
3279
+ let property: String = try jsConvertedString(jsGet(d, "property"))
3280
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1573)
3281
+ do {
3282
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1574)
3283
+ if Core_ui_core_properties_index.isCssVariable(property) {
3284
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1576)
3285
+ return
3286
+ }
3287
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1579)
3288
+ if try Core_ui_core_properties_index._isCssPendingSubstitution(jsGet(d, "value")) {
3289
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1580)
3290
+ if !jsTruthy(resolvedShorthands as Any?) {
3291
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1581)
3292
+ resolvedShorthands = JSMap<CssPendingSubstitution, Any?>()
3272
3293
  }
3273
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1572)
3274
- var value: Any? = nil
3275
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1573)
3276
- if try Core_ui_core_properties_index._isCssPendingSubstitution(jsGet(d, "value")) {
3277
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1574)
3278
- if !jsTruthy(resolvedShorthands as Any?) {
3279
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1575)
3280
- resolvedShorthands = JSMap<CssPendingSubstitution, JSRecord<Any?>>()
3281
- }
3282
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1578)
3283
- var resolved: JSRecord<Any?>? = try
3284
- ((jsCast(jsGet(d, "value"), CssPendingSubstitution.self)) as CssPendingSubstitution?)
3285
- .flatMap { try jsUnwrap(resolvedShorthands, "get").get($0) }
3286
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1579)
3287
- if !jsTruthy(resolved as Any?) {
3288
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1580)
3289
- resolved = try Core_ui_styling_style_scope.resolvePendingSubstitution(
3290
- view, (jsCast(jsGet(d, "value"), CssPendingSubstitution.self)))
3291
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1581)
3292
- _ = try jsUnwrap(resolvedShorthands, "set").set(
3293
- (jsCastPresent(jsGet(d, "value")) as CssPendingSubstitution),
3294
- jsObjectRequired(resolved))
3295
- }
3296
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1584)
3297
- value =
3298
- try
3299
- (jsHasKey((resolved as Any?), property)
3300
- ? jsUnwrap(resolved, "property")[entry: property]
3301
- : Core_ui_core_properties_property_shared.unsetValue)
3302
- } else {
3294
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1584)
3295
+ var resolved: Any? =
3296
+ try
3297
+ (((jsCast(jsGet(d, "value"), CssPendingSubstitution.self)) as CssPendingSubstitution?)
3298
+ .map { try jsUnwrap(resolvedShorthands, "get").get($0) ?? nil } ?? nil)
3299
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1585)
3300
+ if !jsTruthy(resolved) {
3303
3301
  #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1586)
3304
- value = try Core_ui_styling_style_scope.evaluateCssExpressions(
3305
- view, property, jsConvertedString(jsGet(d, "value")))
3302
+ resolved = try Core_ui_core_properties_index._substituteCssShorthand(
3303
+ view, (jsCast(jsGet(d, "value"), CssPendingSubstitution.self)))
3304
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1587)
3305
+ _ = try jsUnwrap(resolvedShorthands, "set").set(
3306
+ (jsCastPresent(jsGet(d, "value")) as CssPendingSubstitution), resolved)
3306
3307
  }
3307
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1589)
3308
- if try jsHasKey(jsUnwrap(view, "style").style, property) {
3309
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1590)
3310
- try jsUnwrap(jsUnwrap(view, "style").style, setting: "property")[jsKey: property] =
3311
- value
3312
- } else {
3313
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1592)
3314
- try jsUnwrap(view, setting: "property")[jsKey: property] = value
3315
- }
3316
- } catch {
3317
- #sourceLocation()
3318
- let e: Any? = jsCaught(error)
3308
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1590)
3309
+ try Core_ui_core_properties_index._setLocalCssShorthandValue(
3310
+ jsUnwrap(view, "style").style, property,
3311
+ (jsCast(jsGet(d, "value"), CssPendingSubstitution.self)), resolved)
3312
+ } else if try jsHasKey(jsUnwrap(view, "style").style, property) {
3313
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1593)
3314
+ try jsUnwrap(jsUnwrap(view, "style").style, setting: "property")[jsKey: property] = jsGet(
3315
+ d, "value")
3316
+ } else {
3319
3317
  #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1595)
3320
- try NativeScriptKit.Trace.write(
3321
- "Failed to apply property [\(jsConvertedString(jsGet(d, "property")))] with value [\(jsToStringThrowing(jsGet(d, "value")))] to \(jsToStringThrowing(view)). \(jsToStringThrowing(e))",
3322
- NativeScriptKit.Trace.categories.Error, NativeScriptKit.Trace.messageType.error)
3318
+ try jsUnwrap(view, setting: "property")[jsKey: property] =
3319
+ Core_ui_core_properties_index._evaluateCssExpressions(
3320
+ view, property, jsConvertedString(jsGet(d, "value")))
3321
+ }
3322
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1598)
3323
+ if !jsTruthy(applied as Any?) {
3324
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1599)
3325
+ applied = JSSet<String>()
3323
3326
  }
3324
- })
3325
- #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1600)
3327
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1601)
3328
+ _ = try jsUnwrap(applied, "add").add(property)
3329
+ } catch {
3330
+ let e: Any? = jsCaught(error)
3331
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1603)
3332
+ try NativeScriptKit.Trace.write(
3333
+ "Failed to apply property [\(jsConvertedString(jsGet(d, "property")))] with value [\(jsToStringThrowing(jsGet(d, "value")))] to \(jsToStringThrowing(view)). \(jsToStringThrowing(e))",
3334
+ NativeScriptKit.Trace.categories.Error, NativeScriptKit.Trace.messageType.error)
3335
+ }
3336
+ })
3337
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1608)
3338
+ try (declared as JSSet<String>?)?.forEach { (property: String, _: String) throws -> Void in
3339
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1609)
3340
+ if !jsTruthy((applied as JSSet<String>?)?.has(property) as Any?) {
3341
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1610)
3342
+ _ = try jsUnwrap(declared, "delete").delete(property)
3343
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1611)
3344
+ if jsTruthy((previous as JSSet<String>?)?.has(property) as Any?) {
3345
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1612)
3346
+ try Core_ui_styling_style_scope.unsetInlineValue(view, property)
3347
+ }
3348
+ }
3349
+ }
3350
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1616)
3351
+ if ((declared?.size) ?? .nan) == 0 {
3352
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1617)
3353
+ _ = try jsUnwrap(Core_ui_styling_style_scope.inlineStyleProperties, "delete").delete(
3354
+ jsObjectRequired(view))
3355
+ }
3356
+ #sourceLocation(file:"@nativescript/core/ui.styling.style-scope.ts",line:1621)
3326
3357
  try jsUnwrap(view, "_onCssStateChange")._onCssStateChange()
3327
3358
  })
3328
3359
  }