diff --git a/pages.json b/pages.json
index e2bf077b47fdc009f69c0f3c14a0828b7948a850..02c97bf7693333d391aa1c36df40543265021fb8 100644
--- a/pages.json
+++ b/pages.json
@@ -477,17 +477,6 @@
"navigationBarTitleText": "涂鸦"
}
},
- // #ifndef WEB
- {
- "path": "pages/component/animation-view/animation-view",
- "group": "0,5,2",
- "style": {
- "navigationBarTitleText": "animation-view | Lottie动画",
- "enablePullDownRefresh": false
- }
- },
- // #endif
-
{
"path": "pages/tabBar/API",
"style": {
@@ -2009,10 +1998,6 @@
{
"id": "component.media.video",
"name": "video"
- },
- {
- "id": "component.media.animation-view",
- "name": "animation-view"
}
]
},
diff --git a/pages/component/animation-view/animation-view.uvue b/pages/component/animation-view/animation-view.uvue
deleted file mode 100644
index 5750b727f261ab245760f68b56950ce764f3f93a..0000000000000000000000000000000000000000
--- a/pages/component/animation-view/animation-view.uvue
+++ /dev/null
@@ -1,91 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/uni_modules/uni-animation-view/changelog.md b/uni_modules/uni-animation-view/changelog.md
deleted file mode 100644
index c11e4d58cf33014bb777120c9b9409c0e92284bf..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/changelog.md
+++ /dev/null
@@ -1,12 +0,0 @@
-## 1.0.5(2024-06-14)
-调整iOS平台组件内的默认样式
-## 1.0.4(2024-05-24)
-+ 修复 Android uni-app x 正式包模式下,可能不展示动画的Bug
-## 1.0.3(2024-04-11)
-修复Android平台 修正组件名称为 `animation-view`
-## 1.0.2(2024-03-22)
-修复Android平台云打包编译失败的Bug
-## 1.0.1(2023-04-07)
-修复ios平台本地编译会报 swift 版本不兼容的bug
-## 1.0.0(2023-01-16)
-实现android/ios平台animation-view组件,仅支持nvue页面
diff --git a/uni_modules/uni-animation-view/package.json b/uni_modules/uni-animation-view/package.json
deleted file mode 100644
index 86bd992b45e5825a59dd13ea7827c808372c7846..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/package.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "id": "uni-animation-view",
- "displayName": "animation-view",
- "version": "1.0.5",
- "description": "使用uts组件开发,实现animation-view组件",
- "keywords": [
- "animation-view",
- "lottie"
- ],
- "repository": "",
- "engines": {
- "HBuilderX": "^3.7.0"
- },
- "dcloudext": {
- "type": "component-uts",
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "插件不采集任何数据",
- "permissions": "无"
- },
- "npmurl": ""
- },
- "uni_modules": {
- "dependencies": [],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y",
- "alipay": "n"
- },
- "client": {
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- },
- "App": {
- "app-android": {
- "minVersion": "21"
- },
- "app-ios": {
- "minVersion": "11"
- }
- },
- "H5-mobile": {
- "Safari": "u",
- "Android Browser": "u",
- "微信浏览器(Android)": "u",
- "QQ浏览器(Android)": "u"
- },
- "H5-pc": {
- "Chrome": "u",
- "IE": "u",
- "Edge": "u",
- "Firefox": "u",
- "Safari": "u"
- },
- "小程序": {
- "微信": "u",
- "阿里": "u",
- "百度": "u",
- "字节跳动": "u",
- "QQ": "u",
- "钉钉": "u",
- "快手": "u",
- "飞书": "u",
- "京东": "u"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- }
- }
- }
- }
-}
diff --git a/uni_modules/uni-animation-view/readme.md b/uni_modules/uni-animation-view/readme.md
deleted file mode 100644
index 118c91fad572d9a600adcaf799f1c6e4581acce0..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/readme.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# animation-view
-
-> animation-view组件是[uts插件](https://uniapp.dcloud.net.cn/plugin/uts-component.html),需 HBuilderX 3.7.0+
-
-> 使用文档:[https://uniapp.dcloud.net.cn/component/animation-view.html](https://uniapp.dcloud.net.cn/component/animation-view.html)
-
-
-### 属性说明
-
-|属性名|类型|默认值|说明|
-|:-|:-|:-|:-|
-| path | String | | 动画资源地址,支持本地路径和网络路径 |
-| loop | Boolean | false | 动画是否循环播放 |
-| autoplay | Boolean | true | 动画是否自动播放 |
-| action | String | play | 动画操作,可取值 play、pause、stop |
-| hidden | Boolean | true | 是否隐藏动画 |
-| @bindended | EventHandle | | 当播放到末尾时触发 ended 事件(自然播放结束会触发回调,循环播放结束及手动停止动画不会触发) |
-
-
-**注意**
-* animation-view 仅App端nvue页面支持
-* App端实现使用了Lottie三方SDK,参考开源项目:[Lottie for Android](https://github.com/airbnb/lottie-android),[Lottie for iOS](https://github.com/airbnb/lottie-ios)
-* App-Android平台要求Android5(API Leavel 21)及以上系统
-* App-iOS平台要求iOS11及以上版本系统
-
-
-### 代码示例
-
-```html
-
-
-
-
-
-
-
-
-
-
-
-```
-
-
-
-
-
-
diff --git a/uni_modules/uni-animation-view/static/lottie.json b/uni_modules/uni-animation-view/static/lottie.json
deleted file mode 100644
index b85c38bcb3bb5bd243e06f5b56258e0181827485..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/static/lottie.json
+++ /dev/null
@@ -1 +0,0 @@
-{"v":"4.8.0","meta":{"g":"LottieFiles AE 3.1.1","a":"","k":"","d":"","tc":""},"fr":24,"ip":0,"op":48,"w":408,"h":522,"nm":"dons_2","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Layer 4 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[181.326,214.081,0],"ix":2},"a":{"a":0,"k":[28.299,22.945,0],"ix":1},"s":{"a":0,"k":[100,108.675,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-13.354,-5.413],[3.868,-9.545],[13.355,5.413],[-3.869,9.544]],"o":[[13.354,5.413],[-3.869,9.544],[-13.354,-5.413],[3.868,-9.545]],"v":[[7.005,-17.282],[24.181,9.801],[-7.005,17.282],[-24.18,-9.801]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156922583,0.976470648074,0.952941236309,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[28.299,22.945],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":48,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"bras","parent":5,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":0,"s":[-0.462]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":9,"s":[-10.65]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":20,"s":[-10.65]},{"i":{"x":[0],"y":[1]},"o":{"x":[1],"y":[0]},"t":24,"s":[34]},{"i":{"x":[0.09],"y":[1]},"o":{"x":[1],"y":[0]},"t":26,"s":[22]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":29,"s":[34]},{"t":36,"s":[-0.462]}],"ix":10},"p":{"a":0,"k":[133.32,104.53,0],"ix":2},"a":{"a":0,"k":[38.938,195.403,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[16.66,-7.812],[-2.153,-3.453],[-7.785,-1.342],[4.514,-6.255],[9.957,2.763],[-0.468,-1.814],[12.203,-10.355],[2.666,8.892],[0.015,0.156],[1.252,11.709],[0.352,5.64],[-3.072,8.607],[4.549,-8.18],[-0.773,-4.313],[-4.762,-1.151],[10.216,-4.196],[-0.224,-2.478],[-5.679,-0.129],[8.299,-9.998]],"o":[[-11.874,5.568],[4.814,10.311],[7.395,1.506],[-6.611,9.158],[-1.805,-0.5],[8.398,32.54],[-12.626,10.713],[-0.045,-0.151],[-2.701,-30.214],[-2.644,-11.492],[-1.238,-7.472],[4.472,-12.528],[-2.809,5.052],[5.651,-22.113],[4.148,1.003],[-5.706,2.342],[1.924,-0.448],[7.1,0.16],[-5.919,7.13]],"v":[[-2.544,-58.346],[-9.098,-35.436],[12.275,-26.365],[32.212,-16.298],[-0.357,-13.203],[-3.382,-10.278],[7.04,90.479],[-12.887,89.676],[-12.975,89.217],[-28.245,-15.87],[-35.488,-59.285],[-32.501,-88.664],[-20.309,-88.194],[-24.775,-64.518],[5.622,-98.227],[1.902,-84.239],[-8.913,-69.208],[5.158,-72.66],[19.322,-57.83]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":1,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[39.938,104.403],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":48,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 1","parent":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-34,"ix":10},"p":{"a":0,"k":[-40.984,146.877,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[5.75,1],[4,-7.5],[0,0],[0,0],[0,0],[0,0],[-19.638,39.445],[-2.856,-2.914],[-3,2.75],[3.75,4.25],[-3.5,11.25],[-8.75,-1.5],[0,-0.5],[-5.25,1.5],[5.5,3.25],[0,0],[-8.5,-0.25],[0,1],[8.25,1.25],[6.75,-3],[0,0],[-2.75,0.75]],"o":[[-5.75,-1],[-4,7.5],[0,0],[0,0],[0,0],[0,0],[12.719,-25.548],[19.092,19.482],[3,-2.75],[-3.75,-4.25],[3.5,-11.25],[8.75,1.5],[0,0.5],[5.25,-1.5],[-5.5,-3.25],[0,0],[8.5,0.25],[0,-1],[-8.25,-1.25],[-6.75,3],[0,0],[2.75,-0.75]],"v":[[63.75,-226.5],[36.25,-205.5],[12.25,-151],[-16.75,-92.75],[-27,-69.75],[-7.408,-42.518],[15.73,-94.963],[37.5,-145],[67.75,-127.25],[62.25,-141],[43.5,-166.5],[61.75,-181.75],[74,-173.75],[80.5,-168.5],[79,-187],[62.75,-194],[77.75,-200.25],[91.25,-204],[84.25,-212.25],[60,-207.5],[47.5,-200.5],[61.75,-215.25]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125489994124,0.380391977348,0.301960993748,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156922583,0.976470648074,0.952941236309,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[59.408,142.518],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 2","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":48,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Layer 5 Outlines","parent":5,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-13,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[39.158,21.872,0],"to":[-0.047,-3.333,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":15,"s":[38.874,1.874,0],"to":[0,0,0],"ti":[-0.047,-3.333,0]},{"t":19,"s":[39.158,21.872,0]}],"ix":2},"a":{"a":0,"k":[41.854,42.62,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.209,-0.69],[-0.511,0.048],[-0.236,0.203],[-0.229,0.246],[-0.179,0.228],[1.02,-0.13]],"o":[[0.151,0.433],[0.308,-0.048],[0.265,-0.206],[0.201,-0.209],[-0.947,-0.934],[0.136,0.707]],"v":[[-1.296,0.681],[-0.331,1.498],[0.502,1.114],[1.243,0.434],[1.814,-0.222],[-1.814,-1.416]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[33.451,44.92],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.195,-0.029],[0.008,-0.353],[0,0],[0,0],[-0.168,-0.016],[-0.02,0.005],[0.01,0.364],[0,0]],"o":[[-0.195,0.029],[0,0],[0,0],[0.002,0.308],[0.021,0.002],[0.195,-0.046],[0,0],[0.012,-0.344]],"v":[[0.011,-1.252],[-0.357,-0.558],[-0.357,-0.497],[-0.352,0.718],[-0.06,1.279],[0.004,1.274],[0.345,0.55],[0.346,-0.674]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[34.894,34.027],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":4,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.212,0.121],[-0.015,0.015],[0.157,0.252],[0.209,0.258],[0.204,-0.07],[0.028,-0.06],[-0.016,-0.065],[-0.206,-0.261],[-0.174,-0.221]],"o":[[0.019,-0.011],[0.273,-0.263],[-0.165,-0.289],[-0.116,-0.139],[-0.059,0.03],[-0.028,0.061],[0.077,0.323],[0.152,0.234],[0.119,0.151]],"v":[[0.56,1.061],[0.609,1.022],[0.366,0.017],[-0.196,-0.804],[-0.711,-1.112],[-0.847,-0.973],[-0.867,-0.779],[-0.436,0.107],[0.057,0.793]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[32.81,34.261],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":4,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.204,-0.083],[0.374,-0.834],[0.339,0.614],[0.458,0.355],[0.565,0.131],[0.273,-0.022],[0.313,-0.18],[0.199,-0.302],[-0.359,-0.794],[-0.93,-0.444],[0.462,-0.759],[-0.127,-0.528],[-0.702,-0.039],[-0.564,0.425],[-0.417,0.571],[0,0],[-0.168,-0.024],[-0.17,-0.028],[-0.342,-0.099],[-0.009,-0.006],[-0.122,-0.044],[-0.175,-0.074],[-0.268,-0.15],[-0.222,-0.136],[-0.029,0.05],[-0.056,0.107],[0,0],[-0.034,0.088],[0.009,0.096],[0.066,0.073],[0.125,0.072],[0.64,0.2],[0.693,0.038],[0,0],[0.034,0.509],[-0.183,-0.026],[-0.328,-0.065],[-0.906,-0.697],[0.006,0.022],[0.507,0.838],[0.354,0.195],[0.403,-0.014]],"o":[[-0.84,0.362],[-0.094,-0.695],[-0.268,-0.514],[-0.459,-0.355],[-0.269,-0.056],[-0.361,0.021],[-0.313,0.181],[-0.44,0.751],[0.424,0.938],[-0.782,0.423],[-0.28,0.462],[0.155,0.679],[0.705,-0.001],[0.583,-0.4],[0,0],[0.169,-0.019],[0.172,0.018],[0.353,0.053],[0.011,0.003],[0.118,0.034],[0.177,0.063],[0.283,0.122],[0.228,0.125],[0.011,0.005],[0.05,-0.107],[0,0],[0.047,-0.083],[0.03,-0.092],[-0.014,-0.097],[-0.095,-0.108],[-0.568,-0.356],[-0.661,-0.209],[0,0],[0.116,-0.496],[0.289,-0.006],[0.334,0.014],[1.12,0.228],[0,0],[0.198,-0.928],[-0.204,-0.349],[-0.354,-0.195],[-0.22,0.017]],"v":[[2.55,-2.869],[0.663,-1.007],[0.007,-2.989],[-1.095,-4.308],[-2.648,-5.046],[-3.464,-5.097],[-4.489,-4.791],[-5.267,-4.058],[-5.258,-1.537],[-3.162,0.604],[-5.062,2.408],[-5.427,3.95],[-3.861,5.119],[-1.906,4.463],[-0.394,2.997],[-0.372,2.994],[0.135,3.001],[0.648,3.07],[1.691,3.298],[1.721,3.312],[2.072,3.426],[2.599,3.632],[3.426,4.041],[4.101,4.437],[4.468,3.847],[4.64,3.532],[4.776,3.277],[4.898,3.019],[4.929,2.734],[4.807,2.473],[4.476,2.2],[2.657,1.363],[0.618,0.99],[0.579,0.99],[0.704,-0.525],[1.418,-0.512],[2.412,-0.394],[5.491,1.011],[5.498,0.994],[5.2,-1.911],[4.348,-2.742],[3.191,-3.019]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[32.167,38.948],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":4,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-8.59,-6.769]],"o":[[10.518,-6.189],[0,0]],"v":[[-20.375,-10.538],[10.841,-10.616]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[22.814,-24.65],[10.841,-10.616]],"c":false},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[-4.955,10.557]],"o":[[-4.477,-5.224],[0,0]],"v":[[-13.138,18.333],[-20.375,-10.538]],"c":false},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-0.295,7.422],[-10.518,6.189]],"o":[[0,0],[-2.063,-3.506],[0.395,-9.952],[0,0]],"v":[[-13.138,18.333],[-32.176,39.329],[-37.43,18.936],[-20.375,-10.538]],"c":false},"ix":2},"nm":"Path 4","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0]],"o":[[0,0],[0,0]],"v":[[-13.138,18.333],[10.841,-10.616]],"c":false},"ix":2},"nm":"Path 5","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[0,0],[-2.885,10.905],[-0.531,1.944],[-2.966,4.284]],"o":[[18.09,3.95],[1.393,-5.265],[0.596,-2.179],[0,0]],"v":[[-13.138,18.333],[13.367,3.421],[16.893,-13.831],[22.814,-24.65]],"c":false},"ix":2},"nm":"Path 6","mn":"ADBE Vector Shape - Group","hd":false},{"ind":6,"ty":"sh","ix":7,"ks":{"a":0,"k":{"i":[[0,0],[5.159,-7.45]],"o":[[-2.755,-4.825],[0,0]],"v":[[37.725,-34.504],[22.814,-24.65]],"c":false},"ix":2},"nm":"Path 7","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":1,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[40.936,42.7],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 5","np":9,"cix":2,"bm":0,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0.715,5.099],[-11.354,4.592],[-12.719,-8.717],[-2.13,-2.167],[0,0],[0,0],[0,0],[0,0]],"o":[[-0.893,-6.374],[4.108,-1.661],[7.021,-0.745],[0,0],[0,0],[0,0],[0,0],[-1.321,-3.481]],"v":[[-25.941,11.835],[-7.163,-20.245],[19.813,-19.934],[26.535,-23.938],[24.234,-1.121],[13.635,8.865],[-0.799,9.311],[-21.085,28.651]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156922583,0.976470648074,0.952941236309,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[30.208,51.717],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 6","np":4,"cix":2,"bm":0,"ix":6,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[4.464,3.366],[5.846,-12.984],[-4.804,11.218]],"o":[[-7.155,-5.396],[11.963,2.414],[5.226,-12.206]],"v":[[14.734,-20.133],[-19.197,23.115],[9.854,8.844]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[64.26,25.779],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 7","np":4,"cix":2,"bm":0,"ix":7,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":48,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"body","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[13]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":16,"s":[0]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":31,"s":[0]},{"t":41,"s":[13]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":0,"s":[142.297,202.632,0],"to":[0,-1.667,0],"ti":[0,1.667,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":16,"s":[142.297,192.632,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":31,"s":[142.297,192.632,0],"to":[0,1.667,0],"ti":[0,-1.667,0]},{"t":41,"s":[142.297,202.632,0]}],"ix":2},"a":{"a":0,"k":[92.494,93.24,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[20.164,29.219]],"o":[[-1.28,3.904],[0,0]],"v":[[13.561,-16.855],[-13.561,-12.363]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[87.756,97.125],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-1.574,-2.217],[3.993,-3.182]],"o":[[5.55,-0.989],[1.574,2.217],[0,0]],"v":[[-8.746,-0.146],[7.156,-0.495],[-2.855,11.822]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-2.917,0.914],[-2.107,-2.725]],"o":[[-1.081,-3.448],[3.604,-1.129],[0,0]],"v":[[-2.745,-3.079],[1.006,-10.693],[8.746,-6.678]],"c":false},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[93.075,68.164],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":4,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-2.917,0.913],[-2.107,-2.725]],"o":[[-1.081,-3.448],[3.604,-1.129],[0,0]],"v":[[-5.205,4.371],[-1.454,-3.242],[6.286,0.772]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[66.862,69.869],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[1.757,-4.123],[-4.205,-0.748],[0.95,4.302]],"o":[[-1.406,3.298],[1.318,0.446],[-1.187,-5.379]],"v":[[-6.583,-1.346],[4.273,5.022],[7.039,0.982]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[88.043,41.733],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":4,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[3.717,2.922],[1.917,-4.078],[-4.643,-0.214]],"o":[[-2.974,-2.338],[-0.816,1.22],[5.804,0.268]],"v":[[3.519,-5.584],[-5.949,3.727],[-2.593,7.654]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[60.12,50.424],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 5","np":4,"cix":2,"bm":0,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-2.05,-6.545],[6.544,-2.05],[2.05,6.545],[-6.544,2.05]],"o":[[2.05,6.544],[-6.545,2.05],[-2.05,-6.544],[6.545,-2.05]],"v":[[11.89,-7.175],[4.439,12.176],[-12.035,4.323],[-2.986,-11.524]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.58431372549,1,0.666666666667,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[47.828,90.915],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 6","np":4,"cix":2,"bm":0,"ix":6,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-2.05,-6.544],[-6.544,2.05],[2.051,6.544],[6.544,-2.05]],"o":[[2.05,6.545],[6.545,-2.051],[-2.05,-6.545],[-6.545,2.05]],"v":[[-13.127,0.329],[4.033,11.971],[13.082,-3.877],[-3.391,-11.729]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.58431372549,1,0.666666666667,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[119.233,66.376],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 7","np":4,"cix":2,"bm":0,"ix":7,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[39.85,-17.128],[-17.128,-39.85],[-39.851,17.128],[17.128,39.851]],"o":[[-39.85,17.128],[17.127,39.85],[39.85,-17.127],[-17.128,-39.85]],"v":[[-31.012,-72.156],[-72.156,31.012],[31.012,72.156],[72.156,-31.012]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[92.494,92.494],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 8","np":2,"cix":2,"bm":0,"ix":8,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[39.85,-17.128],[-17.128,-39.85],[-39.851,17.128],[17.128,39.851]],"o":[[-39.85,17.128],[17.127,39.85],[39.85,-17.127],[-17.128,-39.85]],"v":[[-31.012,-72.156],[-72.156,31.012],[31.012,72.156],[72.156,-31.012]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156922583,0.976470648074,0.952941236309,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[92.494,92.494],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 9","np":4,"cix":2,"bm":0,"ix":9,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-2.802,-3.269]],"o":[[2.335,-0.097],[0,0]],"v":[[-5.253,-1.849],[5.253,1.946]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":1,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[85.522,160.585],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 10","np":2,"cix":2,"bm":0,"ix":10,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":48,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"Layer 8 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":0,"s":[9]},{"i":{"x":[0],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":9,"s":[19]},{"i":{"x":[0],"y":[1]},"o":{"x":[1],"y":[0]},"t":20,"s":[24.913]},{"i":{"x":[0],"y":[1]},"o":{"x":[1],"y":[0]},"t":24,"s":[1.609]},{"i":{"x":[0],"y":[1]},"o":{"x":[0.993],"y":[0]},"t":26,"s":[11.207]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":29,"s":[0]},{"t":34,"s":[9]}],"ix":10},"p":{"a":0,"k":[206.516,209.876,0],"ix":2},"a":{"a":0,"k":[46.928,140.495,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[2.676,-6.958],[0,0]],"o":[[0,0],[8.991,1.606],[0,0],[0,0]],"v":[[-11.86,-10.501],[12.31,-24.085],[22.746,-0.802],[-25.422,24.085]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[68.772,130.12],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[30.048,-29.096],[16.859,-10.303],[-7.359,12.444],[-8.979,9.634],[2.554,0],[-1.161,4.26],[-2.944,0.134],[-4.816,10.598],[4.416,-1.606],[2.007,1.204],[-15.655,-0.802],[-2.007,-6.022],[0,0],[-5.78,0],[-0.536,-8.296],[-0.428,3.182],[-1.606,-9.634]],"o":[[-23.281,22.544],[-36.929,13.166],[19.667,-12.443],[2.478,-2.658],[-8.43,0],[1.205,-4.416],[8.162,-0.268],[6.022,-13.246],[-4.415,1.605],[-2.007,-1.204],[12.524,0.643],[0,0],[-0.803,-3.345],[5.78,0],[1.07,-5.218],[0.95,-7.073],[1.605,9.634]],"v":[[60.213,-0.128],[-53.788,70.118],[-44.956,38.005],[39.74,-14.177],[26.09,-17.388],[15.654,-25.015],[26.09,-27.825],[54.443,-41.539],[38.387,-59.2],[30.761,-57.996],[46.014,-71.243],[67.691,-52.376],[62.873,-68.834],[65.429,-82.329],[76.521,-53.982],[79.732,-73.65],[89.113,-73.65]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":1,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[93.928,86.495],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[30.048,-29.096],[16.859,-10.303],[-7.359,12.444],[-8.979,9.634],[2.554,0],[-1.161,4.26],[-2.944,0.134],[-4.816,10.598],[4.416,-1.606],[2.007,1.204],[-15.655,-0.802],[-2.007,-6.022],[0,0],[-5.78,0],[-0.536,-8.296],[-0.428,3.182],[-1.606,-9.634]],"o":[[-23.281,22.544],[-36.929,13.166],[19.667,-12.443],[2.478,-2.658],[-8.43,0],[1.205,-4.416],[8.162,-0.268],[6.022,-13.246],[-4.415,1.605],[-2.007,-1.204],[12.524,0.643],[0,0],[-0.803,-3.345],[5.78,0],[1.07,-5.218],[0.95,-7.073],[1.605,9.634]],"v":[[60.213,-0.128],[-53.788,70.118],[-44.956,38.005],[39.74,-14.177],[26.09,-17.388],[15.654,-25.015],[26.09,-27.825],[54.443,-41.539],[38.387,-59.2],[30.761,-57.996],[46.014,-71.243],[67.691,-52.376],[62.873,-68.834],[65.429,-82.329],[76.521,-53.982],[79.732,-73.65],[89.113,-73.65]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156922583,0.976470648074,0.952941236309,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[93.928,86.495],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":4,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":48,"st":0,"bm":0},{"ddd":0,"ind":7,"ty":4,"nm":"Shape Layer 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[205,256.5,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-53.5,-2],[0,0],[0,0],[5.5,-1],[0,0],[1.5,-2.5]],"o":[[53.5,2],[0,0],[0,0],[-5.5,1],[0,0],[-1.5,2.5]],"v":[[-93,7.5],[-45,10],[-51,42],[-72,33.5],[-71,23],[-94,21]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125489994124,0.380391977348,0.301960993748,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":48,"st":0,"bm":0},{"ddd":0,"ind":8,"ty":4,"nm":"Layer 7 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[120.672,368.357,0],"ix":2},"a":{"a":0,"k":[72.85,134.81,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-0.154],[0.759,-0.598],[1.592,-0.531],[5.019,0],[3.167,1.055],[0.741,0.584],[0,0.155],[-0.76,0.598],[-1.592,0.531],[-5.019,0],[-3.167,-1.055],[-0.742,-0.585]],"o":[[0,0.155],[-0.742,0.584],[-3.167,1.055],[-5.019,0],[-1.592,-0.531],[-0.76,-0.598],[0,-0.154],[0.741,-0.585],[3.167,-1.055],[5.019,0],[1.592,0.531],[0.759,0.598]],"v":[[17.021,-0.001],[16.169,1.156],[12.663,2.867],[0,4.604],[-12.663,2.867],[-16.169,1.156],[-17.021,-0.001],[-16.169,-1.156],[-12.663,-2.867],[0,-4.604],[12.663,-2.867],[16.169,-1.156]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[39.375,213.586],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-0.154],[0.759,-0.598],[1.592,-0.531],[5.019,0],[3.167,1.055],[0.741,0.584],[0,0.155],[-0.76,0.598],[-1.592,0.531],[-5.019,0],[-3.167,-1.055],[-0.742,-0.585]],"o":[[0,0.155],[-0.742,0.584],[-3.167,1.055],[-5.019,0],[-1.592,-0.531],[-0.76,-0.598],[0,-0.154],[0.741,-0.585],[3.167,-1.055],[5.019,0],[1.592,0.531],[0.759,0.598]],"v":[[17.021,-0.001],[16.169,1.156],[12.663,2.867],[0,4.604],[-12.663,2.867],[-16.169,1.156],[-17.021,-0.001],[-16.169,-1.156],[-12.663,-2.867],[0,-4.604],[12.663,-2.867],[16.169,-1.156]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.913725550034,0.847058883368,0.678431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[39.375,213.586],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":4,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-22.161,19.486]],"o":[[12.895,7.323],[0,0]],"v":[[-33.193,-7.355],[33.193,-9.743]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[39.129,223.329],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 3","np":2,"cix":2,"bm":0,"ix":3,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,7.642],[3.43,-0.801],[1.906,-5.256],[-2.36,-1.056]],"o":[[-0.955,-13.85],[-14.328,3.346],[-2.085,5.746],[13.846,6.195]],"v":[[16.716,-22.596],[3.821,-28.805],[-19.1,-31.668],[-19.1,-20.685]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-23.69,14.137]],"o":[[13.691,5.89],[0,0]],"v":[[-35.343,22.787],[35.343,22.787]],"c":false},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[38.896,217.077],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 4","np":4,"cix":2,"bm":0,"ix":4,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-14.328,3.346],[-0.955,-13.85],[13.847,6.195],[-2.085,5.746]],"o":[[3.43,-0.801],[0,7.642],[-2.36,-1.056],[1.906,-5.256]],"v":[[6.193,-3.098],[19.088,3.111],[-16.728,5.022],[-16.728,-5.961]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.913725550034,0.847058883368,0.678431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[36.524,191.37],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 5","np":4,"cix":2,"bm":0,"ix":5,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.764,14.902],[-5.253,3.184],[-3.025,1.751],[-9.075,-7.163],[0,-16.875],[14.646,7.483]],"o":[[0.764,-14.901],[10.699,4.202],[1.273,-1.433],[9.106,7.189],[-21.397,17.958],[-0.318,-2.706]],"v":[[-35.482,-6.632],[-18.766,-34.81],[4.693,-34.81],[27.14,-27.086],[35.737,18.286],[-35.482,20.114]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[39.457,230.165],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 6","np":2,"cix":2,"bm":0,"ix":6,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-0.764,14.902],[-5.253,3.184],[-3.025,1.751],[-9.075,-7.163],[0,-16.875],[14.646,7.483]],"o":[[0.764,-14.901],[10.699,4.202],[1.273,-1.433],[9.106,7.189],[-21.397,17.958],[-0.318,-2.706]],"v":[[-35.482,-6.632],[-18.766,-34.81],[4.693,-34.81],[27.14,-27.086],[35.737,18.286],[-35.482,20.114]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.913725550034,0.847058883368,0.678431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[39.457,230.165],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 7","np":4,"cix":2,"bm":0,"ix":7,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[30.411,2.444]],"o":[[-8.825,2.828],[0,0]],"v":[[32.244,-3.937],[-32.244,1.493]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[105.367,215.215],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 8","np":2,"cix":2,"bm":0,"ix":8,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-33.107,13.54]],"o":[[-0.61,3.391],[0,0]],"v":[[15.283,-23.224],[43.857,-11.751]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-3.002,-0.724],[-4.297,-5.254]],"o":[[2.702,0.295],[7.7,1.859],[0,0]],"v":[[15.283,-23.224],[23.846,-21.717],[43.857,-11.751]],"c":false},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[3.009,-8.69]],"o":[[2.737,1.089],[0,0]],"v":[[-40.91,-18.608],[-36.459,-4.479]],"c":false},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[-4.046,5.578]],"o":[[0.598,-10.858],[0,0]],"v":[[-48.939,5.796],[-40.91,-18.608]],"c":false},"ix":2},"nm":"Path 4","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[-7.329,-0.801]],"o":[[4.729,-1.106],[0,0]],"v":[[-2.949,-22.311],[15.283,-23.224]],"c":false},"ix":2},"nm":"Path 5","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[0,0],[3.677,0.624],[-0.209,-2.911],[1.481,6.028],[4.256,-5.87]],"o":[[-0.176,-1.603],[-4.596,-0.78],[-3.232,-0.038],[0,0],[0,0]],"v":[[-2.949,-22.311],[-7.251,-32.294],[-16.876,-21.218],[-38.025,-28.456],[-40.91,-18.608]],"c":false},"ix":2},"nm":"Path 6","mn":"ADBE Vector Shape - Group","hd":false},{"ind":6,"ty":"sh","ix":7,"ks":{"a":0,"k":{"i":[[0,0],[-4.308,1.008]],"o":[[1.692,-1.143],[0,0]],"v":[[-12.059,-18.74],[-2.949,-22.311]],"c":false},"ix":2},"nm":"Path 7","mn":"ADBE Vector Shape - Group","hd":false},{"ind":7,"ty":"sh","ix":8,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[12.331,0],[3.002,3.821],[0,3.387]],"o":[[0,0],[0,2.293],[-32.045,0],[-2.402,-3.057],[0,0]],"v":[[51.34,11.321],[51.34,30.457],[15.169,32.464],[-48.939,29.253],[-48.939,5.796]],"c":false},"ix":2},"nm":"Path 8","mn":"ADBE Vector Shape - Group","hd":false},{"ind":8,"ty":"sh","ix":9,"ks":{"a":0,"k":{"i":[[0,0],[6.019,5.172]],"o":[[-0.858,-3.461],[0,0]],"v":[[51.34,11.321],[43.857,-11.751]],"c":false},"ix":2},"nm":"Path 9","mn":"ADBE Vector Shape - Group","hd":false},{"ind":9,"ty":"sh","ix":10,"ks":{"a":0,"k":{"i":[[0,0],[-1.228,22.283]],"o":[[-34.164,3.481],[0,0]],"v":[[51.34,11.321],[-48.939,5.796]],"c":false},"ix":2},"nm":"Path 10","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[91.149,217.684],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 9","np":12,"cix":2,"bm":0,"ix":9,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[-4.596,-0.78],[-0.176,-1.603],[-7.329,-0.801],[-3.002,-0.724],[-4.297,-5.254],[-0.858,-3.461],[0,0],[12.331,0],[3.002,3.821],[-0.208,4.43],[-0.011,0.202],[-4.046,5.578],[0.207,0.866],[0.016,0.066],[-0.031,-0.129],[-3.196,-0.037]],"o":[[3.677,0.624],[4.729,-1.106],[2.702,0.295],[7.7,1.859],[6.019,5.172],[0,0],[0,2.293],[-32.045,0],[-2.284,-2.906],[0,-0.196],[0.598,-10.858],[3.705,-5.11],[-0.02,-0.065],[0,0],[1.784,5.858],[-0.209,-2.911]],"v":[[-7.309,-32.294],[-3.008,-22.311],[15.223,-23.224],[23.788,-21.717],[43.799,-11.751],[51.281,11.321],[51.281,30.457],[15.111,32.464],[-48.997,29.253],[-49.014,6.392],[-48.997,5.796],[-40.969,-18.608],[-38.029,-28.26],[-38.083,-28.456],[-38.029,-28.26],[-16.934,-21.218]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.913725550034,0.847058883368,0.678431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[91.208,217.684],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 10","np":4,"cix":2,"bm":0,"ix":10,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[2.411,0.885],[-0.883,3.211],[-1.429,-4.013],[1.207,-2.809]],"o":[[-1.928,-0.709],[1.851,-6.7],[1.139,3.198],[-1.005,2.339]],"v":[[-16.462,3.989],[-14.454,-6.449],[17.251,-0.428],[14.445,10.81]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[47.315,147.729],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 11","np":2,"cix":2,"bm":0,"ix":11,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[2.411,0.885],[-0.883,3.211],[-1.429,-4.013],[1.207,-2.809]],"o":[[-1.928,-0.709],[1.851,-6.7],[1.139,3.198],[-1.005,2.339]],"v":[[-16.462,3.989],[-14.454,-6.449],[17.251,-0.428],[14.445,10.81]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[47.315,147.729],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 12","np":4,"cix":2,"bm":0,"ix":12,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[1.737,0.845],[-1.21,2.545],[-2.407,-2.007],[0.806,-3.613]],"o":[[-1.39,-0.675],[2.901,-4.373],[1.924,1.604],[-0.728,3.261]],"v":[[-12.733,2.512],[-10.682,-7.472],[12.2,-1.049],[10.193,8.584]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[73.651,155.977],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 13","np":2,"cix":2,"bm":0,"ix":13,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[1.737,0.845],[-1.21,2.545],[-2.407,-2.007],[0.806,-3.613]],"o":[[-1.39,-0.675],[2.901,-4.373],[1.924,1.604],[-0.728,3.261]],"v":[[-12.733,2.512],[-10.682,-7.472],[12.2,-1.049],[10.193,8.584]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[73.651,155.977],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 14","np":4,"cix":2,"bm":0,"ix":14,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[27.423,-66.525],[3.794,-76.512],[2.544,-73.555],[26.173,-63.567]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-7.522,62.497],[0,0],[6.577,-26.289]],"o":[[6.531,-26.104],[0,0],[-7.49,62.233],[0,0]],"v":[[-1.872,76.271],[28.392,-64.854],[25.204,-65.238],[-4.987,75.492]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-27.264,71.555],[-3.821,77.439],[-3.039,74.324],[-26.482,68.441]],"c":true},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[1.711,-11.608],[3.022,-14.521],[6.58,-18.695],[0,0],[-6.059,29.105],[-1.715,11.628],[0.413,5.16]],"o":[[0.38,4.744],[-1.703,11.548],[-6.05,29.061],[0,0],[6.652,-18.898],[3.032,-14.562],[1.705,-11.569],[0,0]],"v":[[1.568,-74.906],[-0.584,-49.537],[-7.867,-9.515],[-28.387,69.465],[-25.358,70.532],[-4.724,-8.86],[2.593,-49.069],[4.769,-75.162]],"c":true},"ix":2},"nm":"Path 4","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[26.798,-65.046],[28.392,-64.854],[28.537,-66.055],[27.423,-66.525]],"c":true},"ix":2},"nm":"Path 5","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-0.365,0.219],[-0.104,0.414]],"o":[[0,0],[0.414,0.104],[0.366,-0.219],[0,0]],"v":[[-3.43,75.882],[-3.821,77.439],[-2.605,77.258],[-1.872,76.271]],"c":true},"ix":2},"nm":"Path 6","mn":"ADBE Vector Shape - Group","hd":false},{"ind":6,"ty":"sh","ix":7,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-0.214,-0.398],[-0.438,-0.11]],"o":[[0,0],[-0.15,0.426],[0.214,0.398],[0,0]],"v":[[-26.873,69.999],[-28.387,69.465],[-28.287,70.758],[-27.264,71.555]],"c":true},"ix":2},"nm":"Path 7","mn":"ADBE Vector Shape - Group","hd":false},{"ind":7,"ty":"sh","ix":8,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[3.169,-75.034],[3.794,-76.512],[1.357,-77.542],[1.568,-74.906]],"c":true},"ix":2},"nm":"Path 8","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[63.414,77.792],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 15","np":12,"cix":2,"bm":0,"ix":15,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[1.584,19.807],[0,0],[6.555,-26.197]],"o":[[13.233,-37.594],[0,0],[-7.506,62.365],[0,0]],"v":[[-26.835,69.575],[3.206,-75.458],[26.835,-65.47],[-3.393,75.458]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156922583,0.976470648074,0.952941236309,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[63.377,78.216],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 16","np":4,"cix":2,"bm":0,"ix":16,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[27.424,-66.525],[3.794,-76.512],[2.544,-73.554],[26.173,-63.567]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ind":1,"ty":"sh","ix":2,"ks":{"a":0,"k":{"i":[[0,0],[-7.522,62.498],[0,0],[6.577,-26.288]],"o":[[6.532,-26.105],[0,0],[-7.49,62.233],[0,0]],"v":[[-1.872,76.271],[28.393,-64.854],[25.204,-65.237],[-4.987,75.492]],"c":true},"ix":2},"nm":"Path 2","mn":"ADBE Vector Shape - Group","hd":false},{"ind":2,"ty":"sh","ix":3,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[-27.263,71.557],[-3.82,77.439],[-3.039,74.325],[-26.482,68.441]],"c":true},"ix":2},"nm":"Path 3","mn":"ADBE Vector Shape - Group","hd":false},{"ind":3,"ty":"sh","ix":4,"ks":{"a":0,"k":{"i":[[0,0],[1.711,-11.607],[3.023,-14.521],[6.581,-18.695],[0,0],[-6.059,29.106],[-1.714,11.628],[0.413,5.16]],"o":[[0.379,4.744],[-1.702,11.549],[-6.05,29.06],[0,0],[6.652,-18.897],[3.031,-14.562],[1.706,-11.569],[0,0]],"v":[[1.569,-74.905],[-0.584,-49.537],[-7.867,-9.514],[-28.387,69.465],[-25.358,70.532],[-4.723,-8.86],[2.593,-49.068],[4.77,-75.161]],"c":true},"ix":2},"nm":"Path 4","mn":"ADBE Vector Shape - Group","hd":false},{"ind":4,"ty":"sh","ix":5,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[26.799,-65.046],[28.393,-64.854],[28.537,-66.054],[27.424,-66.525]],"c":true},"ix":2},"nm":"Path 5","mn":"ADBE Vector Shape - Group","hd":false},{"ind":5,"ty":"sh","ix":6,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-0.366,0.219],[-0.103,0.413]],"o":[[0,0],[0.413,0.103],[0.365,-0.219],[0,0]],"v":[[-3.43,75.882],[-3.82,77.439],[-2.604,77.258],[-1.872,76.271]],"c":true},"ix":2},"nm":"Path 6","mn":"ADBE Vector Shape - Group","hd":false},{"ind":6,"ty":"sh","ix":7,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[-0.214,-0.397],[-0.438,-0.11]],"o":[[0,0],[-0.15,0.426],[0.214,0.398],[0,0]],"v":[[-26.872,69.999],[-28.387,69.465],[-28.287,70.758],[-27.263,71.557]],"c":true},"ix":2},"nm":"Path 7","mn":"ADBE Vector Shape - Group","hd":false},{"ind":7,"ty":"sh","ix":8,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0]],"v":[[3.169,-75.033],[3.794,-76.512],[1.358,-77.542],[1.569,-74.905]],"c":true},"ix":2},"nm":"Path 8","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[87.148,81.128],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 17","np":12,"cix":2,"bm":0,"ix":17,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[1.585,19.806],[0,0],[6.555,-26.197]],"o":[[13.232,-37.593],[0,0],[-7.507,62.366],[0,0]],"v":[[-26.836,69.574],[3.205,-75.458],[26.835,-65.471],[-3.394,75.458]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.992156922583,0.976470648074,0.952941236309,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[87.112,81.553],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 18","np":4,"cix":2,"bm":0,"ix":18,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[1.182,-7.001],[0,0],[0,0],[0,0]],"o":[[0.043,1.91],[0,0],[0,0],[0,0],[0,0]],"v":[[17.111,-18.601],[12.812,2.992],[8.165,23.813],[-17.154,18.162],[-6.411,-23.813]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[42.96,171.602],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 19","np":2,"cix":2,"bm":0,"ix":19,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[1.182,-7.001],[0,0],[0,0],[0,0]],"o":[[0.043,1.91],[0,0],[0,0],[0,0],[0,0]],"v":[[17.111,-18.601],[12.812,2.992],[8.165,23.813],[-17.154,18.162],[-6.411,-23.813]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[42.96,171.602],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 20","np":4,"cix":2,"bm":0,"ix":20,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[1.183,-7.001],[0,0],[0,0],[0,0]],"o":[[0.042,1.91],[0,0],[0,0],[0,0],[0,0]],"v":[[17.112,-18.6],[12.812,2.992],[8.166,23.813],[-17.154,18.163],[-6.412,-23.813]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":3.211,"ix":5},"lc":2,"lj":2,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[66.686,174.935],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 21","np":2,"cix":2,"bm":0,"ix":21,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[1.183,-7.001],[0,0],[0,0],[0,0]],"o":[[0.042,1.91],[0,0],[0,0],[0,0],[0,0]],"v":[[17.112,-18.6],[12.812,2.992],[8.166,23.813],[-17.154,18.163],[-6.412,-23.813]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[66.686,174.935],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 22","np":4,"cix":2,"bm":0,"ix":22,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[2.111,2.82],[7.027,1.405],[0,0]],"o":[[-2.111,-2.82],[0,0],[6.406,-0.201]],"v":[[10.804,1.805],[-12.915,-5.934],[-5.776,5.934]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.125490196078,0.380392186782,0.301960784314,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[70.311,185.683],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 23","np":4,"cix":2,"bm":0,"ix":23,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":48,"st":0,"bm":0},{"ddd":0,"ind":9,"ty":4,"nm":"Layer 9 Outlines 7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[278.079,104.613,0],"ix":2},"a":{"a":0,"k":[31.092,23.846,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":29,"s":[122.942,122.942,100]},{"t":37,"s":[2292.942,2292.942,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.171,-0.624],[-2.094,0.695],[-3.201,-0.672],[-1.344,-4.905],[3.328,-3.803],[5.833,-1.015],[4.185,0.011],[1.831,-0.129],[0.974,0.646],[0.616,1.279],[1.611,9.728],[-4.823,2.802],[-4.355,-7.673],[-0.035,-0.875],[-0.009,-0.197]],"o":[[0.009,0.654],[0.978,3.673],[3.118,-1.025],[4.75,1.011],[1.344,4.904],[-3.924,4.499],[-4.134,0.725],[-1.843,-0.01],[-1.088,0.074],[-1.232,-0.815],[-4.098,-8.552],[-0.908,-5.494],[7.593,-4.369],[0.43,0.764],[0.003,0.208],[0,0]],"v":[[1.009,-10.6],[1.192,-8.656],[8.421,-9.237],[18.092,-9.868],[29.498,-0.38],[25.608,14.26],[10.032,22.212],[-2.476,23.001],[-8.003,23.076],[-11.501,22.949],[-14.02,19.193],[-29.934,-5.15],[-22.827,-19.227],[0.361,-13.755],[0.981,-11.22],[0.997,-10.605]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.58431372549,1,0.666666666667,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[31.092,23.846],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":29,"op":77,"st":29,"bm":0},{"ddd":0,"ind":10,"ty":4,"nm":"Layer 9 Outlines 6","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[278.079,104.613,0],"ix":2},"a":{"a":0,"k":[31.092,23.846,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":28,"s":[122.942,122.942,100]},{"t":36,"s":[2292.942,2292.942,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.171,-0.624],[-2.094,0.695],[-3.201,-0.672],[-1.344,-4.905],[3.328,-3.803],[5.833,-1.015],[4.185,0.011],[1.831,-0.129],[0.974,0.646],[0.616,1.279],[1.611,9.728],[-4.823,2.802],[-4.355,-7.673],[-0.035,-0.875],[-0.009,-0.197]],"o":[[0.009,0.654],[0.978,3.673],[3.118,-1.025],[4.75,1.011],[1.344,4.904],[-3.924,4.499],[-4.134,0.725],[-1.843,-0.01],[-1.088,0.074],[-1.232,-0.815],[-4.098,-8.552],[-0.908,-5.494],[7.593,-4.369],[0.43,0.764],[0.003,0.208],[0,0]],"v":[[1.009,-10.6],[1.192,-8.656],[8.421,-9.237],[18.092,-9.868],[29.498,-0.38],[25.608,14.26],[10.032,22.212],[-2.476,23.001],[-8.003,23.076],[-11.501,22.949],[-14.02,19.193],[-29.934,-5.15],[-22.827,-19.227],[0.361,-13.755],[0.981,-11.22],[0.997,-10.605]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.58431372549,1,0.666666666667,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[31.092,23.846],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":28,"op":76,"st":28,"bm":0},{"ddd":0,"ind":11,"ty":4,"nm":"Layer 9 Outlines 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[278.079,104.613,0],"ix":2},"a":{"a":0,"k":[31.092,23.846,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":27,"s":[122.942,122.942,100]},{"t":35,"s":[2292.942,2292.942,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.171,-0.624],[-2.094,0.695],[-3.201,-0.672],[-1.344,-4.905],[3.328,-3.803],[5.833,-1.015],[4.185,0.011],[1.831,-0.129],[0.974,0.646],[0.616,1.279],[1.611,9.728],[-4.823,2.802],[-4.355,-7.673],[-0.035,-0.875],[-0.009,-0.197]],"o":[[0.009,0.654],[0.978,3.673],[3.118,-1.025],[4.75,1.011],[1.344,4.904],[-3.924,4.499],[-4.134,0.725],[-1.843,-0.01],[-1.088,0.074],[-1.232,-0.815],[-4.098,-8.552],[-0.908,-5.494],[7.593,-4.369],[0.43,0.764],[0.003,0.208],[0,0]],"v":[[1.009,-10.6],[1.192,-8.656],[8.421,-9.237],[18.092,-9.868],[29.498,-0.38],[25.608,14.26],[10.032,22.212],[-2.476,23.001],[-8.003,23.076],[-11.501,22.949],[-14.02,19.193],[-29.934,-5.15],[-22.827,-19.227],[0.361,-13.755],[0.981,-11.22],[0.997,-10.605]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.682114545037,0.109412092321,0.626004806219,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[31.092,23.846],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":27,"op":75,"st":27,"bm":0},{"ddd":0,"ind":12,"ty":4,"nm":"Layer 9 Outlines 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[278.079,104.613,0],"ix":2},"a":{"a":0,"k":[31.092,23.846,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":26,"s":[122.942,122.942,100]},{"t":34,"s":[2292.942,2292.942,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.171,-0.624],[-2.094,0.695],[-3.201,-0.672],[-1.344,-4.905],[3.328,-3.803],[5.833,-1.015],[4.185,0.011],[1.831,-0.129],[0.974,0.646],[0.616,1.279],[1.611,9.728],[-4.823,2.802],[-4.355,-7.673],[-0.035,-0.875],[-0.009,-0.197]],"o":[[0.009,0.654],[0.978,3.673],[3.118,-1.025],[4.75,1.011],[1.344,4.904],[-3.924,4.499],[-4.134,0.725],[-1.843,-0.01],[-1.088,0.074],[-1.232,-0.815],[-4.098,-8.552],[-0.908,-5.494],[7.593,-4.369],[0.43,0.764],[0.003,0.208],[0,0]],"v":[[1.009,-10.6],[1.192,-8.656],[8.421,-9.237],[18.092,-9.868],[29.498,-0.38],[25.608,14.26],[10.032,22.212],[-2.476,23.001],[-8.003,23.076],[-11.501,22.949],[-14.02,19.193],[-29.934,-5.15],[-22.827,-19.227],[0.361,-13.755],[0.981,-11.22],[0.997,-10.605]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.682114545037,0.109412092321,0.626004806219,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[31.092,23.846],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":26,"op":74,"st":26,"bm":0},{"ddd":0,"ind":13,"ty":4,"nm":"Layer 9 Outlines 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[278.079,104.613,0],"ix":2},"a":{"a":0,"k":[31.092,23.846,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":26,"s":[122.942,122.942,100]},{"t":34,"s":[2292.942,2292.942,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.171,-0.624],[-2.094,0.695],[-3.201,-0.672],[-1.344,-4.905],[3.328,-3.803],[5.833,-1.015],[4.185,0.011],[1.831,-0.129],[0.974,0.646],[0.616,1.279],[1.611,9.728],[-4.823,2.802],[-4.355,-7.673],[-0.035,-0.875],[-0.009,-0.197]],"o":[[0.009,0.654],[0.978,3.673],[3.118,-1.025],[4.75,1.011],[1.344,4.904],[-3.924,4.499],[-4.134,0.725],[-1.843,-0.01],[-1.088,0.074],[-1.232,-0.815],[-4.098,-8.552],[-0.908,-5.494],[7.593,-4.369],[0.43,0.764],[0.003,0.208],[0,0]],"v":[[1.009,-10.6],[1.192,-8.656],[8.421,-9.237],[18.092,-9.868],[29.498,-0.38],[25.608,14.26],[10.032,22.212],[-2.476,23.001],[-8.003,23.076],[-11.501,22.949],[-14.02,19.193],[-29.934,-5.15],[-22.827,-19.227],[0.361,-13.755],[0.981,-11.22],[0.997,-10.605]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.682114545037,0.109412092321,0.626004806219,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[31.092,23.846],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":26,"op":74,"st":26,"bm":0},{"ddd":0,"ind":14,"ty":4,"nm":"Layer 9 Outlines 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[278.079,104.613,0],"ix":2},"a":{"a":0,"k":[31.092,23.846,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":25,"s":[122.942,122.942,100]},{"t":33,"s":[2292.942,2292.942,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.171,-0.624],[-2.094,0.695],[-3.201,-0.672],[-1.344,-4.905],[3.328,-3.803],[5.833,-1.015],[4.185,0.011],[1.831,-0.129],[0.974,0.646],[0.616,1.279],[1.611,9.728],[-4.823,2.802],[-4.355,-7.673],[-0.035,-0.875],[-0.009,-0.197]],"o":[[0.009,0.654],[0.978,3.673],[3.118,-1.025],[4.75,1.011],[1.344,4.904],[-3.924,4.499],[-4.134,0.725],[-1.843,-0.01],[-1.088,0.074],[-1.232,-0.815],[-4.098,-8.552],[-0.908,-5.494],[7.593,-4.369],[0.43,0.764],[0.003,0.208],[0,0]],"v":[[1.009,-10.6],[1.192,-8.656],[8.421,-9.237],[18.092,-9.868],[29.498,-0.38],[25.608,14.26],[10.032,22.212],[-2.476,23.001],[-8.003,23.076],[-11.501,22.949],[-14.02,19.193],[-29.934,-5.15],[-22.827,-19.227],[0.361,-13.755],[0.981,-11.22],[0.997,-10.605]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.895770981733,0.58431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[31.092,23.846],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":25,"op":73,"st":25,"bm":0},{"ddd":0,"ind":15,"ty":4,"nm":"Layer 9 Outlines","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[278.079,104.613,0],"ix":2},"a":{"a":0,"k":[31.092,23.846,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.833,0.833,0.833],"y":[0.833,0.833,0.833]},"o":{"x":[0.167,0.167,0.167],"y":[0.167,0.167,0.167]},"t":24,"s":[122.942,122.942,100]},{"t":32,"s":[2292.942,2292.942,100]}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.171,-0.624],[-2.094,0.695],[-3.201,-0.672],[-1.344,-4.905],[3.328,-3.803],[5.833,-1.015],[4.185,0.011],[1.831,-0.129],[0.974,0.646],[0.616,1.279],[1.611,9.728],[-4.823,2.802],[-4.355,-7.673],[-0.035,-0.875],[-0.009,-0.197]],"o":[[0.009,0.654],[0.978,3.673],[3.118,-1.025],[4.75,1.011],[1.344,4.904],[-3.924,4.499],[-4.134,0.725],[-1.843,-0.01],[-1.088,0.074],[-1.232,-0.815],[-4.098,-8.552],[-0.908,-5.494],[7.593,-4.369],[0.43,0.764],[0.003,0.208],[0,0]],"v":[[1.009,-10.6],[1.192,-8.656],[8.421,-9.237],[18.092,-9.868],[29.498,-0.38],[25.608,14.26],[10.032,22.212],[-2.476,23.001],[-8.003,23.076],[-11.501,22.949],[-14.02,19.193],[-29.934,-5.15],[-22.827,-19.227],[0.361,-13.755],[0.981,-11.22],[0.997,-10.605]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.58431372549,1,0.666666666667,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[31.092,23.846],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":24,"op":72,"st":24,"bm":0}],"markers":[]}
\ No newline at end of file
diff --git a/uni_modules/uni-animation-view/utssdk/app-android/config.json b/uni_modules/uni-animation-view/utssdk/app-android/config.json
deleted file mode 100644
index 12290c6b927b685588697ed648d82d6bb6273624..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-android/config.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "minSdkVersion": "21",
- "dependencies": [
- "com.airbnb.android:lottie:5.2.0",
- "androidx.appcompat:appcompat:1.0.0"
- ]
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-android/index.vue b/uni_modules/uni-animation-view/utssdk/app-android/index.vue
deleted file mode 100644
index 91d55e8b37eeed28073a542ca347c7002f227296..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-android/index.vue
+++ /dev/null
@@ -1,214 +0,0 @@
-
-
-
-
-
-
-
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/Resources/PrivacyInfo.xcprivacy b/uni_modules/uni-animation-view/utssdk/app-ios/Resources/PrivacyInfo.xcprivacy
deleted file mode 100644
index 187c151d1662c18ca7dfea1d4c7eadfb017dd80e..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/Resources/PrivacyInfo.xcprivacy
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
- NSPrivacyTracking
-
- NSPrivacyTrackingDomains
-
- NSPrivacyCollectedDataTypes
-
- NSPrivacyAccessedAPITypes
-
-
- NSPrivacyAccessedAPIType
- NSPrivacyAccessedAPICategoryFileTimestamp
- NSPrivacyAccessedAPITypeReasons
-
- 3B52.1
-
-
-
-
-
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/config.json b/uni_modules/uni-animation-view/utssdk/app-ios/config.json
deleted file mode 100644
index 30bde2f74b5485dcada042f8d411c8ce9409ff1c..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/config.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "deploymentTarget": "12.0",
- "validArchitectures": [
- "arm64",
- "x86_64"
- ]
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/index.vue b/uni_modules/uni-animation-view/utssdk/app-ios/index.vue
deleted file mode 100644
index 95f5c940102d30a858d7e4c16966e8a8d3912271..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/index.vue
+++ /dev/null
@@ -1,233 +0,0 @@
-
-
-
-
-
-
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/PrivacyInfo.xcprivacy b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/PrivacyInfo.xcprivacy
deleted file mode 100644
index 187c151d1662c18ca7dfea1d4c7eadfb017dd80e..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/PrivacyInfo.xcprivacy
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
- NSPrivacyTracking
-
- NSPrivacyTrackingDomains
-
- NSPrivacyCollectedDataTypes
-
- NSPrivacyAccessedAPITypes
-
-
- NSPrivacyAccessedAPIType
- NSPrivacyAccessedAPICategoryFileTimestamp
- NSPrivacyAccessedAPITypeReasons
-
- 3B52.1
-
-
-
-
-
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift
deleted file mode 100644
index f62b7760db139a91f828bb4ac0adf5cd35af988e..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CAAnimation+TimingConfiguration.swift
+++ /dev/null
@@ -1,81 +0,0 @@
-// Created by Cal Stephens on 1/6/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-extension CAAnimation {
- /// Creates a `CAAnimation` that wraps this animation,
- /// applying timing-related configuration from the given `LayerAnimationContext`.
- /// - This animation should start at the beginning of the animation and
- /// last the entire duration of the animation. It will be trimmed and retimed
- /// to match the current playback state / looping configuration of the animation view.
- @nonobjc
- func timed(with context: LayerAnimationContext, for layer: CALayer) -> CAAnimation {
- // The base animation always has the duration of the full animation,
- // since that's the time space where keyframing and interpolating happens.
- // So we start with a simple animation timeline from 0% to 100%:
- //
- // ┌──────────────────────────────────┐
- // │ baseAnimation │
- // └──────────────────────────────────┘
- // 0% 100%
- //
- let baseAnimation = self
- baseAnimation.duration = context.animationDuration
- baseAnimation.speed = (context.endFrame < context.startFrame) ? -1 : 1
-
- // To select the subrange of the `baseAnimation` that should be played,
- // we create a parent animation with the duration of that subrange
- // to clip the `baseAnimation`. This parent animation can then loop
- // and/or autoreverse over the clipped subrange.
- //
- // ┌────────────────────┬───────►
- // │ clippingParent │ ...
- // └────────────────────┴───────►
- // 25% 75%
- // ┌──────────────────────────────────┐
- // │ baseAnimation │
- // └──────────────────────────────────┘
- // 0% 100%
- //
- let clippingParent = CAAnimationGroup()
- clippingParent.animations = [baseAnimation]
-
- clippingParent.duration = Double(abs(context.endFrame - context.startFrame)) / context.animation.framerate
- baseAnimation.timeOffset = context.animation.time(forFrame: context.startFrame)
-
- clippingParent.autoreverses = context.timingConfiguration.autoreverses
- clippingParent.repeatCount = context.timingConfiguration.repeatCount
- clippingParent.timeOffset = context.timingConfiguration.timeOffset
-
- // Once the animation ends, it should pause on the final frame
- clippingParent.fillMode = .both
- clippingParent.isRemovedOnCompletion = false
-
- // We can pause the animation on a specific frame by setting the root layer's
- // `speed` to 0, and then setting the `timeOffset` for the given frame.
- // - For that setup to work properly, we have to set the `beginTime`
- // of this animation to a time slightly before the current time.
- // - It's not really clear why this is necessary, but `timeOffset`
- // is not applied correctly without this configuration.
- // - We can't do this when playing the animation in real time,
- // because it can cause keyframe timings to be incorrect.
- if context.timingConfiguration.speed == 0 {
- let currentTime = layer.convertTime(CACurrentMediaTime(), from: nil)
- clippingParent.beginTime = currentTime - .leastNonzeroMagnitude
- }
-
- return clippingParent
- }
-}
-
-extension CALayer {
- /// Adds the given animation to this layer, timed with the given timing configuration
- /// - The given animation should start at the beginning of the animation and
- /// last the entire duration of the animation. It will be trimmed and retimed
- /// to match the current playback state / looping configuration of the animation view.
- @nonobjc
- func add(_ animation: CAPropertyAnimation, timedWith context: LayerAnimationContext) {
- add(animation.timed(with: context, for: self), forKey: animation.keyPath)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CALayer+addAnimation.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CALayer+addAnimation.swift
deleted file mode 100644
index 35dd69dfb4373fe3f6326124b82ee24bc3a0d400..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CALayer+addAnimation.swift
+++ /dev/null
@@ -1,469 +0,0 @@
-// Created by Cal Stephens on 12/14/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-extension CALayer {
-
- // MARK: Internal
-
- /// Constructs a `CAKeyframeAnimation` that reflects the given keyframes,
- /// and adds it to this `CALayer`.
- @nonobjc
- func addAnimation(
- for property: LayerProperty,
- keyframes: KeyframeGroup,
- value keyframeValueMapping: (KeyframeValue) throws -> ValueRepresentation,
- context: LayerAnimationContext)
- throws
- {
- if let customAnimation = try customizedAnimation(for: property, context: context) {
- add(customAnimation, timedWith: context)
- }
-
- else if
- let defaultAnimation = try defaultAnimation(
- for: property,
- keyframes: keyframes,
- value: keyframeValueMapping,
- context: context)
- {
- let timedAnimation = defaultAnimation.timed(with: context, for: self)
- add(timedAnimation, forKey: property.caLayerKeypath)
- }
- }
-
- // MARK: Private
-
- /// Constructs a `CAAnimation` that reflects the given keyframes
- /// - If the value can be applied directly to the CALayer using KVC,
- /// then no `CAAnimation` will be created and the value will be applied directly.
- @nonobjc
- private func defaultAnimation(
- for property: LayerProperty,
- keyframes keyframeGroup: KeyframeGroup,
- value keyframeValueMapping: (KeyframeValue) throws -> ValueRepresentation,
- context: LayerAnimationContext)
- throws -> CAAnimation?
- {
- let keyframes = keyframeGroup.keyframes
- guard !keyframes.isEmpty else { return nil }
-
- // Check if this set of keyframes uses After Effects expressions, which aren't supported.
- // - We only log this once per `CoreAnimationLayer` instance.
- if keyframeGroup.unsupportedAfterEffectsExpression != nil, !context.loggingState.hasLoggedAfterEffectsExpressionsWarning {
- context.loggingState.hasLoggedAfterEffectsExpressionsWarning = true
- context.logger.info("""
- `\(property.caLayerKeypath)` animation for "\(context.currentKeypath.fullPath)" \
- includes an After Effects expression (https://helpx.adobe.com/after-effects/using/expression-language.html), \
- which is not supported by lottie-ios (expressions are only supported by lottie-web). \
- This animation may not play correctly.
- """)
- }
-
- // If there is exactly one keyframe value that doesn't animate,
- // we can improve performance by applying that value directly to the layer
- // instead of creating a relatively expensive `CAKeyframeAnimation`.
- if keyframes.count == 1 {
- return singleKeyframeAnimation(
- for: property,
- keyframeValue: try keyframeValueMapping(keyframes[0].value),
- writeDirectlyToPropertyIfPossible: true)
- }
-
- /// If we're required to use the `complexTimeRemapping` from some parent `PreCompLayer`,
- /// we have to manually interpolate the keyframes with the time remapping applied.
- if context.mustUseComplexTimeRemapping {
- return try defaultAnimation(
- for: property,
- keyframes: Keyframes.manuallyInterpolatedWithTimeRemapping(keyframeGroup, context: context),
- value: keyframeValueMapping,
- context: context.withoutTimeRemapping())
- }
-
- // Split the keyframes into segments with the same `CAAnimationCalculationMode` value
- // - Each of these segments will become their own `CAKeyframeAnimation`
- let animationSegments = keyframes.segmentsSplitByCalculationMode()
-
- // If we only have a single segment, we can just create a single `CAKeyframeAnimation`
- // instead of wrapping it in a `CAAnimationGroup` -- this reduces allocation overhead a bit.
- if animationSegments.count == 1 {
- return try keyframeAnimation(
- for: property,
- keyframes: animationSegments[0],
- value: keyframeValueMapping,
- context: context)
- } else {
- return try animationGroup(
- for: property,
- animationSegments: animationSegments,
- value: keyframeValueMapping,
- context: context)
- }
- }
-
- /// A `CAAnimation` that applies the custom value from the `AnyValueProvider`
- /// registered for this specific property's `AnimationKeypath`,
- /// if one has been registered using `LottieAnimationView.setValueProvider(_:keypath:)`.
- @nonobjc
- private func customizedAnimation(
- for property: LayerProperty,
- context: LayerAnimationContext)
- throws -> CAPropertyAnimation?
- {
- guard
- let customizableProperty = property.customizableProperty,
- let customKeyframes = try context.valueProviderStore.customKeyframes(
- of: customizableProperty,
- for: AnimationKeypath(keys: context.currentKeypath.keys + customizableProperty.name.map { $0.rawValue }),
- context: context)
- else { return nil }
-
- // Since custom animations are overriding an existing animation,
- // we always have to create a CAAnimation and can't write directly
- // to the layer property
- if
- customKeyframes.keyframes.count == 1,
- let singleKeyframeAnimation = singleKeyframeAnimation(
- for: property,
- keyframeValue: customKeyframes.keyframes[0].value,
- writeDirectlyToPropertyIfPossible: false)
- {
- return singleKeyframeAnimation
- }
-
- return try keyframeAnimation(
- for: property,
- keyframes: Array(customKeyframes.keyframes),
- value: { $0 },
- context: context)
- }
-
- /// Creates an animation that applies a single keyframe to this layer property
- /// - In many cases this animation can be omitted entirely, and the underlying
- /// property can be set directly. In that case, no animation will be created.
- private func singleKeyframeAnimation(
- for property: LayerProperty,
- keyframeValue: ValueRepresentation,
- writeDirectlyToPropertyIfPossible: Bool)
- -> CABasicAnimation?
- {
- if writeDirectlyToPropertyIfPossible {
- // If the keyframe value is the same as the layer's default value for this property,
- // then we can just ignore this set of keyframes.
- if property.isDefaultValue(keyframeValue) {
- return nil
- }
-
- // If the property on the CALayer being animated hasn't been modified from the default yet,
- // then we can apply the keyframe value directly to the layer using KVC instead
- // of creating a `CAAnimation`.
- let currentValue = value(forKey: property.caLayerKeypath) as? ValueRepresentation
- if property.isDefaultValue(currentValue) {
- setValue(keyframeValue, forKeyPath: property.caLayerKeypath)
- return nil
- }
- }
-
- // Otherwise, we still need to create a `CAAnimation`, but we can
- // create a simple `CABasicAnimation` that is still less expensive
- // than computing a `CAKeyframeAnimation`.
- let animation = CABasicAnimation(keyPath: property.caLayerKeypath)
- animation.fromValue = keyframeValue
- animation.toValue = keyframeValue
- return animation
- }
-
- /// Creates a `CAAnimationGroup` that wraps a `CAKeyframeAnimation` for each
- /// of the given `animationSegments`
- private func animationGroup(
- for property: LayerProperty,
- animationSegments: [[Keyframe]],
- value keyframeValueMapping: (KeyframeValue) throws -> ValueRepresentation,
- context: LayerAnimationContext)
- throws -> CAAnimationGroup
- {
- // Build the `CAKeyframeAnimation` for each segment of keyframes
- // with the same `CAAnimationCalculationMode`.
- // - Here we have a non-zero number of animation segments,
- // all of which have a non-zero number of keyframes.
- let segmentAnimations: [CAKeyframeAnimation] = try animationSegments.indices.map { index in
- let animationSegment = animationSegments[index]
- var segmentStartTime = try context.time(forFrame: animationSegment.first!.time)
- var segmentEndTime = try context.time(forFrame: animationSegment.last!.time)
-
- // Every portion of the animation timeline has to be covered by a `CAKeyframeAnimation`,
- // so if this is the first or last segment then the start/end time should be exactly
- // the start/end time of the animation itself.
- let isFirstSegment = (index == animationSegments.indices.first!)
- let isLastSegment = (index == animationSegments.indices.last!)
-
- if isFirstSegment {
- segmentStartTime = min(
- try context.time(forFrame: context.animation.startFrame),
- segmentStartTime)
- }
-
- if isLastSegment {
- segmentEndTime = max(
- try context.time(forFrame: context.animation.endFrame),
- segmentEndTime)
- }
-
- let segmentDuration = segmentEndTime - segmentStartTime
-
- // We're building `CAKeyframeAnimation`s, so the `keyTimes` are expressed
- // relative to 0 (`segmentStartTime`) and 1 (`segmentEndTime`). This is different
- // from the default behavior of the `keyframeAnimation` method, where times
- // are expressed relative to the entire animation duration.
- let customKeyTimes = try animationSegment.map { keyframeModel -> NSNumber in
- let keyframeTime = try context.time(forFrame: keyframeModel.time)
- let segmentProgressTime = ((keyframeTime - segmentStartTime) / segmentDuration)
- return segmentProgressTime as NSNumber
- }
-
- let animation = try keyframeAnimation(
- for: property,
- keyframes: animationSegment,
- value: keyframeValueMapping,
- customKeyTimes: customKeyTimes,
- context: context)
-
- animation.duration = segmentDuration
- animation.beginTime = segmentStartTime
- return animation
- }
-
- let fullAnimation = CAAnimationGroup()
- fullAnimation.animations = segmentAnimations
- return fullAnimation
- }
-
- /// Creates and validates a `CAKeyframeAnimation` for the given keyframes
- private func keyframeAnimation(
- for property: LayerProperty,
- keyframes: [Keyframe],
- value keyframeValueMapping: (KeyframeValue) throws -> ValueRepresentation,
- customKeyTimes: [NSNumber]? = nil,
- context: LayerAnimationContext)
- throws
- -> CAKeyframeAnimation
- {
- // Convert the list of `Keyframe` into
- // the representation used by `CAKeyframeAnimation`
- var keyTimes = try customKeyTimes ?? keyframes.map { keyframeModel -> NSNumber in
- NSNumber(value: Float(try context.progressTime(for: keyframeModel.time)))
- }
-
- var timingFunctions = timingFunctions(for: keyframes)
- let calculationMode = calculationMode(for: keyframes)
-
- let animation = CAKeyframeAnimation(keyPath: property.caLayerKeypath)
-
- // Position animations define a `CGPath` curve that should be followed,
- // instead of animating directly between keyframe point values.
- if property.caLayerKeypath == LayerProperty.position.caLayerKeypath {
- animation.path = try path(keyframes: keyframes, value: { value in
- guard let point = try keyframeValueMapping(value) as? CGPoint else {
- context.logger.assertionFailure("Cannot create point from keyframe with value \(value)")
- return .zero
- }
-
- return point
- })
- }
-
- // All other types of keyframes provide individual values that are interpolated by Core Animation
- else {
- var values = try keyframes.map { keyframeModel in
- try keyframeValueMapping(keyframeModel.value)
- }
-
- validate(
- values: &values,
- keyTimes: &keyTimes,
- timingFunctions: &timingFunctions,
- for: calculationMode,
- context: context)
-
- animation.values = values
- }
-
- animation.calculationMode = calculationMode
- animation.keyTimes = keyTimes
- animation.timingFunctions = timingFunctions
- return animation
- }
-
- /// The `CAAnimationCalculationMode` that should be used for a `CAKeyframeAnimation`
- /// animating the given keyframes
- private func calculationMode(
- for keyframes: [Keyframe])
- -> CAAnimationCalculationMode
- {
- // At this point we expect all of the animations to have been split in
- // to segments based on the `CAAnimationCalculationMode`, so we can just
- // check the first keyframe.
- if keyframes[0].isHold {
- return .discrete
- } else {
- return .linear
- }
- }
-
- /// `timingFunctions` to apply to a `CAKeyframeAnimation` animating the given keyframes
- private func timingFunctions(
- for keyframes: [Keyframe])
- -> [CAMediaTimingFunction]
- {
- // Compute the timing function between each keyframe and the subsequent keyframe
- var timingFunctions: [CAMediaTimingFunction] = []
-
- for (index, keyframe) in keyframes.enumerated()
- where index != keyframes.indices.last
- {
- let nextKeyframe = keyframes[index + 1]
-
- let controlPoint1 = keyframe.outTangent?.pointValue ?? .zero
- let controlPoint2 = nextKeyframe.inTangent?.pointValue ?? CGPoint(x: 1, y: 1)
-
- timingFunctions.append(CAMediaTimingFunction(
- controlPoints:
- Float(controlPoint1.x),
- Float(controlPoint1.y),
- Float(controlPoint2.x),
- Float(controlPoint2.y)))
- }
-
- return timingFunctions
- }
-
- /// Creates a `CGPath` for the given `position` keyframes,
- /// which accounts for `spatialInTangent`s and `spatialOutTangents`
- private func path(
- keyframes positionKeyframes: [Keyframe],
- value keyframeValueMapping: (KeyframeValue) throws -> CGPoint) rethrows
- -> CGPath
- {
- let path = CGMutablePath()
-
- for (index, keyframe) in positionKeyframes.enumerated() {
- if index == positionKeyframes.indices.first {
- path.move(to: try keyframeValueMapping(keyframe.value))
- }
-
- if index != positionKeyframes.indices.last {
- let nextKeyframe = positionKeyframes[index + 1]
-
- if
- let controlPoint1 = keyframe.spatialOutTangent?.pointValue,
- let controlPoint2 = nextKeyframe.spatialInTangent?.pointValue,
- !(controlPoint1 == .zero && controlPoint2 == .zero)
- {
- path.addCurve(
- to: try keyframeValueMapping(nextKeyframe.value),
- control1: try keyframeValueMapping(keyframe.value) + controlPoint1,
- control2: try keyframeValueMapping(nextKeyframe.value) + controlPoint2)
- }
-
- else {
- path.addLine(to: try keyframeValueMapping(nextKeyframe.value))
- }
- }
- }
-
- path.closeSubpath()
- return path
- }
-
- /// Validates that the requirements of the `CAKeyframeAnimation` API are met correctly
- private func validate(
- values: inout [ValueRepresentation],
- keyTimes: inout [NSNumber],
- timingFunctions: inout [CAMediaTimingFunction],
- for calculationMode: CAAnimationCalculationMode,
- context: LayerAnimationContext)
- {
- // Validate that we have correct start (0.0) and end (1.0) keyframes.
- // From the documentation of `CAKeyframeAnimation.keyTimes`:
- // - The first value in the `keyTimes` array must be 0.0 and the last value must be 1.0.
- if keyTimes.first != 0.0 {
- keyTimes.insert(0.0, at: 0)
- values.insert(values[0], at: 0)
- timingFunctions.insert(CAMediaTimingFunction(name: .linear), at: 0)
- }
-
- if keyTimes.last != 1.0 {
- keyTimes.append(1.0)
- values.append(values.last!)
- timingFunctions.append(CAMediaTimingFunction(name: .linear))
- }
-
- switch calculationMode {
- case .linear, .cubic:
- // From the documentation of `CAKeyframeAnimation.keyTimes`:
- // - The number of elements in the keyTimes array
- // should match the number of elements in the values property
- context.logger.assert(
- values.count == keyTimes.count,
- "`values.count` must exactly equal `keyTimes.count`")
-
- context.logger.assert(
- timingFunctions.count == (values.count - 1),
- "`timingFunctions.count` must exactly equal `values.count - 1`")
-
- case .discrete:
- // From the documentation of `CAKeyframeAnimation.keyTimes`:
- // - If the calculationMode is set to discrete... the keyTimes array
- // should have one more entry than appears in the values array.
- values.removeLast()
-
- context.logger.assert(
- keyTimes.count == values.count + 1,
- "`keyTimes.count` must exactly equal `values.count + 1`")
-
- default:
- context.logger.assertionFailure("""
- Unexpected keyframe calculation mode \(calculationMode)
- """)
- }
- }
-
-}
-
-extension RandomAccessCollection {
- /// Splits this array of `Keyframe`s into segments with the same `CAAnimationCalculationMode`
- /// - Keyframes with `isHold=true` become `discrete`, and keyframes with `isHold=false`
- /// become linear. Each `CAKeyframeAnimation` can only be one or the other, so each
- /// `calculationModeSegment` becomes its own `CAKeyframeAnimation`.
- func segmentsSplitByCalculationMode() -> [[Element]]
- where Element == Keyframe, Index == Int
- {
- var segments: [[Element]] = []
- var currentSegment: [Element] = []
-
- for keyframe in self {
- guard let mostRecentKeyframe = currentSegment.last else {
- currentSegment.append(keyframe)
- continue
- }
-
- // When `isHold` changes between any two given keyframes, we have to create a new segment
- if keyframe.isHold != mostRecentKeyframe.isHold {
- // Add this keyframe to both the existing segment that is ending,
- // so we know how long that segment is, and the new segment,
- // so we know when that segment starts.
- currentSegment.append(keyframe)
- segments.append(currentSegment)
- currentSegment = [keyframe]
- }
-
- else {
- currentSegment.append(keyframe)
- }
- }
-
- segments.append(currentSegment)
- return segments
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift
deleted file mode 100644
index e5b888f45e8173801dc856ab8ef65662484ef1ad..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CombinedShapeAnimation.swift
+++ /dev/null
@@ -1,84 +0,0 @@
-// Created by Cal Stephens on 1/28/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-extension CAShapeLayer {
- /// Adds animations for the given `CombinedShapeItem` to this `CALayer`
- @nonobjc
- func addAnimations(
- for combinedShapes: CombinedShapeItem,
- context: LayerAnimationContext,
- pathMultiplier: PathMultiplier)
- throws
- {
- try addAnimation(
- for: .path,
- keyframes: combinedShapes.shapes,
- value: { paths in
- let combinedPath = CGMutablePath()
- for path in paths {
- combinedPath.addPath(path.cgPath().duplicated(times: pathMultiplier))
- }
- return combinedPath
- },
- context: context)
- }
-}
-
-// MARK: - CombinedShapeItem
-
-/// A custom `ShapeItem` subclass that combines multiple `Shape`s into a single `KeyframeGroup`
-final class CombinedShapeItem: ShapeItem {
-
- // MARK: Lifecycle
-
- init(shapes: KeyframeGroup<[BezierPath]>, name: String) {
- self.shapes = shapes
- super.init(name: name, type: .shape, hidden: false)
- }
-
- required init(from _: Decoder) throws {
- fatalError("init(from:) has not been implemented")
- }
-
- required init(dictionary _: [String: Any]) throws {
- fatalError("init(dictionary:) has not been implemented")
- }
-
- // MARK: Internal
-
- let shapes: KeyframeGroup<[BezierPath]>
-
-}
-
-extension CombinedShapeItem {
- /// Manually combines the given shape keyframes by manually interpolating at each frame
- static func manuallyInterpolating(
- shapes: [KeyframeGroup],
- name: String)
- -> CombinedShapeItem
- {
- let interpolators = shapes.map { shape in
- KeyframeInterpolator(keyframes: shape.keyframes)
- }
-
- let times = shapes.flatMap { $0.keyframes.map { $0.time } }
-
- let minimumTime = times.min() ?? 0
- let maximumTime = times.max() ?? 0
- let animationLocalTimeRange = Int(minimumTime)...Int(maximumTime)
-
- let interpolatedKeyframes = animationLocalTimeRange.map { localTime in
- Keyframe(
- value: interpolators.compactMap { interpolator in
- interpolator.value(frame: AnimationFrameTime(localTime)) as? BezierPath
- },
- time: AnimationFrameTime(localTime))
- }
-
- return CombinedShapeItem(
- shapes: KeyframeGroup(keyframes: ContiguousArray(interpolatedKeyframes)),
- name: name)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CustomPathAnimation.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CustomPathAnimation.swift
deleted file mode 100644
index 2171eda5172a4d6118c33cc6743507861d96bcd8..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/CustomPathAnimation.swift
+++ /dev/null
@@ -1,86 +0,0 @@
-// Created by Cal Stephens on 12/21/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-extension CAShapeLayer {
- /// Adds animations for the given `BezierPath` keyframes to this `CALayer`
- @nonobjc
- func addAnimations(
- for customPath: KeyframeGroup,
- context: LayerAnimationContext,
- pathMultiplier: PathMultiplier = 1,
- transformPath: (CGPath) -> CGPath = { $0 },
- roundedCorners: RoundedCorners? = nil)
- throws
- {
- let combinedKeyframes = try BezierPathKeyframe.combining(
- path: customPath,
- cornerRadius: roundedCorners?.radius)
-
- try addAnimation(
- for: .path,
- keyframes: combinedKeyframes,
- value: { pathKeyframe in
- var path = pathKeyframe.path
- if let cornerRadius = pathKeyframe.cornerRadius {
- path = path.roundCorners(radius: cornerRadius.cgFloatValue)
- }
-
- return transformPath(path.cgPath().duplicated(times: pathMultiplier))
- },
- context: context)
- }
-}
-
-extension CGPath {
- /// Duplicates this `CGPath` so that it is repeated the given number of times
- func duplicated(times: Int) -> CGPath {
- if times <= 1 {
- return self
- }
-
- let cgPath = CGMutablePath()
-
- for _ in 0..,
- cornerRadius: KeyframeGroup?) throws
- -> KeyframeGroup
- {
- guard
- let cornerRadius,
- cornerRadius.keyframes.contains(where: { $0.value.cgFloatValue > 0 })
- else {
- return path.map { path in
- BezierPathKeyframe(path: path, cornerRadius: nil)
- }
- }
-
- return Keyframes.combined(
- path, cornerRadius,
- makeCombinedResult: BezierPathKeyframe.init)
- }
-
- func interpolate(to: BezierPathKeyframe, amount: CGFloat) -> BezierPathKeyframe {
- BezierPathKeyframe(
- path: path.interpolate(to: to.path, amount: amount),
- cornerRadius: cornerRadius.interpolate(to: to.cornerRadius, amount: amount))
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/DropShadowAnimation.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/DropShadowAnimation.swift
deleted file mode 100644
index 92296390bbe07ddcb262e6e13de8ce70efca35df..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/DropShadowAnimation.swift
+++ /dev/null
@@ -1,160 +0,0 @@
-// Created by Cal Stephens on 8/15/23.
-// Copyright © 2023 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - DropShadowModel
-
-protocol DropShadowModel {
- /// The opacity of the drop shadow, from 0 to 100.
- var _opacity: KeyframeGroup? { get }
-
- /// The shadow radius of the blur
- var _radius: KeyframeGroup? { get }
-
- /// The color of the drop shadow
- var _color: KeyframeGroup? { get }
-
- /// The angle of the drop shadow, in degrees,
- /// with "90" resulting in a shadow directly beneath the layer.
- /// Combines with the `distance` to form the `shadowOffset`.
- var _angle: KeyframeGroup? { get }
-
- /// The distance of the drop shadow offset.
- /// Combines with the `angle` to form the `shadowOffset`.
- var _distance: KeyframeGroup? { get }
-}
-
-// MARK: - DropShadowStyle + DropShadowModel
-
-extension DropShadowStyle: DropShadowModel {
- var _opacity: KeyframeGroup? { opacity }
- var _color: KeyframeGroup? { color }
- var _angle: KeyframeGroup? { angle }
- var _distance: KeyframeGroup? { distance }
-
- var _radius: KeyframeGroup? {
- size.map { sizeValue in
- // After Effects shadow softness uses a different range of values than CALayer.shadowRadius,
- // so shadows render too softly if we directly use the value from After Effects. We find that
- // dividing this value from After Effects by 2 produces results that are visually similar.
- LottieVector1D(sizeValue.cgFloatValue / 2)
- }
- }
-}
-
-// MARK: - DropShadowEffect + DropShadowModel
-
-extension DropShadowEffect: DropShadowModel {
- var _color: KeyframeGroup? { color?.value }
- var _distance: KeyframeGroup? { distance?.value }
-
- var _radius: KeyframeGroup? {
- softness?.value?.map { softnessValue in
- // After Effects shadow softness uses a different range of values than CALayer.shadowRadius,
- // so shadows render too softly if we directly use the value from After Effects. We find that
- // dividing this value from After Effects by 5 produces results that are visually similar.
- LottieVector1D(softnessValue.cgFloatValue / 5)
- }
- }
-
- var _opacity: KeyframeGroup? {
- opacity?.value?.map { originalOpacityValue in
- // `DropShadowEffect.opacity` is a value between 0 and 255,
- // but `DropShadowModel._opacity` expects a value between 0 and 100.
- LottieVector1D((originalOpacityValue.value / 255.0) * 100)
- }
- }
-
- var _angle: KeyframeGroup? {
- direction?.value?.map { originalAngleValue in
- // `DropShadowEffect.distance` is rotated 90º from the
- // angle value representation expected by `DropShadowModel._angle`
- LottieVector1D(originalAngleValue.value - 90)
- }
- }
-}
-
-// MARK: - CALayer + DropShadowModel
-
-extension CALayer {
-
- // MARK: Internal
-
- /// Adds drop shadow animations from the given `DropShadowModel` to this layer
- @nonobjc
- func addDropShadowAnimations(
- for dropShadowModel: DropShadowModel,
- context: LayerAnimationContext)
- throws
- {
- try addShadowOpacityAnimation(from: dropShadowModel, context: context)
- try addShadowColorAnimation(from: dropShadowModel, context: context)
- try addShadowRadiusAnimation(from: dropShadowModel, context: context)
- try addShadowOffsetAnimation(from: dropShadowModel, context: context)
- }
-
- // MARK: Private
-
- private func addShadowOpacityAnimation(from model: DropShadowModel, context: LayerAnimationContext) throws {
- guard let opacityKeyframes = model._opacity else { return }
-
- try addAnimation(
- for: .shadowOpacity,
- keyframes: opacityKeyframes,
- value: {
- // Lottie animation files express opacity as a numerical percentage value
- // (e.g. 0%, 50%, 100%) so we divide by 100 to get the decimal values
- // expected by Core Animation (e.g. 0.0, 0.5, 1.0).
- $0.cgFloatValue / 100
- },
- context: context)
- }
-
- private func addShadowColorAnimation(from model: DropShadowModel, context: LayerAnimationContext) throws {
- guard let shadowColorKeyframes = model._color else { return }
-
- try addAnimation(
- for: .shadowColor,
- keyframes: shadowColorKeyframes,
- value: \.cgColorValue,
- context: context)
- }
-
- private func addShadowRadiusAnimation(from model: DropShadowModel, context: LayerAnimationContext) throws {
- guard let shadowSizeKeyframes = model._radius else { return }
-
- try addAnimation(
- for: .shadowRadius,
- keyframes: shadowSizeKeyframes,
- value: \.cgFloatValue,
- context: context)
- }
-
- private func addShadowOffsetAnimation(from model: DropShadowModel, context: LayerAnimationContext) throws {
- guard
- let angleKeyframes = model._angle,
- let distanceKeyframes = model._distance
- else { return }
-
- let offsetKeyframes = Keyframes.combined(angleKeyframes, distanceKeyframes) { angleDegrees, distance -> CGSize in
- // Lottie animation files express rotation in degrees
- // (e.g. 90º, 180º, 360º) so we convert to radians to get the
- // values expected by Core Animation (e.g. π/2, π, 2π)
- let angleRadians = (angleDegrees.cgFloatValue * .pi) / 180
-
- // Lottie animation files express the `shadowOffset` as (angle, distance) pair,
- // which we convert to the expected x / y offset values:
- let offsetX = distance.cgFloatValue * cos(angleRadians)
- let offsetY = distance.cgFloatValue * sin(angleRadians)
- return CGSize(width: offsetX, height: offsetY)
- }
-
- try addAnimation(
- for: .shadowOffset,
- keyframes: offsetKeyframes,
- value: { $0 },
- context: context)
- }
-
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/EllipseAnimation.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/EllipseAnimation.swift
deleted file mode 100644
index df3d148d485ce36e6449bc7b18379159794b5ac9..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/EllipseAnimation.swift
+++ /dev/null
@@ -1,49 +0,0 @@
-// Created by Cal Stephens on 12/21/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-extension CAShapeLayer {
- /// Adds animations for the given `Ellipse` to this `CALayer`
- @nonobjc
- func addAnimations(
- for ellipse: Ellipse,
- context: LayerAnimationContext,
- pathMultiplier: PathMultiplier)
- throws
- {
- try addAnimation(
- for: .path,
- keyframes: ellipse.combinedKeyframes(),
- value: { keyframe in
- BezierPath.ellipse(
- size: keyframe.size.sizeValue,
- center: keyframe.position.pointValue,
- direction: ellipse.direction)
- .cgPath()
- .duplicated(times: pathMultiplier)
- },
- context: context)
- }
-}
-
-extension Ellipse {
- /// Data that represents how to render an ellipse at a specific point in time
- struct Keyframe: Interpolatable {
- let size: LottieVector3D
- let position: LottieVector3D
-
- func interpolate(to: Ellipse.Keyframe, amount: CGFloat) -> Ellipse.Keyframe {
- Keyframe(
- size: size.interpolate(to: to.size, amount: amount),
- position: position.interpolate(to: to.position, amount: amount))
- }
- }
-
- /// Creates a single array of animatable keyframes from the separate arrays of keyframes in this Ellipse
- func combinedKeyframes() throws -> KeyframeGroup {
- Keyframes.combined(
- size, position,
- makeCombinedResult: Ellipse.Keyframe.init)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/GradientAnimations.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/GradientAnimations.swift
deleted file mode 100644
index 17ebf274d00aefe31a0ff2b9d6cc9e1d97d014ff..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/GradientAnimations.swift
+++ /dev/null
@@ -1,244 +0,0 @@
-// Created by Cal Stephens on 1/7/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - GradientShapeItem
-
-/// A `ShapeItem` that represents a gradient
-protocol GradientShapeItem: OpacityAnimationModel {
- var startPoint: KeyframeGroup { get }
- var endPoint: KeyframeGroup { get }
- var gradientType: GradientType { get }
- var numberOfColors: Int { get }
- var colors: KeyframeGroup<[Double]> { get }
-}
-
-// MARK: - GradientFill + GradientShapeItem
-
-extension GradientFill: GradientShapeItem { }
-
-// MARK: - GradientStroke + GradientShapeItem
-
-extension GradientStroke: GradientShapeItem { }
-
-// MARK: - GradientRenderLayer + GradientShapeItem
-
-extension GradientRenderLayer {
-
- // MARK: Internal
-
- /// Adds gradient-related animations to this layer, from the given `GradientFill`
- /// - The RGB components and alpha components can have different color stops / locations,
- /// so have to be rendered in separate `CAGradientLayer`s.
- func addGradientAnimations(
- for gradient: GradientShapeItem,
- type: GradientContentType,
- context: LayerAnimationContext)
- throws
- {
- // We have to set `colors` and `locations` to non-nil values
- // for the animations below to actually take effect
- locations = []
-
- // The initial value for `colors` must be an array with the exact same number of colors
- // as the gradient that will be applied in the `CAAnimation`
- switch type {
- case .rgb:
- colors = .init(
- repeating: CGColor.rgb(0, 0, 0),
- count: gradient.numberOfColors)
-
- case .alpha:
- colors = .init(
- repeating: CGColor.rgb(0, 0, 0),
- count: gradient.colorConfiguration(from: gradient.colors.keyframes[0].value, type: .alpha).count)
- }
-
- try addAnimation(
- for: .colors,
- keyframes: gradient.colors,
- value: { colorComponents in
- gradient.colorConfiguration(from: colorComponents, type: type).map { $0.color }
- },
- context: context)
-
- try addAnimation(
- for: .locations,
- keyframes: gradient.colors,
- value: { colorComponents in
- gradient.colorConfiguration(from: colorComponents, type: type).map { $0.location }
- },
- context: context)
-
- try addOpacityAnimation(for: gradient, context: context)
-
- switch gradient.gradientType {
- case .linear:
- try addLinearGradientAnimations(for: gradient, context: context)
- case .radial:
- try addRadialGradientAnimations(for: gradient, context: context)
- case .none:
- break
- }
- }
-
- // MARK: Private
-
- private func addLinearGradientAnimations(
- for gradient: GradientShapeItem,
- context: LayerAnimationContext)
- throws
- {
- type = .axial
-
- try addAnimation(
- for: .startPoint,
- keyframes: gradient.startPoint,
- value: { absoluteStartPoint in
- percentBasedPointInBounds(from: absoluteStartPoint.pointValue)
- },
- context: context)
-
- try addAnimation(
- for: .endPoint,
- keyframes: gradient.endPoint,
- value: { absoluteEndPoint in
- percentBasedPointInBounds(from: absoluteEndPoint.pointValue)
- },
- context: context)
- }
-
- private func addRadialGradientAnimations(for gradient: GradientShapeItem, context: LayerAnimationContext) throws {
- type = .radial
-
- let combinedKeyframes = Keyframes.combined(
- gradient.startPoint, gradient.endPoint,
- makeCombinedResult: { absoluteStartPoint, absoluteEndPoint -> RadialGradientKeyframes in
- // Convert the absolute start / end points to the relative structure used by Core Animation
- let relativeStartPoint = percentBasedPointInBounds(from: absoluteStartPoint.pointValue)
- let radius = absoluteStartPoint.pointValue.distanceTo(absoluteEndPoint.pointValue)
- let relativeEndPoint = percentBasedPointInBounds(
- from: CGPoint(
- x: absoluteStartPoint.x + radius,
- y: absoluteStartPoint.y + radius))
-
- return RadialGradientKeyframes(startPoint: relativeStartPoint, endPoint: relativeEndPoint)
- })
-
- try addAnimation(
- for: .startPoint,
- keyframes: combinedKeyframes,
- value: \.startPoint,
- context: context)
-
- try addAnimation(
- for: .endPoint,
- keyframes: combinedKeyframes,
- value: \.endPoint,
- context: context)
- }
-}
-
-// MARK: - RadialGradientKeyframes
-
-private struct RadialGradientKeyframes: Interpolatable {
- let startPoint: CGPoint
- let endPoint: CGPoint
-
- func interpolate(to: RadialGradientKeyframes, amount: CGFloat) -> RadialGradientKeyframes {
- RadialGradientKeyframes(
- startPoint: startPoint.interpolate(to: to.startPoint, amount: amount),
- endPoint: endPoint.interpolate(to: to.endPoint, amount: amount))
- }
-}
-
-// MARK: - GradientContentType
-
-/// Each type of gradient that can be constructed from a `GradientShapeItem`
-enum GradientContentType {
- case rgb
- case alpha
-}
-
-/// `colors` and `locations` configuration for a `CAGradientLayer`
-typealias GradientColorConfiguration = [(color: CGColor, location: CGFloat)]
-
-extension GradientShapeItem {
-
- // MARK: Internal
-
- /// Whether or not this `GradientShapeItem` includes an alpha component
- /// that has to be rendered as a separate `CAGradientLayer` from the
- /// layer that renders the rgb color components
- var hasAlphaComponent: Bool {
- for colorComponentsKeyframe in colors.keyframes {
- let colorComponents = colorComponentsKeyframe.value
- let alphaConfiguration = colorConfiguration(from: colorComponents, type: .alpha)
-
- let notFullyOpaque = alphaConfiguration.contains(where: { color, _ in
- color.alpha < 0.999
- })
-
- if notFullyOpaque {
- return true
- }
- }
-
- return false
- }
-
- // MARK: Fileprivate
-
- /// Converts the compact `[Double]` color components representation
- /// into an array of `CGColor`s and the location of those colors within the gradient.
- /// - The color components array is a repeating list of `[location, red, green, blue]` values
- /// for each color in the gradient, followed by an optional repeating list of
- /// `[location, alpha]` values that control the colors' alpha values.
- /// - The RGB and alpha values can have different color stops / locations,
- /// so each has to be rendered in a separate `CAGradientLayer`.
- fileprivate func colorConfiguration(
- from colorComponents: [Double],
- type: GradientContentType)
- -> GradientColorConfiguration
- {
- switch type {
- case .rgb:
- precondition(
- colorComponents.count >= numberOfColors * 4,
- "Each color must have RGB components and a location component")
-
- // Each group of four `Double` values represents a single `CGColor`,
- // and its relative location within the gradient.
- var colors = GradientColorConfiguration()
-
- for colorIndex in 0.. {
- /// The `CALayer` KVC key path that this value should be assigned to
- let caLayerKeypath: String
-
- /// Whether or not the given value is the default value for this property
- /// - If the keyframe values are just equal to the default value,
- /// then we can improve performance a bit by just not creating
- /// a CAAnimation (since it would be redundant).
- let isDefaultValue: (ValueRepresentation?) -> Bool
-
- /// A description of how this property can be customized dynamically
- /// at runtime using `AnimationView.setValueProvider(_:keypath:)`
- let customizableProperty: CustomizableProperty?
-}
-
-extension LayerProperty where ValueRepresentation: Equatable {
- /// Initializes a `LayerProperty` that corresponds to a property on `CALayer`
- /// or some other `CALayer` subclass like `CAShapeLayer`.
- /// - Parameters:
- /// - caLayerKeypath: The Objective-C `#keyPath` to the `CALayer` property,
- /// e.g. `#keyPath(CALayer.opacity)` or `#keyPath(CAShapeLayer.path)`.
- /// - defaultValue: The default value of the property (e.g. the value of the
- /// property immediately after calling `CALayer.init()`). Knowing this value
- /// lets us perform some optimizations in `CALayer+addAnimation`.
- /// - customizableProperty: A description of how this property can be customized
- /// dynamically at runtime using `AnimationView.setValueProvider(_:keypath:)`.
- init(
- caLayerKeypath: String,
- defaultValue: ValueRepresentation?,
- customizableProperty: CustomizableProperty?)
- {
- self.init(
- caLayerKeypath: caLayerKeypath,
- isDefaultValue: { $0 == defaultValue },
- customizableProperty: customizableProperty)
- }
-}
-
-// MARK: - CustomizableProperty
-
-/// A description of how a `CALayer` property can be customized dynamically
-/// at runtime using `LottieAnimationView.setValueProvider(_:keypath:)`
-struct CustomizableProperty {
- /// The name that `AnimationKeypath`s can use to refer to this property
- /// - When building an animation for this property that will be applied
- /// to a specific layer, this `name` is appended to the end of that
- /// layer's `AnimationKeypath`. The combined keypath is used to query
- /// the `ValueProviderStore`.
- let name: [PropertyName]
-
- /// A closure that coverts the type-erased value of an `AnyValueProvider`
- /// to the strongly-typed representation used by this property, if possible.
- /// - `value` is the value for the current frame that should be converted,
- /// as returned by `AnyValueProvider.typeErasedStorage`.
- /// - `valueProvider` is the `AnyValueProvider` that returned the type-erased value.
- let conversion: (_ value: Any, _ valueProvider: AnyValueProvider) -> ValueRepresentation?
-}
-
-// MARK: - PropertyName
-
-/// The name of a customizable property that can be used in an `AnimationKeypath`
-/// - These values should be shared between the two rendering engines,
-/// since they form the public API of the `AnimationKeypath` system.
-enum PropertyName: String, CaseIterable {
- case color = "Color"
- case opacity = "Opacity"
- case scale = "Scale"
- case position = "Position"
- case rotation = "Rotation"
- case strokeWidth = "Stroke Width"
- case gradientColors = "Colors"
-}
-
-// MARK: CALayer properties
-
-extension LayerProperty {
- static var position: LayerProperty {
- .init(
- caLayerKeypath: "transform.translation",
- defaultValue: CGPoint(x: 0, y: 0),
- customizableProperty: .position)
- }
-
- static var positionX: LayerProperty {
- .init(
- caLayerKeypath: "transform.translation.x",
- defaultValue: 0,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var positionY: LayerProperty {
- .init(
- caLayerKeypath: "transform.translation.y",
- defaultValue: 0,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var scale: LayerProperty {
- .init(
- caLayerKeypath: "transform.scale",
- defaultValue: 1,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var scaleX: LayerProperty {
- .init(
- caLayerKeypath: "transform.scale.x",
- defaultValue: 1,
- customizableProperty: .scaleX)
- }
-
- static var scaleY: LayerProperty {
- .init(
- caLayerKeypath: "transform.scale.y",
- defaultValue: 1,
- customizableProperty: .scaleY)
- }
-
- static var rotationX: LayerProperty {
- .init(
- caLayerKeypath: "transform.rotation.x",
- defaultValue: 0,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var rotationY: LayerProperty {
- .init(
- caLayerKeypath: "transform.rotation.y",
- defaultValue: 0,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var rotationZ: LayerProperty {
- .init(
- caLayerKeypath: "transform.rotation.z",
- defaultValue: 0,
- customizableProperty: .rotation)
- }
-
- static var anchorPoint: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CALayer.anchorPoint),
- // This is intentionally not `GGPoint(x: 0.5, y: 0.5)` (the actual default)
- // to opt `anchorPoint` out of the KVC `setValue` flow, which causes issues.
- defaultValue: nil,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var opacity: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CALayer.opacity),
- defaultValue: 1,
- customizableProperty: .opacity)
- }
-
- static var isHidden: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CALayer.isHidden),
- defaultValue: false,
- customizableProperty: nil /* unsupported */ )
- }
-
- static var transform: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CALayer.transform),
- isDefaultValue: { transform in
- guard let transform else { return false }
- return CATransform3DIsIdentity(transform)
- },
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var shadowOpacity: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CALayer.shadowOpacity),
- defaultValue: 0,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var shadowColor: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CALayer.shadowColor),
- defaultValue: .rgb(0, 0, 0),
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var shadowRadius: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CALayer.shadowRadius),
- defaultValue: 3.0,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var shadowOffset: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CALayer.shadowOffset),
- defaultValue: CGSize(width: 0, height: -3.0),
- customizableProperty: nil /* currently unsupported */ )
- }
-}
-
-// MARK: CAShapeLayer properties
-
-extension LayerProperty {
- static var path: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CAShapeLayer.path),
- defaultValue: nil,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var fillColor: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CAShapeLayer.fillColor),
- defaultValue: nil,
- customizableProperty: .color)
- }
-
- static var lineWidth: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CAShapeLayer.lineWidth),
- defaultValue: 1,
- customizableProperty: .floatValue(.strokeWidth))
- }
-
- static var lineDashPhase: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CAShapeLayer.lineDashPhase),
- defaultValue: 0,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var strokeColor: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CAShapeLayer.strokeColor),
- defaultValue: nil,
- customizableProperty: .color)
- }
-
- static var strokeStart: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CAShapeLayer.strokeStart),
- defaultValue: 0,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var strokeEnd: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CAShapeLayer.strokeEnd),
- defaultValue: 1,
- customizableProperty: nil /* currently unsupported */ )
- }
-}
-
-// MARK: CAGradientLayer properties
-
-extension LayerProperty {
- static var colors: LayerProperty<[CGColor]> {
- .init(
- caLayerKeypath: #keyPath(CAGradientLayer.colors),
- defaultValue: nil,
- customizableProperty: .gradientColors)
- }
-
- static var locations: LayerProperty<[CGFloat]> {
- .init(
- caLayerKeypath: #keyPath(CAGradientLayer.locations),
- defaultValue: nil,
- customizableProperty: .gradientLocations)
- }
-
- static var startPoint: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CAGradientLayer.startPoint),
- defaultValue: nil,
- customizableProperty: nil /* currently unsupported */ )
- }
-
- static var endPoint: LayerProperty {
- .init(
- caLayerKeypath: #keyPath(CAGradientLayer.endPoint),
- defaultValue: nil,
- customizableProperty: nil /* currently unsupported */ )
- }
-}
-
-// MARK: - CustomizableProperty types
-
-extension CustomizableProperty {
- static var color: CustomizableProperty {
- .init(
- name: [.color],
- conversion: { typeErasedValue, _ in
- guard let color = typeErasedValue as? LottieColor else {
- return nil
- }
-
- return .rgba(CGFloat(color.r), CGFloat(color.g), CGFloat(color.b), CGFloat(color.a))
- })
- }
-
- static var opacity: CustomizableProperty {
- .init(
- name: [.opacity],
- conversion: { typeErasedValue, _ in
- guard let vector = typeErasedValue as? LottieVector1D else { return nil }
-
- // Lottie animation files express opacity as a numerical percentage value
- // (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values
- // expected by Core Animation (e.g. 0.5, 1.0, 2.0).
- return vector.cgFloatValue / 100
- })
- }
-
- static var scaleX: CustomizableProperty {
- .init(
- name: [.scale],
- conversion: { typeErasedValue, _ in
- guard let vector = typeErasedValue as? LottieVector3D else { return nil }
-
- // Lottie animation files express scale as a numerical percentage value
- // (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values
- // expected by Core Animation (e.g. 0.5, 1.0, 2.0).
- return vector.pointValue.x / 100
- })
- }
-
- static var scaleY: CustomizableProperty {
- .init(
- name: [.scale],
- conversion: { typeErasedValue, _ in
- guard let vector = typeErasedValue as? LottieVector3D else { return nil }
-
- // Lottie animation files express scale as a numerical percentage value
- // (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values
- // expected by Core Animation (e.g. 0.5, 1.0, 2.0).
- return vector.pointValue.y / 100
- })
- }
-
- static var rotation: CustomizableProperty {
- .init(
- name: [.rotation],
- conversion: { typeErasedValue, _ in
- guard let vector = typeErasedValue as? LottieVector1D else { return nil }
-
- // Lottie animation files express rotation in degrees
- // (e.g. 90º, 180º, 360º) so we covert to radians to get the
- // values expected by Core Animation (e.g. π/2, π, 2π)
- return vector.cgFloatValue * .pi / 180
- })
- }
-
- static var position: CustomizableProperty {
- .init(
- name: [.position],
- conversion: { typeErasedValue, _ in
- guard let vector = typeErasedValue as? LottieVector3D else { return nil }
- return vector.pointValue
- })
- }
-
- static var gradientColors: CustomizableProperty<[CGColor]> {
- .init(
- name: [.gradientColors],
- conversion: { _, typeErasedValueProvider in
- guard let gradientValueProvider = typeErasedValueProvider as? GradientValueProvider else { return nil }
- return gradientValueProvider.colors.map { $0.cgColorValue }
- })
- }
-
- static var gradientLocations: CustomizableProperty<[CGFloat]> {
- .init(
- name: [.gradientColors],
- conversion: { _, typeErasedValueProvider in
- guard let gradientValueProvider = typeErasedValueProvider as? GradientValueProvider else { return nil }
- return gradientValueProvider.locations.map { CGFloat($0) }
- })
- }
-
- static func floatValue(_ name: PropertyName...) -> CustomizableProperty {
- .init(
- name: name,
- conversion: { typeErasedValue, _ in
- guard let vector = typeErasedValue as? LottieVector1D else { return nil }
- return vector.cgFloatValue
- })
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/OpacityAnimation.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/OpacityAnimation.swift
deleted file mode 100644
index b7bf2200eb3acd540cb8139550067b35d3fe18f3..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/OpacityAnimation.swift
+++ /dev/null
@@ -1,52 +0,0 @@
-// Created by Cal Stephens on 5/17/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - OpacityAnimationModel
-
-protocol OpacityAnimationModel {
- /// The opacity animation to apply to a `CALayer`
- var opacity: KeyframeGroup { get }
-}
-
-// MARK: - Transform + OpacityAnimationModel
-
-extension Transform: OpacityAnimationModel { }
-
-// MARK: - ShapeTransform + OpacityAnimationModel
-
-extension ShapeTransform: OpacityAnimationModel { }
-
-// MARK: - Fill + OpacityAnimationModel
-
-extension Fill: OpacityAnimationModel { }
-
-// MARK: - GradientFill + OpacityAnimationModel
-
-extension GradientFill: OpacityAnimationModel { }
-
-// MARK: - Stroke + OpacityAnimationModel
-
-extension Stroke: OpacityAnimationModel { }
-
-// MARK: - GradientStroke + OpacityAnimationModel
-
-extension GradientStroke: OpacityAnimationModel { }
-
-extension CALayer {
- /// Adds the opacity animation from the given `OpacityAnimationModel` to this layer
- @nonobjc
- func addOpacityAnimation(for opacity: OpacityAnimationModel, context: LayerAnimationContext) throws {
- try addAnimation(
- for: .opacity,
- keyframes: opacity.opacity,
- value: {
- // Lottie animation files express opacity as a numerical percentage value
- // (e.g. 0%, 50%, 100%) so we divide by 100 to get the decimal values
- // expected by Core Animation (e.g. 0.0, 0.5, 1.0).
- $0.cgFloatValue / 100
- },
- context: context)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/RectangleAnimation.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/RectangleAnimation.swift
deleted file mode 100644
index 8c617a67eb40c34f14374966178070c8d9054eab..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/RectangleAnimation.swift
+++ /dev/null
@@ -1,54 +0,0 @@
-// Created by Cal Stephens on 12/21/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-extension CAShapeLayer {
- /// Adds animations for the given `Rectangle` to this `CALayer`
- @nonobjc
- func addAnimations(
- for rectangle: Rectangle,
- context: LayerAnimationContext,
- pathMultiplier: PathMultiplier,
- roundedCorners: RoundedCorners?)
- throws
- {
- try addAnimation(
- for: .path,
- keyframes: try rectangle.combinedKeyframes(roundedCorners: roundedCorners),
- value: { keyframe in
- BezierPath.rectangle(
- position: keyframe.position.pointValue,
- size: keyframe.size.sizeValue,
- cornerRadius: keyframe.cornerRadius.cgFloatValue,
- direction: rectangle.direction)
- .cgPath()
- .duplicated(times: pathMultiplier)
- },
- context: context)
- }
-}
-
-extension Rectangle {
- /// Data that represents how to render a rectangle at a specific point in time
- struct Keyframe: Interpolatable {
- let size: LottieVector3D
- let position: LottieVector3D
- let cornerRadius: LottieVector1D
-
- func interpolate(to: Rectangle.Keyframe, amount: CGFloat) -> Rectangle.Keyframe {
- Rectangle.Keyframe(
- size: size.interpolate(to: to.size, amount: amount),
- position: position.interpolate(to: to.position, amount: amount),
- cornerRadius: cornerRadius.interpolate(to: to.cornerRadius, amount: amount))
- }
- }
-
- /// Creates a single array of animatable keyframes from the separate arrays of keyframes in this Rectangle
- func combinedKeyframes(roundedCorners: RoundedCorners?) throws -> KeyframeGroup {
- let cornerRadius = roundedCorners?.radius ?? cornerRadius
- return Keyframes.combined(
- size, position, cornerRadius,
- makeCombinedResult: Rectangle.Keyframe.init)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/ShapeAnimation.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/ShapeAnimation.swift
deleted file mode 100644
index 0559f29a2f8f1c7af41896d1452f01ec7d49636d..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/ShapeAnimation.swift
+++ /dev/null
@@ -1,236 +0,0 @@
-// Created by Cal Stephens on 1/7/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-extension CAShapeLayer {
- /// Adds a `path` animation for the given `ShapeItem`
- @nonobjc
- func addAnimations(
- for shape: ShapeItem,
- context: LayerAnimationContext,
- pathMultiplier: PathMultiplier,
- roundedCorners: RoundedCorners?)
- throws
- {
- switch shape {
- case let customShape as Shape:
- try addAnimations(
- for: customShape.path,
- context: context,
- pathMultiplier: pathMultiplier,
- roundedCorners: roundedCorners)
-
- case let combinedShape as CombinedShapeItem:
- try addAnimations(for: combinedShape, context: context, pathMultiplier: pathMultiplier)
- try context.compatibilityAssert(roundedCorners == nil, """
- Rounded corners support is not currently implemented for combined shape items
- """)
-
- case let ellipse as Ellipse:
- try addAnimations(for: ellipse, context: context, pathMultiplier: pathMultiplier)
-
- case let rectangle as Rectangle:
- try addAnimations(
- for: rectangle,
- context: context,
- pathMultiplier: pathMultiplier,
- roundedCorners: roundedCorners)
-
- case let star as Star:
- try addAnimations(for: star, context: context, pathMultiplier: pathMultiplier)
- try context.compatibilityAssert(roundedCorners == nil, """
- Rounded corners support is currently not implemented for polygon items
- """)
-
- default:
- // None of the other `ShapeItem` subclasses draw a `path`
- try context.logCompatibilityIssue("Unexpected shape type \(type(of: shape))")
- return
- }
- }
-
- /// Adds a `fillColor` animation for the given `Fill` object
- @nonobjc
- func addAnimations(for fill: Fill, context: LayerAnimationContext) throws {
- fillRule = fill.fillRule.caFillRule
-
- try addAnimation(
- for: .fillColor,
- keyframes: fill.color,
- value: \.cgColorValue,
- context: context)
-
- try addOpacityAnimation(for: fill, context: context)
- }
-
- /// Adds animations for `strokeStart` and `strokeEnd` from the given `Trim` object
- @nonobjc
- func addAnimations(for trim: Trim, context: LayerAnimationContext) throws -> PathMultiplier {
- let (strokeStartKeyframes, strokeEndKeyframes, pathMultiplier) = try trim.caShapeLayerKeyframes()
-
- try addAnimation(
- for: .strokeStart,
- keyframes: strokeStartKeyframes,
- value: { strokeStart in
- // Lottie animation files express stoke trims as a numerical percentage value
- // (e.g. 25%, 50%, 100%) so we divide by 100 to get the decimal values
- // expected by Core Animation (e.g. 0.25, 0.5, 1.0).
- CGFloat(strokeStart.cgFloatValue) / CGFloat(pathMultiplier) / 100
- }, context: context)
-
- try addAnimation(
- for: .strokeEnd,
- keyframes: strokeEndKeyframes,
- value: { strokeEnd in
- // Lottie animation files express stoke trims as a numerical percentage value
- // (e.g. 25%, 50%, 100%) so we divide by 100 to get the decimal values
- // expected by Core Animation (e.g. 0.25, 0.5, 1.0).
- CGFloat(strokeEnd.cgFloatValue) / CGFloat(pathMultiplier) / 100
- }, context: context)
-
- return pathMultiplier
- }
-}
-
-/// The number of times that a `CGPath` needs to be duplicated in order to support the animation's `Trim` keyframes
-typealias PathMultiplier = Int
-
-extension Trim {
-
- // MARK: Fileprivate
-
- /// The `strokeStart` and `strokeEnd` keyframes to apply to a `CAShapeLayer`,
- /// plus a `pathMultiplier` that should be applied to the layer's `path` so that
- /// trim values larger than 100% can be displayed properly.
- fileprivate func caShapeLayerKeyframes()
- throws
- -> (strokeStart: KeyframeGroup, strokeEnd: KeyframeGroup, pathMultiplier: PathMultiplier)
- {
- let strokeStart: KeyframeGroup
- let strokeEnd: KeyframeGroup
-
- // CAShapeLayer requires strokeStart to be less than strokeEnd. This
- // isn't required by the Lottie schema, so some animations may have
- // strokeStart and strokeEnd flipped.
- if startValueIsAlwaysLessOrEqualToThanEndValue() {
- // If the start value is always _less than_ or equal to the end value
- // then we can use the given values without any modifications
- strokeStart = start
- strokeEnd = end
- } else if startValueIsAlwaysGreaterThanOrEqualToEndValue() {
- // If the start value is always _greater than_ or equal to the end value,
- // then we can just swap the start / end keyframes. This lets us avoid
- // manually interpolating the keyframes values at each frame, which
- // would be more expensive.
- strokeStart = end
- strokeEnd = start
- } else {
- // Otherwise if the start / end values ever swap places we have to
- // fix the order on a per-keyframe basis, which may require manually
- // interpolating the keyframe values at each frame.
- (strokeStart, strokeEnd) = interpolatedAtEachFrame()
- }
-
- // If there are no offsets, then the stroke values can be used as-is
- guard
- !offset.keyframes.isEmpty,
- offset.keyframes.contains(where: { $0.value.cgFloatValue != 0 })
- else {
- return (strokeStart, strokeEnd, 1)
- }
-
- // Apply the offset to the start / end values at each frame
- let offsetStrokeKeyframes = Keyframes.combined(
- strokeStart,
- strokeEnd,
- offset,
- makeCombinedResult: { start, end, offset -> (start: LottieVector1D, end: LottieVector1D) in
- // Compute the adjusted value by converting the offset value to a stroke value
- let offsetStart = start.cgFloatValue + (offset.cgFloatValue / 360 * 100)
- let offsetEnd = end.cgFloatValue + (offset.cgFloatValue / 360 * 100)
- return (start: LottieVector1D(offsetStart), end: LottieVector1D(offsetEnd))
- })
-
- var adjustedStrokeStart = offsetStrokeKeyframes.map { $0.start }
- var adjustedStrokeEnd = offsetStrokeKeyframes.map { $0.end }
-
- // If maximum stroke value is larger than 100%, then we have to create copies of the path
- // so the total path length includes the maximum stroke
- let startStrokes = adjustedStrokeStart.keyframes.map { $0.value.cgFloatValue }
- let endStrokes = adjustedStrokeEnd.keyframes.map { $0.value.cgFloatValue }
- let minimumStrokeMultiplier = Double(floor((startStrokes.min() ?? 0) / 100.0))
- let maximumStrokeMultiplier = Double(ceil((endStrokes.max() ?? 100) / 100.0))
-
- if minimumStrokeMultiplier < 0 {
- // Core Animation doesn't support negative stroke offsets, so we have to
- // shift all of the offset values up by the minimum
- adjustedStrokeStart = adjustedStrokeStart.map { LottieVector1D($0.value + (abs(minimumStrokeMultiplier) * 100.0)) }
- adjustedStrokeEnd = adjustedStrokeEnd.map { LottieVector1D($0.value + (abs(minimumStrokeMultiplier) * 100.0)) }
- }
-
- return (
- strokeStart: adjustedStrokeStart,
- strokeEnd: adjustedStrokeEnd,
- pathMultiplier: Int(abs(maximumStrokeMultiplier) + abs(minimumStrokeMultiplier)))
- }
-
- // MARK: Private
-
- /// Checks whether or not the value for `trim.start` is less than
- /// or equal to the value for every `trim.end` at every frame.
- private func startValueIsAlwaysLessOrEqualToThanEndValue() -> Bool {
- startAndEndValuesAllSatisfy { startValue, endValue in
- startValue <= endValue
- }
- }
-
- /// Checks whether or not the value for `trim.start` is greater than
- /// or equal to the value for every `trim.end` at every frame.
- private func startValueIsAlwaysGreaterThanOrEqualToEndValue() -> Bool {
- startAndEndValuesAllSatisfy { startValue, endValue in
- startValue >= endValue
- }
- }
-
- private func startAndEndValuesAllSatisfy(_ condition: (_ start: CGFloat, _ end: CGFloat) -> Bool) -> Bool {
- let keyframeTimes = Set(start.keyframes.map { $0.time } + end.keyframes.map { $0.time })
-
- let startInterpolator = KeyframeInterpolator(keyframes: start.keyframes)
- let endInterpolator = KeyframeInterpolator(keyframes: end.keyframes)
-
- for keyframeTime in keyframeTimes {
- guard
- let startAtTime = startInterpolator.value(frame: keyframeTime) as? LottieVector1D,
- let endAtTime = endInterpolator.value(frame: keyframeTime) as? LottieVector1D
- else { continue }
-
- if !condition(startAtTime.cgFloatValue, endAtTime.cgFloatValue) {
- return false
- }
- }
-
- return true
- }
-
- /// Interpolates the start and end keyframes, at each frame if necessary,
- /// so that the value of `strokeStart` is always less than `strokeEnd`.
- private func interpolatedAtEachFrame()
- -> (strokeStart: KeyframeGroup, strokeEnd: KeyframeGroup)
- {
- let combinedKeyframes = Keyframes.combined(
- start,
- end,
- makeCombinedResult: { startValue, endValue -> (start: LottieVector1D, end: LottieVector1D) in
- if startValue.cgFloatValue < endValue.cgFloatValue {
- return (start: startValue, end: endValue)
- } else {
- return (start: endValue, end: startValue)
- }
- })
-
- return (
- strokeStart: combinedKeyframes.map { $0.start },
- strokeEnd: combinedKeyframes.map { $0.end })
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/StarAnimation.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/StarAnimation.swift
deleted file mode 100644
index 62a762111be7c4f55e9a19da76cb26e716129ddf..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/StarAnimation.swift
+++ /dev/null
@@ -1,116 +0,0 @@
-// Created by Cal Stephens on 1/10/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-extension CAShapeLayer {
-
- // MARK: Internal
-
- /// Adds animations for the given `Rectangle` to this `CALayer`
- @nonobjc
- func addAnimations(
- for star: Star,
- context: LayerAnimationContext,
- pathMultiplier: PathMultiplier)
- throws
- {
- switch star.starType {
- case .star:
- try addStarAnimation(for: star, context: context, pathMultiplier: pathMultiplier)
- case .polygon:
- try addPolygonAnimation(for: star, context: context, pathMultiplier: pathMultiplier)
- case .none:
- break
- }
- }
-
- // MARK: Private
-
- @nonobjc
- private func addStarAnimation(
- for star: Star,
- context: LayerAnimationContext,
- pathMultiplier: PathMultiplier)
- throws
- {
- try addAnimation(
- for: .path,
- keyframes: try star.combinedKeyframes(),
- value: { keyframe in
- BezierPath.star(
- position: keyframe.position.pointValue,
- outerRadius: keyframe.outerRadius.cgFloatValue,
- innerRadius: keyframe.innerRadius.cgFloatValue,
- outerRoundedness: keyframe.outerRoundness.cgFloatValue,
- innerRoundedness: keyframe.innerRoundness.cgFloatValue,
- numberOfPoints: keyframe.points.cgFloatValue,
- rotation: keyframe.rotation.cgFloatValue,
- direction: star.direction)
- .cgPath()
- .duplicated(times: pathMultiplier)
- },
- context: context)
- }
-
- @nonobjc
- private func addPolygonAnimation(
- for star: Star,
- context: LayerAnimationContext,
- pathMultiplier: PathMultiplier)
- throws
- {
- try addAnimation(
- for: .path,
- keyframes: try star.combinedKeyframes(),
- value: { keyframe in
- BezierPath.polygon(
- position: keyframe.position.pointValue,
- numberOfPoints: keyframe.points.cgFloatValue,
- outerRadius: keyframe.outerRadius.cgFloatValue,
- outerRoundedness: keyframe.outerRoundness.cgFloatValue,
- rotation: keyframe.rotation.cgFloatValue,
- direction: star.direction)
- .cgPath()
- .duplicated(times: pathMultiplier)
- },
- context: context)
- }
-}
-
-extension Star {
- /// Data that represents how to render a star at a specific point in time
- struct Keyframe: Interpolatable {
- let position: LottieVector3D
- let outerRadius: LottieVector1D
- let innerRadius: LottieVector1D
- let outerRoundness: LottieVector1D
- let innerRoundness: LottieVector1D
- let points: LottieVector1D
- let rotation: LottieVector1D
-
- func interpolate(to: Star.Keyframe, amount: CGFloat) -> Star.Keyframe {
- Star.Keyframe(
- position: position.interpolate(to: to.position, amount: amount),
- outerRadius: outerRadius.interpolate(to: to.outerRadius, amount: amount),
- innerRadius: innerRadius.interpolate(to: to.innerRadius, amount: amount),
- outerRoundness: outerRoundness.interpolate(to: to.outerRoundness, amount: amount),
- innerRoundness: innerRoundness.interpolate(to: to.innerRoundness, amount: amount),
- points: points.interpolate(to: to.points, amount: amount),
- rotation: rotation.interpolate(to: to.rotation, amount: amount))
- }
- }
-
- /// Creates a single array of animatable keyframes from the separate arrays of keyframes in this star/polygon
- func combinedKeyframes() throws -> KeyframeGroup {
- Keyframes.combined(
- position,
- outerRadius,
- innerRadius ?? KeyframeGroup(LottieVector1D(0)),
- outerRoundness,
- innerRoundness ?? KeyframeGroup(LottieVector1D(0)),
- points,
- rotation,
- makeCombinedResult: Star.Keyframe.init)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/StrokeAnimation.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/StrokeAnimation.swift
deleted file mode 100644
index 92b5e4a18b776bce70e85cbd8e0813f27dfc72bb..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/StrokeAnimation.swift
+++ /dev/null
@@ -1,86 +0,0 @@
-// Created by Cal Stephens on 2/10/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - StrokeShapeItem
-
-/// A `ShapeItem` that represents a stroke
-protocol StrokeShapeItem: ShapeItem, OpacityAnimationModel {
- var strokeColor: KeyframeGroup? { get }
- var width: KeyframeGroup { get }
- var lineCap: LineCap { get }
- var lineJoin: LineJoin { get }
- var miterLimit: Double { get }
- var dashPattern: [DashElement]? { get }
- func copy(width: KeyframeGroup) -> StrokeShapeItem
-}
-
-// MARK: - Stroke + StrokeShapeItem
-
-extension Stroke: StrokeShapeItem {
- var strokeColor: KeyframeGroup? { color }
-
- func copy(width: KeyframeGroup) -> StrokeShapeItem {
- // Type-erase the copy from `Stroke` to `StrokeShapeItem`
- let copy: Stroke = copy(width: width)
- return copy
- }
-}
-
-// MARK: - GradientStroke + StrokeShapeItem
-
-extension GradientStroke: StrokeShapeItem {
- var strokeColor: KeyframeGroup? { nil }
-
- func copy(width: KeyframeGroup) -> StrokeShapeItem {
- // Type-erase the copy from `GradientStroke` to `StrokeShapeItem`
- let copy: GradientStroke = copy(width: width)
- return copy
- }
-}
-
-// MARK: - CAShapeLayer + StrokeShapeItem
-
-extension CAShapeLayer {
- /// Adds animations for properties related to the given `Stroke` object (`strokeColor`, `lineWidth`, etc)
- @nonobjc
- func addStrokeAnimations(for stroke: StrokeShapeItem, context: LayerAnimationContext) throws {
- lineJoin = stroke.lineJoin.caLineJoin
- lineCap = stroke.lineCap.caLineCap
- miterLimit = CGFloat(stroke.miterLimit)
-
- if let strokeColor = stroke.strokeColor {
- try addAnimation(
- for: .strokeColor,
- keyframes: strokeColor,
- value: \.cgColorValue,
- context: context)
- }
-
- try addAnimation(
- for: .lineWidth,
- keyframes: stroke.width,
- value: \.cgFloatValue,
- context: context)
-
- try addOpacityAnimation(for: stroke, context: context)
-
- if let (dashPattern, dashPhase) = stroke.dashPattern?.shapeLayerConfiguration {
- let lineDashPattern = try dashPattern.map {
- try KeyframeGroup(keyframes: $0)
- .exactlyOneKeyframe(context: context, description: "stroke dashPattern").cgFloatValue
- }
-
- if lineDashPattern.isSupportedLayerDashPattern {
- self.lineDashPattern = lineDashPattern as [NSNumber]
- }
-
- try addAnimation(
- for: .lineDashPhase,
- keyframes: KeyframeGroup(keyframes: dashPhase),
- value: \.cgFloatValue,
- context: context)
- }
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/TransformAnimations.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/TransformAnimations.swift
deleted file mode 100644
index b9f69d605c12e1d39e72df5fd973638579e2f641..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/TransformAnimations.swift
+++ /dev/null
@@ -1,343 +0,0 @@
-// Created by Cal Stephens on 12/17/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - TransformModel
-
-/// This protocol mirrors the interface of `Transform`,
-/// but is also implemented by `ShapeTransform` to allow
-/// both transform types to share the same animation implementation.
-protocol TransformModel {
- /// The anchor point of the transform.
- var anchorPoint: KeyframeGroup { get }
-
- /// The position of the transform. This is nil if the position data was split.
- var _position: KeyframeGroup? { get }
-
- /// The positionX of the transform. This is nil if the position property is set.
- var _positionX: KeyframeGroup? { get }
-
- /// The positionY of the transform. This is nil if the position property is set.
- var _positionY: KeyframeGroup? { get }
-
- /// The scale of the transform
- var scale: KeyframeGroup { get }
-
- /// The rotation of the transform on X axis.
- var rotationX: KeyframeGroup { get }
-
- /// The rotation of the transform on Y axis.
- var rotationY: KeyframeGroup { get }
-
- /// The rotation of the transform on Z axis.
- var rotationZ: KeyframeGroup { get }
-
- /// The skew of the transform (only present on `ShapeTransform`s)
- var _skew: KeyframeGroup? { get }
-
- /// The skew axis of the transform (only present on `ShapeTransform`s)
- var _skewAxis: KeyframeGroup? { get }
-}
-
-// MARK: - Transform + TransformModel
-
-extension Transform: TransformModel {
- var _position: KeyframeGroup? { position }
- var _positionX: KeyframeGroup? { positionX }
- var _positionY: KeyframeGroup? { positionY }
- var _skew: KeyframeGroup? { nil }
- var _skewAxis: KeyframeGroup? { nil }
-}
-
-// MARK: - ShapeTransform + TransformModel
-
-extension ShapeTransform: TransformModel {
- var anchorPoint: KeyframeGroup { anchor }
- var _position: KeyframeGroup? { position }
- var _positionX: KeyframeGroup? { nil }
- var _positionY: KeyframeGroup? { nil }
- var _skew: KeyframeGroup? { skew }
- var _skewAxis: KeyframeGroup? { skewAxis }
-}
-
-// MARK: - CALayer + TransformModel
-
-extension CALayer {
-
- // MARK: Internal
-
- /// Adds transform-related animations from the given `TransformModel` to this layer
- /// - This _doesn't_ apply `transform.opacity`, which has to be handled separately
- /// since child layers don't inherit the `opacity` of their parent.
- @nonobjc
- func addTransformAnimations(
- for transformModel: TransformModel,
- context: LayerAnimationContext)
- throws
- {
- if
- // CALayers don't support animating skew with its own set of keyframes.
- // If the transform includes a skew, we have to combine all of the transform
- // components into a single set of keyframes.
- transformModel.hasSkew
- // Negative `scale.x` values aren't applied correctly by Core Animation when animating
- // `transform.scale.x` and `transform.scale.y` using separate `CAKeyframeAnimation`s
- // (https://openradar.appspot.com/FB9862872). If the transform includes negative `scale.x`
- // values, we have to combine all of the transform components into a single set of keyframes.
- || transformModel.hasNegativeXScaleValues
- {
- try addCombinedTransformAnimation(for: transformModel, context: context)
- }
-
- else {
- try addPositionAnimations(from: transformModel, context: context)
- try addAnchorPointAnimation(from: transformModel, context: context)
- try addScaleAnimations(from: transformModel, context: context)
- try addRotationAnimations(from: transformModel, context: context)
- }
- }
-
- // MARK: Private
-
- @nonobjc
- private func addPositionAnimations(
- from transformModel: TransformModel,
- context: LayerAnimationContext)
- throws
- {
- if let positionKeyframes = transformModel._position {
- try addAnimation(
- for: .position,
- keyframes: positionKeyframes,
- value: \.pointValue,
- context: context)
- } else if
- let xKeyframes = transformModel._positionX,
- let yKeyframes = transformModel._positionY
- {
- try addAnimation(
- for: .positionX,
- keyframes: xKeyframes,
- value: \.cgFloatValue,
- context: context)
-
- try addAnimation(
- for: .positionY,
- keyframes: yKeyframes,
- value: \.cgFloatValue,
- context: context)
- } else {
- try context.logCompatibilityIssue("""
- `Transform` values must provide either `position` or `positionX` / `positionY` keyframes
- """)
- }
- }
-
- @nonobjc
- private func addAnchorPointAnimation(
- from transformModel: TransformModel,
- context: LayerAnimationContext)
- throws
- {
- try addAnimation(
- for: .anchorPoint,
- keyframes: transformModel.anchorPoint,
- value: { absoluteAnchorPoint in
- guard bounds.width > 0, bounds.height > 0 else {
- context.logger.assertionFailure("Size must be non-zero before an animation can be played")
- return .zero
- }
-
- // Lottie animation files express anchorPoint as an absolute point value,
- // so we have to divide by the width/height of this layer to get the
- // relative decimal values expected by Core Animation.
- return CGPoint(
- x: CGFloat(absoluteAnchorPoint.x) / bounds.width,
- y: CGFloat(absoluteAnchorPoint.y) / bounds.height)
- },
- context: context)
- }
-
- @nonobjc
- private func addScaleAnimations(
- from transformModel: TransformModel,
- context: LayerAnimationContext)
- throws
- {
- try addAnimation(
- for: .scaleX,
- keyframes: transformModel.scale,
- value: { scale in
- // Lottie animation files express scale as a numerical percentage value
- // (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values
- // expected by Core Animation (e.g. 0.5, 1.0, 2.0).
- CGFloat(scale.x) / 100
- },
- context: context)
-
- try addAnimation(
- for: .scaleY,
- keyframes: transformModel.scale,
- value: { scale in
- // Lottie animation files express scale as a numerical percentage value
- // (e.g. 50%, 100%, 200%) so we divide by 100 to get the decimal values
- // expected by Core Animation (e.g. 0.5, 1.0, 2.0).
- CGFloat(scale.y) / 100
- },
- context: context)
- }
-
- private func addRotationAnimations(
- from transformModel: TransformModel,
- context: LayerAnimationContext)
- throws
- {
- let containsXRotationValues = transformModel.rotationX.keyframes.contains(where: { $0.value.cgFloatValue != 0 })
- let containsYRotationValues = transformModel.rotationY.keyframes.contains(where: { $0.value.cgFloatValue != 0 })
-
- // When `rotation.x` or `rotation.y` is used, it doesn't render property in test snapshots
- // but do renders correctly on the simulator / device
- if TestHelpers.snapshotTestsAreRunning {
- if containsXRotationValues {
- context.logger.warn("""
- `rotation.x` values are not displayed correctly in snapshot tests
- """)
- }
-
- if containsYRotationValues {
- context.logger.warn("""
- `rotation.y` values are not displayed correctly in snapshot tests
- """)
- }
- }
-
- // Lottie animation files express rotation in degrees
- // (e.g. 90º, 180º, 360º) so we convert to radians to get the
- // values expected by Core Animation (e.g. π/2, π, 2π)
-
- try addAnimation(
- for: .rotationX,
- keyframes: transformModel.rotationX,
- value: { rotationDegrees in
- rotationDegrees.cgFloatValue * .pi / 180
- },
- context: context)
-
- try addAnimation(
- for: .rotationY,
- keyframes: transformModel.rotationY,
- value: { rotationDegrees in
- rotationDegrees.cgFloatValue * .pi / 180
- },
- context: context)
-
- try addAnimation(
- for: .rotationZ,
- keyframes: transformModel.rotationZ,
- value: { rotationDegrees in
- // Lottie animation files express rotation in degrees
- // (e.g. 90º, 180º, 360º) so we convert to radians to get the
- // values expected by Core Animation (e.g. π/2, π, 2π)
- rotationDegrees.cgFloatValue * .pi / 180
- },
- context: context)
- }
-
- /// Adds an animation for the entire `transform` key by combining all of the
- /// position / size / rotation / skew animations into a single set of keyframes.
- /// This is more expensive that animating each component separately, since
- /// it may require manually interpolating the keyframes at each frame.
- private func addCombinedTransformAnimation(
- for transformModel: TransformModel,
- context: LayerAnimationContext)
- throws
- {
- let requiresManualInterpolation =
- // Core Animation doesn't animate skew changes properly. If the skew value
- // changes over the course of the animation then we have to manually
- // compute the `CATransform3D` for each frame individually.
- transformModel.hasSkewAnimation
- // `addAnimation` requires that we use an `Interpolatable` value, but we can't interpolate a `CATransform3D`.
- // Since this is only necessary when using `complexTimeRemapping`, we can avoid this by manually interpolating
- // when `context.mustUseComplexTimeRemapping` is true and just returning a `Hold` container.
- // Since our keyframes are already manually interpolated, they won't need to be interpolated again.
- || context.mustUseComplexTimeRemapping
-
- let combinedTransformKeyframes = Keyframes.combined(
- transformModel.anchorPoint,
- transformModel._position ?? KeyframeGroup(LottieVector3D(x: 0.0, y: 0.0, z: 0.0)),
- transformModel._positionX ?? KeyframeGroup(LottieVector1D(0)),
- transformModel._positionY ?? KeyframeGroup(LottieVector1D(0)),
- transformModel.scale,
- transformModel.rotationX,
- transformModel.rotationY,
- transformModel.rotationZ,
- transformModel._skew ?? KeyframeGroup(LottieVector1D(0)),
- transformModel._skewAxis ?? KeyframeGroup(LottieVector1D(0)),
- requiresManualInterpolation: requiresManualInterpolation,
- makeCombinedResult: {
- anchor, position, positionX, positionY, scale, rotationX, rotationY, rotationZ, skew, skewAxis
- -> Hold in
-
- let transformPosition: CGPoint
- if transformModel._positionX != nil, transformModel._positionY != nil {
- transformPosition = CGPoint(x: positionX.cgFloatValue, y: positionY.cgFloatValue)
- } else {
- transformPosition = position.pointValue
- }
-
- let transform = CATransform3D.makeTransform(
- anchor: anchor.pointValue,
- position: transformPosition,
- scale: scale.sizeValue,
- rotationX: rotationX.cgFloatValue,
- rotationY: rotationY.cgFloatValue,
- rotationZ: rotationZ.cgFloatValue,
- skew: skew.cgFloatValue,
- skewAxis: skewAxis.cgFloatValue)
-
- return Hold(value: transform)
- })
-
- try addAnimation(
- for: .transform,
- keyframes: combinedTransformKeyframes,
- value: { $0.value },
- context: context)
- }
-
-}
-
-extension TransformModel {
- /// Whether or not this transform has a non-zero skew value
- var hasSkew: Bool {
- guard
- let _skew,
- let _skewAxis,
- !_skew.keyframes.isEmpty,
- !_skewAxis.keyframes.isEmpty
- else {
- return false
- }
-
- return _skew.keyframes.contains(where: { $0.value.cgFloatValue != 0 })
- }
-
- /// Whether or not this transform has a non-zero skew value which animates
- var hasSkewAnimation: Bool {
- guard
- hasSkew,
- let _skew,
- let _skewAxis
- else { return false }
-
- return _skew.keyframes.count > 1
- || _skewAxis.keyframes.count > 1
- }
-
- /// Whether or not this `TransformModel` has any negative X scale values
- var hasNegativeXScaleValues: Bool {
- scale.keyframes.contains(where: { $0.value.x < 0 })
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/VisibilityAnimation.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/VisibilityAnimation.swift
deleted file mode 100644
index 7d6c4b71ea1ac5b7c396c7dac7a69f7094124c73..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Animations/VisibilityAnimation.swift
+++ /dev/null
@@ -1,63 +0,0 @@
-// Created by Cal Stephens on 12/21/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-extension CALayer {
- /// Adds an animation for the given `inTime` and `outTime` to this `CALayer`
- @nonobjc
- func addVisibilityAnimation(
- inFrame: AnimationFrameTime,
- outFrame: AnimationFrameTime,
- context: LayerAnimationContext)
- throws
- {
- /// If this layer uses `complexTimeRemapping`, use the `addAnimation` codepath
- /// which uses `Keyframes.manuallyInterpolatedWithTimeRemapping`.
- if context.mustUseComplexTimeRemapping {
- let isHiddenKeyframes = KeyframeGroup(keyframes: [
- Keyframe(value: true, time: 0, isHold: true), // hidden, before `inFrame`
- Keyframe(value: false, time: inFrame, isHold: true), // visible
- Keyframe(value: true, time: outFrame, isHold: true), // hidden, after `outFrame`
- ])
-
- try addAnimation(
- for: .isHidden,
- keyframes: isHiddenKeyframes.map { Hold(value: $0) },
- value: { $0.value },
- context: context)
- }
-
- /// Otherwise continue using the legacy codepath that doesn't support complex time remapping.
- /// - TODO: We could remove this codepath in favor of always using the simpler codepath above,
- /// but would have to solve https://github.com/airbnb/lottie-ios/pull/2254 for that codepath.
- else {
- let animation = CAKeyframeAnimation(keyPath: #keyPath(isHidden))
- animation.calculationMode = .discrete
-
- animation.values = [
- true, // hidden, before `inFrame`
- false, // visible
- true, // hidden, after `outFrame`
- ]
-
- // From the documentation of `keyTimes`:
- // - If the calculationMode is set to discrete, the first value in the array
- // must be 0.0 and the last value must be 1.0. The array should have one more
- // entry than appears in the values array. For example, if there are two values,
- // there should be three key times.
- animation.keyTimes = [
- NSNumber(value: 0.0),
- NSNumber(value: max(Double(try context.progressTime(for: inFrame)), 0)),
- // Anything visible during the last frame should stay visible until the absolute end of the animation.
- // - This matches the behavior of the main thread rendering engine.
- context.simpleTimeRemapping(outFrame) == context.animation.endFrame
- ? NSNumber(value: Double(1.0))
- : NSNumber(value: min(Double(try context.progressTime(for: outFrame)), 1)),
- NSNumber(value: 1.0),
- ]
-
- add(animation, timedWith: context)
- }
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/CompatibilityTracker.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/CompatibilityTracker.swift
deleted file mode 100644
index ce7e09793ee8e8314e1565808edc7d8ec14be40d..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/CompatibilityTracker.swift
+++ /dev/null
@@ -1,130 +0,0 @@
-// Created by Cal Stephens on 5/4/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-// MARK: - CompatibilityIssue
-
-/// A compatibility issue that was encountered while setting up an animation with the Core Animation engine
-struct CompatibilityIssue: CustomStringConvertible {
- let message: String
- let context: String
-
- var description: String {
- "[\(context)] \(message)"
- }
-}
-
-// MARK: - CompatibilityTracker
-
-/// A type that tracks whether or not an animation is compatible with the Core Animation engine
-final class CompatibilityTracker {
-
- // MARK: Lifecycle
-
- init(mode: Mode, logger: LottieLogger) {
- self.mode = mode
- self.logger = logger
- }
-
- // MARK: Internal
-
- /// How compatibility issues should be handled
- enum Mode {
- /// When a compatibility issue is encountered, an error will be thrown immediately,
- /// aborting the animation setup process as soon as possible.
- case abort
-
- /// When a compatibility issue is encountered, it is stored in `CompatibilityTracker.issues`
- case track
- }
-
- enum Error: Swift.Error {
- case encounteredCompatibilityIssue(CompatibilityIssue)
- }
-
- /// Records a compatibility issue that will be reported according to `CompatibilityTracker.Mode`
- func logIssue(message: String, context: String) throws {
- logger.assert(!context.isEmpty, "Compatibility issue context is unexpectedly empty")
-
- let issue = CompatibilityIssue(
- // Compatibility messages are usually written in source files using multi-line strings,
- // but converting them to be a single line makes it easier to read the ultimate log output.
- message: message.replacingOccurrences(of: "\n", with: " "),
- context: context)
-
- switch mode {
- case .abort:
- throw CompatibilityTracker.Error.encounteredCompatibilityIssue(issue)
- case .track:
- issues.append(issue)
- }
- }
-
- /// Asserts that a condition is true, otherwise logs a compatibility issue that will be reported
- /// according to `CompatibilityTracker.Mode`
- func assert(
- _ condition: Bool,
- _ message: @autoclosure () -> String,
- context: @autoclosure () -> String)
- throws
- {
- if !condition {
- try logIssue(message: message(), context: context())
- }
- }
-
- /// Reports the compatibility issues that were recorded when setting up the animation,
- /// and clears the set of tracked issues.
- func reportCompatibilityIssues(_ handler: ([CompatibilityIssue]) -> Void) {
- handler(issues)
- issues = []
- }
-
- // MARK: Private
-
- private let mode: Mode
- private let logger: LottieLogger
-
- /// Compatibility issues encountered while setting up the animation
- private var issues = [CompatibilityIssue]()
-
-}
-
-// MARK: - CompatibilityTrackerProviding
-
-protocol CompatibilityTrackerProviding {
- var compatibilityTracker: CompatibilityTracker { get }
- var compatibilityIssueContext: String { get }
-}
-
-extension CompatibilityTrackerProviding {
- /// Records a compatibility issue that will be reported according to `CompatibilityTracker.Mode`
- func logCompatibilityIssue(_ message: String) throws {
- try compatibilityTracker.logIssue(message: message, context: compatibilityIssueContext)
- }
-
- /// Asserts that a condition is true, otherwise logs a compatibility issue that will be reported
- /// according to `CompatibilityTracker.Mode`
- func compatibilityAssert(
- _ condition: Bool,
- _ message: @autoclosure () -> String)
- throws
- {
- try compatibilityTracker.assert(condition, message(), context: compatibilityIssueContext)
- }
-}
-
-// MARK: - LayerContext + CompatibilityTrackerProviding
-
-extension LayerContext: CompatibilityTrackerProviding {
- var compatibilityIssueContext: String {
- layerName
- }
-}
-
-// MARK: - LayerAnimationContext + CompatibilityTrackerProviding
-
-extension LayerAnimationContext: CompatibilityTrackerProviding {
- var compatibilityIssueContext: String {
- currentKeypath.fullPath
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/CoreAnimationLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/CoreAnimationLayer.swift
deleted file mode 100644
index 8389dd5600b92cc6f41e16cb6ee54e9e598f601a..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/CoreAnimationLayer.swift
+++ /dev/null
@@ -1,584 +0,0 @@
-// Created by Cal Stephens on 12/13/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - CoreAnimationLayer
-
-/// The root `CALayer` of the Core Animation rendering engine
-final class CoreAnimationLayer: BaseAnimationLayer {
-
- // MARK: Lifecycle
-
- /// Initializes a `CALayer` that renders the given animation using `CAAnimation`s.
- /// - This initializer is throwing, but will only throw when using
- /// `CompatibilityTracker.Mode.abort`.
- init(
- animation: LottieAnimation,
- imageProvider: AnimationImageProvider,
- textProvider: AnimationKeypathTextProvider,
- fontProvider: AnimationFontProvider,
- maskAnimationToBounds: Bool,
- compatibilityTrackerMode: CompatibilityTracker.Mode,
- logger: LottieLogger)
- throws
- {
- self.animation = animation
- self.imageProvider = imageProvider
- self.textProvider = textProvider
- self.fontProvider = fontProvider
- self.logger = logger
- compatibilityTracker = CompatibilityTracker(mode: compatibilityTrackerMode, logger: logger)
- valueProviderStore = ValueProviderStore(logger: logger)
- super.init()
- masksToBounds = maskAnimationToBounds
- setup()
- try setupChildLayers()
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- animation = typedLayer.animation
- currentAnimationConfiguration = typedLayer.currentAnimationConfiguration
- imageProvider = typedLayer.imageProvider
- textProvider = typedLayer.textProvider
- fontProvider = typedLayer.fontProvider
- didSetUpAnimation = typedLayer.didSetUpAnimation
- compatibilityTracker = typedLayer.compatibilityTracker
- logger = typedLayer.logger
- valueProviderStore = typedLayer.valueProviderStore
- super.init(layer: typedLayer)
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- // MARK: Internal
-
- /// Timing-related configuration to apply to this layer's child `CAAnimation`s
- /// - This is effectively a configurable subset of `CAMediaTiming`
- struct CAMediaTimingConfiguration: Equatable {
- var autoreverses = false
- var repeatCount: Float = 0
- var speed: Float = 1
- var timeOffset: TimeInterval = 0
- }
-
- enum PlaybackState: Equatable {
- /// The animation is has started playing, and may still be playing.
- /// - When animating with a finite duration (e.g. `playOnce`), playback
- /// state will still be `playing` when the animation completes.
- /// To check if the animation is currently playing, prefer `isAnimationPlaying`.
- case playing
- /// The animation is statically displaying a specific frame
- case paused(frame: AnimationFrameTime)
- }
-
- /// Configuration used by the `playAnimation` method
- struct AnimationConfiguration: Equatable {
- var animationContext: AnimationContext
- var timingConfiguration: CAMediaTimingConfiguration
- var recordHierarchyKeypath: ((String) -> Void)?
-
- static func ==(_ lhs: AnimationConfiguration, _ rhs: AnimationConfiguration) -> Bool {
- lhs.animationContext == rhs.animationContext
- && lhs.timingConfiguration == rhs.timingConfiguration
- && ((lhs.recordHierarchyKeypath == nil) == (rhs.recordHierarchyKeypath == nil))
- }
- }
-
- /// The parent `LottieAnimationLayer` that manages this layer
- weak var lottieAnimationLayer: LottieAnimationLayer?
-
- /// A closure that is called after this layer sets up its animation.
- /// If the animation setup was unsuccessful and encountered compatibility issues,
- /// those issues are included in this call.
- var didSetUpAnimation: (([CompatibilityIssue]) -> Void)?
-
- /// The `AnimationImageProvider` that `ImageLayer`s use to retrieve images,
- /// referenced by name in the animation json.
- var imageProvider: AnimationImageProvider {
- didSet { reloadImages() }
- }
-
- /// The `AnimationKeypathTextProvider` that `TextLayer`'s use to retrieve texts,
- /// that they should use to render their text context
- var textProvider: AnimationKeypathTextProvider {
- didSet {
- // We need to rebuild the current animation after updating the text provider,
- // since this is used in `TextLayer.setupAnimations(context:)`
- rebuildCurrentAnimation()
- }
- }
-
- /// The `FontProvider` that `TextLayer`s use to retrieve the `CTFont`
- /// that they should use to render their text content
- var fontProvider: AnimationFontProvider {
- didSet { reloadFonts() }
- }
-
- /// Queues the animation with the given timing configuration
- /// to begin playing at the next `display()` call.
- /// - This batches together animations so that even if `playAnimation`
- /// is called multiple times in the same run loop cycle, the animation
- /// will only be set up a single time.
- func playAnimation(
- configuration: AnimationConfiguration,
- playbackState: PlaybackState = .playing)
- {
- pendingAnimationConfiguration = (
- animationConfiguration: configuration,
- playbackState: playbackState)
-
- setNeedsDisplay()
- }
-
- override func layoutSublayers() {
- super.layoutSublayers()
-
- // If no animation has been set up yet, display the first frame
- // now that the layer hierarchy has been setup and laid out
- if
- pendingAnimationConfiguration == nil,
- currentAnimationConfiguration == nil,
- bounds.size != .zero
- {
- currentFrame = animation.frameTime(forProgress: animationProgress)
- }
- }
-
- override func display() {
- // We intentionally don't call `super.display()`, since this layer
- // doesn't directly render any content.
- // - This fixes an issue where certain animations would unexpectedly
- // allocate a very large amount of memory (400mb+).
- // - Alternatively this layer could subclass `CATransformLayer`,
- // but this causes Core Animation to emit unnecessary logs.
- if var pendingAnimationConfiguration {
- pendingAnimationConfigurationModification?(&pendingAnimationConfiguration.animationConfiguration)
- pendingAnimationConfigurationModification = nil
- self.pendingAnimationConfiguration = nil
-
- do {
- try setupAnimation(for: pendingAnimationConfiguration.animationConfiguration)
- } catch {
- if case CompatibilityTracker.Error.encounteredCompatibilityIssue(let compatibilityIssue) = error {
- // Even though the animation setup failed, we still update the layer's playback state
- // so it can be read by the parent `LottieAnimationView` when handling this error
- currentPlaybackState = pendingAnimationConfiguration.playbackState
-
- didSetUpAnimation?([compatibilityIssue])
- return
- }
- }
-
- currentPlaybackState = pendingAnimationConfiguration.playbackState
-
- compatibilityTracker.reportCompatibilityIssues { compatibilityIssues in
- didSetUpAnimation?(compatibilityIssues)
- }
- }
- }
-
- // MARK: Private
-
- /// The configuration for the most recent animation which has been
- /// queued by calling `playAnimation` but not yet actually set up
- private var pendingAnimationConfiguration: (
- animationConfiguration: AnimationConfiguration,
- playbackState: PlaybackState)?
-
- /// A modification that should be applied to the next animation configuration
- private var pendingAnimationConfigurationModification: ((inout AnimationConfiguration) -> Void)?
-
- /// Configuration for the animation that is currently setup in this layer
- private var currentAnimationConfiguration: AnimationConfiguration?
-
- /// The current progress of the placeholder `CAAnimation`,
- /// which is also the realtime animation progress of this layer's animation
- @objc private var animationProgress: CGFloat = 0
-
- private let animation: LottieAnimation
- private let valueProviderStore: ValueProviderStore
- private let compatibilityTracker: CompatibilityTracker
- private let logger: LottieLogger
- private let loggingState = LoggingState()
-
- /// The current playback state of the animation that is displayed in this layer
- private var currentPlaybackState: PlaybackState? {
- didSet {
- guard playbackState != oldValue else { return }
-
- switch playbackState {
- case .playing, nil:
- timeOffset = 0
- case .paused(let frame):
- timeOffset = animation.time(forFrame: frame)
- }
- }
- }
-
- /// The current or pending playback state of the animation displayed in this layer
- private var playbackState: PlaybackState? {
- pendingAnimationConfiguration?.playbackState ?? currentPlaybackState
- }
-
- /// Context used when setting up and configuring sublayers
- private var layerContext: LayerContext {
- LayerContext(
- animation: animation,
- imageProvider: imageProvider,
- textProvider: textProvider,
- fontProvider: fontProvider,
- compatibilityTracker: compatibilityTracker,
- layerName: "root layer")
- }
-
- private func setup() {
- bounds = animation.bounds
- }
-
- private func setupChildLayers() throws {
- try setupLayerHierarchy(
- for: animation.layers,
- context: layerContext)
-
- try validateReasonableNumberOfTimeRemappingLayers()
- }
-
- /// Immediately builds and begins playing `CAAnimation`s for each sublayer
- private func setupAnimation(for configuration: AnimationConfiguration) throws {
- // Remove any existing animations from the layer hierarchy
- removeAnimations()
-
- currentAnimationConfiguration = configuration
-
- let layerContext = LayerAnimationContext(
- animation: animation,
- timingConfiguration: configuration.timingConfiguration,
- startFrame: configuration.animationContext.playFrom,
- endFrame: configuration.animationContext.playTo,
- valueProviderStore: valueProviderStore,
- compatibilityTracker: compatibilityTracker,
- logger: logger,
- loggingState: loggingState,
- currentKeypath: AnimationKeypath(keys: []),
- textProvider: textProvider,
- recordHierarchyKeypath: configuration.recordHierarchyKeypath)
-
- // Perform a layout pass if necessary so all of the sublayers
- // have the most up-to-date sizing information
- layoutIfNeeded()
-
- // Set the speed of this layer, which will be inherited
- // by all sublayers and their animations.
- // - This is required to support scrubbing with a speed of 0
- speed = configuration.timingConfiguration.speed
-
- // Setup a placeholder animation to let us track the realtime animation progress
- setupPlaceholderAnimation(context: layerContext)
-
- // Set up the new animations with the current `TimingConfiguration`
- for animationLayer in sublayers ?? [] {
- try (animationLayer as? AnimationLayer)?.setupAnimations(context: layerContext)
- }
- }
-
- /// Sets up a placeholder `CABasicAnimation` that tracks the current
- /// progress of this animation (between 0 and 1). This lets us provide
- /// realtime animation progress via `self.currentFrame`.
- private func setupPlaceholderAnimation(context: LayerAnimationContext) {
- let animationProgressTracker = CABasicAnimation(keyPath: #keyPath(animationProgress))
- animationProgressTracker.fromValue = 0
- animationProgressTracker.toValue = 1
-
- let timedProgressAnimation = animationProgressTracker.timed(with: context, for: self)
- timedProgressAnimation.delegate = currentAnimationConfiguration?.animationContext.closure
-
- // Remove the progress animation once complete so we know when the animation
- // has finished playing (if it doesn't loop infinitely)
- timedProgressAnimation.isRemovedOnCompletion = true
-
- add(timedProgressAnimation, forKey: #keyPath(animationProgress))
- }
-
- // Removes the current `CAAnimation`s, and rebuilds new animations
- // using the same configuration as the previous animations.
- private func rebuildCurrentAnimation() {
- guard
- // Don't replace any pending animations that are queued to begin
- // on the next run loop cycle, since an existing pending animation
- // will cause the animation to be rebuilt anyway.
- pendingAnimationConfiguration == nil
- else { return }
-
- if isAnimationPlaying == true {
- lottieAnimationLayer?.updateInFlightAnimation()
- } else {
- let currentFrame = currentFrame
- removeAnimations()
- self.currentFrame = currentFrame
- }
- }
-
-}
-
-// MARK: RootAnimationLayer
-
-extension CoreAnimationLayer: RootAnimationLayer {
-
- var primaryAnimationKey: AnimationKey {
- .specific(#keyPath(animationProgress))
- }
-
- /// Whether or not the animation is currently playing.
- /// - Handles case where CAAnimations with a finite duration animation (e.g. `playOnce`)
- /// have finished playing but still present on this layer.
- var isAnimationPlaying: Bool? {
- switch pendingAnimationConfiguration?.playbackState {
- case .playing:
- return true
- case .paused:
- return false
- case nil:
- switch playbackState {
- case .playing:
- return animation(forKey: #keyPath(animationProgress)) != nil
- case nil, .paused:
- return false
- }
- }
- }
-
- /// The current frame of the animation being displayed,
- /// accounting for the realtime progress of any active CAAnimations.
- var currentFrame: AnimationFrameTime {
- get {
- switch playbackState {
- case .paused(let frame):
- return frame
-
- case .playing, nil:
- // When in the `playing` state, the animation is either actively playing
- // or is completed on the final frame of a non-repeating animation.
- // When a non-repeating animation is complete, `animation(forKey: #keyPath(animationProgress))`
- // is no longer present and the Core-Animation-managed `animationProgress` value is just 0.
- // In that case, since the animation is complete, we just return the final frame that was played to.
- let animationCurrentlyPlaying = animation(forKey: #keyPath(animationProgress)) != nil
-
- if !animationCurrentlyPlaying, let configuration = currentAnimationConfiguration {
- return configuration.animationContext.playTo
- } else {
- return animation.frameTime(forProgress: (presentation() ?? self).animationProgress)
- }
- }
- }
- set {
- // We can display a specific frame of the animation by setting
- // `timeOffset` of this layer. This requires setting up the layer hierarchy
- // with a specific configuration (speed=0, etc) at least once. But if
- // the layer hierarchy is already set up correctly, we can update the
- // `timeOffset` very cheaply.
- let requiredAnimationConfiguration = AnimationConfiguration(
- animationContext: AnimationContext(
- playFrom: animation.startFrame,
- // Normal animation playback (like when looping) skips the last frame.
- // However when the animation is paused, we need to be able to render the final frame.
- // To allow this we have to extend the length of the animation by one frame.
- playTo: animation.endFrame + 1,
- closure: nil),
- timingConfiguration: CAMediaTimingConfiguration(speed: 0))
-
- if
- pendingAnimationConfiguration == nil,
- currentAnimationConfiguration == requiredAnimationConfiguration
- {
- currentPlaybackState = .paused(frame: newValue)
- }
-
- else {
- playAnimation(
- configuration: requiredAnimationConfiguration,
- playbackState: .paused(frame: newValue))
- }
- }
- }
-
- var renderScale: CGFloat {
- get { contentsScale }
- set {
- contentsScale = newValue
-
- for sublayer in allSublayers {
- sublayer.contentsScale = newValue
- }
- }
- }
-
- var respectAnimationFrameRate: Bool {
- get { false }
- set {
- logger.assertionFailure("""
- The Core Animation rendering engine currently doesn't support `respectAnimationFrameRate`)
- """)
- }
- }
-
- var _animationLayers: [CALayer] {
- (sublayers ?? []).filter { $0 is AnimationLayer }
- }
-
- func reloadImages() {
- // When the image provider changes, we have to update all `ImageLayer`s
- // so they can query the most up-to-date image from the new image provider.
- for sublayer in allSublayers {
- if let imageLayer = sublayer as? ImageLayer {
- imageLayer.setupImage(context: layerContext)
- }
- }
- }
-
- func reloadFonts() {
- // When the text provider changes, we have to update all `TextLayer`s
- // so they can query the most up-to-date font from the new font provider.
- for sublayer in allSublayers {
- if let textLayer = sublayer as? TextLayer {
- try? textLayer.configureRenderLayer(with: layerContext)
- }
- }
- }
-
- func forceDisplayUpdate() {
- // Unimplemented
- // - We can't call `display()` here, because it would cause unexpected frame animations:
- // https://github.com/airbnb/lottie-ios/issues/2193
- }
-
- func logHierarchyKeypaths() {
- for keypath in allHierarchyKeypaths() {
- logger.info(keypath)
- }
- }
-
- func allHierarchyKeypaths() -> [String] {
- guard pendingAnimationConfiguration?.animationConfiguration ?? currentAnimationConfiguration != nil else {
- logger.info("Cannot log hierarchy keypaths until animation has been set up at least once")
- return []
- }
-
- logger.info("Lottie: Rebuilding animation with hierarchy keypath logging enabled")
-
- var allAnimationKeypaths = [String]()
- pendingAnimationConfigurationModification = { configuration in
- configuration.recordHierarchyKeypath = { keypath in
- allAnimationKeypaths.append(keypath)
- }
- }
-
- rebuildCurrentAnimation()
- displayIfNeeded()
-
- return allAnimationKeypaths
- }
-
- func setValueProvider(_ valueProvider: AnyValueProvider, keypath: AnimationKeypath) {
- valueProviderStore.setValueProvider(valueProvider, keypath: keypath)
-
- // We need to rebuild the current animation after registering a value provider,
- // since any existing `CAAnimation`s could now be out of date.
- rebuildCurrentAnimation()
- }
-
- func getValue(for _: AnimationKeypath, atFrame _: AnimationFrameTime?) -> Any? {
- logger.assertionFailure("""
- The Core Animation rendering engine doesn't support querying values for individual frames
- """)
- return nil
- }
-
- func getOriginalValue(for _: AnimationKeypath, atFrame _: AnimationFrameTime?) -> Any? {
- logger.assertionFailure("""
- The Core Animation rendering engine doesn't support querying values for individual frames
- """)
- return nil
- }
-
- func layer(for _: AnimationKeypath) -> CALayer? {
- logger.assertionFailure("""
- The Core Animation rendering engine doesn't support retrieving `CALayer`s by keypath
- """)
- return nil
- }
-
- func animatorNodes(for _: AnimationKeypath) -> [AnimatorNode]? {
- logger.assertionFailure("""
- The Core Animation rendering engine does not use `AnimatorNode`s
- """)
- return nil
- }
-
- func removeAnimations() {
- currentAnimationConfiguration = nil
- currentPlaybackState = nil
- removeAllAnimations()
-
- for sublayer in allSublayers {
- sublayer.removeAllAnimations()
- }
- }
-
- /// Time remapping in the Core Animation rendering engine requires manually interpolating
- /// every frame of every animation. For very large animations with a huge number of layers,
- /// this can be prohibitively expensive.
- func validateReasonableNumberOfTimeRemappingLayers() throws {
- try layerContext.compatibilityAssert(
- numberOfLayersWithTimeRemapping < 500,
- """
- This animation has a very large number of layers with time remapping (\(numberOfLayersWithTimeRemapping)),
- so will perform poorly with the Core Animation rendering engine.
- """)
- }
-
-}
-
-// MARK: - CALayer + allSublayers
-
-extension CALayer {
- /// All of the layers in the layer tree that are descendants from this later
- @nonobjc
- var allSublayers: [CALayer] {
- var allSublayers: [CALayer] = []
-
- for sublayer in sublayers ?? [] {
- allSublayers.append(sublayer)
- allSublayers.append(contentsOf: sublayer.allSublayers)
- }
-
- return allSublayers
- }
-
- /// The number of layers in this layer hierarchy that have a time remapping applied
- @nonobjc
- var numberOfLayersWithTimeRemapping: Int {
- var numberOfSublayersWithTimeRemapping = 0
-
- for sublayer in sublayers ?? [] {
- if
- let preCompLayer = sublayer as? PreCompLayer,
- preCompLayer.preCompLayer.timeRemapping != nil
- {
- numberOfSublayersWithTimeRemapping += preCompLayer.allSublayers.count
- } else {
- numberOfSublayersWithTimeRemapping += sublayer.numberOfLayersWithTimeRemapping
- }
- }
-
- return numberOfSublayersWithTimeRemapping
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift
deleted file mode 100644
index fe9e9e02683032eb456b3dcb4221f73dd393aa4d..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/CALayer+fillBounds.swift
+++ /dev/null
@@ -1,35 +0,0 @@
-// Created by Cal Stephens on 12/15/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - CALayer + fillBoundsOfSuperlayer
-
-extension CALayer {
- /// Updates the `bounds` of this layer to fill the bounds of its `superlayer`
- /// without setting `frame` (which is not permitted if the layer can rotate)
- @nonobjc
- func fillBoundsOfSuperlayer() {
- guard let superlayer else { return }
-
- if let customLayerLayer = self as? CustomLayoutLayer {
- customLayerLayer.layout(superlayerBounds: superlayer.bounds)
- }
-
- else {
- // By default the `anchorPoint` of a layer is `CGPoint(x: 0.5, y: 0.5)`.
- // Setting it to `.zero` makes the layer have the same coordinate space
- // as its superlayer, which lets use use `superlayer.bounds` directly.
- anchorPoint = .zero
-
- bounds = superlayer.bounds
- }
- }
-}
-
-// MARK: - CustomLayoutLayer
-
-/// A `CALayer` that sets a custom `bounds` and `anchorPoint` relative to its superlayer
-protocol CustomLayoutLayer: CALayer {
- func layout(superlayerBounds: CGRect)
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift
deleted file mode 100644
index 627d7429367aac0c43bfde0816c00193b793d05d..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/KeyframeGroup+exactlyOneKeyframe.swift
+++ /dev/null
@@ -1,29 +0,0 @@
-// Created by Cal Stephens on 1/11/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-// MARK: - KeyframeGroup + exactlyOneKeyframe
-
-extension KeyframeGroup {
- /// Retrieves the first `Keyframe` from this group,
- /// and asserts that there are not any extra keyframes that would be ignored
- /// - This should only be used in cases where it's fundamentally not possible to
- /// support animating a given property (e.g. if Core Animation itself doesn't
- /// support the property).
- func exactlyOneKeyframe(
- context: CompatibilityTrackerProviding,
- description: String,
- fileID _: StaticString = #fileID,
- line _: UInt = #line)
- throws
- -> T
- {
- try context.compatibilityAssert(
- keyframes.count == 1,
- """
- The Core Animation rendering engine does not support animating multiple keyframes
- for \(description) values, due to limitations of Core Animation.
- """)
-
- return keyframes[0].value
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/Keyframes+combined.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/Keyframes+combined.swift
deleted file mode 100644
index ceaefd74663e890f77f394ffb5beea9d9466fbf1..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/Keyframes+combined.swift
+++ /dev/null
@@ -1,328 +0,0 @@
-// Created by Cal Stephens on 1/28/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-// MARK: - Keyframes
-
-enum Keyframes {
-
- // MARK: Internal
-
- /// Combines the given keyframe groups of `Keyframe`s into a single keyframe group of of `Keyframe<[T]>`s
- /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged
- /// - Otherwise, the keyframes are manually interpolated at each frame in the animation
- static func combined(
- _ allGroups: [KeyframeGroup],
- requiresManualInterpolation: Bool = false)
- -> KeyframeGroup<[T]>
- where T: AnyInterpolatable
- {
- Keyframes.combined(
- allGroups,
- requiresManualInterpolation: requiresManualInterpolation,
- makeCombinedResult: { untypedValues in
- untypedValues.compactMap { $0 as? T }
- })
- }
-
- /// Combines the given keyframe groups of `Keyframe`s into a single keyframe group of of `Keyframe<[T]>`s
- /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged
- /// - Otherwise, the keyframes are manually interpolated at each frame in the animation
- static func combined(
- _ k1: KeyframeGroup,
- _ k2: KeyframeGroup,
- requiresManualInterpolation: Bool = false,
- makeCombinedResult: (T1, T2) throws -> CombinedResult)
- rethrows
- -> KeyframeGroup
- where T1: AnyInterpolatable, T2: AnyInterpolatable
- {
- try Keyframes.combined(
- [k1, k2],
- requiresManualInterpolation: requiresManualInterpolation,
- makeCombinedResult: { untypedValues in
- guard
- let t1 = untypedValues[0] as? T1,
- let t2 = untypedValues[1] as? T2
- else { return nil }
-
- return try makeCombinedResult(t1, t2)
- })
- }
-
- /// Combines the given keyframe groups of `Keyframe`s into a single keyframe group of of `Keyframe<[T]>`s
- /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged
- /// - Otherwise, the keyframes are manually interpolated at each frame in the animation
- static func combined(
- _ k1: KeyframeGroup,
- _ k2: KeyframeGroup,
- _ k3: KeyframeGroup,
- requiresManualInterpolation: Bool = false,
- makeCombinedResult: (T1, T2, T3) -> CombinedResult)
- -> KeyframeGroup
- where T1: AnyInterpolatable, T2: AnyInterpolatable, T3: AnyInterpolatable
- {
- Keyframes.combined(
- [k1, k2, k3],
- requiresManualInterpolation: requiresManualInterpolation,
- makeCombinedResult: { untypedValues in
- guard
- let t1 = untypedValues[0] as? T1,
- let t2 = untypedValues[1] as? T2,
- let t3 = untypedValues[2] as? T3
- else { return nil }
-
- return makeCombinedResult(t1, t2, t3)
- })
- }
-
- /// Combines the given keyframe groups of `Keyframe`s into a single keyframe group of of `Keyframe<[T]>`s
- /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged
- /// - Otherwise, the keyframes are manually interpolated at each frame in the animation
- static func combined(
- _ k1: KeyframeGroup,
- _ k2: KeyframeGroup,
- _ k3: KeyframeGroup,
- _ k4: KeyframeGroup,
- _ k5: KeyframeGroup,
- _ k6: KeyframeGroup,
- _ k7: KeyframeGroup,
- requiresManualInterpolation: Bool = false,
- makeCombinedResult: (T1, T2, T3, T4, T5, T6, T7) -> CombinedResult)
- -> KeyframeGroup
- where T1: AnyInterpolatable, T2: AnyInterpolatable, T3: AnyInterpolatable, T4: AnyInterpolatable,
- T5: AnyInterpolatable, T6: AnyInterpolatable, T7: AnyInterpolatable
- {
- Keyframes.combined(
- [k1, k2, k3, k4, k5, k6, k7],
- requiresManualInterpolation: requiresManualInterpolation,
- makeCombinedResult: { untypedValues in
- guard
- let t1 = untypedValues[0] as? T1,
- let t2 = untypedValues[1] as? T2,
- let t3 = untypedValues[2] as? T3,
- let t4 = untypedValues[3] as? T4,
- let t5 = untypedValues[4] as? T5,
- let t6 = untypedValues[5] as? T6,
- let t7 = untypedValues[6] as? T7
- else { return nil }
-
- return makeCombinedResult(t1, t2, t3, t4, t5, t6, t7)
- })
- }
-
- /// Combines the given keyframe groups of `Keyframe`s into a single keyframe group of of `Keyframe<[T]>`s
- /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged
- /// - Otherwise, the keyframes are manually interpolated at each frame in the animation
- static func combined(
- _ k1: KeyframeGroup,
- _ k2: KeyframeGroup,
- _ k3: KeyframeGroup,
- _ k4: KeyframeGroup,
- _ k5: KeyframeGroup,
- _ k6: KeyframeGroup,
- _ k7: KeyframeGroup,
- _ k8: KeyframeGroup,
- requiresManualInterpolation: Bool = false,
- makeCombinedResult: (T1, T2, T3, T4, T5, T6, T7, T8) -> CombinedResult)
- -> KeyframeGroup
- where T1: AnyInterpolatable, T2: AnyInterpolatable, T3: AnyInterpolatable, T4: AnyInterpolatable,
- T5: AnyInterpolatable, T6: AnyInterpolatable, T7: AnyInterpolatable, T8: AnyInterpolatable
- {
- Keyframes.combined(
- [k1, k2, k3, k4, k5, k6, k7, k8],
- requiresManualInterpolation: requiresManualInterpolation,
- makeCombinedResult: { untypedValues in
- guard
- let t1 = untypedValues[0] as? T1,
- let t2 = untypedValues[1] as? T2,
- let t3 = untypedValues[2] as? T3,
- let t4 = untypedValues[3] as? T4,
- let t5 = untypedValues[4] as? T5,
- let t6 = untypedValues[5] as? T6,
- let t7 = untypedValues[6] as? T7,
- let t8 = untypedValues[7] as? T8
- else { return nil }
-
- return makeCombinedResult(t1, t2, t3, t4, t5, t6, t7, t8)
- })
- }
-
- /// Combines the given keyframe groups of `Keyframe`s into a single keyframe group of of `Keyframe<[T]>`s
- /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged
- /// - Otherwise, the keyframes are manually interpolated at each frame in the animation
- static func combined(
- _ k1: KeyframeGroup,
- _ k2: KeyframeGroup,
- _ k3: KeyframeGroup,
- _ k4: KeyframeGroup,
- _ k5: KeyframeGroup,
- _ k6: KeyframeGroup,
- _ k7: KeyframeGroup,
- _ k8: KeyframeGroup,
- _ k9: KeyframeGroup,
- _ k10: KeyframeGroup,
- requiresManualInterpolation: Bool = false,
- makeCombinedResult: (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10) -> CombinedResult)
- -> KeyframeGroup
- where T1: AnyInterpolatable, T2: AnyInterpolatable, T3: AnyInterpolatable, T4: AnyInterpolatable,
- T5: AnyInterpolatable, T6: AnyInterpolatable, T7: AnyInterpolatable, T8: AnyInterpolatable,
- T9: AnyInterpolatable, T10: AnyInterpolatable
- {
- Keyframes.combined(
- [k1, k2, k3, k4, k5, k6, k7, k8, k9, k10],
- requiresManualInterpolation: requiresManualInterpolation,
- makeCombinedResult: { untypedValues in
- guard
- let t1 = untypedValues[0] as? T1,
- let t2 = untypedValues[1] as? T2,
- let t3 = untypedValues[2] as? T3,
- let t4 = untypedValues[3] as? T4,
- let t5 = untypedValues[4] as? T5,
- let t6 = untypedValues[5] as? T6,
- let t7 = untypedValues[6] as? T7,
- let t8 = untypedValues[7] as? T8,
- let t9 = untypedValues[8] as? T9,
- let t10 = untypedValues[9] as? T10
- else { return nil }
-
- return makeCombinedResult(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10)
- })
- }
-
- // MARK: Private
-
- /// Combines the given `[KeyframeGroup]` of `Keyframe`s into a single `KeyframeGroup` of `Keyframe`s
- /// - If all of the `KeyframeGroup`s have the exact same animation timing, the keyframes are merged
- /// - Otherwise, the keyframes are manually interpolated at each frame in the animation
- ///
- /// `makeCombinedResult` is a closure that takes an array of keyframe values (with the exact same length as `AnyKeyframeGroup`),
- /// casts them to the expected type, and combined them into the final resulting keyframe.
- ///
- /// `requiresManualInterpolation` determines whether the keyframes must be computed using `Keyframes.manuallyInterpolated`,
- /// which interpolates the value at each frame, or if the keyframes can simply be combined.
- private static func combined(
- _ allGroups: [AnyKeyframeGroup],
- requiresManualInterpolation: Bool,
- makeCombinedResult: ([Any]) throws -> CombinedResult?)
- rethrows
- -> KeyframeGroup
- {
- let untypedGroups = allGroups.map { $0.untyped }
-
- // Animations with no timing information (e.g. with just a single keyframe)
- // can be trivially combined with any other set of keyframes, so we don't need
- // to check those.
- let animatingKeyframes = untypedGroups.filter { $0.keyframes.count > 1 }
-
- guard
- !requiresManualInterpolation,
- !allGroups.isEmpty,
- animatingKeyframes.allSatisfy({ $0.hasSameTimingParameters(as: animatingKeyframes[0]) })
- else {
- // If the keyframes don't all share the same timing information,
- // we have to interpolate the value at each individual frame
- return try Keyframes.manuallyInterpolated(allGroups, makeCombinedResult: makeCombinedResult)
- }
-
- var combinedKeyframes = ContiguousArray>()
- let baseKeyframes = (animatingKeyframes.first ?? untypedGroups[0]).keyframes
-
- for index in baseKeyframes.indices {
- let baseKeyframe = baseKeyframes[index]
- let untypedValues = untypedGroups.map { $0.valueForCombinedKeyframes(at: index) }
-
- if let combinedValue = try makeCombinedResult(untypedValues) {
- combinedKeyframes.append(baseKeyframe.withValue(combinedValue))
- } else {
- LottieLogger.shared.assertionFailure("""
- Failed to cast untyped keyframe values to expected type. This is an internal error.
- """)
- }
- }
-
- return KeyframeGroup(keyframes: combinedKeyframes)
- }
-
- private static func manuallyInterpolated(
- _ allGroups: [AnyKeyframeGroup],
- makeCombinedResult: ([Any]) throws -> CombinedResult?)
- rethrows
- -> KeyframeGroup
- {
- let untypedGroups = allGroups.map { $0.untyped }
- let untypedInterpolators = allGroups.map { $0.interpolator }
-
- let times = untypedGroups.flatMap { $0.keyframes.map { $0.time } }
-
- let minimumTime = times.min() ?? 0
- let maximumTime = times.max() ?? 0
-
- // We disable Core Animation interpolation when using manually interpolated keyframes,
- // so we don't animate between these values. To prevent the animation from being choppy
- // even at low playback speed, we have to interpolate at a very high fidelity.
- let animationLocalTimeRange = stride(from: minimumTime, to: maximumTime, by: 0.1)
-
- let interpolatedKeyframes = try animationLocalTimeRange.compactMap { localTime -> Keyframe? in
- let interpolatedValues = untypedInterpolators.map { interpolator in
- interpolator.value(frame: AnimationFrameTime(localTime))
- }
-
- guard let combinedResult = try makeCombinedResult(interpolatedValues) else {
- LottieLogger.shared.assertionFailure("""
- Failed to cast untyped keyframe values to expected type. This is an internal error.
- """)
- return nil
- }
-
- return Keyframe(
- value: combinedResult,
- time: AnimationFrameTime(localTime),
- // Since we already manually interpolated the keyframes, have Core Animation display
- // each value as a static keyframe rather than trying to interpolate between them.
- isHold: true)
- }
-
- return KeyframeGroup(keyframes: ContiguousArray(interpolatedKeyframes))
- }
-
-}
-
-extension KeyframeGroup {
- /// Whether or not all of the keyframes in this `KeyframeGroup` have the same
- /// timing parameters as the corresponding keyframe in the other given `KeyframeGroup`
- func hasSameTimingParameters(as other: KeyframeGroup) -> Bool {
- guard keyframes.count == other.keyframes.count else {
- return false
- }
-
- return zip(keyframes, other.keyframes).allSatisfy {
- $0.hasSameTimingParameters(as: $1)
- }
- }
-}
-
-extension Keyframe {
- /// Whether or not this keyframe has the same timing parameters as the given keyframe,
- /// excluding `spatialInTangent` and `spatialOutTangent`.
- fileprivate func hasSameTimingParameters(as other: Keyframe) -> Bool {
- time == other.time
- && isHold == other.isHold
- && inTangent == other.inTangent
- && outTangent == other.outTangent
- // We intentionally don't compare spatial in/out tangents,
- // since those values are only used in very specific cases
- // (animating the x/y position of a layer), which aren't ever
- // combined in this way.
- }
-}
-
-extension KeyframeGroup {
- /// The value to use for a combined set of keyframes, for the given index
- fileprivate func valueForCombinedKeyframes(at index: Int) -> T {
- if keyframes.count == 1 {
- return keyframes[0].value
- } else {
- return keyframes[index].value
- }
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/Keyframes+timeRemapping.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/Keyframes+timeRemapping.swift
deleted file mode 100644
index 217e38ddae20b698f5cac997b75b0ac611518666..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Extensions/Keyframes+timeRemapping.swift
+++ /dev/null
@@ -1,46 +0,0 @@
-// Created by Cal Stephens on 1/8/24.
-// Copyright © 2024 Airbnb Inc. All rights reserved.
-
-extension Keyframes {
- /// Manually interpolates the given keyframes, and applies `context.complexTimeRemapping`.
- /// - Since `complexTimeRemapping` is a mapping from "global time" to "local time",
- /// we have to manually interpolate the keyframes at every frame in the animation.
- static func manuallyInterpolatedWithTimeRemapping(
- _ keyframes: KeyframeGroup,
- context: LayerAnimationContext)
- -> KeyframeGroup
- {
- let minimumTime = context.animation.startFrame
- let maximumTime = context.animation.endFrame
- let animationLocalTimeRange = stride(from: minimumTime, to: maximumTime, by: 1.0)
-
- let interpolator = keyframes.interpolator
-
- // Since potentially many global times can refer to the same local time,
- // we can cache and reused these local-time values.
- var localTimeCache = [AnimationFrameTime: T]()
-
- let interpolatedRemappedKeyframes = animationLocalTimeRange.compactMap { globalTime -> Keyframe? in
- let remappedLocalTime = context.complexTimeRemapping(globalTime)
-
- let valueAtRemappedTime: T
- if let cachedValue = localTimeCache[remappedLocalTime] {
- valueAtRemappedTime = cachedValue
- } else if let interpolatedValue = interpolator.value(frame: remappedLocalTime) as? T {
- valueAtRemappedTime = interpolatedValue
- localTimeCache[remappedLocalTime] = interpolatedValue
- } else {
- LottieLogger.shared.assertionFailure("""
- Failed to cast untyped keyframe values to expected type. This is an internal error.
- """)
- return nil
- }
-
- return Keyframe(
- value: valueAtRemappedTime,
- time: AnimationFrameTime(globalTime))
- }
-
- return KeyframeGroup(keyframes: ContiguousArray(interpolatedRemappedKeyframes))
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/AnimationLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/AnimationLayer.swift
deleted file mode 100644
index e15ae531a214394574e79ebb18c15d00038a75a0..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/AnimationLayer.swift
+++ /dev/null
@@ -1,169 +0,0 @@
-// Created by Cal Stephens on 12/14/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - AnimationLayer
-
-/// A type of `CALayer` that can be used in a Lottie animation
-/// - Layers backed by a `LayerModel` subclass should subclass `BaseCompositionLayer`
-protocol AnimationLayer: CALayer {
- /// Instructs this layer to setup its `CAAnimation`s
- /// using the given `LayerAnimationContext`
- func setupAnimations(context: LayerAnimationContext) throws
-}
-
-// MARK: - LayerAnimationContext
-
-// Context describing the timing parameters of the current animation
-struct LayerAnimationContext {
- /// The animation being played
- let animation: LottieAnimation
-
- /// The timing configuration that should be applied to `CAAnimation`s
- let timingConfiguration: CoreAnimationLayer.CAMediaTimingConfiguration
-
- /// The absolute frame number that this animation begins at
- let startFrame: AnimationFrameTime
-
- /// The absolute frame number that this animation ends at
- let endFrame: AnimationFrameTime
-
- /// The set of custom Value Providers applied to this animation
- let valueProviderStore: ValueProviderStore
-
- /// Information about whether or not an animation is compatible with the Core Animation engine
- let compatibilityTracker: CompatibilityTracker
-
- /// The logger that should be used for assertions and warnings
- let logger: LottieLogger
-
- /// Mutable state related to log events, stored on the `CoreAnimationLayer`.
- let loggingState: LoggingState
-
- /// The AnimationKeypath represented by the current layer
- var currentKeypath: AnimationKeypath
-
- /// The `AnimationKeypathTextProvider`
- var textProvider: AnimationKeypathTextProvider
-
- /// Records the given animation keypath so it can be logged or collected into a list
- /// - Used for `CoreAnimationLayer.logHierarchyKeypaths()` and `allHierarchyKeypaths()`
- var recordHierarchyKeypath: ((String) -> Void)?
-
- /// A closure that remaps the given frame in the child layer's local time to a frame
- /// in the animation's overall global time.
- /// - This time remapping is simple and only used `preCompLayer.timeStretch` and `preCompLayer.startTime`,
- /// so is a trivial function and is invertible. This allows us to invert the time remapping from
- /// "global time to local time" to instead be "local time to global time".
- private(set) var simpleTimeRemapping: ((_ localTime: AnimationFrameTime) -> AnimationFrameTime) = { $0 }
-
- /// A complex time remapping closure that remaps the given frame in the animation's overall global time
- /// into the child layer's local time.
- /// - This time remapping is arbitrarily complex because it includes the full `preCompLayer.timeRemapping`.
- /// - Since it isn't possible to invert the time remapping function, this can only be applied by converting
- /// from global time to local time. This requires using `Keyframes.manuallyInterpolatedWithTimeRemapping`.
- private(set) var complexTimeRemapping: ((_ globalTime: AnimationFrameTime) -> AnimationFrameTime) = { $0 }
-
- /// Whether or not this layer is required to use the `complexTimeRemapping` via
- /// the more expensive `Keyframes.manuallyInterpolatedWithTimeRemapping` codepath.
- var mustUseComplexTimeRemapping = false
-
- /// The duration of the animation
- var animationDuration: AnimationFrameTime {
- // Normal animation playback (like when looping) skips the last frame.
- // However when the animation is paused, we need to be able to render the final frame.
- // To allow this we have to extend the length of the animation by one frame.
- let animationEndFrame: AnimationFrameTime
- if timingConfiguration.speed == 0 {
- animationEndFrame = animation.endFrame + 1
- } else {
- animationEndFrame = animation.endFrame
- }
-
- return Double(animationEndFrame - animation.startFrame) / animation.framerate
- }
-
- /// Adds the given component string to the `AnimationKeypath` stored
- /// that describes the current path being configured by this context value
- func addingKeypathComponent(_ component: String) -> LayerAnimationContext {
- var context = self
- context.currentKeypath.keys.append(component)
- return context
- }
-
- /// The `AnimationProgressTime` for the given `AnimationFrameTime` within this layer,
- /// accounting for the `simpleTimeRemapping` applied to this layer.
- func progressTime(for frame: AnimationFrameTime) throws -> AnimationProgressTime {
- try compatibilityAssert(
- !mustUseComplexTimeRemapping,
- "LayerAnimationContext.time(forFrame:) does not support complex time remapping")
-
- let animationFrameCount = animationDuration * animation.framerate
- return (simpleTimeRemapping(frame) - animation.startFrame) / animationFrameCount
- }
-
- /// The real-time `TimeInterval` for the given `AnimationFrameTime` within this layer,
- /// accounting for the `simpleTimeRemapping` applied to this layer.
- func time(forFrame frame: AnimationFrameTime) throws -> TimeInterval {
- try compatibilityAssert(
- !mustUseComplexTimeRemapping,
- "LayerAnimationContext.time(forFrame:) does not support complex time remapping")
-
- return animation.time(forFrame: simpleTimeRemapping(frame))
- }
-
- /// Chains an additional time remapping closure onto the `simpleTimeRemapping` closure
- func withSimpleTimeRemapping(
- _ additionalSimpleTimeRemapping: @escaping (_ localTime: AnimationFrameTime) -> AnimationFrameTime)
- -> LayerAnimationContext
- {
- var copy = self
- copy.simpleTimeRemapping = { [existingSimpleTimeRemapping = simpleTimeRemapping] time in
- existingSimpleTimeRemapping(additionalSimpleTimeRemapping(time))
- }
- return copy
- }
-
- /// Chains an additional time remapping closure onto the `complexTimeRemapping` closure.
- /// - If `required` is `true`, all subsequent child layers will be required to use the expensive
- /// `complexTimeRemapping` / `Keyframes.manuallyInterpolatedWithTimeRemapping` codepath.
- /// - `required: true` is necessary when this time remapping is not available via `simpleTimeRemapping`.
- func withComplexTimeRemapping(
- required: Bool,
- _ additionalComplexTimeRemapping: @escaping (_ globalTime: AnimationFrameTime) -> AnimationFrameTime)
- -> LayerAnimationContext
- {
- var copy = self
- copy.mustUseComplexTimeRemapping = copy.mustUseComplexTimeRemapping || required
- copy.complexTimeRemapping = { [existingComplexTimeRemapping = complexTimeRemapping] time in
- additionalComplexTimeRemapping(existingComplexTimeRemapping(time))
- }
- return copy
- }
-
- /// Returns a copy of this context with time remapping removed
- func withoutTimeRemapping() -> LayerAnimationContext {
- var copy = self
- copy.simpleTimeRemapping = { $0 }
- copy.complexTimeRemapping = { $0 }
- copy.mustUseComplexTimeRemapping = false
- return copy
- }
-}
-
-// MARK: - LoggingState
-
-/// Mutable state related to log events, stored on the `CoreAnimationLayer`.
-final class LoggingState {
-
- // MARK: Lifecycle
-
- init() { }
-
- // MARK: Internal
-
- /// Whether or not the warning about unsupported After Effects expressions
- /// has been logged yet for this layer.
- var hasLoggedAfterEffectsExpressionsWarning = false
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/BaseAnimationLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/BaseAnimationLayer.swift
deleted file mode 100644
index 06248b20f87dd81d04a733e0773c6f166f847322..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/BaseAnimationLayer.swift
+++ /dev/null
@@ -1,33 +0,0 @@
-// Created by Cal Stephens on 1/27/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-/// A base `CALayer` that manages the frame and animations
-/// of its `sublayers` and `mask`
-class BaseAnimationLayer: CALayer, AnimationLayer {
-
- // MARK: Internal
-
- override func layoutSublayers() {
- super.layoutSublayers()
-
- for sublayer in managedSublayers {
- sublayer.fillBoundsOfSuperlayer()
- }
- }
-
- func setupAnimations(context: LayerAnimationContext) throws {
- for childAnimationLayer in managedSublayers {
- try (childAnimationLayer as? AnimationLayer)?.setupAnimations(context: context)
- }
- }
-
- // MARK: Private
-
- /// All of the sublayers managed by this container
- private var managedSublayers: [CALayer] {
- (sublayers ?? []) + [mask].compactMap { $0 }
- }
-
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/BaseCompositionLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/BaseCompositionLayer.swift
deleted file mode 100644
index 976580338e0eee51eb02ee3b274a318dbb2ca3a3..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/BaseCompositionLayer.swift
+++ /dev/null
@@ -1,110 +0,0 @@
-// Created by Cal Stephens on 12/20/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - BaseCompositionLayer
-
-/// The base type of `AnimationLayer` that can contain other `AnimationLayer`s
-class BaseCompositionLayer: BaseAnimationLayer {
-
- // MARK: Lifecycle
-
- init(layerModel: LayerModel) {
- baseLayerModel = layerModel
- super.init()
-
- setupSublayers()
- compositingFilter = layerModel.blendMode.filterName
- name = layerModel.name
- contentsLayer.name = "\(layerModel.name) (Content)"
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- baseLayerModel = typedLayer.baseLayerModel
- super.init(layer: typedLayer)
- }
-
- // MARK: Internal
-
- /// The layer that content / sublayers should be rendered in.
- /// This is the layer that transform animations are applied to.
- let contentsLayer = BaseAnimationLayer()
-
- /// Whether or not this layer render should render any visible content
- var renderLayerContents: Bool { true }
-
- /// Sets up the base `LayerModel` animations for this layer,
- /// and all child `AnimationLayer`s.
- /// - Can be overridden by subclasses, which much call `super`.
- override func setupAnimations(context: LayerAnimationContext) throws {
- let layerContext = context.addingKeypathComponent(baseLayerModel.name)
- let childContext = renderLayerContents ? layerContext : context
-
- try setupLayerAnimations(context: layerContext)
- try setupChildAnimations(context: childContext)
- }
-
- func setupLayerAnimations(context: LayerAnimationContext) throws {
- let transformContext = context.addingKeypathComponent("Transform")
-
- try contentsLayer.addTransformAnimations(for: baseLayerModel.transform, context: transformContext)
-
- if renderLayerContents {
- try contentsLayer.addOpacityAnimation(for: baseLayerModel.transform, context: transformContext)
-
- try contentsLayer.addVisibilityAnimation(
- inFrame: CGFloat(baseLayerModel.inFrame),
- outFrame: CGFloat(baseLayerModel.outFrame),
- context: context)
-
- // There are two different drop shadow schemas, either using `DropShadowEffect` or `DropShadowStyle`.
- // If both happen to be present, prefer the `DropShadowEffect` (which is the drop shadow schema
- // supported on other platforms).
- let dropShadowEffect = baseLayerModel.effects.first(where: { $0 is DropShadowEffect }) as? DropShadowModel
- let dropShadowStyle = baseLayerModel.styles.first(where: { $0 is DropShadowStyle }) as? DropShadowModel
- if let dropShadowModel = dropShadowEffect ?? dropShadowStyle {
- try contentsLayer.addDropShadowAnimations(for: dropShadowModel, context: context)
- }
- }
- }
-
- func setupChildAnimations(context: LayerAnimationContext) throws {
- try super.setupAnimations(context: context)
- }
-
- override func addSublayer(_ layer: CALayer) {
- if layer === contentsLayer {
- super.addSublayer(contentsLayer)
- } else {
- contentsLayer.addSublayer(layer)
- }
- }
-
- // MARK: Private
-
- private let baseLayerModel: LayerModel
-
- private func setupSublayers() {
- addSublayer(contentsLayer)
-
- if
- renderLayerContents,
- let masks = baseLayerModel.masks?.filter({ $0.mode != .none }),
- !masks.isEmpty
- {
- contentsLayer.mask = MaskCompositionLayer(masks: masks)
- }
- }
-
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift
deleted file mode 100644
index dfbf28cff55fb08537e7325dcdac92b363d49e68..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/CALayer+setupLayerHierarchy.swift
+++ /dev/null
@@ -1,169 +0,0 @@
-// Created by Cal Stephens on 1/11/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-extension CALayer {
-
- // MARK: Internal
-
- /// Sets up an `AnimationLayer` / `CALayer` hierarchy in this layer,
- /// using the given list of layers.
- @nonobjc
- func setupLayerHierarchy(
- for layers: [LayerModel],
- context: LayerContext)
- throws
- {
- // A `LottieAnimation`'s `LayerModel`s are listed from front to back,
- // but `CALayer.sublayers` are listed from back to front.
- // We reverse the layer ordering to match what Core Animation expects.
- // The final view hierarchy must display the layers in this exact order.
- let layersInZAxisOrder = layers.reversed()
-
- let layersByIndex = Dictionary(grouping: layersInZAxisOrder, by: \.index)
- .compactMapValues(\.first)
-
- /// Layers specify a `parent` layer. Child layers inherit the `transform` of their parent.
- /// - We can't add the child as a sublayer of the parent `CALayer`, since that would
- /// break the ordering specified in `layersInZAxisOrder`.
- /// - Instead, we create an invisible `TransformLayer` to handle the parent
- /// transform animations, and add the child layer to that `TransformLayer`.
- func makeParentTransformLayer(
- childLayerModel: LayerModel,
- childLayer: CALayer,
- name: (LayerModel) -> String)
- -> CALayer
- {
- guard
- let parentIndex = childLayerModel.parent,
- let parentLayerModel = layersByIndex[parentIndex]
- else { return childLayer }
-
- let parentLayer = TransformLayer(layerModel: parentLayerModel)
- parentLayer.name = name(parentLayerModel)
- parentLayer.addSublayer(childLayer)
-
- return makeParentTransformLayer(
- childLayerModel: parentLayerModel,
- childLayer: parentLayer,
- name: name)
- }
-
- // Create an `AnimationLayer` for each `LayerModel`
- for (layerModel, mask) in try layersInZAxisOrder.pairedLayersAndMasks() {
- guard let layer = try layerModel.makeAnimationLayer(context: context) else {
- continue
- }
-
- // If this layer has a `parent`, we create an invisible `TransformLayer`
- // to handle displaying / animating the parent transform.
- let parentTransformLayer = makeParentTransformLayer(
- childLayerModel: layerModel,
- childLayer: layer,
- name: { parentLayerModel in
- "\(layerModel.name) (parent, \(parentLayerModel.name))"
- })
-
- // Create the `mask` layer for this layer, if it has a `MatteType`
- if
- let mask,
- let maskLayer = try maskLayer(for: mask.model, type: mask.matteType, context: context)
- {
- let maskParentTransformLayer = makeParentTransformLayer(
- childLayerModel: mask.model,
- childLayer: maskLayer,
- name: { parentLayerModel in
- "\(mask.model.name) (mask of \(layerModel.name)) (parent, \(parentLayerModel.name))"
- })
-
- // Set up a parent container to host both the layer
- // and its mask in the same coordinate space
- let maskContainer = BaseAnimationLayer()
- maskContainer.name = "\(layerModel.name) (parent, masked)"
- maskContainer.addSublayer(parentTransformLayer)
-
- // Core Animation will silently fail to apply a mask if a `mask` layer
- // itself _also_ has a `mask`. As a workaround, we can wrap this layer's
- // mask in an additional container layer which never has its own `mask`.
- let additionalMaskParent = BaseAnimationLayer()
- additionalMaskParent.addSublayer(maskParentTransformLayer)
- maskContainer.mask = additionalMaskParent
-
- addSublayer(maskContainer)
- }
-
- else {
- addSublayer(parentTransformLayer)
- }
- }
- }
-
- // MARK: Fileprivate
-
- /// Creates a mask `CALayer` from the given matte layer model, using the `MatteType`
- /// from the layer that is being masked.
- fileprivate func maskLayer(
- for matteLayerModel: LayerModel,
- type: MatteType,
- context: LayerContext)
- throws -> CALayer?
- {
- switch type {
- case .add:
- return try matteLayerModel.makeAnimationLayer(context: context)
-
- case .invert:
- guard let maskLayer = try matteLayerModel.makeAnimationLayer(context: context) else {
- return nil
- }
-
- // We can invert the mask layer by having a large solid black layer with the
- // given mask layer subtracted out using the `xor` blend mode. When applied to the
- // layer being masked, this creates an inverted mask where only areas _outside_
- // of the mask layer are visible.
- // https://developer.apple.com/documentation/coregraphics/cgblendmode/xor
- // - The inverted mask is supposed to expand infinitely around the shape,
- // so we use `InfiniteOpaqueAnimationLayer`
- let base = InfiniteOpaqueAnimationLayer()
- base.backgroundColor = .rgb(0, 0, 0)
- base.addSublayer(maskLayer)
- maskLayer.compositingFilter = "xor"
- return base
-
- case .none, .unknown:
- return nil
- }
- }
-
-}
-
-extension Collection {
- /// Pairs each `LayerModel` within this array with
- /// a `LayerModel` to use as its mask, if applicable
- /// based on the layer's `MatteType` configuration.
- /// - Assumes the layers are sorted in z-axis order.
- fileprivate func pairedLayersAndMasks() throws
- -> [(layer: LayerModel, mask: (model: LayerModel, matteType: MatteType)?)]
- {
- var layersAndMasks = [(layer: LayerModel, mask: (model: LayerModel, matteType: MatteType)?)]()
- var unprocessedLayers = reversed()
-
- while let layer = unprocessedLayers.popLast() {
- /// If a layer has a `MatteType`, then the next layer will be used as its `mask`
- if
- let matteType = layer.matte,
- matteType != .none,
- let maskLayer = unprocessedLayers.popLast()
- {
- layersAndMasks.append((layer: layer, mask: (model: maskLayer, matteType: matteType)))
- }
-
- else {
- layersAndMasks.append((layer: layer, mask: nil))
- }
- }
-
- return layersAndMasks
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/GradientRenderLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/GradientRenderLayer.swift
deleted file mode 100644
index cb2fe4888e7a0891a26e306e71db6cdb02870d5c..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/GradientRenderLayer.swift
+++ /dev/null
@@ -1,97 +0,0 @@
-// Created by Cal Stephens on 1/10/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - GradientRenderLayer
-
-/// A `CAGradientLayer` subclass used to render a gradient _outside_ the normal layer bounds
-///
-/// - `GradientFill.startPoint` and `GradientFill.endPoint` are expressed
-/// with respect to the `bounds` of the `ShapeItemLayer`.
-///
-/// - The gradient itself is supposed to be rendered infinitely in all directions
-/// (e.g. including outside of `bounds`). This is because `ShapeItemLayer` paths
-/// don't necessarily sit within the layer's `bounds`.
-///
-/// - To support this, `GradientRenderLayer` tracks a `gradientReferenceBounds`
-/// that `startPoint` / `endPoint` are calculated relative to.
-/// The _actual_ `bounds` of this layer is padded by a large amount so that
-/// the gradient can be drawn outside of the `gradientReferenceBounds`.
-///
-final class GradientRenderLayer: CAGradientLayer {
-
- // MARK: Internal
-
- /// The reference bounds within this layer that the gradient's
- /// `startPoint` and `endPoint` should be calculated relative to
- var gradientReferenceBounds: CGRect = .zero {
- didSet {
- if oldValue != gradientReferenceBounds {
- updateLayout()
- }
- }
- }
-
- /// Converts the given `CGPoint` within `gradientReferenceBounds`
- /// to a percentage value relative to the full `bounds` of this layer
- /// - This converts absolute `startPoint` and `endPoint` values into
- /// the percent-based values expected by Core Animation,
- /// with respect to the custom bounds geometry used by this layer type.
- func percentBasedPointInBounds(from referencePoint: CGPoint) -> CGPoint {
- guard bounds.width > 0, bounds.height > 0 else {
- LottieLogger.shared.assertionFailure("Size must be non-zero before an animation can be played")
- return .zero
- }
-
- let pointInBounds = CGPoint(
- x: referencePoint.x + CALayer.veryLargeLayerPadding,
- y: referencePoint.y + CALayer.veryLargeLayerPadding)
-
- return CGPoint(
- x: CGFloat(pointInBounds.x) / bounds.width,
- y: CGFloat(pointInBounds.y) / bounds.height)
- }
-
- // MARK: Private
-
- private func updateLayout() {
- anchorPoint = .zero
-
- bounds = CGRect(
- x: gradientReferenceBounds.origin.x,
- y: gradientReferenceBounds.origin.y,
- width: CALayer.veryLargeLayerPadding + gradientReferenceBounds.width + CALayer.veryLargeLayerPadding,
- height: CALayer.veryLargeLayerPadding + gradientReferenceBounds.height + CALayer.veryLargeLayerPadding)
-
- // Align the center of this layer to be at the center point of its parent layer
- let superlayerSize = superlayer?.frame.size ?? gradientReferenceBounds.size
-
- transform = CATransform3DMakeTranslation(
- (superlayerSize.width - bounds.width) / 2,
- (superlayerSize.height - bounds.height) / 2,
- 0)
- }
-
-}
-
-// MARK: CustomLayoutLayer
-
-extension GradientRenderLayer: CustomLayoutLayer {
- func layout(superlayerBounds: CGRect) {
- gradientReferenceBounds = superlayerBounds
-
- if let gradientMask = mask as? GradientRenderLayer {
- gradientMask.layout(superlayerBounds: superlayerBounds)
- }
- }
-}
-
-extension CALayer {
- /// Extra padding to add around layers that should be very large or "infinite" in size.
- /// Examples include `GradientRenderLayer` and `InfiniteOpaqueAnimationLayer`.
- /// - This specific value is arbitrary and can be increased if necessary.
- /// - Theoretically this should be "infinite", to match the behavior of
- /// `CGContext.drawLinearGradient` with `[.drawsAfterEndLocation, .drawsBeforeStartLocation]` etc.
- static let veryLargeLayerPadding: CGFloat = 10_000
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/ImageLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/ImageLayer.swift
deleted file mode 100644
index 433c06f3b75b44c6ccf96136cf124c669333cf6f..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/ImageLayer.swift
+++ /dev/null
@@ -1,80 +0,0 @@
-// Created by Cal Stephens on 1/10/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - ImageLayer
-
-/// The `CALayer` type responsible for rendering `ImageLayerModel`s
-final class ImageLayer: BaseCompositionLayer {
-
- // MARK: Lifecycle
-
- init(
- imageLayer: ImageLayerModel,
- context: LayerContext)
- {
- self.imageLayer = imageLayer
- super.init(layerModel: imageLayer)
- setupImage(context: context)
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- imageLayer = typedLayer.imageLayer
- super.init(layer: typedLayer)
- }
-
- // MARK: Internal
-
- func setupImage(context: LayerContext) {
- guard
- let imageAsset = context.animation.assetLibrary?.imageAssets[imageLayer.referenceID],
- let image = context.imageProvider.imageForAsset(asset: imageAsset)
- else {
- self.imageAsset = nil
- contentsLayer.contents = nil
- return
- }
-
- self.imageAsset = imageAsset
- contentsLayer.contents = image
- contentsLayer.contentsGravity = context.imageProvider.contentsGravity(for: imageAsset)
- setNeedsLayout()
- }
-
- // MARK: Private
-
- private let imageLayer: ImageLayerModel
- private var imageAsset: ImageAsset?
-
-}
-
-// MARK: CustomLayoutLayer
-
-extension ImageLayer: CustomLayoutLayer {
- func layout(superlayerBounds: CGRect) {
- anchorPoint = .zero
-
- guard let imageAsset else {
- bounds = superlayerBounds
- return
- }
-
- // Image layers specifically need to use the size of the image itself
- bounds = CGRect(
- x: superlayerBounds.origin.x,
- y: superlayerBounds.origin.y,
- width: CGFloat(imageAsset.width),
- height: CGFloat(imageAsset.height))
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift
deleted file mode 100644
index 4549fea691b0a57971498713631ceba7441dee39..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/InfiniteOpaqueAnimationLayer.swift
+++ /dev/null
@@ -1,56 +0,0 @@
-// Created by Cal Stephens on 10/10/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - ExpandedAnimationLayer
-
-/// A `BaseAnimationLayer` subclass that renders its background color
-/// as if the layer is infinitely large, without affecting its bounds
-/// or the bounds of its sublayers
-final class InfiniteOpaqueAnimationLayer: BaseAnimationLayer {
-
- // MARK: Lifecycle
-
- override init() {
- super.init()
- addSublayer(additionalPaddingLayer)
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- super.init(layer: layer)
- }
-
- // MARK: Internal
-
- override func layoutSublayers() {
- super.layoutSublayers()
-
- masksToBounds = false
- additionalPaddingLayer.backgroundColor = backgroundColor
-
- // Scale `additionalPaddingLayer` to be larger than this layer
- // by `additionalPadding` at each size, and centered at the center
- // of this layer. Since `additionalPadding` is very large, this has
- // the affect of making `additionalPaddingLayer` appear infinite.
- let scaleRatioX = (bounds.width + (CALayer.veryLargeLayerPadding * 2)) / bounds.width
- let scaleRatioY = (bounds.height + (CALayer.veryLargeLayerPadding * 2)) / bounds.height
-
- additionalPaddingLayer.transform = CATransform3DScale(
- CATransform3DMakeTranslation(-CALayer.veryLargeLayerPadding, -CALayer.veryLargeLayerPadding, 0),
- scaleRatioX,
- scaleRatioY,
- 1)
- }
-
- // MARK: Private
-
- private let additionalPaddingLayer = CALayer()
-
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift
deleted file mode 100644
index 0ca9339049b61975d17449fad34b09f6fa12cb49..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/LayerModel+makeAnimationLayer.swift
+++ /dev/null
@@ -1,59 +0,0 @@
-// Created by Cal Stephens on 12/20/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-// MARK: - LayerContext
-
-/// Context available when constructing an `AnimationLayer`
-struct LayerContext {
- let animation: LottieAnimation
- let imageProvider: AnimationImageProvider
- let textProvider: AnimationKeypathTextProvider
- let fontProvider: AnimationFontProvider
- let compatibilityTracker: CompatibilityTracker
- var layerName: String
-
- func forLayer(_ layer: LayerModel) -> LayerContext {
- var context = self
- context.layerName = layer.name
- return context
- }
-}
-
-// MARK: - LayerModel + makeAnimationLayer
-
-extension LayerModel {
- /// Constructs an `AnimationLayer` / `CALayer` that represents this `LayerModel`
- func makeAnimationLayer(context: LayerContext) throws -> BaseCompositionLayer? {
- let context = context.forLayer(self)
-
- if hidden {
- return TransformLayer(layerModel: self)
- }
-
- switch (type, self) {
- case (.precomp, let preCompLayerModel as PreCompLayerModel):
- let preCompLayer = PreCompLayer(preCompLayer: preCompLayerModel)
- try preCompLayer.setup(context: context)
- return preCompLayer
-
- case (.solid, let solidLayerModel as SolidLayerModel):
- return SolidLayer(solidLayerModel)
-
- case (.shape, let shapeLayerModel as ShapeLayerModel):
- return try ShapeLayer(shapeLayer: shapeLayerModel, context: context)
-
- case (.image, let imageLayerModel as ImageLayerModel):
- return ImageLayer(imageLayer: imageLayerModel, context: context)
-
- case (.text, let textLayerModel as TextLayerModel):
- return try TextLayer(textLayerModel: textLayerModel, context: context)
-
- case (.null, _):
- return TransformLayer(layerModel: self)
-
- case (.unknown, _), (.precomp, _), (.solid, _), (.image, _), (.shape, _), (.text, _):
- return nil
- }
- }
-
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/MaskCompositionLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/MaskCompositionLayer.swift
deleted file mode 100644
index d032ab5dabb60c1f1a0270ec617eb764d9f4fa68..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/MaskCompositionLayer.swift
+++ /dev/null
@@ -1,138 +0,0 @@
-// Created by Cal Stephens on 1/6/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - MaskCompositionLayer
-
-/// The CALayer type responsible for rendering the `Mask` of a `BaseCompositionLayer`
-final class MaskCompositionLayer: CALayer {
-
- // MARK: Lifecycle
-
- init(masks: [Mask]) {
- maskLayers = masks.map(MaskLayer.init(mask:))
- super.init()
-
- var containerLayer = BaseAnimationLayer()
- var firstObject = true
- for maskLayer in maskLayers {
- if maskLayer.maskModel.mode.usableMode == .none {
- continue
- } else if maskLayer.maskModel.mode.usableMode == .add || firstObject {
- firstObject = false
- containerLayer.addSublayer(maskLayer)
- } else {
- containerLayer.mask = maskLayer
- let newContainer = BaseAnimationLayer()
- newContainer.addSublayer(containerLayer)
- containerLayer = newContainer
- }
- }
-
- addSublayer(containerLayer)
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- maskLayers = typedLayer.maskLayers
- super.init(layer: typedLayer)
- }
-
- // MARK: Internal
-
- override func layoutSublayers() {
- super.layoutSublayers()
-
- for sublayer in sublayers ?? [] {
- sublayer.fillBoundsOfSuperlayer()
- }
- }
-
- // MARK: Private
-
- private let maskLayers: [MaskLayer]
-
-}
-
-// MARK: AnimationLayer
-
-extension MaskCompositionLayer: AnimationLayer {
- func setupAnimations(context: LayerAnimationContext) throws {
- for maskLayer in maskLayers {
- try maskLayer.setupAnimations(context: context)
- }
- }
-}
-
-// MARK: MaskCompositionLayer.MaskLayer
-
-extension MaskCompositionLayer {
- final class MaskLayer: CAShapeLayer {
-
- // MARK: Lifecycle
-
- init(mask: Mask) {
- maskModel = mask
- super.init()
-
- fillRule = .evenOdd
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- maskModel = typedLayer.maskModel
- super.init(layer: typedLayer)
- }
-
- // MARK: Internal
-
- let maskModel: Mask
-
- }
-}
-
-// MARK: - MaskCompositionLayer.MaskLayer + AnimationLayer
-
-extension MaskCompositionLayer.MaskLayer: AnimationLayer {
- func setupAnimations(context: LayerAnimationContext) throws {
- let shouldInvertMask = (maskModel.mode.usableMode == .subtract && !maskModel.inverted)
- || (maskModel.mode.usableMode == .add && maskModel.inverted)
-
- try addAnimations(
- for: maskModel.shape,
- context: context,
- transformPath: { maskPath in
- // If the mask is using `MaskMode.subtract` or has `inverted: true`,
- // we have to invert the area filled by the path. We can do that by
- // drawing a rectangle, and then adding a path (which is subtracted
- // from the rectangle based on the .evenOdd fill mode).
- if shouldInvertMask {
- let path = CGMutablePath()
- path.addRect(.veryLargeRect)
- path.addPath(maskPath)
- return path
- } else {
- return maskPath
- }
- })
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/PreCompLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/PreCompLayer.swift
deleted file mode 100644
index 700619273822cdabfaeacfd497818256e270d9e4..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/PreCompLayer.swift
+++ /dev/null
@@ -1,105 +0,0 @@
-// Created by Cal Stephens on 12/14/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - PreCompLayer
-
-/// The `CALayer` type responsible for rendering `PreCompLayerModel`s
-final class PreCompLayer: BaseCompositionLayer {
-
- // MARK: Lifecycle
-
- init(preCompLayer: PreCompLayerModel) {
- self.preCompLayer = preCompLayer
- super.init(layerModel: preCompLayer)
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- preCompLayer = typedLayer.preCompLayer
- super.init(layer: typedLayer)
- }
-
- // MARK: Internal
-
- let preCompLayer: PreCompLayerModel
-
- /// Post-init setup for `PreCompLayer`s.
- /// Should always be called after `PreCompLayer.init(preCompLayer:)`.
- ///
- /// This is a workaround for a hard-to-reproduce crash that was
- /// triggered when `PreCompLayer.init` was called reentantly. We didn't
- /// have any consistent repro steps for this crash (it happened 100% of
- /// the time for some testers, and 0% of the time for other testers),
- /// but moving this code out of `PreCompLayer.init` does seem to fix it.
- ///
- /// The stack trace looked like:
- /// - `_os_unfair_lock_recursive_abort`
- /// - `-[CALayerAccessibility__UIKit__QuartzCore dealloc]`
- /// - `PreCompLayer.__allocating_init(preCompLayer:context:)` <- reentrant init call
- /// - ...
- /// - `CALayer.setupLayerHierarchy(for:context:)`
- /// - `PreCompLayer.init(preCompLayer:context:)`
- ///
- func setup(context: LayerContext) throws {
- try setupLayerHierarchy(
- for: context.animation.assetLibrary?.precompAssets[preCompLayer.referenceID]?.layers ?? [],
- context: context)
- }
-
- override func setupAnimations(context: LayerAnimationContext) throws {
- var context = context
- context = context.addingKeypathComponent(preCompLayer.name)
- try setupLayerAnimations(context: context)
-
- let timeRemappingInterpolator = preCompLayer.timeRemapping.flatMap { KeyframeInterpolator(keyframes: $0.keyframes) }
-
- let contextForChildren = context
- // `timeStretch` and `startTime` are a simple linear function so can be inverted from a
- // "global time to local time" function into the simpler "local time to global time".
- .withSimpleTimeRemapping { [preCompLayer] layerLocalFrame in
- (layerLocalFrame * AnimationFrameTime(preCompLayer.timeStretch)) + AnimationFrameTime(preCompLayer.startTime)
- }
- // `timeRemappingInterpolator` is arbitrarily complex and cannot be inverted,
- // so can only be applied via `complexTimeRemapping` from global time to local time.
- .withComplexTimeRemapping(required: preCompLayer.timeRemapping != nil) { [preCompLayer] globalTime in
- if let timeRemappingInterpolator {
- let remappedLocalTime = timeRemappingInterpolator.value(frame: globalTime) as! LottieVector1D
- return remappedLocalTime.cgFloatValue * context.animation.framerate
- } else {
- return (globalTime - preCompLayer.startTime) / preCompLayer.timeStretch
- }
- }
-
- try setupChildAnimations(context: contextForChildren)
- }
-
-}
-
-// MARK: CustomLayoutLayer
-
-extension PreCompLayer: CustomLayoutLayer {
- func layout(superlayerBounds: CGRect) {
- anchorPoint = .zero
-
- // Pre-comp layers use a size specified in the layer model,
- // and clip the composition to that bounds
- bounds = CGRect(
- x: superlayerBounds.origin.x,
- y: superlayerBounds.origin.y,
- width: CGFloat(preCompLayer.width),
- height: CGFloat(preCompLayer.height))
-
- contentsLayer.masksToBounds = true
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/RepeaterLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/RepeaterLayer.swift
deleted file mode 100644
index e27e7e876b5d1b248329cf53cc37bd8fb2bfaa3a..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/RepeaterLayer.swift
+++ /dev/null
@@ -1,98 +0,0 @@
-// Created by Cal Stephens on 8/1/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - RepeaterLayer
-
-/// A layer that renders a child layer at some offset using a `Repeater`
-final class RepeaterLayer: BaseAnimationLayer {
-
- // MARK: Lifecycle
-
- init(repeater: Repeater, childLayer: CALayer, index: Int) {
- repeaterTransform = RepeaterTransform(repeater: repeater, index: index)
- super.init()
- addSublayer(childLayer)
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- repeaterTransform = typedLayer.repeaterTransform
- super.init(layer: typedLayer)
- }
-
- // MARK: Internal
-
- override func setupAnimations(context: LayerAnimationContext) throws {
- try super.setupAnimations(context: context)
- try addTransformAnimations(for: repeaterTransform, context: context)
- }
-
- // MARK: Private
-
- private let repeaterTransform: RepeaterTransform
-
-}
-
-// MARK: - RepeaterTransform
-
-/// A transform model created from a `Repeater`
-private struct RepeaterTransform {
-
- // MARK: Lifecycle
-
- init(repeater: Repeater, index: Int) {
- anchorPoint = repeater.anchorPoint
- scale = repeater.scale
-
- rotationX = repeater.rotationX.map { rotation in
- LottieVector1D(rotation.value * Double(index))
- }
-
- rotationY = repeater.rotationY.map { rotation in
- LottieVector1D(rotation.value * Double(index))
- }
-
- rotationZ = repeater.rotationZ.map { rotation in
- LottieVector1D(rotation.value * Double(index))
- }
-
- position = repeater.position.map { position in
- LottieVector3D(
- x: position.x * Double(index),
- y: position.y * Double(index),
- z: position.z * Double(index))
- }
- }
-
- // MARK: Internal
-
- let anchorPoint: KeyframeGroup
- let position: KeyframeGroup
- let rotationX: KeyframeGroup
- let rotationY: KeyframeGroup
- let rotationZ: KeyframeGroup
-
- let scale: KeyframeGroup
-
-}
-
-// MARK: TransformModel
-
-extension RepeaterTransform: TransformModel {
- var _position: KeyframeGroup? { position }
- var _positionX: KeyframeGroup? { nil }
- var _positionY: KeyframeGroup? { nil }
- var _skew: KeyframeGroup? { nil }
- var _skewAxis: KeyframeGroup? { nil }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/ShapeItemLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/ShapeItemLayer.swift
deleted file mode 100644
index 23524d107bef23274bcb83b12e6cc97d4e1bf4e7..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/ShapeItemLayer.swift
+++ /dev/null
@@ -1,344 +0,0 @@
-// Created by Cal Stephens on 12/13/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - ShapeItemLayer
-
-/// A CALayer type that renders an array of `[ShapeItem]`s,
-/// from a `Group` in a `ShapeLayerModel`.
-final class ShapeItemLayer: BaseAnimationLayer {
-
- // MARK: Lifecycle
-
- /// Initializes a `ShapeItemLayer` that renders a `Group` from a `ShapeLayerModel`
- /// - Parameters:
- /// - shape: The `ShapeItem` in this group that renders a `GGPath`
- /// - otherItems: Other items in this group that affect the appearance of the shape
- init(shape: Item, otherItems: [Item], context: LayerContext) throws {
- self.shape = shape
- self.otherItems = otherItems
-
- try context.compatibilityAssert(
- shape.item.drawsCGPath,
- "`ShapeItemLayer` must contain exactly one `ShapeItem` that draws a `GPPath`")
-
- try context.compatibilityAssert(
- !otherItems.contains(where: { $0.item.drawsCGPath }),
- "`ShapeItemLayer` must contain exactly one `ShapeItem` that draws a `GPPath`")
-
- super.init()
-
- setupLayerHierarchy()
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- shape = typedLayer.shape
- otherItems = typedLayer.otherItems
- super.init(layer: typedLayer)
- }
-
- // MARK: Internal
-
- /// An item that can be displayed by this layer
- struct Item {
- /// A `ShapeItem` that should be rendered by this layer
- let item: ShapeItem
-
- /// The set of groups that this item descends from
- /// - Due to the way `GroupLayer`s are setup, the original `ShapeItem`
- /// hierarchy from the `ShapeLayer` data model may no longer exactly
- /// match the hierarchy of `GroupLayer` / `ShapeItemLayer`s constructed
- /// at runtime. Since animation keypaths need to match the original
- /// structure of the `ShapeLayer` data model, we track that info here.
- let groupPath: [String]
- }
-
- override func setupAnimations(context: LayerAnimationContext) throws {
- try super.setupAnimations(context: context)
-
- guard let sublayerConfiguration else { return }
-
- switch sublayerConfiguration.fill {
- case .solidFill(let shapeLayer):
- try setupSolidFillAnimations(shapeLayer: shapeLayer, context: context)
-
- case .gradientFill(let gradientLayers):
- try setupGradientFillAnimations(layers: gradientLayers, context: context)
- }
-
- if let gradientStrokeConfiguration = sublayerConfiguration.gradientStroke {
- try setupGradientStrokeAnimations(layers: gradientStrokeConfiguration, context: context)
- }
- }
-
- // MARK: Private
-
- private struct GradientLayers {
- /// The `CALayer` that renders the RGB components of the gradient
- let gradientColorLayer: GradientRenderLayer
- /// The `CALayer` that renders the alpha components of the gradient,
- /// masking the `gradientColorLayer`
- let gradientAlphaLayer: GradientRenderLayer?
- /// The `CAShapeLayer` that clips the gradient layers to the expected shape
- let shapeMaskLayer: CAShapeLayer
- /// The top-most `CAShapeLayer` used to render `Stroke`s over the gradient if necessary
- let overlayLayer: CAShapeLayer?
- }
-
- /// The configuration of this layer's `fill` sublayers
- private enum FillLayerConfiguration {
- /// This layer displays a single `CAShapeLayer`
- case solidFill(CAShapeLayer)
-
- /// This layer displays a `GradientRenderLayer` masked by a `CAShapeLayer`.
- case gradientFill(GradientLayers)
- }
-
- /// The `ShapeItem` in this group that renders a `GGPath`
- private let shape: Item
-
- /// Other items in this group that affect the appearance of the shape
- private let otherItems: [Item]
-
- /// The current configuration of this layer's sublayer(s)
- private var sublayerConfiguration: (fill: FillLayerConfiguration, gradientStroke: GradientLayers?)?
-
- private func setupLayerHierarchy() {
- // We have to build a different layer hierarchy depending on if
- // we're rendering a gradient (a `CAGradientLayer` masked by a `CAShapeLayer`)
- // or a solid shape (a simple `CAShapeLayer`).
- let fillLayerConfiguration: FillLayerConfiguration
- if let gradientFill = otherItems.first(GradientFill.self) {
- fillLayerConfiguration = setupGradientFillLayerHierarchy(for: gradientFill)
- } else {
- fillLayerConfiguration = setupSolidFillLayerHierarchy()
- }
-
- let gradientStrokeConfiguration: GradientLayers?
- if let gradientStroke = otherItems.first(GradientStroke.self) {
- gradientStrokeConfiguration = setupGradientStrokeLayerHierarchy(for: gradientStroke)
- } else {
- gradientStrokeConfiguration = nil
- }
-
- sublayerConfiguration = (fillLayerConfiguration, gradientStrokeConfiguration)
- }
-
- private func setupSolidFillLayerHierarchy() -> FillLayerConfiguration {
- let shapeLayer = CAShapeLayer()
- addSublayer(shapeLayer)
-
- // `CAShapeLayer.fillColor` defaults to black, so we have to
- // nil out the background color if there isn't an expected fill color
- if !otherItems.contains(where: { $0.item is Fill }) {
- shapeLayer.fillColor = nil
- }
-
- return .solidFill(shapeLayer)
- }
-
- private func setupGradientFillLayerHierarchy(
- for gradientFill: GradientFill)
- -> FillLayerConfiguration
- {
- let container = BaseAnimationLayer()
- let pathContainer = BaseAnimationLayer()
-
- let pathMask = CAShapeLayer()
- pathMask.fillColor = .rgb(0, 0, 0)
- pathContainer.mask = pathMask
-
- let rgbGradientLayer = GradientRenderLayer()
- pathContainer.addSublayer(rgbGradientLayer)
- container.addSublayer(pathContainer)
-
- let overlayLayer = CAShapeLayer()
- overlayLayer.fillColor = nil
- container.addSublayer(overlayLayer)
-
- addSublayer(container)
-
- let alphaGradientLayer: GradientRenderLayer?
- if gradientFill.hasAlphaComponent {
- alphaGradientLayer = GradientRenderLayer()
- rgbGradientLayer.mask = alphaGradientLayer
- } else {
- alphaGradientLayer = nil
- }
-
- return .gradientFill(GradientLayers(
- gradientColorLayer: rgbGradientLayer,
- gradientAlphaLayer: alphaGradientLayer,
- shapeMaskLayer: pathMask,
- overlayLayer: overlayLayer))
- }
-
- private func setupGradientStrokeLayerHierarchy(
- for gradientStroke: GradientStroke)
- -> GradientLayers
- {
- let container = BaseAnimationLayer()
-
- let pathMask = CAShapeLayer()
- pathMask.fillColor = nil
- pathMask.strokeColor = .rgb(0, 0, 0)
- container.mask = pathMask
-
- let rgbGradientLayer = GradientRenderLayer()
- container.addSublayer(rgbGradientLayer)
- addSublayer(container)
-
- let alphaGradientLayer: GradientRenderLayer?
- if gradientStroke.hasAlphaComponent {
- alphaGradientLayer = GradientRenderLayer()
- rgbGradientLayer.mask = alphaGradientLayer
- } else {
- alphaGradientLayer = nil
- }
-
- return GradientLayers(
- gradientColorLayer: rgbGradientLayer,
- gradientAlphaLayer: alphaGradientLayer,
- shapeMaskLayer: pathMask,
- overlayLayer: nil)
- }
-
- private func setupSolidFillAnimations(
- shapeLayer: CAShapeLayer,
- context: LayerAnimationContext)
- throws
- {
- var trimPathMultiplier: PathMultiplier? = nil
- if let (trim, context) = otherItems.first(Trim.self, where: { !$0.isEmpty }, context: context) {
- trimPathMultiplier = try shapeLayer.addAnimations(for: trim, context: context)
-
- try context.compatibilityAssert(
- otherItems.first(Fill.self) == nil,
- """
- The Core Animation rendering engine doesn't currently support applying
- trims to filled shapes (only stroked shapes).
- """)
- }
-
- try shapeLayer.addAnimations(
- for: shape.item,
- context: context.for(shape),
- pathMultiplier: trimPathMultiplier ?? 1,
- roundedCorners: otherItems.first(RoundedCorners.self))
-
- if let (fill, context) = otherItems.first(Fill.self, context: context) {
- try shapeLayer.addAnimations(for: fill, context: context)
- }
-
- if let (stroke, context) = otherItems.first(Stroke.self, context: context) {
- try shapeLayer.addStrokeAnimations(for: stroke, context: context)
- }
- }
-
- private func setupGradientFillAnimations(
- layers: GradientLayers,
- context: LayerAnimationContext)
- throws
- {
- let pathLayers = [layers.shapeMaskLayer, layers.overlayLayer]
- for pathLayer in pathLayers {
- try pathLayer?.addAnimations(
- for: shape.item,
- context: context.for(shape),
- pathMultiplier: 1,
- roundedCorners: otherItems.first(RoundedCorners.self))
- }
-
- if let (gradientFill, context) = otherItems.first(GradientFill.self, context: context) {
- layers.shapeMaskLayer.fillRule = gradientFill.fillRule.caFillRule
- try layers.gradientColorLayer.addGradientAnimations(for: gradientFill, type: .rgb, context: context)
- try layers.gradientAlphaLayer?.addGradientAnimations(for: gradientFill, type: .alpha, context: context)
- }
-
- if let (stroke, context) = otherItems.first(Stroke.self, context: context) {
- try layers.overlayLayer?.addStrokeAnimations(for: stroke, context: context)
- }
- }
-
- private func setupGradientStrokeAnimations(
- layers: GradientLayers,
- context: LayerAnimationContext)
- throws
- {
- var trimPathMultiplier: PathMultiplier? = nil
- if let (trim, context) = otherItems.first(Trim.self, context: context) {
- trimPathMultiplier = try layers.shapeMaskLayer.addAnimations(for: trim, context: context)
- }
-
- try layers.shapeMaskLayer.addAnimations(
- for: shape.item,
- context: context.for(shape),
- pathMultiplier: trimPathMultiplier ?? 1,
- roundedCorners: otherItems.first(RoundedCorners.self))
-
- if let (gradientStroke, context) = otherItems.first(GradientStroke.self, context: context) {
- try layers.gradientColorLayer.addGradientAnimations(for: gradientStroke, type: .rgb, context: context)
- try layers.gradientAlphaLayer?.addGradientAnimations(for: gradientStroke, type: .alpha, context: context)
-
- try layers.shapeMaskLayer.addStrokeAnimations(for: gradientStroke, context: context)
- }
- }
-
-}
-
-// MARK: - [ShapeItem] helpers
-
-extension [ShapeItemLayer.Item] {
- /// The first `ShapeItem` in this array of the given type
- func first(
- _: ItemType.Type,
- where condition: (ItemType) -> Bool = { _ in true },
- context: LayerAnimationContext)
- -> (item: ItemType, context: LayerAnimationContext)?
- {
- for item in self {
- if let match = item.item as? ItemType, condition(match) {
- return (match, context.for(item))
- }
- }
-
- return nil
- }
-
- /// The first `ShapeItem` in this array of the given type
- func first(_: ItemType.Type) -> ItemType? {
- for item in self {
- if let match = item.item as? ItemType {
- return match
- }
- }
-
- return nil
- }
-}
-
-extension LayerAnimationContext {
- /// An updated `LayerAnimationContext` with the`AnimationKeypath`
- /// that refers to this specific `ShapeItem`.
- func `for`(_ item: ShapeItemLayer.Item) -> LayerAnimationContext {
- var context = self
-
- for parentGroupName in item.groupPath {
- context.currentKeypath.keys.append(parentGroupName)
- }
-
- context.currentKeypath.keys.append(item.item.name)
- return context
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/ShapeLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/ShapeLayer.swift
deleted file mode 100644
index 7249d39777c09c3d3e02c510b0f6d07272f57d70..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/ShapeLayer.swift
+++ /dev/null
@@ -1,561 +0,0 @@
-// Created by Cal Stephens on 12/14/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - ShapeLayer
-
-/// The CALayer type responsible for rendering `ShapeLayerModel`s
-final class ShapeLayer: BaseCompositionLayer {
-
- // MARK: Lifecycle
-
- init(shapeLayer: ShapeLayerModel, context: LayerContext) throws {
- self.shapeLayer = shapeLayer
- super.init(layerModel: shapeLayer)
- try setUpGroups(context: context)
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- shapeLayer = typedLayer.shapeLayer
- super.init(layer: typedLayer)
- }
-
- // MARK: Private
-
- private let shapeLayer: ShapeLayerModel
-
- private func setUpGroups(context: LayerContext) throws {
- let shapeItems = shapeLayer.items.map { ShapeItemLayer.Item(item: $0, groupPath: []) }
- try setupGroups(from: shapeItems, parentGroup: nil, parentGroupPath: [], context: context)
- }
-
-}
-
-// MARK: - GroupLayer
-
-/// The CALayer type responsible for rendering `Group`s
-final class GroupLayer: BaseAnimationLayer {
-
- // MARK: Lifecycle
-
- init(group: Group, items: [ShapeItemLayer.Item], groupPath: [String], context: LayerContext) throws {
- self.group = group
- self.items = items
- self.groupPath = groupPath
- super.init()
- try setupLayerHierarchy(context: context)
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- group = typedLayer.group
- items = typedLayer.items
- groupPath = typedLayer.groupPath
- super.init(layer: typedLayer)
- }
-
- // MARK: Internal
-
- override func setupAnimations(context: LayerAnimationContext) throws {
- try super.setupAnimations(context: context)
-
- if let (shapeTransform, context) = nonGroupItems.first(ShapeTransform.self, context: context) {
- try addTransformAnimations(for: shapeTransform, context: context)
- try addOpacityAnimation(for: shapeTransform, context: context)
- }
- }
-
- // MARK: Private
-
- private let group: Group
-
- /// `ShapeItemLayer.Item`s rendered by this `Group`
- /// - In the original `ShapeLayer` data model, these items could have originated from a different group
- private let items: [ShapeItemLayer.Item]
-
- /// The keypath that represents this group, with respect to the parent `ShapeLayer`
- /// - Due to the way `GroupLayer`s are setup, the original `ShapeItem`
- /// hierarchy from the `ShapeLayer` data model may no longer exactly
- /// match the hierarchy of `GroupLayer` / `ShapeItemLayer`s constructed
- /// at runtime. Since animation keypaths need to match the original
- /// structure of the `ShapeLayer` data model, we track that info here.
- private let groupPath: [String]
-
- /// Child group items contained in this group. Correspond to a child `GroupLayer`
- private lazy var childGroups = items.filter { $0.item is Group }
-
- /// `ShapeItem`s (other than nested `Group`s) that are rendered by this layer
- private lazy var nonGroupItems = items.filter { !($0.item is Group) }
-
- private func setupLayerHierarchy(context: LayerContext) throws {
- // Groups can contain other groups, so we may have to continue
- // recursively creating more `GroupLayer`s
- try setupGroups(from: items, parentGroup: group, parentGroupPath: groupPath, context: context)
-
- // Create `ShapeItemLayer`s for each subgroup of shapes that should be rendered as a single unit
- // - These groups are listed from front-to-back, so we have to add the sublayers in reverse order
- let renderGroups = items.shapeRenderGroups(groupHasChildGroupsToInheritUnusedItems: !childGroups.isEmpty)
- for shapeRenderGroup in renderGroups.validGroups.reversed() {
- // When there are multiple path-drawing items, they're supposed to be rendered
- // in a single `CAShapeLayer` (instead of rendering them in separate layers) so
- // `CAShapeLayerFillRule.evenOdd` can be applied correctly if the paths overlap.
- // Since a `CAShapeLayer` only supports animating a single `CGPath` from a single `KeyframeGroup`,
- // this requires combining all of the path-drawing items into a single set of keyframes.
- if
- shapeRenderGroup.pathItems.count > 1,
- // We currently only support this codepath for `Shape` items that directly contain bezier path keyframes.
- // We could also support this for other path types like rectangles, ellipses, and polygons with more work.
- shapeRenderGroup.pathItems.allSatisfy({ $0.item is Shape }),
- // `Trim`s are currently only applied correctly using individual `ShapeItemLayer`s,
- // because each path has to be trimmed separately.
- !shapeRenderGroup.otherItems.contains(where: { $0.item is Trim })
- {
- let allPathKeyframes = shapeRenderGroup.pathItems.compactMap { ($0.item as? Shape)?.path }
- let combinedShape = CombinedShapeItem(
- shapes: Keyframes.combined(allPathKeyframes),
- name: group.name)
-
- let sublayer = try ShapeItemLayer(
- shape: ShapeItemLayer.Item(item: combinedShape, groupPath: shapeRenderGroup.pathItems[0].groupPath),
- otherItems: shapeRenderGroup.otherItems,
- context: context)
-
- addSublayer(sublayer)
- }
-
- // Otherwise, if each `ShapeItem` that draws a `GGPath` animates independently,
- // we have to create a separate `ShapeItemLayer` for each one. This may render
- // incorrectly if there are multiple paths that overlap with each other.
- else {
- for pathDrawingItem in shapeRenderGroup.pathItems {
- let sublayer = try ShapeItemLayer(
- shape: pathDrawingItem,
- otherItems: shapeRenderGroup.otherItems,
- context: context)
-
- addSublayer(sublayer)
- }
- }
- }
- }
-
-}
-
-extension CALayer {
-
- // MARK: Fileprivate
-
- /// Sets up `GroupLayer`s for each `Group` in the given list of `ShapeItem`s
- /// - Each `Group` item becomes its own `GroupLayer` sublayer.
- /// - Other `ShapeItem` are applied to all sublayers
- fileprivate func setupGroups(
- from items: [ShapeItemLayer.Item],
- parentGroup: Group?,
- parentGroupPath: [String],
- context: LayerContext)
- throws
- {
- // If the layer has any `Repeater`s, set up each repeater
- // and then handle any remaining groups like normal.
- if items.contains(where: { $0.item is Repeater }) {
- let repeaterGroupings = items.split(whereSeparator: { $0.item is Repeater })
-
- // Iterate through the groupings backwards to preserve the expected rendering order
- for repeaterGrouping in repeaterGroupings.reversed() {
- // Each repeater applies to the previous items in the list
- if let repeater = repeaterGrouping.trailingSeparator?.item as? Repeater {
- try setUpRepeater(
- repeater,
- items: repeaterGrouping.grouping,
- parentGroupPath: parentGroupPath,
- context: context)
- }
-
- // Any remaining items after the last repeater are handled like normal
- else {
- try setupGroups(
- from: repeaterGrouping.grouping,
- parentGroup: parentGroup,
- parentGroupPath: parentGroupPath,
- context: context)
- }
- }
- }
-
- else {
- let groupLayers = try makeGroupLayers(
- from: items,
- parentGroup: parentGroup,
- parentGroupPath: parentGroupPath,
- context: context)
-
- for groupLayer in groupLayers {
- addSublayer(groupLayer)
- }
- }
- }
-
- // MARK: Private
-
- /// Sets up this layer using the given `Repeater`
- private func setUpRepeater(
- _ repeater: Repeater,
- items allItems: [ShapeItemLayer.Item],
- parentGroupPath: [String],
- context: LayerContext)
- throws
- {
- let items = allItems.filter { !($0.item is Repeater) }
- let copyCount = Int(try repeater.copies.exactlyOneKeyframe(context: context, description: "repeater copies").value)
-
- for index in 0.. [GroupLayer]
- {
- var groupItems = items.compactMap { $0.item as? Group }.filter { !$0.hidden }
- var otherItems = items.filter { !($0.item is Group) && !$0.item.hidden }
-
- // Handle the top-level `shapeLayer.items` array. This is typically just a single `Group`,
- // but in practice can be any combination of items. The implementation expects all path-drawing
- // shape items to be managed by a `GroupLayer`, so if there's a top-level path item we
- // have to create a placeholder group.
- if parentGroup == nil, otherItems.contains(where: { $0.item.drawsCGPath }) {
- groupItems = [Group(items: items.map { $0.item }, name: "")]
- otherItems = []
- }
-
- // Any child items that wouldn't be included in a valid shape render group
- // need to be applied to child groups (otherwise they'd be silently ignored).
- let inheritedItemsForChildGroups = otherItems
- .shapeRenderGroups(groupHasChildGroupsToInheritUnusedItems: !groupItems.isEmpty)
- .unusedItems
-
- // Groups are listed from front to back,
- // but `CALayer.sublayers` are listed from back to front.
- let groupsInZAxisOrder = groupItems.reversed()
-
- return try groupsInZAxisOrder.compactMap { group in
- var pathForChildren = parentGroupPath
- if !group.name.isEmpty {
- pathForChildren.append(group.name)
- }
-
- let childItems = group.items
- .filter { !$0.hidden }
- .map { ShapeItemLayer.Item(item: $0, groupPath: pathForChildren) }
-
- // Some shape item properties are affected by scaling (e.g. stroke width).
- // The child group may have a `ShapeTransform` that affects the scale of its items,
- // but shouldn't affect the scale of any inherited items. To prevent this scale
- // from affecting inherited items, we have to apply an inverse scale to them.
- let inheritedItems = try inheritedItemsForChildGroups.map { item in
- ShapeItemLayer.Item(
- item: try item.item.scaledCopyForChildGroup(group, context: context),
- groupPath: item.groupPath)
- }
-
- return try GroupLayer(
- group: group,
- items: childItems + inheritedItems,
- groupPath: pathForChildren,
- context: context)
- }
- }
-}
-
-extension ShapeItem {
- /// Whether or not this `ShapeItem` is responsible for rendering a `CGPath`
- var drawsCGPath: Bool {
- switch type {
- case .ellipse, .rectangle, .shape, .star:
- return true
-
- case .fill, .gradientFill, .group, .gradientStroke, .merge,
- .repeater, .round, .stroke, .trim, .transform, .unknown:
- return false
- }
- }
-
- /// Whether or not this `ShapeItem` provides a fill for a set of shapes
- var isFill: Bool {
- switch type {
- case .fill, .gradientFill:
- return true
-
- case .ellipse, .rectangle, .shape, .star, .group, .gradientStroke,
- .merge, .repeater, .round, .stroke, .trim, .transform, .unknown:
- return false
- }
- }
-
- /// Whether or not this `ShapeItem` provides a stroke for a set of shapes
- var isStroke: Bool {
- switch type {
- case .stroke, .gradientStroke:
- return true
-
- case .ellipse, .rectangle, .shape, .star, .group, .gradientFill,
- .merge, .repeater, .round, .fill, .trim, .transform, .unknown:
- return false
- }
- }
-
- // For any inherited shape items that are affected by scaling (e.g. strokes but not fills),
- // any `ShapeTransform` in the given child group isn't supposed to be applied to the item.
- // To cancel out the effect of the transform, we can apply an inverse transform to the
- // shape item.
- func scaledCopyForChildGroup(_ childGroup: Group, context: LayerContext) throws -> ShapeItem {
- guard
- // Path-drawing items aren't inherited by child groups in this way
- !drawsCGPath,
- // Stroke widths are affected by scaling, but fill colors aren't.
- // We can expand this to other types of items in the future if necessary.
- let stroke = self as? StrokeShapeItem,
- // We only need to handle scaling if there's a `ShapeTransform` present
- let transform = childGroup.items.first(where: { $0 is ShapeTransform }) as? ShapeTransform
- else { return self }
-
- let newWidth = try Keyframes.combined(stroke.width, transform.scale) { strokeWidth, scale -> LottieVector1D in
- // Since we're applying this scale to a scalar value rather than to a layer,
- // we can only handle cases where the scale is also a scalar (e.g. the same for both x and y)
- try context.compatibilityAssert(scale.x == scale.y, """
- The Core Animation rendering engine doesn't support applying separate x/y scale values \
- (x: \(scale.x), y: \(scale.y)) to this stroke item (\(self.name)).
- """)
-
- return LottieVector1D(strokeWidth.value * (100 / scale.x))
- }
-
- return stroke.copy(width: newWidth)
- }
-}
-
-extension Collection {
- /// Splits this collection into two groups, based on the given predicate
- func grouped(by predicate: (Element) -> Bool) -> (trueElements: [Element], falseElements: [Element]) {
- var trueElements = [Element]()
- var falseElements = [Element]()
-
- for element in self {
- if predicate(element) {
- trueElements.append(element)
- } else {
- falseElements.append(element)
- }
- }
-
- return (trueElements, falseElements)
- }
-
- /// Splits this collection into an array of grouping separated by the given separator.
- /// For example, `[A, B, C]` split by `B` returns an array with two elements:
- /// 1. `(grouping: [A], trailingSeparator: B)`
- /// 2. `(grouping: [C], trailingSeparator: nil)`
- func split(whereSeparator separatorPredicate: (Element) -> Bool)
- -> [(grouping: [Element], trailingSeparator: Element?)]
- {
- guard !isEmpty else { return [] }
-
- var groupings: [(grouping: [Element], trailingSeparator: Element?)] = []
-
- for element in self {
- if groupings.isEmpty || groupings.last?.trailingSeparator != nil {
- groupings.append((grouping: [], trailingSeparator: nil))
- }
-
- if separatorPredicate(element) {
- groupings[groupings.indices.last!].trailingSeparator = element
- } else {
- groupings[groupings.indices.last!].grouping.append(element)
- }
- }
-
- return groupings
- }
-}
-
-// MARK: - ShapeRenderGroup
-
-/// A group of `ShapeItem`s that should be rendered together as a single unit
-struct ShapeRenderGroup {
- /// The items in this group that render `CGPath`s.
- /// Valid shape render groups must have at least one path-drawing item.
- var pathItems: [ShapeItemLayer.Item] = []
- /// Shape items that modify the appearance of the shapes rendered by this group
- var otherItems: [ShapeItemLayer.Item] = []
-}
-
-extension [ShapeItemLayer.Item] {
- /// Splits this list of `ShapeItem`s into groups that should be rendered together as individual units,
- /// plus the remaining items that were not included in any group.
- /// - groupHasChildGroupsToInheritUnusedItems: whether or not this group has child groups
- /// that will inherit any items that aren't used as part of a valid render group
- func shapeRenderGroups(groupHasChildGroupsToInheritUnusedItems: Bool)
- -> (validGroups: [ShapeRenderGroup], unusedItems: [ShapeItemLayer.Item])
- {
- var renderGroups = [ShapeRenderGroup()]
-
- for item in self {
- // `renderGroups` is non-empty, so is guaranteed to have a valid end index
- var lastIndex: Int {
- renderGroups.indices.last!
- }
-
- if item.item.drawsCGPath {
- // Trims should only affect paths that precede them in the group,
- // so if the existing group already has a trim we create a new group for this path item.
- if renderGroups[lastIndex].otherItems.contains(where: { $0.item is Trim }) {
- renderGroups.append(ShapeRenderGroup())
- }
-
- renderGroups[lastIndex].pathItems.append(item)
- }
-
- // `Fill` items are unique, because they specifically only apply to _previous_ shapes in a `Group`
- // - For example, with [Rectangle, Fill(Red), Circle, Fill(Blue)], the Rectangle should be Red
- // but the Circle should be Blue.
- // - To handle this, we create a new `ShapeRenderGroup` when we encounter a `Fill` item
- else if item.item.isFill {
- renderGroups[lastIndex].otherItems.append(item)
-
- // There are cases where the current render group doesn't have a path-drawing
- // shape item yet, and could just contain this fill. Some examples:
- // - `[Circle, Fill(Red), Fill(Green)]`: In this case, the second fill would
- // be unused and silently ignored. To avoid this we render the fill using
- // the shape items from the previous group.
- // - `[Circle, Fill(Red), Group, Fill(Green)]`: In this case, the second fill
- // is inherited and rendered by the child group.
- if
- renderGroups[lastIndex].pathItems.isEmpty,
- !groupHasChildGroupsToInheritUnusedItems,
- lastIndex != renderGroups.indices.first
- {
- renderGroups[lastIndex].pathItems = renderGroups[lastIndex - 1].pathItems
- }
-
- // Finalize the group so the fill item doesn't affect following shape items
- renderGroups.append(ShapeRenderGroup())
- }
-
- // Other items in the list are applied to all subgroups
- else {
- for index in renderGroups.indices {
- renderGroups[index].otherItems.append(item)
- }
- }
- }
-
- /// The main thread rendering engine draws each Stroke and Fill as a separate `CAShapeLayer`.
- /// As an optimization, we can combine them into a single shape layer when a few conditions are met:
- /// 1. There is at most one stroke and one fill (a `CAShapeLayer` can only render one of each)
- /// 2. The stroke is drawn on top of the fill (the behavior of a `CAShapeLayer`)
- /// 3. The fill and stroke have the same `opacity` animations (since a `CAShapeLayer` can only render
- /// a single set of `opacity` animations).
- /// Otherwise, each stroke / fill needs to be split into a separate layer.
- renderGroups = renderGroups.flatMap { group -> [ShapeRenderGroup] in
- let (strokesAndFills, otherItems) = group.otherItems.grouped(by: { $0.item.isFill || $0.item.isStroke })
- let (strokes, fills) = strokesAndFills.grouped(by: { $0.item.isStroke })
-
- // A `CAShapeLayer` can only draw a single fill and a single stroke
- let hasAtMostOneFill = fills.count <= 1
- let hasAtMostOneStroke = strokes.count <= 1
-
- // A `CAShapeLayer` can only draw a stroke on top of a fill -- if the fill is supposed to be
- // drawn on top of the stroke, then they have to be rendered as separate layers.
- let strokeDrawnOnTopOfFill: Bool
- if
- let strokeIndex = strokesAndFills.firstIndex(where: { $0.item.isStroke }),
- let fillIndex = strokesAndFills.firstIndex(where: { $0.item.isFill })
- {
- strokeDrawnOnTopOfFill = strokeIndex < fillIndex
- } else {
- strokeDrawnOnTopOfFill = false
- }
-
- // `Fill` and `Stroke` items have an `alpha` property that can be animated separately,
- // but each layer only has a single `opacity` property. We can only use a single `CAShapeLayer`
- // when the items have the same `alpha` animations.
- let allAlphaAnimationsAreIdentical = {
- strokesAndFills.allSatisfy { item in
- (item.item as? OpacityAnimationModel)?.opacity
- == (strokesAndFills.first?.item as? OpacityAnimationModel)?.opacity
- }
- }
-
- // If all the required conditions are met, this group can be rendered using a single `ShapeItemLayer`
- if
- hasAtMostOneFill,
- hasAtMostOneStroke,
- strokeDrawnOnTopOfFill,
- allAlphaAnimationsAreIdentical()
- {
- return [group]
- }
-
- // Otherwise each stroke / fill needs to be rendered as a separate `ShapeItemLayer`
- return strokesAndFills.map { strokeOrFill in
- ShapeRenderGroup(
- pathItems: group.pathItems,
- otherItems: [strokeOrFill] + otherItems)
- }
- }
-
- // All valid render groups must have a path, otherwise the items wouldn't be rendered
- renderGroups = renderGroups.filter { renderGroup in
- !renderGroup.pathItems.isEmpty
- }
-
- let itemsInValidRenderGroups = NSSet(
- array: renderGroups.lazy
- .flatMap { $0.pathItems + $0.otherItems }
- .map { $0.item })
-
- // `unusedItems` should only include each original item a single time,
- // and should preserve the existing order
- let itemsNotInValidRenderGroups = filter { item in
- !itemsInValidRenderGroups.contains(item.item)
- }
-
- return (validGroups: renderGroups, unusedItems: itemsNotInValidRenderGroups)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/SolidLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/SolidLayer.swift
deleted file mode 100644
index 2e1d5e33e154fd8ba1f8a4ce96d91f73ed40f703..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/SolidLayer.swift
+++ /dev/null
@@ -1,65 +0,0 @@
-// Created by Cal Stephens on 12/13/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - SolidLayer
-
-final class SolidLayer: BaseCompositionLayer {
-
- // MARK: Lifecycle
-
- init(_ solidLayer: SolidLayerModel) {
- self.solidLayer = solidLayer
- super.init(layerModel: solidLayer)
- setupContentLayer()
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- solidLayer = typedLayer.solidLayer
- super.init(layer: typedLayer)
- }
-
- // MARK: Internal
-
- override func setupAnimations(context: LayerAnimationContext) throws {
- try super.setupAnimations(context: context)
-
- var context = context
- context = context.addingKeypathComponent(solidLayer.name)
-
- // Even though the Lottie json schema provides a fixed `solidLayer.colorHex` value,
- // we still need to create a set of keyframes and go through the standard `CAAnimation`
- // codepath so that this value can be customized using the custom `ValueProvider`s API.
- try shapeLayer.addAnimation(
- for: .fillColor,
- keyframes: KeyframeGroup(solidLayer.colorHex.lottieColor),
- value: { $0.cgColorValue },
- context: context)
- }
-
- // MARK: Private
-
- private let solidLayer: SolidLayerModel
-
- /// Render the fill color in a child `CAShapeLayer`
- /// - Using a `CAShapeLayer` specifically, instead of a `CALayer` with a `backgroundColor`,
- /// allows the size of the fill shape to be different from `contentsLayer.size`.
- private let shapeLayer = CAShapeLayer()
-
- private func setupContentLayer() {
- shapeLayer.path = CGPath(rect: .init(x: 0, y: 0, width: solidLayer.width, height: solidLayer.height), transform: nil)
- addSublayer(shapeLayer)
- }
-
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/TextLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/TextLayer.swift
deleted file mode 100644
index 48b77096208c46e3794e0420aee8c6fdc91370c9..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/TextLayer.swift
+++ /dev/null
@@ -1,115 +0,0 @@
-// Created by Cal Stephens on 2/9/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-/// The `CALayer` type responsible for rendering `TextLayer`s
-final class TextLayer: BaseCompositionLayer {
-
- // MARK: Lifecycle
-
- init(
- textLayerModel: TextLayerModel,
- context: LayerContext)
- throws
- {
- self.textLayerModel = textLayerModel
- super.init(layerModel: textLayerModel)
- setupSublayers()
- try configureRenderLayer(with: context)
- }
-
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- /// Called by CoreAnimation to create a shadow copy of this layer
- /// More details: https://developer.apple.com/documentation/quartzcore/calayer/1410842-init
- override init(layer: Any) {
- guard let typedLayer = layer as? Self else {
- fatalError("\(Self.self).init(layer:) incorrectly called with \(type(of: layer))")
- }
-
- textLayerModel = typedLayer.textLayerModel
- super.init(layer: typedLayer)
- }
-
- // MARK: Internal
-
- override func setupAnimations(context: LayerAnimationContext) throws {
- try super.setupAnimations(context: context)
- let textAnimationContext = context.addingKeypathComponent(textLayerModel.name)
-
- let sourceText = try textLayerModel.text.exactlyOneKeyframe(
- context: textAnimationContext,
- description: "text layer text")
-
- // Prior to Lottie 4.3.0 the Core Animation rendering engine always just used `LegacyAnimationTextProvider`
- // but incorrectly called it with the full keypath string, unlike the Main Thread rendering engine
- // which only used the last component of the keypath. Starting in Lottie 4.3.0 we use `AnimationKeypathTextProvider`
- // instead if implemented.
- if let keypathTextValue = context.textProvider.text(for: textAnimationContext.currentKeypath, sourceText: sourceText.text) {
- renderLayer.text = keypathTextValue
- } else if let legacyTextProvider = context.textProvider as? LegacyAnimationTextProvider {
- renderLayer.text = legacyTextProvider.textFor(
- keypathName: textAnimationContext.currentKeypath.fullPath,
- sourceText: sourceText.text)
- } else {
- renderLayer.text = sourceText.text
- }
-
- renderLayer.sizeToFit()
- }
-
- func configureRenderLayer(with context: LayerContext) throws {
- // We can't use `CATextLayer`, because it doesn't support enough features we use.
- // Instead, we use the same `CoreTextRenderLayer` (with a custom `draw` implementation)
- // used by the Main Thread rendering engine. This means the Core Animation engine can't
- // _animate_ text properties, but it can display static text without any issues.
- let text = try textLayerModel.text.exactlyOneKeyframe(context: context, description: "text layer text")
-
- // The Core Animation engine doesn't currently support `TextAnimator`s.
- // - We could add support for animating the transform-related properties without much trouble.
- // - We may be able to support animating `fillColor` by getting clever with layer blend modes
- // or masks (e.g. use `CoreTextRenderLayer` to draw black glyphs, and then fill them in
- // using a `CAShapeLayer`).
- if !textLayerModel.animators.isEmpty {
- try context.logCompatibilityIssue("""
- The Core Animation rendering engine currently doesn't support text animators.
- """)
- }
-
- renderLayer.font = context.fontProvider.fontFor(family: text.fontFamily, size: CGFloat(text.fontSize))
-
- renderLayer.alignment = text.justification.textAlignment
- renderLayer.lineHeight = CGFloat(text.lineHeight)
- renderLayer.tracking = (CGFloat(text.fontSize) * CGFloat(text.tracking)) / 1000
-
- renderLayer.fillColor = text.fillColorData?.cgColorValue
- renderLayer.strokeColor = text.strokeColorData?.cgColorValue
- renderLayer.strokeWidth = CGFloat(text.strokeWidth ?? 0)
- renderLayer.strokeOnTop = text.strokeOverFill ?? false
-
- renderLayer.preferredSize = text.textFrameSize?.sizeValue
- renderLayer.sizeToFit()
-
- renderLayer.transform = CATransform3DIdentity
- renderLayer.position = text.textFramePosition?.pointValue ?? .zero
- }
-
- // MARK: Private
-
- private let textLayerModel: TextLayerModel
- private let renderLayer = CoreTextRenderLayer()
-
- private func setupSublayers() {
- // Place the text render layer in an additional container
- // - Direct sublayers of a `BaseCompositionLayer` always fill the bounds
- // of their superlayer -- so this container will be the bounds of self,
- // and the text render layer can be positioned anywhere.
- let textContainerLayer = CALayer()
- textContainerLayer.addSublayer(renderLayer)
- addSublayer(textContainerLayer)
- }
-
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/TransformLayer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/TransformLayer.swift
deleted file mode 100644
index 027739a4473334a52f0987d82ef69d69a2372608..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/Layers/TransformLayer.swift
+++ /dev/null
@@ -1,11 +0,0 @@
-// Created by Cal Stephens on 12/21/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-/// The CALayer type responsible for only rendering the `transform` of a `LayerModel`
-final class TransformLayer: BaseCompositionLayer {
-
- /// `TransformLayer`s don't render any visible content,
- /// they just `transform` their sublayers
- override var renderLayerContents: Bool { false }
-
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/ValueProviderStore.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/ValueProviderStore.swift
deleted file mode 100644
index 68a1432ca4a7808e6f8d42f63d2ca3b37ef96e52..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/CoreAnimation/ValueProviderStore.swift
+++ /dev/null
@@ -1,151 +0,0 @@
-// Created by Cal Stephens on 1/13/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-import QuartzCore
-
-// MARK: - ValueProviderStore
-
-/// Registration and storage for `AnyValueProvider`s that can dynamically
-/// provide custom values for `AnimationKeypath`s within a `LottieAnimation`.
-final class ValueProviderStore {
-
- // MARK: Lifecycle
-
- init(logger: LottieLogger) {
- self.logger = logger
- }
-
- // MARK: Internal
-
- /// Registers an `AnyValueProvider` for the given `AnimationKeypath`
- func setValueProvider(_ valueProvider: AnyValueProvider, keypath: AnimationKeypath) {
- logger.assert(
- valueProvider.typeErasedStorage.isSupportedByCoreAnimationRenderingEngine,
- """
- The Core Animation rendering engine doesn't support Value Providers that vend a closure,
- because that would require calling the closure on the main thread once per frame.
- """)
-
- let supportedProperties = PropertyName.allCases.map { $0.rawValue }
- let propertyBeingCustomized = keypath.keys.last ?? ""
-
- logger.assert(
- supportedProperties.contains(propertyBeingCustomized),
- """
- The Core Animation rendering engine currently doesn't support customizing "\(propertyBeingCustomized)" \
- properties. Supported properties are: \(supportedProperties.joined(separator: ", ")).
- """)
-
- valueProviders.removeAll(where: { $0.keypath == keypath })
- valueProviders.append((keypath: keypath, valueProvider: valueProvider))
- }
-
- // Retrieves the custom value keyframes for the given property,
- // if an `AnyValueProvider` was registered for the given keypath.
- func customKeyframes(
- of customizableProperty: CustomizableProperty,
- for keypath: AnimationKeypath,
- context: LayerAnimationContext)
- throws -> KeyframeGroup?
- {
- context.recordHierarchyKeypath?(keypath.fullPath)
-
- guard let anyValueProvider = valueProvider(for: keypath) else {
- return nil
- }
-
- // Retrieve the type-erased keyframes from the custom `ValueProvider`
- let typeErasedKeyframes: [Keyframe]
- switch anyValueProvider.typeErasedStorage {
- case .singleValue(let typeErasedValue):
- typeErasedKeyframes = [Keyframe(typeErasedValue)]
-
- case .keyframes(let keyframes, _):
- typeErasedKeyframes = keyframes
-
- case .closure:
- try context.logCompatibilityIssue("""
- The Core Animation rendering engine doesn't support Value Providers that vend a closure,
- because that would require calling the closure on the main thread once per frame.
- """)
- return nil
- }
-
- // Convert the type-erased keyframe values using this `CustomizableProperty`'s conversion closure
- let typedKeyframes = typeErasedKeyframes.compactMap { typeErasedKeyframe -> Keyframe? in
- guard let convertedValue = customizableProperty.conversion(typeErasedKeyframe.value, anyValueProvider) else {
- logger.assertionFailure("""
- Could not convert value of type \(type(of: typeErasedKeyframe.value)) from \(anyValueProvider) to expected type \(
- Value
- .self)
- """)
- return nil
- }
-
- return typeErasedKeyframe.withValue(convertedValue)
- }
-
- // Verify that all of the keyframes were successfully converted to the expected type
- guard typedKeyframes.count == typeErasedKeyframes.count else {
- return nil
- }
-
- return KeyframeGroup(keyframes: ContiguousArray(typedKeyframes))
- }
-
- // MARK: Private
-
- private let logger: LottieLogger
- private var valueProviders = [(keypath: AnimationKeypath, valueProvider: AnyValueProvider)]()
-
- /// Retrieves the most-recently-registered Value Provider that matches the given keypath.
- private func valueProvider(for keypath: AnimationKeypath) -> AnyValueProvider? {
- // Find the last keypath matching the given keypath,
- // so we return the value provider that was registered most-recently
- valueProviders.last(where: { registeredKeypath, _ in
- keypath.matches(registeredKeypath)
- })?.valueProvider
- }
-
-}
-
-extension AnyValueProviderStorage {
- /// Whether or not this type of value provider is supported
- /// by the new Core Animation rendering engine
- var isSupportedByCoreAnimationRenderingEngine: Bool {
- switch self {
- case .singleValue, .keyframes:
- return true
- case .closure:
- return false
- }
- }
-}
-
-extension AnimationKeypath {
- /// Whether or not this keypath from the animation hierarchy
- /// matches the given keypath (which may contain wildcards)
- func matches(_ keypath: AnimationKeypath) -> Bool {
- var regex = "^" // match the start of the string
- + keypath.keys.joined(separator: "\\.") // match this keypath, escaping "." characters
- + "$" // match the end of the string
-
- // Replace the ** and * wildcards with markers that are guaranteed to be unique
- // and won't conflict with regex syntax (e.g. `.*`).
- let doubleWildcardMarker = UUID().uuidString
- let singleWildcardMarker = UUID().uuidString
- regex = regex.replacingOccurrences(of: "**", with: doubleWildcardMarker)
- regex = regex.replacingOccurrences(of: "*", with: singleWildcardMarker)
-
- // "**" wildcards match zero or more path segments separated by "\\."
- // - "**.Color" matches any of "Color", "Layer 1.Color", and "Layer 1.Layer 2.Color"
- regex = regex.replacingOccurrences(of: "\(doubleWildcardMarker)\\.", with: ".*")
- regex = regex.replacingOccurrences(of: doubleWildcardMarker, with: ".*")
-
- // "*" wildcards match exactly one path component
- // - "*.Color" matches "Layer 1.Color" but not "Layer 1.Layer 2.Color"
- regex = regex.replacingOccurrences(of: singleWildcardMarker, with: "[^.]+")
-
- return fullPath.range(of: regex, options: .regularExpression) != nil
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/Collection+Diff.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/Collection+Diff.swift
deleted file mode 100644
index 572e2a2812eba9f6046061ccc47a50b1e86fb526..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/Collection+Diff.swift
+++ /dev/null
@@ -1,263 +0,0 @@
-// Created by Laura Skelton on 11/25/16.
-// Copyright © 2016 Airbnb. All rights reserved.
-
-// MARK: - Collection
-
-extension Collection where Element: Diffable, Index == Int {
-
- /// Diffs two collections (e.g. `Array`s) of `Diffable` items, returning an `IndexChangeset`
- /// representing the minimal set of changes to get from the other collection to this collection.
- ///
- /// - Parameters:
- /// - from other: The collection of old data.
- func makeChangeset(from other: Self) -> IndexChangeset {
- // Arranging the elements contiguously prior to diffing improves performance by ~40%.
- let new = ContiguousArray(self)
- let old = ContiguousArray(other)
-
- /// The entries in both this and the other collection, keyed by their `dataID`s.
- var entries = [AnyHashable: EpoxyEntry](minimumCapacity: new.count)
- var duplicates = [EpoxyEntry]()
-
- var newResults = ContiguousArray()
- newResults.reserveCapacity(new.count)
-
- for index in new.indices {
- let id = new[index].diffIdentifier
- let entry = entries[id, default: EpoxyEntry()]
- if entry.trackNewIndex(index) {
- duplicates.append(entry)
- }
- entries[id] = entry
- newResults.append(NewRecord(entry: entry))
- }
-
- var oldResults = ContiguousArray()
- oldResults.reserveCapacity(old.count)
-
- for index in old.indices {
- let id = old[index].diffIdentifier
- let entry = entries[id]
- entry?.pushOldIndex(index)
- oldResults.append(OldRecord(entry: entry))
- }
-
- for newIndex in new.indices {
- let entry = newResults[newIndex].entry
- if let oldIndex = entry.popOldIndex() {
- let newItem = new[newIndex]
- let oldItem = other[oldIndex]
-
- if !oldItem.isDiffableItemEqual(to: newItem) {
- entry.isUpdated = true
- }
-
- newResults[newIndex].correspondingOldIndex = oldIndex
- oldResults[oldIndex].correspondingNewIndex = newIndex
- }
- }
-
- var deletes = [Int]()
- var deleteOffsets = [Int]()
- deleteOffsets.reserveCapacity(old.count)
- var runningDeleteOffset = 0
-
- for index in old.indices {
- deleteOffsets.append(runningDeleteOffset)
-
- let record = oldResults[index]
-
- if record.correspondingNewIndex == nil {
- deletes.append(index)
- runningDeleteOffset += 1
- }
- }
-
- var inserts = [Int]()
- var updates = [(Int, Int)]()
- var moves = [(Int, Int)]()
- var insertOffsets = [Int]()
- insertOffsets.reserveCapacity(new.count)
- var runningInsertOffset = 0
-
- for index in new.indices {
- insertOffsets.append(runningInsertOffset)
-
- let record = newResults[index]
-
- if let oldArrayIndex = record.correspondingOldIndex {
- if record.entry.isUpdated {
- updates.append((oldArrayIndex, index))
- }
-
- let insertOffset = insertOffsets[index]
- let deleteOffset = deleteOffsets[oldArrayIndex]
- if (oldArrayIndex - deleteOffset + insertOffset) != index {
- moves.append((oldArrayIndex, index))
- }
-
- } else {
- inserts.append(index)
- runningInsertOffset += 1
- }
- }
-
- EpoxyLogger.shared.assert(
- old.count + inserts.count - deletes.count == new.count,
- "Failed sanity check for old count with changes matching new count.")
-
- return IndexChangeset(
- inserts: inserts,
- deletes: deletes,
- updates: updates,
- moves: moves,
- newIndices: oldResults.map { $0.correspondingNewIndex },
- duplicates: duplicates.map { $0.newIndices })
- }
-
- /// Diffs between two collections (eg. `Array`s) of `Diffable` items, and returns an `IndexPathChangeset`
- /// representing the minimal set of changes to get from the other collection to this collection.
- ///
- /// - Parameters:
- /// - from other: The collection of old data.
- /// - fromSection: The section the other collection's data exists within. Defaults to `0`.
- /// - toSection: The section this collection's data exists within. Defaults to `0`.
- func makeIndexPathChangeset(
- from other: Self,
- fromSection: Int = 0,
- toSection: Int = 0)
- -> IndexPathChangeset
- {
- let indexChangeset = makeChangeset(from: other)
-
- return IndexPathChangeset(
- inserts: indexChangeset.inserts.map { index in
- [toSection, index]
- },
- deletes: indexChangeset.deletes.map { index in
- [fromSection, index]
- },
- updates: indexChangeset.updates.map { fromIndex, toIndex in
- ([fromSection, fromIndex], [toSection, toIndex])
- },
- moves: indexChangeset.moves.map { fromIndex, toIndex in
- ([fromSection, fromIndex], [toSection, toIndex])
- },
- duplicates: indexChangeset.duplicates.map { duplicate in
- duplicate.map { index in
- [toSection, index]
- }
- })
- }
-
- /// Diffs between two collections (e.g. `Array`s) of `Diffable` items, returning an
- /// `IndexSetChangeset` representing the minimal set of changes to get from the other collection
- /// to this collection.
- ///
- /// - Parameters:
- /// - from other: The collection of old data.
- func makeIndexSetChangeset(from other: Self) -> IndexSetChangeset {
- let indexChangeset = makeChangeset(from: other)
-
- return IndexSetChangeset(
- inserts: .init(indexChangeset.inserts),
- deletes: .init(indexChangeset.deletes),
- updates: indexChangeset.updates,
- moves: indexChangeset.moves,
- newIndices: indexChangeset.newIndices,
- duplicates: indexChangeset.duplicates.map { .init($0) })
- }
-
-}
-
-extension Collection where Element: DiffableSection, Index == Int {
- /// Diffs between two collections (e.g. `Array`s) of `DiffableSection` items, returning an
- /// `SectionedChangeset` representing the minimal set of changes to get from the other collection
- /// to this collection.
- ///
- /// - Parameters:
- /// - from other: The collection of old data.
- func makeSectionedChangeset(from other: Self) -> SectionedChangeset {
- let sectionChangeset = makeIndexSetChangeset(from: other)
- var itemChangeset = IndexPathChangeset()
-
- for fromSectionIndex in other.indices {
- guard let toSectionIndex = sectionChangeset.newIndices[fromSectionIndex] else {
- continue
- }
-
- let fromItems = other[fromSectionIndex].diffableItems
- let toItems = self[toSectionIndex].diffableItems
-
- let itemIndexChangeset = toItems.makeIndexPathChangeset(
- from: fromItems,
- fromSection: fromSectionIndex,
- toSection: toSectionIndex)
-
- itemChangeset += itemIndexChangeset
- }
-
- return SectionedChangeset(sectionChangeset: sectionChangeset, itemChangeset: itemChangeset)
- }
-}
-
-// MARK: - EpoxyEntry
-
-/// A bookkeeping refrence type for the diffing algorithm.
-private final class EpoxyEntry {
-
- // MARK: Internal
-
- private(set) var oldIndices = [Int]()
- private(set) var newIndices = [Int]()
- var isUpdated = false
-
- /// Tracks an index from the new indices, returning `true` if this entry has previously tracked
- /// a new index as a means to identify duplicates and `false` otherwise.
- func trackNewIndex(_ index: Int) -> Bool {
- let previouslyEmpty = newIndices.isEmpty
-
- newIndices.append(index)
-
- // We've encountered a duplicate, return true so we can track it.
- if !previouslyEmpty, newIndices.count == 2 {
- return true
- }
-
- return false
- }
-
- func pushOldIndex(_ index: Int) {
- oldIndices.append(index)
- }
-
- func popOldIndex() -> Int? {
- guard currentOldIndex < oldIndices.endIndex else {
- return nil
- }
- defer {
- currentOldIndex += 1
- }
- return oldIndices[currentOldIndex]
- }
-
- // MARK: Private
-
- private var currentOldIndex = 0
-}
-
-// MARK: - OldRecord
-
-/// A bookkeeping type for pairing up an old element with its new index.
-private struct OldRecord {
- var entry: EpoxyEntry?
- var correspondingNewIndex: Int? = nil
-}
-
-// MARK: - NewRecord
-
-/// A bookkeeping type for pairing up a new element with its old index.
-private struct NewRecord {
- var entry: EpoxyEntry
- var correspondingOldIndex: Int? = nil
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/Diffable.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/Diffable.swift
deleted file mode 100644
index 4cb0b2d2cdf8e018c73b8d9353b1b820ef0cdc38..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/Diffable.swift
+++ /dev/null
@@ -1,18 +0,0 @@
-// Created by Laura Skelton on 5/11/17.
-// Copyright © 2017 Airbnb. All rights reserved.
-
-// MARK: - Diffable
-
-/// A protocol that allows us to check identity and equality between items for the purposes of
-/// diffing.
-protocol Diffable {
-
- /// Checks for equality between items when diffing.
- ///
- /// - Parameters:
- /// - otherDiffableItem: The other item to check equality against while diffing.
- func isDiffableItemEqual(to otherDiffableItem: Diffable) -> Bool
-
- /// The identifier to use when checking identity while diffing.
- var diffIdentifier: AnyHashable { get }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/DiffableSection.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/DiffableSection.swift
deleted file mode 100644
index acbf93a639a51c34e9f34bdfbdef10786008a2a6..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/DiffableSection.swift
+++ /dev/null
@@ -1,16 +0,0 @@
-// Created by eric_horacek on 12/9/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - DiffableSection
-
-/// A protocol that allows us to check identity and equality between sections of `Diffable` items
-/// for the purposes of diffing.
-protocol DiffableSection: Diffable {
- /// The diffable items in this section.
- associatedtype DiffableItems: Collection where
- DiffableItems.Index == Int,
- DiffableItems.Element: Diffable
-
- /// The diffable items in this section.
- var diffableItems: DiffableItems { get }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/IndexChangeset.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/IndexChangeset.swift
deleted file mode 100644
index 2cb8653db8826477b900ab9eee671a02b1cf8740..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/IndexChangeset.swift
+++ /dev/null
@@ -1,187 +0,0 @@
-// Created by Laura Skelton on 11/25/16.
-// Copyright © 2016 Airbnb. All rights reserved.
-
-import Foundation
-
-// MARK: - IndexChangeset
-
-/// A set of inserts, deletes, updates, and moves that define the changes between two collections.
-struct IndexChangeset {
-
- // MARK: Lifecycle
-
- init(
- inserts: [Int] = [],
- deletes: [Int] = [],
- updates: [(old: Int, new: Int)] = [],
- moves: [(old: Int, new: Int)] = [],
- newIndices: [Int?] = [],
- duplicates: [[Int]] = [])
- {
- self.inserts = inserts
- self.deletes = deletes
- self.updates = updates
- self.moves = moves
- self.newIndices = newIndices
- self.duplicates = duplicates
- }
-
- // MARK: Internal
-
- /// The inserted indices needed to get from the old collection to the new collection.
- var inserts: [Int]
-
- /// The deleted indices needed to get from the old collection to the new collection.
- var deletes: [Int]
-
- /// The updated indices needed to get from the old collection to the new collection.
- var updates: [(old: Int, new: Int)]
-
- /// The moved indices needed to get from the old collection to the new collection.
- var moves: [(old: Int, new: Int)]
-
- /// A record for each old collection item to its index (if any) is in the new collection.
- ///
- /// The indexes of this `Array` represent the indexes old collection, with elements of the
- /// corresponding index of the same item in the new collection it exists, else `nil`.
- var newIndices: [Int?]
-
- /// A record of each element in the new collection that has an identical `diffIdentifier` with
- /// another element in the same collection.
- ///
- /// Each element in the outer `Array` corresponds to a duplicated identifier, with each inner
- /// `[Int]` containing the indexes that share a duplicate identifier in the new collection.
- ///
- /// While the diffing algorithm makes a best effort to handle duplicates, they can lead to
- /// unexpected behavior since identity of elements cannot be established and should be avoided if
- /// possible.
- var duplicates: [[Int]]
-
- /// Whether there are any inserts, deletes, moves, or updates in this changeset.
- var isEmpty: Bool {
- inserts.isEmpty && deletes.isEmpty && updates.isEmpty && moves.isEmpty
- }
-}
-
-// MARK: - IndexPathChangeset
-
-/// A set of inserts, deletes, updates, and moves that define the changes between two collections
-/// with indexes stored as `IndexPath`s.
-struct IndexPathChangeset {
-
- // MARK: Lifecycle
-
- init(
- inserts: [IndexPath] = [],
- deletes: [IndexPath] = [],
- updates: [(old: IndexPath, new: IndexPath)] = [],
- moves: [(old: IndexPath, new: IndexPath)] = [],
- duplicates: [[IndexPath]] = [])
- {
- self.inserts = inserts
- self.deletes = deletes
- self.updates = updates
- self.moves = moves
- self.duplicates = duplicates
- }
-
- // MARK: Internal
-
- /// The inserted `IndexPath`s needed to get from the old collection to the new collection.
- var inserts: [IndexPath]
-
- /// The deleted `IndexPath`s needed to get from the old collection to the new collection.
- var deletes: [IndexPath]
-
- /// The updated `IndexPath`s needed to get from the old collection to the new collection.
- var updates: [(old: IndexPath, new: IndexPath)]
-
- /// The moved `IndexPath`s needed to get from the old collection to the new collection.
- var moves: [(old: IndexPath, new: IndexPath)]
-
- /// A record for each element in the new collection that has an identical `diffIdentifier` with
- /// another element in the same collection.
- ///
- /// Each element in the outer `Array` corresponds to a duplicated identifier, with each inner
- /// `[IndexPath]` corresponding to the indexes that share a duplicate identifier in the new
- /// collection.
- ///
- /// While the diffing algorithm makes a best effort to handle duplicates, they can lead to
- /// unexpected behavior since identity of elements cannot be established and should be avoided if
- /// possible.
- var duplicates: [[IndexPath]]
-
- /// Whether there are any inserts, deletes, moves, or updates in this changeset.
- var isEmpty: Bool {
- inserts.isEmpty && deletes.isEmpty && updates.isEmpty && moves.isEmpty
- }
-
- static func += (left: inout IndexPathChangeset, right: IndexPathChangeset) {
- left.inserts += right.inserts
- left.deletes += right.deletes
- left.updates += right.updates
- left.moves += right.moves
- left.duplicates += right.duplicates
- }
-}
-
-// MARK: - IndexSetChangeset
-
-/// A set of inserts, deletes, updates, and moves that define the changes between two collections
-/// with indexes stored as `IndexSet`.
-struct IndexSetChangeset {
-
- // MARK: Lifecycle
-
- init(
- inserts: IndexSet = [],
- deletes: IndexSet = [],
- updates: [(old: Int, new: Int)] = [],
- moves: [(old: Int, new: Int)] = [],
- newIndices: [Int?] = [],
- duplicates: [IndexSet] = [])
- {
- self.inserts = inserts
- self.deletes = deletes
- self.updates = updates
- self.moves = moves
- self.newIndices = newIndices
- self.duplicates = duplicates
- }
-
- // MARK: Internal
-
- /// An `IndexSet` of inserts needed to get from the old collection to the new collection.
- var inserts: IndexSet
-
- /// An `IndexSet` of deletes needed to get from the old collection to the new collection.
- var deletes: IndexSet
-
- /// The updated indices needed to get from the old collection to the new collection.
- var updates: [(old: Int, new: Int)]
-
- /// The moved indices needed to get from the old collection to the new collection.
- var moves: [(old: Int, new: Int)]
-
- /// A record for each old collection item of what its index (if any) is in the new collection.
- ///
- /// The indexes of this `Array` represent the indexes old collection, with elements of the
- /// corresponding index of the same item in the new collection it exists, else `nil`.
- var newIndices: [Int?]
-
- /// A record for each element in the new collection that has an identical `diffIdentifier` with
- /// another element in the same collection.
- ///
- /// Each element in the `Array` corresponds to a duplicated identifier, with each `IndexSet`
- /// containing the indexes that share a duplicate identifier in the new collection.
- ///
- /// While the diffing algorithm makes a best effort to handle duplicates, they can lead to
- /// unexpected behavior since identity of elements cannot be established and should be avoided if
- /// possible.
- var duplicates: [IndexSet]
-
- /// Whether there are any inserts, deletes, moves, or updates in this changeset.
- var isEmpty: Bool {
- inserts.isEmpty && deletes.isEmpty && updates.isEmpty && moves.isEmpty
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/SectionedChangeset.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/SectionedChangeset.swift
deleted file mode 100644
index f18fae5737fbdfd3762ec63a9d81c7d5e3d436ef..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Diffing/SectionedChangeset.swift
+++ /dev/null
@@ -1,32 +0,0 @@
-// Created by Laura Skelton on 5/11/17.
-// Copyright © 2017 Airbnb. All rights reserved.
-
-/// A set of the minimum changes to get from one array of `DiffableSection`s to another, used for
-/// diffing.
-struct SectionedChangeset {
-
- // MARK: Lifecycle
-
- init(
- sectionChangeset: IndexSetChangeset,
- itemChangeset: IndexPathChangeset)
- {
- self.sectionChangeset = sectionChangeset
- self.itemChangeset = itemChangeset
- }
-
- // MARK: Internal
-
- /// A set of the minimum changes to get from one set of sections to another.
- var sectionChangeset: IndexSetChangeset
-
- /// A set of the minimum changes to get from one set of items to another, aggregated across all
- /// sections.
- var itemChangeset: IndexPathChangeset
-
- /// Whether there are any inserts, deletes, moves, or updates in this changeset.
- var isEmpty: Bool {
- sectionChangeset.isEmpty && itemChangeset.isEmpty
- }
-
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Logging/EpoxyLogger.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Logging/EpoxyLogger.swift
deleted file mode 100644
index 405c4d7f68baaf961a6367149b23c9eb885cbe16..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Logging/EpoxyLogger.swift
+++ /dev/null
@@ -1,99 +0,0 @@
-// Created by eric_horacek on 12/9/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-/// A shared logger that allows consumers to intercept Epoxy assertions and warning messages to pipe
-/// into their own logging systems.
-final class EpoxyLogger {
-
- // MARK: Lifecycle
-
- init(
- assert: @escaping Assert = { condition, message, file, line in
- // If we default to `Swift.assert` directly with `assert: Assert = Swift.assert`,
- // the call will unexpectedly not respect the -O flag and will crash in release
- // https://github.com/apple/swift/issues/60249
- Swift.assert(condition(), message(), file: file, line: line)
- },
- assertionFailure: @escaping AssertionFailure = { message, file, line in
- // If we default to `Swift.assertionFailure` directly with
- // `assertionFailure: AssertionFailure = Swift.assertionFailure`,
- // the call will unexpectedly not respect the -O flag and will crash in release
- // https://github.com/apple/swift/issues/60249
- Swift.assertionFailure(message(), file: file, line: line)
- },
- warn: @escaping Warn = { message, _, _ in
- #if DEBUG
- // swiftlint:disable:next no_direct_standard_out_logs
- print(message())
- #endif
- })
- {
- _assert = assert
- _assertionFailure = assertionFailure
- _warn = warn
- }
-
- // MARK: Internal
-
- /// Logs that an assertion occurred.
- typealias Assert = (
- _ condition: @autoclosure () -> Bool,
- _ message: @autoclosure () -> String,
- _ fileID: StaticString,
- _ line: UInt)
- -> Void
-
- /// Logs that an assertion failure occurred.
- typealias AssertionFailure = (
- _ message: @autoclosure () -> String,
- _ fileID: StaticString,
- _ line: UInt)
- -> Void
-
- /// Logs a warning message.
- typealias Warn = (
- _ message: @autoclosure () -> String,
- _ fileID: StaticString,
- _ line: UInt)
- -> Void
-
- /// The shared instance used to log Epoxy assertions and warnings.
- ///
- /// Set this to a new logger instance to intercept assertions and warnings logged by Epoxy.
- static var shared = EpoxyLogger()
-
- /// Logs that an assertion occurred.
- func assert(
- _ condition: @autoclosure () -> Bool,
- _ message: @autoclosure () -> String = String(),
- fileID: StaticString = #fileID,
- line: UInt = #line)
- {
- _assert(condition(), message(), fileID, line)
- }
-
- /// Logs that an assertion failure occurred.
- func assertionFailure(
- _ message: @autoclosure () -> String = String(),
- fileID: StaticString = #fileID,
- line: UInt = #line)
- {
- _assertionFailure(message(), fileID, line)
- }
-
- /// Logs a warning message.
- func warn(
- _ message: @autoclosure () -> String = String(),
- fileID: StaticString = #fileID,
- line: UInt = #line)
- {
- _warn(message(), fileID, line)
- }
-
- // MARK: Private
-
- private let _assert: Assert
- private let _assertionFailure: AssertionFailure
- private let _warn: Warn
-
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/CallbackContextEpoxyModeled.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/CallbackContextEpoxyModeled.swift
deleted file mode 100644
index 7a6ecbc07043bcd698b692450b65d128c2519a4c..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/CallbackContextEpoxyModeled.swift
+++ /dev/null
@@ -1,8 +0,0 @@
-// Created by eric_horacek on 12/15/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-/// An Epoxy model with an associated context type that's passed into callback closures.
-protocol CallbackContextEpoxyModeled: EpoxyModeled {
- /// A context type that's passed into callback closures.
- associatedtype CallbackContext
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelArrayBuilder.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelArrayBuilder.swift
deleted file mode 100644
index a846ba27eb1e41adc4fadb2cd91d120b9682be84..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelArrayBuilder.swift
+++ /dev/null
@@ -1,48 +0,0 @@
-// Created by eric_horacek on 3/15/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-/// A generic result builder that enables a DSL for building arrays of Epoxy models.
-@resultBuilder
-enum EpoxyModelArrayBuilder {
- typealias Expression = Model
- typealias Component = [Model]
-
- static func buildExpression(_ expression: Expression) -> Component {
- [expression]
- }
-
- static func buildExpression(_ expression: Component) -> Component {
- expression
- }
-
- static func buildExpression(_ expression: Expression?) -> Component {
- if let expression {
- return [expression]
- }
- return []
- }
-
- static func buildBlock(_ children: Component...) -> Component {
- children.flatMap { $0 }
- }
-
- static func buildBlock(_ component: Component) -> Component {
- component
- }
-
- static func buildOptional(_ children: Component?) -> Component {
- children ?? []
- }
-
- static func buildEither(first child: Component) -> Component {
- child
- }
-
- static func buildEither(second child: Component) -> Component {
- child
- }
-
- static func buildArray(_ components: [Component]) -> Component {
- components.flatMap { $0 }
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelProperty.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelProperty.swift
deleted file mode 100644
index a7905cb58858c446ee94d697867b5c59810632e1..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelProperty.swift
+++ /dev/null
@@ -1,158 +0,0 @@
-// Created by eric_horacek on 11/18/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - EpoxyModelProperty
-
-/// A property that can be stored in any concrete `EpoxyModeled` type.
-///
-/// Custom model properties can be declared in any module. It's recommended that properties are
-/// declared as `var`s in extensions to `EpoxyModeled` with a `*Property` suffix.
-///
-/// For example, to declare a `EpoxyModelProperty` that fulfills the `TitleProviding` protocol:
-///
-/// ````
-/// internal protocol TitleProviding {
-/// var title: String? { get }
-/// }
-///
-/// extension EpoxyModeled where Self: TitleProviding {
-/// internal var title: String? {
-/// get { self[titleProperty] }
-/// set { self[titleProperty] = newValue }
-/// }
-///
-/// internal func title(_ value: String?) -> Self {
-/// copy(updating: titleProperty, to: value)
-/// }
-///
-/// private var titleProperty: EpoxyModelProperty {
-/// .init(keyPath: \TitleProviding.title, defaultValue: nil, updateStrategy: .replace)
-/// }
-/// }
-/// ````
-struct EpoxyModelProperty {
-
- // MARK: Lifecycle
-
- /// Creates a property identified by a `KeyPath` to its provided `value` and with its default
- /// value if not customized in content by consumers.
- ///
- /// The `updateStrategy` is used to update the value when updating from an old value to a new
- /// value.
- init(
- keyPath: KeyPath,
- defaultValue: @escaping @autoclosure () -> Value,
- updateStrategy: UpdateStrategy)
- {
- self.keyPath = keyPath
- self.defaultValue = defaultValue
- self.updateStrategy = updateStrategy
- }
-
- // MARK: Internal
-
- /// The `KeyPath` that uniquely identifies this property.
- let keyPath: AnyKeyPath
-
- /// A closure that produces the default property value when called.
- let defaultValue: () -> Value
-
- /// A closure used to update an `EpoxyModelProperty` from an old value to a new value.
- let updateStrategy: UpdateStrategy
-
-}
-
-// MARK: EpoxyModelProperty.UpdateStrategy
-
-extension EpoxyModelProperty {
- /// A closure used to update an `EpoxyModelProperty` from an old value to a new value.
- struct UpdateStrategy {
-
- // MARK: Lifecycle
-
- init(update: @escaping (Value, Value) -> Value) {
- self.update = update
- }
-
- // MARK: Public
-
- /// A closure used to update an `EpoxyModelProperty` from an old value to a new value.
- var update: (_ old: Value, _ new: Value) -> Value
- }
-}
-
-// MARK: Defaults
-
-extension EpoxyModelProperty.UpdateStrategy {
- /// Replaces the old value with the new value when an update occurs.
- static var replace: Self {
- .init { _, new in new }
- }
-
- /// Chains the new closure value onto the old closure value, returning a new closure that first
- /// calls the old closure and then subsequently calls the new closure.
- static func chain() -> EpoxyModelProperty<(() -> Void)?>.UpdateStrategy {
- .init { old, new in
- guard let new else { return old }
- guard let old else { return new }
- return {
- old()
- new()
- }
- }
- }
-
- /// Chains the new closure value onto the old closure value, returning a new closure that first
- /// calls the old closure and then subsequently calls the new closure.
- static func chain() -> EpoxyModelProperty<((A) -> Void)?>.UpdateStrategy {
- .init { old, new in
- guard let new else { return old }
- guard let old else { return new }
- return { a in
- old(a)
- new(a)
- }
- }
- }
-
- /// Chains the new closure value onto the old closure value, returning a new closure that first
- /// calls the old closure and then subsequently calls the new closure.
- static func chain() -> EpoxyModelProperty<((A, B) -> Void)?>.UpdateStrategy {
- .init { old, new in
- guard let new else { return old }
- guard let old else { return new }
- return { a, b in
- old(a, b)
- new(a, b)
- }
- }
- }
-
- /// Chains the new closure value onto the old closure value, returning a new closure that first
- /// calls the old closure and then subsequently calls the new closure.
- static func chain() -> EpoxyModelProperty<((A, B, C) -> Void)?>.UpdateStrategy {
- .init { old, new in
- guard let new else { return old }
- guard let old else { return new }
- return { a, b, c in
- old(a, b, c)
- new(a, b, c)
- }
- }
- }
-
- /// Chains the new closure value onto the old closure value, returning a new closure that first
- /// calls the old closure and then subsequently calls the new closure.
- static func chain() -> EpoxyModelProperty<((A, B, C, D) -> Void)?>.UpdateStrategy {
- .init { old, new in
- guard let new else { return old }
- guard let old else { return new }
- return { a, b, c, d in
- old(a, b, c, d)
- new(a, b, c, d)
- }
- }
- }
-
- // Add more arities as needed
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelStorage.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelStorage.swift
deleted file mode 100644
index e6377cba7dfb71c912e498846da2896024ed091f..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModelStorage.swift
+++ /dev/null
@@ -1,88 +0,0 @@
-// Created by eric_horacek on 11/18/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - EpoxyModelStorage
-
-/// The underlying storage for an `EpoxyModeled` model that is capable of storing any
-/// `EpoxyModelProperty`.
-///
-/// Supports being extended with additional storage capabilities in other modules and conditionally
-/// based on the provider capabilities that the content containing this storage conforms to.
-struct EpoxyModelStorage {
-
- // MARK: Lifecycle
-
- init() { }
-
- // MARK: Internal
-
- /// Stores or retrieves the value of the specified property.
- subscript(property: EpoxyModelProperty) -> Property {
- get {
- guard let propertyStorage = storage[property.keyPath] else {
- return property.defaultValue()
- }
-
- // This cast will never fail as the storage is only settable via this subscript and the
- // `KeyPath` key is unique for any provider and value type pair.
- // swiftlint:disable:next force_cast
- return propertyStorage.value as! Property
- }
- set {
- // We first update the value without using the `updateStrategy` since the likely scenario
- // is that there won't be a collision that requires the `updateStrategy`, and we'll be able to
- // return without incurring the cost of another write.
- let propertyStorage = PropertyStorage(value: newValue, property: property)
-
- guard var replaced = storage.updateValue(propertyStorage, forKey: property.keyPath) else {
- return
- }
-
- // This cast will never fail as the storage is only settable via this subscript and the
- // `KeyPath` key is unique for any provider and value type pair.
- // swiftlint:disable:next force_cast
- replaced.value = property.updateStrategy.update(replaced.value as! Property, newValue)
-
- storage[property.keyPath] = replaced
- }
- }
-
- /// Merges the given storage into this storage.
- ///
- /// In the case of a collision, the `UpdateStrategy` of the property is used to determine the
- /// resulting value in this storage.
- mutating func merge(_ other: Self) {
- for (key, otherValue) in other.storage {
- // We first update the value without using the `updateStrategy` since the likely scenario
- // is that there won't be a collision that requires the `updateStrategy`, and we'll be able to
- // return without incurring the cost of another write.
- guard var replaced = storage.updateValue(otherValue, forKey: key) else {
- continue
- }
-
- replaced.value = replaced.property.update(old: replaced.value, new: otherValue.value)
-
- storage[key] = replaced
- }
- }
-
- // MARK: Private
-
- /// The underlying storage for the properties, with a key of the `EpoxyModelProperty.keyPath` and
- /// a value of the property's `PropertyStorage`.
- ///
- /// Does not include default values.
- private var storage = [AnyKeyPath: PropertyStorage]()
-
-}
-
-// MARK: - PropertyStorage
-
-/// A value stored within an `EpoxyModelStorage`.
-private struct PropertyStorage {
- /// The type-erased value of the `EpoxyModelProperty`.
- var value: Any
-
- /// The property's corresponding `EpoxyModelProperty`, erased to an `AnyEpoxyModelProperty`.
- var property: AnyEpoxyModelProperty
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModeled.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModeled.swift
deleted file mode 100644
index 98e6787d5d71edb3cc3756f6f0f5d198508731a4..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/EpoxyModeled.swift
+++ /dev/null
@@ -1,54 +0,0 @@
-// Created by eric_horacek on 11/18/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - EpoxyModeled
-
-/// A protocol that all concrete Epoxy declarative UI model types conform to.
-///
-/// This protocol should be conditionally extended to fulfill provider protocols and with chainable
-/// setters for those providers that concrete model types can receive by declaring conformance to
-/// provider protocols.
-protocol EpoxyModeled {
- /// The underlying storage of this model that stores the current property values.
- var storage: EpoxyModelStorage { get set }
-}
-
-// MARK: Extensions
-
-extension EpoxyModeled {
- /// Stores or retrieves a value of the specified property in `storage`.
- ///
- /// If the value was set previously for the given `property`, the conflict is resolved using the
- /// `EpoxyModelProperty.UpdateStrategy` of the `property`.
- subscript(property: EpoxyModelProperty) -> Property {
- get { storage[property] }
- set { storage[property] = newValue }
- }
-
- /// Returns a copy of this model with the given property updated to the provided value.
- ///
- /// Typically called from within the context of a chainable setter to allow fluent setting of a
- /// property, e.g.:
- ///
- /// ````
- /// internal func title(_ value: String?) -> Self {
- /// copy(updating: titleProperty, to: value)
- /// }
- /// ````
- ///
- /// If a `value` was set previously for the given `property`, the conflict is resolved using the
- /// `EpoxyModelProperty.UpdateStrategy` of the `property`.
- func copy(updating property: EpoxyModelProperty, to value: Value) -> Self {
- var copy = self
- copy.storage[property] = value
- return copy
- }
-
- /// Returns a copy of this model produced by merging the given `other` model's storage into this
- /// model's storage.
- func merging(_ other: EpoxyModeled) -> Self {
- var copy = self
- copy.storage.merge(other.storage)
- return copy
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Internal/AnyEpoxyModelProperty.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Internal/AnyEpoxyModelProperty.swift
deleted file mode 100644
index f5fb10abd673737378328ccb419faf9a8a7e576f..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Internal/AnyEpoxyModelProperty.swift
+++ /dev/null
@@ -1,29 +0,0 @@
-// Created by eric_horacek on 12/1/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - AnyEpoxyModelProperty
-
-/// An erased `EpoxyModelProperty`, with the ability to call the `UpdateStrategy` even when the type
-/// has been erased.
-protocol AnyEpoxyModelProperty {
- /// Returns the updated property from updating from given old to new property.
- func update(old: Any, new: Any) -> Any
-}
-
-// MARK: - EpoxyModelProperty + AnyEpoxyModelProperty
-
-extension EpoxyModelProperty: AnyEpoxyModelProperty {
- func update(old: Any, new: Any) -> Any {
- guard let typedOld = old as? Value else {
- EpoxyLogger.shared.assertionFailure(
- "Expected old to be of type \(Value.self), instead found \(old). This is programmer error.")
- return defaultValue()
- }
- guard let typedNew = new as? Value else {
- EpoxyLogger.shared.assertionFailure(
- "Expected new to be of type \(Value.self), instead found \(old). This is programmer error.")
- return defaultValue()
- }
- return updateStrategy.update(typedOld, typedNew)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Internal/ClassReference.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Internal/ClassReference.swift
deleted file mode 100644
index e3edc246c3f9ace5288d3d3277527cae1364bf44..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Internal/ClassReference.swift
+++ /dev/null
@@ -1,39 +0,0 @@
-// Created by Cal Stephens on 10/15/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-// MARK: - ClassReference
-
-/// A `Hashable` value wrapper around an `AnyClass` value
-/// - Unlike `ObjectIdentifier(class)`, `ClassReference(class)`
-/// preserves the `AnyClass` value and is more human-readable.
-struct ClassReference {
- init(_ class: AnyClass) {
- self.class = `class`
- }
-
- let `class`: AnyClass
-}
-
-// MARK: Equatable
-
-extension ClassReference: Equatable {
- static func ==(_ lhs: Self, _ rhs: Self) -> Bool {
- ObjectIdentifier(lhs.class) == ObjectIdentifier(rhs.class)
- }
-}
-
-// MARK: Hashable
-
-extension ClassReference: Hashable {
- func hash(into hasher: inout Hasher) {
- hasher.combine(ObjectIdentifier(`class`))
- }
-}
-
-// MARK: CustomStringConvertible
-
-extension ClassReference: CustomStringConvertible {
- var description: String {
- String(describing: `class`)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/AnimatedProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/AnimatedProviding.swift
deleted file mode 100644
index 1862b2515b1a6eee3358777b871c5e41d5020db1..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/AnimatedProviding.swift
+++ /dev/null
@@ -1,10 +0,0 @@
-// Created by eric_horacek on 12/16/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-/// The capability of providing a flag indicating whether an operation should be animated.
-///
-/// Typically conformed to by the `CallbackContext` of a `CallbackContextEpoxyModeled`.
-protocol AnimatedProviding {
- /// Whether this operation should be animated.
- var animated: Bool { get }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DataIDProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DataIDProviding.swift
deleted file mode 100644
index bf82156db7cf210d683587bd0fc27e1625e18bfd..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DataIDProviding.swift
+++ /dev/null
@@ -1,57 +0,0 @@
-// Created by eric_horacek on 12/1/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - DataIDProviding
-
-/// The capability of providing a stable data identifier with an erased type.
-///
-/// While it has similar semantics, this type cannot inherit from `Identifiable` as this would give
-/// it an associated type, which would cause the `keyPath` used in its `EpoxyModelProperty` to not
-/// be stable across types if written as `\Self.dataID` since the `KeyPath` `Root` would be
-/// different for each type.
-///
-/// - SeeAlso: `Identifiable`.
-protocol DataIDProviding {
- /// A stable identifier that uniquely identifies this instance, with its typed erased.
- ///
- /// Defaults to `DefaultDataID.noneProvided` if no data ID is provided.
- var dataID: AnyHashable { get }
-}
-
-// MARK: - EpoxyModeled
-
-extension EpoxyModeled where Self: DataIDProviding {
-
- // MARK: Internal
-
- /// A stable identifier that uniquely identifies this model, with its typed erased.
- var dataID: AnyHashable {
- get { self[dataIDProperty] }
- set { self[dataIDProperty] = newValue }
- }
-
- /// Returns a copy of this model with the ID replaced with the provided ID.
- func dataID(_ value: AnyHashable) -> Self {
- copy(updating: dataIDProperty, to: value)
- }
-
- // MARK: Private
-
- private var dataIDProperty: EpoxyModelProperty {
- EpoxyModelProperty(
- keyPath: \DataIDProviding.dataID,
- defaultValue: DefaultDataID.noneProvided,
- updateStrategy: .replace)
- }
-}
-
-// MARK: - DefaultDataID
-
-/// The default data ID when none is provided.
-enum DefaultDataID: Hashable, CustomDebugStringConvertible {
- case noneProvided
-
- var debugDescription: String {
- "DefaultDataID.noneProvided"
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidDisplayProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidDisplayProviding.swift
deleted file mode 100644
index 5a2f2cbb57e85548dba49815df9930f0165a9f22..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidDisplayProviding.swift
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created by eric_horacek on 1/6/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-// MARK: - DidDisplayProviding
-
-/// A sentinel protocol for enabling an `CallbackContextEpoxyModeled` to provide a `didDisplay`
-/// closure property.
-///
-/// - SeeAlso: `WillDisplayProviding`
-/// - SeeAlso: `DidEndDisplayingProviding`
-protocol DidDisplayProviding { }
-
-// MARK: - CallbackContextEpoxyModeled
-
-extension CallbackContextEpoxyModeled where Self: DidDisplayProviding {
-
- // MARK: Internal
-
- /// A closure that's called after a view has been added to the view hierarchy following any
- /// appearance animations.
- typealias DidDisplay = (_ context: CallbackContext) -> Void
-
- /// A closure that's called after the view has been added to the view hierarchy following any
- /// appearance animations.
- var didDisplay: DidDisplay? {
- get { self[didDisplayProperty] }
- set { self[didDisplayProperty] = newValue }
- }
-
- /// Returns a copy of this model with the given did display closure called after the current did
- /// display closure of this model, if there is one.
- func didDisplay(_ value: DidDisplay?) -> Self {
- copy(updating: didDisplayProperty, to: value)
- }
-
- // MARK: Private
-
- private var didDisplayProperty: EpoxyModelProperty {
- .init(keyPath: \Self.didDisplay, defaultValue: nil, updateStrategy: .chain())
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidEndDisplayingProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidEndDisplayingProviding.swift
deleted file mode 100644
index db71be6dc2964f65b76f17a58681ba4f540fc868..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidEndDisplayingProviding.swift
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created by eric_horacek on 12/15/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - DidEndDisplayingProviding
-
-/// A sentinel protocol for enabling an `CallbackContextEpoxyModeled` to provide a
-/// `didEndDisplaying` closure property.
-protocol DidEndDisplayingProviding { }
-
-// MARK: - CallbackContextEpoxyModeled
-
-extension CallbackContextEpoxyModeled where Self: DidEndDisplayingProviding {
-
- // MARK: Internal
-
- /// A closure that's called when a view is no longer displayed following any disappearance
- /// animations and when it has been removed from the view hierarchy.
- typealias DidEndDisplaying = (_ context: CallbackContext) -> Void
-
- /// A closure that's called when the view is no longer displayed following any disappearance
- /// animations and when it has been removed from the view hierarchy.
- var didEndDisplaying: DidEndDisplaying? {
- get { self[didEndDisplayingProperty] }
- set { self[didEndDisplayingProperty] = newValue }
- }
-
- /// Returns a copy of this model with the given did end displaying closure called after the
- /// current did end displaying closure of this model, if there is one.
- func didEndDisplaying(_ value: DidEndDisplaying?) -> Self {
- copy(updating: didEndDisplayingProperty, to: value)
- }
-
- // MARK: Private
-
- private var didEndDisplayingProperty: EpoxyModelProperty {
- .init(
- keyPath: \Self.didEndDisplaying,
- defaultValue: nil,
- updateStrategy: .chain())
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidSelectProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidSelectProviding.swift
deleted file mode 100644
index 007e0244e338bccc960d160132ac35ca18972b11..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/DidSelectProviding.swift
+++ /dev/null
@@ -1,36 +0,0 @@
-// Created by eric_horacek on 12/2/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - DidSelectProviding
-
-/// A sentinel protocol for enabling an `CallbackContextEpoxyModeled` to provide a `didSelect`
-/// closure property.
-protocol DidSelectProviding { }
-
-// MARK: - CallbackContextEpoxyModeled
-
-extension CallbackContextEpoxyModeled where Self: DidSelectProviding {
-
- // MARK: Internal
-
- /// A closure that's called to handle this model's view being selected.
- typealias DidSelect = (CallbackContext) -> Void
-
- /// A closure that's called to handle this model's view being selected.
- var didSelect: DidSelect? {
- get { self[didSelectProperty] }
- set { self[didSelectProperty] = newValue }
- }
-
- /// Returns a copy of this model with the given did select closure called after the current did
- /// select closure of this model, if there is one.
- func didSelect(_ value: DidSelect?) -> Self {
- copy(updating: didSelectProperty, to: value)
- }
-
- // MARK: Private
-
- private var didSelectProperty: EpoxyModelProperty {
- .init(keyPath: \Self.didSelect, defaultValue: nil, updateStrategy: .chain())
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ErasedContentProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ErasedContentProviding.swift
deleted file mode 100644
index 556c3b8cbf00238681b26a65dd6ee79463a62454..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ErasedContentProviding.swift
+++ /dev/null
@@ -1,49 +0,0 @@
-// Created by eric_horacek on 12/2/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - ErasedContentProviding
-
-/// The capability of providing an type-erased `Equatable` content instance.
-protocol ErasedContentProviding {
- /// The type-erased content instance of this model, else `nil` if there is no content.
- ///
- /// If there was an `AnyEquatable` type, we could store this property using it. Instead we need
- /// need to store `isErasedContentEqual` to determine equality.
- var erasedContent: Any? { get }
-
- /// A closure that can be called to determine whether the given `model`'s `erasedContent` is equal
- /// to this model's `erasedContent`, else `nil` if there is no content or the content is always
- /// equal.
- var isErasedContentEqual: ((Self) -> Bool)? { get }
-}
-
-// MARK: - EpoxyModeled
-
-extension EpoxyModeled where Self: ErasedContentProviding {
-
- // MARK: Internal
-
- /// The type-erased content instance of this model, else `nil` if there is no content.
- var erasedContent: Any? {
- get { self[contentProperty] }
- set { self[contentProperty] = newValue }
- }
-
- /// A closure that can be called to determine whether the given `model`'s `erasedContent` is equal
- /// to this model's `erasedContent`, else `nil` if there is no content or the content is always
- /// equal.
- var isErasedContentEqual: ((Self) -> Bool)? {
- get { self[isContentEqualProperty] }
- set { self[isContentEqualProperty] = newValue }
- }
-
- // MARK: Private
-
- private var contentProperty: EpoxyModelProperty {
- .init(keyPath: \Self.erasedContent, defaultValue: nil, updateStrategy: .replace)
- }
-
- private var isContentEqualProperty: EpoxyModelProperty<((Self) -> Bool)?> {
- .init(keyPath: \Self.isErasedContentEqual, defaultValue: nil, updateStrategy: .replace)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/MakeViewProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/MakeViewProviding.swift
deleted file mode 100644
index 0b4301f4e09ef2a74cf1c353b5a1dfc891ac4f4c..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/MakeViewProviding.swift
+++ /dev/null
@@ -1,60 +0,0 @@
-// Created by eric_horacek on 12/1/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - MakeViewProviding
-
-/// The capability of constructing a `UIView`.
-protocol MakeViewProviding {
- /// The view constructed when the `MakeView` closure is called.
- associatedtype View: ViewType
-
- /// A closure that's called to construct an instance of `View`.
- typealias MakeView = () -> View
-
- /// A closure that's called to construct an instance of `View`.
- var makeView: MakeView { get }
-}
-
-// MARK: - ViewEpoxyModeled
-
-extension ViewEpoxyModeled where Self: MakeViewProviding {
-
- // MARK: Internal
-
- /// A closure that's called to construct an instance of `View` represented by this model.
- var makeView: MakeView {
- get { self[makeViewProperty] }
- set { self[makeViewProperty] = newValue }
- }
-
- /// Replaces the default closure to construct the view with the given closure.
- func makeView(_ value: @escaping MakeView) -> Self {
- copy(updating: makeViewProperty, to: value)
- }
-
- // MARK: Private
-
- private var makeViewProperty: EpoxyModelProperty {
- // If you're getting a `EXC_BAD_INSTRUCTION` crash with this property in your stack trace, you
- // probably either:
- // - Conformed a view to `EpoxyableView` / `StyledView` with a custom initializer that
- // takes parameters, or:
- // - Used the `EpoxyModeled.init(dataID:)` initializer on a view has required initializer
- // parameters.
- // If you have parameters to view initialization, they should either be passed to `init(style:)`
- // or you should provide a `makeView` closure when constructing your view's corresponding model,
- // e.g:
- // ```
- // MyView.itemModel(…)
- // .makeView { MyView(customParameter: …) }
- // .styleID(…)
- // ```
- // Note that with the above approach that you must supply an `styleID` with the same identity as
- // your view parameters to ensure that views with different parameters are not reused in place
- // of one another.
- .init(
- keyPath: \Self.makeView,
- defaultValue: View.init,
- updateStrategy: .replace)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/SetBehaviorsProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/SetBehaviorsProviding.swift
deleted file mode 100644
index a73de043de623d72a035ca2a04f7383d027485f1..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/SetBehaviorsProviding.swift
+++ /dev/null
@@ -1,38 +0,0 @@
-// Created by eric_horacek on 12/2/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - SetBehaviorsProviding
-
-/// A sentinel protocol for enabling an `CallbackContextEpoxyModeled` to provide a `setBehaviors`
-/// closure property.
-protocol SetBehaviorsProviding { }
-
-// MARK: - CallbackContextEpoxyModeled
-
-extension CallbackContextEpoxyModeled where Self: SetBehaviorsProviding {
-
- // MARK: Internal
-
- /// A closure that's called to set the content on this model's view with behaviors (e.g. tap handler
- /// closures) whenever this model is updated.
- typealias SetBehaviors = (CallbackContext) -> Void
-
- /// A closure that's called to set the content on this model's view with behaviors (e.g. tap handler
- /// closures) whenever this model is updated.
- var setBehaviors: SetBehaviors? {
- get { self[setBehaviorsProperty] }
- set { self[setBehaviorsProperty] = newValue }
- }
-
- /// Returns a copy of this model with the set behaviors closure called after the current set
- /// behaviors closure of this model, if there is one.
- func setBehaviors(_ value: SetBehaviors?) -> Self {
- copy(updating: setBehaviorsProperty, to: value)
- }
-
- // MARK: Private
-
- private var setBehaviorsProperty: EpoxyModelProperty {
- .init(keyPath: \Self.setBehaviors, defaultValue: nil, updateStrategy: .chain())
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/SetContentProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/SetContentProviding.swift
deleted file mode 100644
index e1456dceb480f6836408940025cd23fb22efa5b8..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/SetContentProviding.swift
+++ /dev/null
@@ -1,38 +0,0 @@
-// Created by eric_horacek on 12/1/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - SetContentProviding
-
-/// A sentinel protocol for enabling an `CallbackContextEpoxyModeled` to provide a `setContent`
-/// closure property.
-protocol SetContentProviding { }
-
-// MARK: - CallbackContextEpoxyModeled
-
-extension CallbackContextEpoxyModeled where Self: SetContentProviding {
-
- // MARK: Internal
-
- /// A closure that's called to set the content on this model's view when it is first created and
- /// subsequently when the content changes.
- typealias SetContent = (CallbackContext) -> Void
-
- /// A closure that's called to set the content on this model's view when it is first created and
- /// subsequently when the content changes.
- var setContent: SetContent? {
- get { self[setContentProperty] }
- set { self[setContentProperty] = newValue }
- }
-
- /// Returns a copy of this model with the given setContent view closure called after the current
- /// setContent view closure of this model, if there is one.
- func setContent(_ value: SetContent?) -> Self {
- copy(updating: setContentProperty, to: value)
- }
-
- // MARK: Private
-
- private var setContentProperty: EpoxyModelProperty {
- .init(keyPath: \Self.setContent, defaultValue: nil, updateStrategy: .chain())
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/StyleIDProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/StyleIDProviding.swift
deleted file mode 100644
index 8242de12d48bdb2bab7a77c91f1d6583d9b2bd67..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/StyleIDProviding.swift
+++ /dev/null
@@ -1,37 +0,0 @@
-// Created by eric_horacek on 12/1/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - StyleIDProviding
-
-protocol StyleIDProviding {
- /// An optional ID for a style type to use for reuse of a view.
- ///
- /// Use this to differentiate between different styling configurations.
- var styleID: AnyHashable? { get }
-}
-
-// MARK: - EpoxyModeled
-
-extension EpoxyModeled where Self: StyleIDProviding {
-
- // MARK: Internal
-
- var styleID: AnyHashable? {
- get { self[styleIDProperty] }
- set { self[styleIDProperty] = newValue }
- }
-
- /// Returns a copy of this model with the `styleID` replaced with the provided `value`.
- func styleID(_ value: AnyHashable?) -> Self {
- copy(updating: styleIDProperty, to: value)
- }
-
- // MARK: Private
-
- private var styleIDProperty: EpoxyModelProperty {
- .init(
- keyPath: \StyleIDProviding.styleID,
- defaultValue: nil,
- updateStrategy: .replace)
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/TraitCollectionProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/TraitCollectionProviding.swift
deleted file mode 100644
index e41ac7906ddd47507393ce2274de05daef9b747f..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/TraitCollectionProviding.swift
+++ /dev/null
@@ -1,14 +0,0 @@
-// Created by eric_horacek on 12/16/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-#if !os(macOS)
-import UIKit
-
-/// The capability of providing a `UITraitCollection` instance.
-///
-/// Typically conformed to by the `CallbackContext` of a `CallbackContextEpoxyModeled`.
-protocol TraitCollectionProviding {
- /// The `UITraitCollection` instance provided by this type.
- var traitCollection: UITraitCollection { get }
-}
-#endif
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewDifferentiatorProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewDifferentiatorProviding.swift
deleted file mode 100644
index 45c0130e8755da013db7ee1d0a039c25c8c5bc40..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewDifferentiatorProviding.swift
+++ /dev/null
@@ -1,34 +0,0 @@
-// Created by Bryan Keller on 12/17/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - ViewDifferentiatorProviding
-
-/// The capability of providing a view differentiator that facilitates generating collection view
-/// cell reuse identifiers.
-protocol ViewDifferentiatorProviding {
- /// The view differentiator for the item model.
- var viewDifferentiator: ViewDifferentiator { get }
-}
-
-// MARK: - ViewDifferentiator
-
-/// Facilitates differentiating between two models' views, based on their view type, optional style
-/// identifier, and optional element kind for supplementary view models. If two models have the same
-/// view differentiator, then they're compatible with one another for element reuse. If two models
-/// have different view differentiators, then they're incompatible with one another for element
-/// reuse.
-struct ViewDifferentiator: Hashable {
-
- // MARK: Lifecycle
-
- init(viewType: AnyClass, styleID: AnyHashable?) {
- viewTypeDescription = "\(type(of: viewType.self))"
- self.styleID = styleID
- }
-
- // MARK: Public
-
- var viewTypeDescription: String
- var styleID: AnyHashable?
-
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewProviding.swift
deleted file mode 100644
index b36eed8cbe7ac2d5d9ccb8bcf00eb51d2d15e267..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/ViewProviding.swift
+++ /dev/null
@@ -1,13 +0,0 @@
-// Created by eric_horacek on 12/16/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-/// The capability of providing an `View` instance
-///
-/// Typically conformed to by the `CallbackContext` of a `CallbackContextEpoxyModeled`.
-protocol ViewProviding {
- /// The `UIView` view of this type.
- associatedtype View: ViewType
-
- /// The `UIView` view instance provided by this type.
- var view: View { get }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/WillDisplayProviding.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/WillDisplayProviding.swift
deleted file mode 100644
index 9bf2163024c7e7c77da364b71422b6540eaed642..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/Providers/WillDisplayProviding.swift
+++ /dev/null
@@ -1,41 +0,0 @@
-// Created by eric_horacek on 12/15/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-// MARK: - WillDisplayProviding
-
-/// A sentinel protocol for enabling an `CallbackContextEpoxyModeled` to provide a `willDisplay`
-/// closure property.
-///
-/// - SeeAlso: `DidDisplayProviding`
-/// - SeeAlso: `DidEndDisplayingProviding`
-protocol WillDisplayProviding { }
-
-// MARK: - CallbackContextEpoxyModeled
-
-extension CallbackContextEpoxyModeled where Self: WillDisplayProviding {
-
- // MARK: Internal
-
- /// A closure that's called when a view is about to be displayed, before it has been added to the
- /// view hierarcy.
- typealias WillDisplay = (_ context: CallbackContext) -> Void
-
- /// A closure that's called when the view is about to be displayed, before it has been added to
- /// the view hierarcy.
- var willDisplay: WillDisplay? {
- get { self[willDisplayProperty] }
- set { self[willDisplayProperty] = newValue }
- }
-
- /// Returns a copy of this model with the given will display closure called after the current will
- /// display closure of this model, if there is one.
- func willDisplay(_ value: WillDisplay?) -> Self {
- copy(updating: willDisplayProperty, to: value)
- }
-
- // MARK: Private
-
- private var willDisplayProperty: EpoxyModelProperty {
- .init(keyPath: \Self.willDisplay, defaultValue: nil, updateStrategy: .chain())
- }
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/ViewEpoxyModeled.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/ViewEpoxyModeled.swift
deleted file mode 100644
index 27901b28fb70a437dfb56aae76f6113ca8d88181..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/Model/ViewEpoxyModeled.swift
+++ /dev/null
@@ -1,10 +0,0 @@
-// Created by eric_horacek on 12/4/20.
-// Copyright © 2020 Airbnb Inc. All rights reserved.
-
-/// An Epoxy model with an associated `UIView` type.
-protocol ViewEpoxyModeled: EpoxyModeled {
- /// The view type associated with this model.
- ///
- /// An instance of this view is typically configured by this model.
- associatedtype View: ViewType
-}
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/README.md b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/README.md
deleted file mode 100644
index f79da6e6760e1d2f3511d1779c57a83891527ee3..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/README.md
+++ /dev/null
@@ -1,31 +0,0 @@
-## EpoxyCore
-
-This directory includes the source code of the EpoxyCore library, from the following release:
-https://github.com/airbnb/epoxy-ios/releases/tag/0.10.0
-
-Lottie is distributed via multiple package managers (SPM, Cocoapods, Carthage, and NPM),
-each with different packaging and compilation requirements.
-
-Due to limitations of these package managers, we can't depend on / import
-a separate EpoxyCore module / library. Instead, we include the source
-directly within the Lottie library and compile everything as a single unit.
-
-### Update instructions
-
-From time to time we may need to update to a more recent version of EpoxyCore.
-When doing this, follow these steps:
-
- 1. Download the latest release from https://github.com/epoxy-ios/EpoxyCore
- and replace the source code in this directory with the updated code.
-
- 2. Update the URL at the top of this file to indicate what release is being used.
-
- 3. Change all of the `public` symbols defined in this module to instead be `internal`
- to prevent Lottie from exposing any EpoxyCore APIs.
-
- 4. Add `@available` annotations as necessary so the library compiles
- (Lottie has a lower minimum iOS version than EpoxyCore).
-
- 5. Namespace any types that conflict with other existing types.
- For example, the EpoxyCore `Entry` type conflicts with the ZipFoundation `Entry` type,
- so the EpoxyCore type has been renamed to `EpoxyEntry`.
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUIHostingController.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUIHostingController.swift
deleted file mode 100644
index 10e99a956a879cb9cd6e98a085a9e1ad134bef25..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUIHostingController.swift
+++ /dev/null
@@ -1,46 +0,0 @@
-// Created by eric_horacek on 10/8/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-#if canImport(SwiftUI) && !os(macOS)
-import SwiftUI
-
-// MARK: - EpoxySwiftUIUIHostingController
-
-/// A `UIHostingController` that hosts SwiftUI views within an Epoxy container, e.g. an Epoxy
-/// `CollectionView`.
-///
-/// Exposed internally to allow consumers to reason about these view controllers, e.g. to opt
-/// collection view cells out of automated view controller impression tracking.
-///
-/// - SeeAlso: `EpoxySwiftUIHostingView`
-@available(iOS 13.0, tvOS 13.0, *)
-open class EpoxySwiftUIHostingController: UIHostingController {
-
- // MARK: Lifecycle
-
- /// Creates a `UIHostingController` that optionally ignores the `safeAreaInsets` when laying out
- /// its contained `RootView`.
- convenience init(rootView: Content, ignoreSafeArea: Bool) {
- self.init(rootView: rootView)
-
- // We unfortunately need to call a private API to disable the safe area. We can also accomplish
- // this by dynamically subclassing this view controller's view at runtime and overriding its
- // `safeAreaInsets` property and returning `.zero`. An implementation of that logic is
- // available in this file in the `2d28b3181cca50b89618b54836f7a9b6e36ea78e` commit if this API
- // no longer functions in future SwiftUI versions.
- _disableSafeArea = ignoreSafeArea
- }
-
- // MARK: Open
-
- open override func viewDidLoad() {
- super.viewDidLoad()
-
- // A `UIHostingController` has a system background color by default as it's typically used in
- // full-screen use cases. Since we're using this view controller to place SwiftUI views within
- // other view controllers we default the background color to clear so we can see the views
- // below, e.g. to draw highlight states in a `CollectionView`.
- view.backgroundColor = .clear
- }
-}
-#endif
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUIHostingView.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUIHostingView.swift
deleted file mode 100644
index c1b8c52790136fcdfd68c86be7036d678f1c2a6d..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUIHostingView.swift
+++ /dev/null
@@ -1,389 +0,0 @@
-// Created by eric_horacek on 9/16/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-#if canImport(Combine) && canImport(SwiftUI) && !os(macOS)
-import Combine
-import SwiftUI
-
-// MARK: - SwiftUIHostingViewReuseBehavior
-
-/// The reuse behavior of an `EpoxySwiftUIHostingView`.
-enum SwiftUIHostingViewReuseBehavior: Hashable {
- /// Instances of a `EpoxySwiftUIHostingView` with `RootView`s of same type can be reused within
- /// the Epoxy container.
- ///
- /// This is the default reuse behavior.
- case reusable
- /// Instances of a `EpoxySwiftUIHostingView` with `RootView`s of same type can only reused within
- /// the Epoxy container when they have identical `reuseID`s.
- case unique(reuseID: AnyHashable)
-}
-
-// MARK: - CallbackContextEpoxyModeled
-
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-extension CallbackContextEpoxyModeled
- where
- Self: WillDisplayProviding & DidEndDisplayingProviding,
- CallbackContext: ViewProviding & AnimatedProviding
-{
- /// Updates the appearance state of a `EpoxySwiftUIHostingView` in coordination with the
- /// `willDisplay` and `didEndDisplaying` callbacks of this `EpoxyableModel`.
- ///
- /// - Note: You should only need to call then from the implementation of a concrete
- /// `EpoxyableModel` convenience vendor method, e.g. `SwiftUI.View.itemModel(…)`.
- func linkDisplayLifecycle() -> Self
- where
- CallbackContext.View == EpoxySwiftUIHostingView
- {
- willDisplay { context in
- context.view.handleWillDisplay(animated: context.animated)
- }
- .didEndDisplaying { context in
- context.view.handleDidEndDisplaying(animated: context.animated)
- }
- }
-}
-
-// MARK: - EpoxySwiftUIHostingView
-
-/// A `UIView` that hosts a SwiftUI view within an Epoxy container, e.g. an Epoxy `CollectionView`.
-///
-/// Wraps an `EpoxySwiftUIHostingController` and adds it as a child view controller to the next
-/// ancestor view controller in the hierarchy.
-///
-/// There's a private API that accomplishes this same behavior without needing a `UIViewController`:
-/// `_UIHostingView`, but we can't safely use it as 1) the behavior may change out from under us, 2)
-/// the API is private and 3) the `_UIHostingView` doesn't not accept setting a new `View` instance.
-///
-/// - SeeAlso: `EpoxySwiftUIHostingController`
-@available(iOS 13.0, tvOS 13.0, *)
-final class EpoxySwiftUIHostingView: UIView, EpoxyableView {
-
- // MARK: Lifecycle
-
- init(style: Style) {
- // Ignore the safe area to ensure the view isn't laid out incorrectly when being sized while
- // overlapping the safe area.
- epoxyContent = EpoxyHostingContent(rootView: style.initialContent.rootView)
- viewController = EpoxySwiftUIHostingController(
- rootView: .init(content: epoxyContent, environment: epoxyEnvironment),
- ignoreSafeArea: true)
-
- dataID = style.initialContent.dataID ?? DefaultDataID.noneProvided as AnyHashable
-
- super.init(frame: .zero)
-
- epoxyEnvironment.intrinsicContentSizeInvalidator = .init(invalidate: { [weak self] in
- self?.viewController.view.invalidateIntrinsicContentSize()
-
- // Inform the enclosing collection view that the size has changed, if we're contained in one,
- // allowing the cell to resize.
- //
- // On iOS 16+, we could call `invalidateIntrinsicContentSize()` on the enclosing collection
- // view cell instead, but that currently causes visual artifacts with `MagazineLayout`. The
- // better long term fix is likely to switch to `UIHostingConfiguration` on iOS 16+ anyways.
- if let enclosingCollectionView = self?.superview?.superview?.superview as? UICollectionView {
- enclosingCollectionView.collectionViewLayout.invalidateLayout()
- }
- })
- layoutMargins = .zero
- }
-
- @available(*, unavailable)
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- // MARK: Internal
-
- struct Style: Hashable {
- init(reuseBehavior: SwiftUIHostingViewReuseBehavior, initialContent: Content) {
- self.reuseBehavior = reuseBehavior
- self.initialContent = initialContent
- }
-
- var reuseBehavior: SwiftUIHostingViewReuseBehavior
- var initialContent: Content
-
- static func == (lhs: Style, rhs: Style) -> Bool {
- lhs.reuseBehavior == rhs.reuseBehavior
- }
-
- func hash(into hasher: inout Hasher) {
- hasher.combine(reuseBehavior)
- }
- }
-
- struct Content: Equatable {
- init(rootView: RootView, dataID: AnyHashable?) {
- self.rootView = rootView
- self.dataID = dataID
- }
-
- var rootView: RootView
- var dataID: AnyHashable?
-
- static func == (_: Content, _: Content) -> Bool {
- // The content should never be equal since we need the `rootView` to be updated on every
- // content change.
- false
- }
- }
-
- override func didMoveToWindow() {
- super.didMoveToWindow()
-
- // We'll only be able to discover a valid parent `viewController` once we're added to a window,
- // so we do so here in addition to the `handleWillDisplay(…)` method.
- if window != nil {
- addViewControllerIfNeeded()
- }
- }
-
- func setContent(_ content: Content, animated _: Bool) {
- // This triggers a change in the observed `EpoxyHostingContent` object and allows the
- // propagation of the SwiftUI transaction, instead of just replacing the `rootView`.
- epoxyContent.rootView = content.rootView
- dataID = content.dataID ?? DefaultDataID.noneProvided as AnyHashable
-
- // The view controller must be added to the view controller hierarchy to measure its content.
- if window != nil {
- addViewControllerIfNeeded()
- }
-
- // As of iOS 15.2, `UIHostingController` now renders updated content asynchronously, and as such
- // this view will get sized incorrectly with the previous content when reused unless we invoke
- // this semi-private API. We couldn't find any other method to get the view to resize
- // synchronously after updating `rootView`, but hopefully this will become a internal API soon so
- // we can remove this call.
- viewController._render(seconds: 0)
-
- // This is required to ensure that views with new content are properly resized.
- viewController.view.invalidateIntrinsicContentSize()
- }
-
- override func layoutMarginsDidChange() {
- super.layoutMarginsDidChange()
-
- let margins = layoutMargins
- switch effectiveUserInterfaceLayoutDirection {
- case .rightToLeft:
- epoxyEnvironment.layoutMargins = .init(
- top: margins.top,
- leading: margins.right,
- bottom: margins.bottom,
- trailing: margins.left)
- case .leftToRight:
- fallthrough
- @unknown default:
- epoxyEnvironment.layoutMargins = .init(
- top: margins.top,
- leading: margins.left,
- bottom: margins.bottom,
- trailing: margins.right)
- }
-
- // Allow the layout margins update to fully propagate through to the SwiftUI View before
- // invalidating the layout.
- DispatchQueue.main.async {
- self.viewController.view.invalidateIntrinsicContentSize()
- }
- }
-
- func handleWillDisplay(animated: Bool) {
- guard state != .appeared, window != nil else { return }
- transition(to: .appearing(animated: animated))
- transition(to: .appeared)
- }
-
- func handleDidEndDisplaying(animated: Bool) {
- guard state != .disappeared else { return }
- transition(to: .disappearing(animated: animated))
- transition(to: .disappeared)
- }
-
- // MARK: Private
-
- private let viewController: EpoxySwiftUIHostingController>
- private let epoxyContent: EpoxyHostingContent
- private let epoxyEnvironment = EpoxyHostingEnvironment()
- private var dataID: AnyHashable
- private var state: AppearanceState = .disappeared
-
- /// Updates the appearance state of the `viewController`.
- private func transition(to state: AppearanceState) {
- guard state != self.state else { return }
-
- // See "Handling View-Related Notifications" section for the state machine diagram.
- // https://developer.apple.com/documentation/uikit/uiviewcontroller
- switch (to: state, from: self.state) {
- case (to: .appearing(let animated), from: .disappeared):
- viewController.beginAppearanceTransition(true, animated: animated)
- addViewControllerIfNeeded()
- case (to: .disappearing(let animated), from: .appeared):
- viewController.beginAppearanceTransition(false, animated: animated)
- case (to: .disappeared, from: .disappearing):
- removeViewControllerIfNeeded()
- case (to: .appeared, from: .appearing):
- viewController.endAppearanceTransition()
- case (to: .disappeared, from: .appeared):
- viewController.beginAppearanceTransition(false, animated: true)
- removeViewControllerIfNeeded()
- case (to: .appeared, from: .disappearing(let animated)):
- viewController.beginAppearanceTransition(true, animated: animated)
- viewController.endAppearanceTransition()
- case (to: .disappeared, from: .appearing(let animated)):
- viewController.beginAppearanceTransition(false, animated: animated)
- removeViewControllerIfNeeded()
- case (to: .appeared, from: .disappeared):
- viewController.beginAppearanceTransition(true, animated: false)
- addViewControllerIfNeeded()
- viewController.endAppearanceTransition()
- case (to: .appearing(let animated), from: .appeared):
- viewController.beginAppearanceTransition(false, animated: animated)
- viewController.beginAppearanceTransition(true, animated: animated)
- case (to: .appearing(let animated), from: .disappearing):
- viewController.beginAppearanceTransition(true, animated: animated)
- case (to: .disappearing(let animated), from: .disappeared):
- viewController.beginAppearanceTransition(true, animated: animated)
- addViewControllerIfNeeded()
- viewController.beginAppearanceTransition(false, animated: animated)
- case (to: .disappearing(let animated), from: .appearing):
- viewController.beginAppearanceTransition(false, animated: animated)
- case (to: .appearing, from: .appearing),
- (to: .appeared, from: .appeared),
- (to: .disappearing, from: .disappearing),
- (to: .disappeared, from: .disappeared):
- // This should never happen since we guard on identical states.
- EpoxyLogger.shared.assertionFailure("Impossible state change from \(self.state) to \(state)")
- }
-
- self.state = state
- }
-
- private func addViewControllerIfNeeded() {
- // This isn't great, and means that we're going to add this view controller as a child view
- // controller of a view controller somewhere else in the hierarchy, which the author of that
- // view controller may not be expecting. However there's not really a better pathway forward
- // here without requiring a view controller instance to be passed all the way through, which is
- // both burdensome and error-prone.
- guard let nextViewController = superview?.next(UIViewController.self) else {
- EpoxyLogger.shared.assertionFailure(
- """
- Unable to add a UIHostingController view, could not locate a UIViewController in the \
- responder chain for view with ID \(dataID) of type \(RootView.self).
- """)
- return
- }
-
- guard viewController.parent !== nextViewController else { return }
-
- // If in a different parent, we need to first remove from it before we add.
- if viewController.parent != nil {
- removeViewControllerIfNeeded()
- }
-
- addViewController(to: nextViewController)
-
- state = .appeared
- }
-
- private func addViewController(to parent: UIViewController) {
- viewController.willMove(toParent: parent)
-
- parent.addChild(viewController)
-
- addSubview(viewController.view)
-
- // Get the view controller's view to be sized correctly so that we don't have to wait for
- // autolayout to perform a pass to do so.
- viewController.view.frame = bounds
-
- viewController.view.translatesAutoresizingMaskIntoConstraints = false
- NSLayoutConstraint.activate([
- viewController.view.leadingAnchor.constraint(equalTo: leadingAnchor),
- viewController.view.topAnchor.constraint(equalTo: topAnchor),
- viewController.view.trailingAnchor.constraint(equalTo: trailingAnchor),
- viewController.view.bottomAnchor.constraint(equalTo: bottomAnchor),
- ])
-
- viewController.didMove(toParent: parent)
- }
-
- private func removeViewControllerIfNeeded() {
- guard viewController.parent != nil else { return }
-
- viewController.willMove(toParent: nil)
- viewController.view.removeFromSuperview()
- viewController.removeFromParent()
- viewController.didMove(toParent: nil)
- }
-}
-
-// MARK: - AppearanceState
-
-/// The appearance state of a `EpoxySwiftUIHostingController` contained within a
-/// `EpoxySwiftUIHostingView`.
-private enum AppearanceState: Equatable {
- case appearing(animated: Bool)
- case appeared
- case disappearing(animated: Bool)
- case disappeared
-}
-
-// MARK: - UIResponder
-
-extension UIResponder {
- /// Recursively traverses the responder chain upwards from this responder to its next responder
- /// until the a responder of the given type is located, else returns `nil`.
- @nonobjc
- fileprivate func next(_ type: ResponderType.Type) -> ResponderType? {
- self as? ResponderType ?? next?.next(type)
- }
-}
-
-// MARK: - EpoxyHostingContent
-
-/// The object that is used to communicate changes in the root view to the
-/// `EpoxySwiftUIHostingController`.
-@available(iOS 13.0, tvOS 13.0, *)
-final class EpoxyHostingContent: ObservableObject {
-
- // MARK: Lifecycle
-
- init(rootView: RootView) {
- _rootView = .init(wrappedValue: rootView)
- }
-
- // MARK: Internal
-
- @Published var rootView: RootView
-}
-
-// MARK: - EpoxyHostingEnvironment
-
-/// The object that is used to communicate values to SwiftUI views within an
-/// `EpoxySwiftUIHostingController`, e.g. layout margins.
-@available(iOS 13.0, tvOS 13.0, *)
-final class EpoxyHostingEnvironment: ObservableObject {
- @Published var layoutMargins = EdgeInsets()
- @Published var intrinsicContentSizeInvalidator = EpoxyIntrinsicContentSizeInvalidator(invalidate: { })
-}
-
-// MARK: - EpoxyHostingWrapper
-
-/// The wrapper view that is used to communicate values to SwiftUI views within an
-/// `EpoxySwiftUIHostingController`, e.g. layout margins.
-@available(iOS 13.0, tvOS 13.0, *)
-struct EpoxyHostingWrapper: View {
- @ObservedObject var content: EpoxyHostingContent
- @ObservedObject var environment: EpoxyHostingEnvironment
-
- var body: some View {
- content.rootView
- .environment(\.epoxyLayoutMargins, environment.layoutMargins)
- .environment(\.epoxyIntrinsicContentSizeInvalidator, environment.intrinsicContentSizeInvalidator)
- }
-}
-#endif
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUIIntrinsicContentSizeInvalidator.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUIIntrinsicContentSizeInvalidator.swift
deleted file mode 100644
index 47ebde44b4b53a3503ad97ac63e490756469bb9b..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUIIntrinsicContentSizeInvalidator.swift
+++ /dev/null
@@ -1,46 +0,0 @@
-// Created by matthew_cheok on 11/19/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-#if canImport(SwiftUI)
-import SwiftUI
-
-// MARK: - EpoxyIntrinsicContentSizeInvalidator
-
-/// Allows the SwiftUI view contained in an Epoxy model to request the invalidation of
-/// the container's intrinsic content size.
-///
-/// ```
-/// @Environment(\.epoxyIntrinsicContentSizeInvalidator) var invalidateIntrinsicContentSize
-///
-/// var body: some View {
-/// ...
-/// .onChange(of: size) {
-/// invalidateIntrinsicContentSize()
-/// }
-/// }
-/// ```
-struct EpoxyIntrinsicContentSizeInvalidator {
- let invalidate: () -> Void
-
- func callAsFunction() {
- invalidate()
- }
-}
-
-// MARK: - EnvironmentValues
-
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-extension EnvironmentValues {
- /// A means of invalidating the intrinsic content size of the parent `EpoxySwiftUIHostingView`.
- var epoxyIntrinsicContentSizeInvalidator: EpoxyIntrinsicContentSizeInvalidator {
- get { self[EpoxyIntrinsicContentSizeInvalidatorKey.self] }
- set { self[EpoxyIntrinsicContentSizeInvalidatorKey.self] = newValue }
- }
-}
-
-// MARK: - EpoxyIntrinsicContentSizeInvalidatorKey
-
-private struct EpoxyIntrinsicContentSizeInvalidatorKey: EnvironmentKey {
- static let defaultValue = EpoxyIntrinsicContentSizeInvalidator(invalidate: { })
-}
-#endif
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUILayoutMargins.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUILayoutMargins.swift
deleted file mode 100644
index 44fc83fbacffeddadc4be994b62f83febb7203ca..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxySwiftUILayoutMargins.swift
+++ /dev/null
@@ -1,53 +0,0 @@
-// Created by eric_horacek on 10/8/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-#if canImport(SwiftUI)
-import SwiftUI
-
-// MARK: - View
-
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-extension View {
- /// Applies the layout margins from the parent `EpoxySwiftUIHostingView` to this `View`, if there
- /// are any.
- ///
- /// Can be used to have a background in SwiftUI underlap the safe area within a bar installer, for
- /// example.
- ///
- /// These margins are propagated via the `EnvironmentValues.epoxyLayoutMargins`.
- func epoxyLayoutMargins() -> some View {
- modifier(EpoxyLayoutMarginsPadding())
- }
-}
-
-// MARK: - EnvironmentValues
-
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-extension EnvironmentValues {
- /// The layout margins of the parent `EpoxySwiftUIHostingView`, else zero if there is none.
- var epoxyLayoutMargins: EdgeInsets {
- get { self[EpoxyLayoutMarginsKey.self] }
- set { self[EpoxyLayoutMarginsKey.self] = newValue }
- }
-}
-
-// MARK: - EpoxyLayoutMarginsKey
-
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-private struct EpoxyLayoutMarginsKey: EnvironmentKey {
- static let defaultValue = EdgeInsets()
-}
-
-// MARK: - EpoxyLayoutMarginsPadding
-
-/// A view modifier that applies the layout margins from an enclosing `EpoxySwiftUIHostingView` to
-/// the modified `View`.
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-private struct EpoxyLayoutMarginsPadding: ViewModifier {
- @Environment(\.epoxyLayoutMargins) var epoxyLayoutMargins
-
- func body(content: Content) -> some View {
- content.padding(epoxyLayoutMargins)
- }
-}
-#endif
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxyableView+SwiftUIView.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxyableView+SwiftUIView.swift
deleted file mode 100644
index 06febc2cc4d97c0a4bf4e8b6e464d912d2a47047..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/EpoxyableView+SwiftUIView.swift
+++ /dev/null
@@ -1,174 +0,0 @@
-// Created by eric_horacek on 9/13/21.
-// Copyright © 2021 Airbnb Inc. All rights reserved.
-
-#if canImport(SwiftUI)
-import SwiftUI
-
-// MARK: - StyledView
-
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-extension StyledView where Self: ContentConfigurableView & BehaviorsConfigurableView {
- /// Returns a SwiftUI `View` representing this `EpoxyableView`.
- ///
- /// To perform additional configuration of the `EpoxyableView` instance, call `configure` on the
- /// returned SwiftUI `View`:
- /// ```
- /// MyView.swiftUIView(…)
- /// .configure { context in
- /// context.view.doSomething()
- /// }
- /// ```
- ///
- /// To configure the sizing behavior of the `EpoxyableView` instance, call `sizing` on the
- /// returned SwiftUI `View`:
- /// ```
- /// MyView.swiftUIView(…).sizing(.intrinsicSize)
- /// ```
- static func swiftUIView(
- content: Content,
- style: Style,
- behaviors: Behaviors? = nil)
- -> SwiftUIView
- {
- SwiftUIView(storage: (content: content, style: style)) {
- let view = Self(style: style)
- view.setContent(content, animated: false)
- return view
- }
- .configure { context in
- // We need to create a new view instance when the style changes.
- if context.oldStorage.style != style {
- context.view = Self(style: style)
- context.view.setContent(content, animated: context.animated)
- }
- // Otherwise, if the just the content changes, we need to update it.
- else if context.oldStorage.content != content {
- context.view.setContent(content, animated: context.animated)
- context.container.invalidateIntrinsicContentSize()
- }
-
- context.view.setBehaviors(behaviors)
- }
- }
-}
-
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-extension StyledView
- where
- Self: ContentConfigurableView & BehaviorsConfigurableView,
- Style == Never
-{
- /// Returns a SwiftUI `View` representing this `EpoxyableView`.
- ///
- /// To perform additional configuration of the `EpoxyableView` instance, call `configure` on the
- /// returned SwiftUI `View`:
- /// ```
- /// MyView.swiftUIView(…)
- /// .configure { context in
- /// context.view.doSomething()
- /// }
- /// ```
- ///
- /// To configure the sizing behavior of the `EpoxyableView` instance, call `sizing` on the
- /// returned SwiftUI `View`:
- /// ```
- /// MyView.swiftUIView(…).sizing(.intrinsicSize)
- /// ```
- static func swiftUIView(
- content: Content,
- behaviors: Behaviors? = nil)
- -> SwiftUIView
- {
- SwiftUIView(storage: content) {
- let view = Self()
- view.setContent(content, animated: false)
- return view
- }
- .configure { context in
- // We need to update the content of the existing view when the content is updated.
- if context.oldStorage != content {
- context.view.setContent(content, animated: context.animated)
- context.container.invalidateIntrinsicContentSize()
- }
-
- context.view.setBehaviors(behaviors)
- }
- }
-}
-
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-extension StyledView
- where
- Self: ContentConfigurableView & BehaviorsConfigurableView,
- Content == Never
-{
- /// Returns a SwiftUI `View` representing this `EpoxyableView`.
- ///
- /// To perform additional configuration of the `EpoxyableView` instance, call `configure` on the
- /// returned SwiftUI `View`:
- /// ```
- /// MyView.swiftUIView(…)
- /// .configure { context in
- /// context.view.doSomething()
- /// }
- /// ```
- ///
- /// To configure the sizing behavior of the `EpoxyableView` instance, call `sizing` on the
- /// returned SwiftUI `View`:
- /// ```
- /// MyView.swiftUIView(…).sizing(.intrinsicSize)
- /// ```
- /// The sizing defaults to `.automatic`.
- static func swiftUIView(
- style: Style,
- behaviors: Behaviors? = nil)
- -> SwiftUIView
- {
- SwiftUIView(storage: style) {
- Self(style: style)
- }
- .configure { context in
- // We need to create a new view instance when the style changes.
- if context.oldStorage != style {
- context.view = Self(style: style)
- }
-
- context.view.setBehaviors(behaviors)
- }
- }
-}
-
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-extension StyledView
- where
- Self: ContentConfigurableView & BehaviorsConfigurableView,
- Content == Never,
- Style == Never
-{
- /// Returns a SwiftUI `View` representing this `EpoxyableView`.
- ///
- /// To perform additional configuration of the `EpoxyableView` instance, call `configure` on the
- /// returned SwiftUI `View`:
- /// ```
- /// MyView.swiftUIView(…)
- /// .configure { context in
- /// context.view.doSomething()
- /// }
- /// ```
- ///
- /// To configure the sizing behavior of the `EpoxyableView` instance, call `sizing` on the
- /// returned SwiftUI `View`:
- /// ```
- /// MyView.swiftUIView(…).sizing(.intrinsicSize)
- /// ```
- /// The sizing defaults to `.automatic`.
- static func swiftUIView(behaviors: Behaviors? = nil) -> SwiftUIView {
- SwiftUIView {
- Self()
- }
- .configure { context in
- context.view.setBehaviors(behaviors)
- }
- }
-}
-#endif
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/MeasuringViewRepresentable.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/MeasuringViewRepresentable.swift
deleted file mode 100644
index 065aaa71042b0ecdda7ebf1b706066e5f2dcdd46..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/MeasuringViewRepresentable.swift
+++ /dev/null
@@ -1,130 +0,0 @@
-// Created by eric_horacek on 6/22/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-#if canImport(SwiftUI)
-import SwiftUI
-
-// MARK: - MeasuringViewRepresentable
-
-/// A `UIViewRepresentable` that uses a `SwiftUIMeasurementContainer` wrapping its represented
-/// `UIView` to report its size that fits a proposed size to SwiftUI.
-///
-/// Supports iOS 13-15 using the private `_overrideSizeThatFits(…)` method and iOS 16+ using the
-/// `sizeThatFits(…)` method.
-///
-/// - SeeAlso: ``SwiftUIMeasurementContainer``
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-protocol MeasuringViewRepresentable: ViewRepresentableType
- where
- RepresentableViewType == SwiftUIMeasurementContainer
-{
- /// The `UIView` content that's being measured by the enclosing `SwiftUIMeasurementContainer`.
- associatedtype Content: ViewType
-
- /// The sizing strategy of the represented view.
- ///
- /// To configure the sizing behavior of the `View` instance, call `sizing` on this `View`, e.g.:
- /// ```
- /// myView.sizing(.intrinsicSize)
- /// ```
- var sizing: SwiftUIMeasurementContainerStrategy { get set }
-}
-
-// MARK: Extensions
-
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-extension MeasuringViewRepresentable {
- /// Returns a copy of this view with its sizing strategy updated to the given `sizing` value.
- func sizing(_ strategy: SwiftUIMeasurementContainerStrategy) -> Self {
- var copy = self
- copy.sizing = strategy
- return copy
- }
-}
-
-// MARK: Defaults
-
-#if os(iOS) || os(tvOS)
-@available(iOS 13.0, tvOS 13.0, *)
-extension MeasuringViewRepresentable {
- func _overrideSizeThatFits(
- _ size: inout CGSize,
- in proposedSize: _ProposedSize,
- uiView: UIViewType)
- {
- uiView.strategy = sizing
-
- // Note: this method is not double-called on iOS 16, so we don't need to do anything to prevent
- // extra work here.
- let children = Mirror(reflecting: proposedSize).children
-
- // Creates a `CGSize` by replacing `nil`s with `UIView.noIntrinsicMetric`
- uiView.proposedSize = .init(
- width: children.first { $0.label == "width" }?.value as? CGFloat ?? ViewType.noIntrinsicMetric,
- height: children.first { $0.label == "height" }?.value as? CGFloat ?? ViewType.noIntrinsicMetric)
-
- size = uiView.measuredFittingSize
- }
-
- #if swift(>=5.7) // Proxy check for being built with the iOS 15 SDK
- @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
- func sizeThatFits(
- _ proposal: ProposedViewSize,
- uiView: UIViewType,
- context _: Context)
- -> CGSize?
- {
- uiView.strategy = sizing
-
- // Creates a size by replacing `nil`s with `UIView.noIntrinsicMetric`
- uiView.proposedSize = .init(
- width: proposal.width ?? ViewType.noIntrinsicMetric,
- height: proposal.height ?? ViewType.noIntrinsicMetric)
-
- return uiView.measuredFittingSize
- }
- #endif
-}
-
-#elseif os(macOS)
-@available(macOS 10.15, *)
-extension MeasuringViewRepresentable {
- func _overrideSizeThatFits(
- _ size: inout CGSize,
- in proposedSize: _ProposedSize,
- nsView: NSViewType)
- {
- nsView.strategy = sizing
-
- let children = Mirror(reflecting: proposedSize).children
-
- // Creates a `CGSize` by replacing `nil`s with `UIView.noIntrinsicMetric`
- nsView.proposedSize = .init(
- width: children.first { $0.label == "width" }?.value as? CGFloat ?? ViewType.noIntrinsicMetric,
- height: children.first { $0.label == "height" }?.value as? CGFloat ?? ViewType.noIntrinsicMetric)
-
- size = nsView.measuredFittingSize
- }
-
- // Proxy check for being built with the macOS 13 SDK.
- #if swift(>=5.7.1)
- @available(macOS 13.0, *)
- func sizeThatFits(
- _ proposal: ProposedViewSize,
- nsView: NSViewType,
- context _: Context)
- -> CGSize?
- {
- nsView.strategy = sizing
-
- // Creates a size by replacing `nil`s with `UIView.noIntrinsicMetric`
- nsView.proposedSize = .init(
- width: proposal.width ?? ViewType.noIntrinsicMetric,
- height: proposal.height ?? ViewType.noIntrinsicMetric)
-
- return nsView.measuredFittingSize
- }
- #endif
-}
-#endif
-#endif
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift
deleted file mode 100644
index 5dcf7b2217f3986181d92cd37623c82c9fd9821d..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/LayoutUtilities/SwiftUIMeasurementContainer.swift
+++ /dev/null
@@ -1,454 +0,0 @@
-// Created by Bryn Bodayle on 1/24/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-#if canImport(SwiftUI)
-import SwiftUI
-
-// MARK: - SwiftUIMeasurementContainer
-
-/// A view that has an `intrinsicContentSize` of the `uiView`'s `systemLayoutSizeFitting(…)` and
-/// supports double layout pass sizing and content size category changes.
-///
-/// This container view uses an injected proposed width to measure the view and return its ideal
-/// height through the `SwiftUISizingContext` binding.
-///
-/// - SeeAlso: ``MeasuringViewRepresentable``
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-final class SwiftUIMeasurementContainer: ViewType {
-
- // MARK: Lifecycle
-
- init(content: Content, strategy: SwiftUIMeasurementContainerStrategy) {
- self.content = content
- self.strategy = strategy
-
- // On iOS 15 and below, passing zero can result in a constraint failure the first time a view
- // is displayed, but the system gracefully recovers afterwards. On iOS 16, it's fine to pass
- // zero.
- let initialSize: CGSize
- if #available(iOS 16, tvOS 16, macOS 13, *) {
- initialSize = .zero
- } else {
- initialSize = .init(width: 375, height: 150)
- }
- super.init(frame: .init(origin: .zero, size: initialSize))
-
- addSubview(content)
- setUpConstraints()
- }
-
- @available(*, unavailable)
- required init?(coder _: NSCoder) {
- fatalError("init(coder:) has not been implemented")
- }
-
- // MARK: Internal
-
- /// The most recently measured fitting size of the `uiView` that fits within the current
- /// `proposedSize`.
- ///
- /// Contains `proposedSize`/`bounds.size` fallbacks for dimensions with no intrinsic size, as
- /// compared to `intrinsicContentSize` which has `UIView.noIntrinsicMetric` fields in the case of
- /// no intrinsic size.
- var measuredFittingSize: CGSize {
- _measuredFittingSize ?? measureView()
- }
-
- /// The `UIView` content that's being measured by this container.
- var content: Content {
- didSet {
- guard content !== oldValue else { return }
- oldValue.removeFromSuperview()
- addSubview(content)
- // Invalidate the strategy since it's derived from this view.
- _resolvedStrategy = nil
- // Re-configure the constraints since they depend on the resolved strategy.
- setUpConstraints()
- // Finally, we need to re-measure the view.
- _measuredFittingSize = nil
- }
- }
-
- /// The proposed size at the time of the latest measurement.
- ///
- /// Has a side-effect of updating the `measuredIntrinsicContentSize` if it's changed.
- var proposedSize = CGSize.noIntrinsicMetric {
- didSet {
- guard oldValue != proposedSize else { return }
- // The proposed size is only used by the measurement, so just re-measure.
- _measuredFittingSize = nil
- }
- }
-
- /// The measurement strategy of this container.
- ///
- /// Has a side-effect of updating the `measuredIntrinsicContentSize` if it's changed.
- var strategy: SwiftUIMeasurementContainerStrategy {
- didSet {
- guard oldValue != strategy else { return }
- // Invalidate the resolved strategy since it's derived from this strategy.
- _resolvedStrategy = nil
- // Then, re-measure the view.
- _measuredFittingSize = nil
- }
- }
-
- override var intrinsicContentSize: CGSize {
- _intrinsicContentSize
- }
-
- #if os(macOS)
- override func layout() {
- super.layout()
-
- // We need to re-measure the view whenever the size of the bounds changes, as the previous size
- // may now be incorrect.
- if latestMeasurementBoundsSize != nil, bounds.size != latestMeasurementBoundsSize {
- // This will trigger SwiftUI to re-measure the view.
- super.invalidateIntrinsicContentSize()
- }
- }
- #else
- override func layoutSubviews() {
- super.layoutSubviews()
-
- // We need to re-measure the view whenever the size of the bounds changes, as the previous size
- // may now be incorrect.
- if latestMeasurementBoundsSize != nil, bounds.size != latestMeasurementBoundsSize {
- // This will trigger SwiftUI to re-measure the view.
- super.invalidateIntrinsicContentSize()
- }
- }
- #endif
-
- override func invalidateIntrinsicContentSize() {
- super.invalidateIntrinsicContentSize()
-
- // Invalidate the resolved strategy in case it changes with the re-measurement as it relies on
- // the intrinsic size.
- _resolvedStrategy = nil
- _measuredFittingSize = nil
- }
-
- // MARK: Private
-
- /// The most recently measured intrinsic content size of the `uiView`, else `noIntrinsicMetric` if
- /// it has not yet been measured.
- ///
- /// Contains `UIView.noIntrinsicMetric` fallbacks for dimensions with no intrinsic size,
- /// as compared to `measuredFittingSize` which has `proposedSize`/`bounds.size` fallbacks.
- private var _intrinsicContentSize = CGSize.noIntrinsicMetric
-
- /// The bounds size at the time of the latest measurement.
- private var latestMeasurementBoundsSize: CGSize?
-
- /// The most recently updated set of constraints constraining `uiView` to `self`.
- private var uiViewConstraints = [NSLayoutConstraint.Attribute: NSLayoutConstraint]()
-
- /// The cached `resolvedStrategy` to prevent unnecessary re-measurements.
- private var _resolvedStrategy: ResolvedSwiftUIMeasurementContainerStrategy?
-
- /// The cached `measuredFittingSize` to prevent unnecessary re-measurements.
- private var _measuredFittingSize: CGSize?
-
- /// The resolved measurement strategy.
- private var resolvedStrategy: ResolvedSwiftUIMeasurementContainerStrategy {
- if let resolvedStrategy = _resolvedStrategy {
- return resolvedStrategy
- }
-
- let resolved: ResolvedSwiftUIMeasurementContainerStrategy
- switch strategy {
- case .automatic:
- // Perform an intrinsic size measurement pass, which gives us valid values for
- // `UILabel.preferredMaxLayoutWidth`.
- let intrinsicSize = content.systemLayoutFittingIntrinsicSize()
-
- // If the view has a intrinsic width and contains a double layout pass subview, give it the
- // proposed width to allow the label content to gracefully wrap to multiple lines.
- if intrinsicSize.width > 0, content.containsDoubleLayoutPassSubviews() {
- resolved = .intrinsicHeightProposedWidth
- } else {
- let zero = CGFloat(0)
- switch (width: intrinsicSize.width, height: intrinsicSize.height) {
- case (width: ...zero, height: ...zero):
- resolved = .proposed
- case (width: ...zero, height: zero.nextUp...):
- resolved = .intrinsicHeightProposedWidth
- case (width: zero.nextUp..., height: ...zero):
- resolved = .intrinsicWidthProposedHeight
- default:
- resolved = .intrinsic(intrinsicSize)
- }
- }
- case .proposed:
- resolved = .proposed
- case .intrinsicHeightProposedWidth:
- resolved = .intrinsicHeightProposedWidth
- case .intrinsicWidthProposedHeight:
- resolved = .intrinsicWidthProposedHeight
- case .intrinsic:
- resolved = .intrinsic(content.systemLayoutFittingIntrinsicSize())
- }
- _resolvedStrategy = resolved
- return resolved
- }
-
- private func setUpConstraints() {
- content.translatesAutoresizingMaskIntoConstraints = false
-
- let leading = content.leadingAnchor.constraint(equalTo: leadingAnchor)
- let top = content.topAnchor.constraint(equalTo: topAnchor)
- let trailing = content.trailingAnchor.constraint(equalTo: trailingAnchor)
- let bottom = content.bottomAnchor.constraint(equalTo: bottomAnchor)
- let newConstraints: [NSLayoutConstraint.Attribute: NSLayoutConstraint] = [
- .leading: leading, .top: top, .trailing: trailing, .bottom: bottom,
- ]
- // Start with the lowest priority constraints so we aren't measuring the view too early, the
- // priorities will be updated later on.
- prioritizeConstraints(newConstraints, strategy: .intrinsic(.zero))
-
- NSLayoutConstraint.deactivate(Array(uiViewConstraints.values))
- uiViewConstraints = newConstraints
- NSLayoutConstraint.activate(Array(uiViewConstraints.values))
- }
-
- /// Prioritizes the given constraints based on the provided resolved strategy.
- private func prioritizeConstraints(
- _ constraints: [NSLayoutConstraint.Attribute: NSLayoutConstraint],
- strategy: ResolvedSwiftUIMeasurementContainerStrategy)
- {
- // Give a required constraint in the dimensions that are fixed to the bounds, otherwise almost
- // required.
- switch strategy {
- case .proposed:
- constraints[.trailing]?.priority = .required
- constraints[.bottom]?.priority = .required
- case .intrinsicHeightProposedWidth:
- constraints[.trailing]?.priority = .required
- constraints[.bottom]?.priority = .almostRequired
- case .intrinsicWidthProposedHeight:
- constraints[.trailing]?.priority = .almostRequired
- constraints[.bottom]?.priority = .required
- case .intrinsic:
- constraints[.trailing]?.priority = .almostRequired
- constraints[.bottom]?.priority = .almostRequired
- }
-
- #if os(macOS)
- // On macOS, views default to having required constraints setting their height / width
- // equal to their intrinsic content size. These have to be disabled in favor of the constraints
- // we create here.
- content.isVerticalContentSizeConstraintActive = false
- content.isHorizontalContentSizeConstraintActive = false
- #endif
- }
-
- /// Measures the `uiView`, storing the resulting size in `measuredIntrinsicContentSize`.
- private func measureView() -> CGSize {
- latestMeasurementBoundsSize = bounds.size
- prioritizeConstraints(uiViewConstraints, strategy: resolvedStrategy)
-
- var measuredSize: CGSize
- let proposedSizeElseBounds = proposedSize.replacingNoIntrinsicMetric(with: bounds.size)
-
- switch resolvedStrategy {
- case .proposed:
- measuredSize = .noIntrinsicMetric
-
- case .intrinsicHeightProposedWidth:
- measuredSize = content.systemLayoutFittingIntrinsicHeightFixedWidth(proposedSizeElseBounds.width)
- measuredSize.width = ViewType.noIntrinsicMetric
-
- case .intrinsicWidthProposedHeight:
- measuredSize = content.systemLayoutFittingIntrinsicWidthFixedHeight(proposedSizeElseBounds.height)
- measuredSize.height = ViewType.noIntrinsicMetric
-
- case .intrinsic(let size):
- measuredSize = size
-
- // If the measured size exceeds an available width or height, set the measured size to
- // `noIntrinsicMetric` to ensure that the component can be compressed, otherwise it will
- // overflow beyond the proposed size.
- // - If the previous intrinsic content size is the same as the new proposed size, we don't
- // do this as SwiftUI sometimes "proposes" the same intrinsic size back to the component and
- // we don't want that scenario to prevent size changes when there is actually more space
- // available.
- if
- proposedSize.width != ViewType.noIntrinsicMetric,
- measuredSize.width > proposedSizeElseBounds.width,
- _intrinsicContentSize.width != proposedSize.width
- {
- measuredSize.width = ViewType.noIntrinsicMetric
- }
- if
- proposedSize.height != ViewType.noIntrinsicMetric,
- measuredSize.height > proposedSizeElseBounds.height,
- _intrinsicContentSize.height != proposedSize.height
- {
- measuredSize.height = ViewType.noIntrinsicMetric
- }
- }
-
- _intrinsicContentSize = measuredSize
-
- let measuredFittingSize = measuredSize.replacingNoIntrinsicMetric(with: proposedSizeElseBounds)
- _measuredFittingSize = measuredFittingSize
- return measuredFittingSize
- }
-}
-
-// MARK: - SwiftUIMeasurementContainerStrategy
-
-/// The measurement strategy of a `SwiftUIMeasurementContainer`.
-enum SwiftUIMeasurementContainerStrategy {
- /// The container makes a best effort to correctly choose the measurement strategy of the view.
- ///
- /// The best effort is based on a number of heuristics:
- /// - The `uiView` will be given its intrinsic width and/or height when measurement in that
- /// dimension produces a positive value, while zero/negative values will result in that
- /// dimension receiving the available space proposed by the parent.
- /// - If the view contains `UILabel` subviews that require a double layout pass as determined by
- /// a `preferredMaxLayoutWidth` that's greater than zero after a layout, then the view will
- /// default to `intrinsicHeightProposedWidth` to allow the labels to wrap.
- ///
- /// If you would like to opt out of automatic sizing for performance or to override the default
- /// behavior, choose another strategy.
- case automatic
-
- /// The `uiView` is sized to fill the area proposed by its parent.
- ///
- /// Typically used for views that should expand greedily in both axes, e.g. a background view.
- case proposed
-
- /// The `uiView` is sized with its intrinsic height and expands horizontally to fill the width
- /// proposed by its parent.
- ///
- /// Typically used for views that have a height that's a function of their width, e.g. a row with
- /// text that can wrap to multiple lines.
- case intrinsicHeightProposedWidth
-
- /// The `uiView` is sized with its intrinsic width and expands vertically to fill the height
- /// proposed by its parent.
- ///
- /// Typically used for views that are free to grow vertically but have a fixed width, e.g. a view
- /// in a horizontal carousel.
- case intrinsicWidthProposedHeight
-
- /// The `uiView` is sized to its intrinsic width and height.
- ///
- /// Typically used for components with a specific intrinsic size in both axes, e.g. controls or
- /// inputs.
- case intrinsic
-}
-
-// MARK: - ResolvedSwiftUIMeasurementContainerStrategy
-
-/// The resolved measurement strategy of a `SwiftUIMeasurementContainer`, matching the cases of the
-/// `SwiftUIMeasurementContainerStrategy` without the automatic case.
-private enum ResolvedSwiftUIMeasurementContainerStrategy {
- case proposed, intrinsicHeightProposedWidth, intrinsicWidthProposedHeight, intrinsic(CGSize)
-}
-
-// MARK: - UILayoutPriority
-
-extension LayoutPriorityType {
- /// An "almost required" constraint, useful for creating near-required constraints that don't
- /// error when unable to be satisfied.
- @nonobjc
- fileprivate static var almostRequired: LayoutPriorityType { .init(rawValue: required.rawValue - 1) }
-}
-
-// MARK: - UIView
-
-extension ViewType {
- /// The `systemLayoutSizeFitting(…)` of this view with a compressed size and fitting priorities.
- @nonobjc
- fileprivate func systemLayoutFittingIntrinsicSize() -> CGSize {
- #if os(macOS)
- intrinsicContentSize
- #else
- systemLayoutSizeFitting(
- UIView.layoutFittingCompressedSize,
- withHorizontalFittingPriority: .fittingSizeLevel,
- verticalFittingPriority: .fittingSizeLevel)
- #endif
- }
-
- /// The `systemLayoutSizeFitting(…)` of this view with a compressed height with a fitting size
- /// priority and with the given fixed width and fitting priority.
- @nonobjc
- fileprivate func systemLayoutFittingIntrinsicHeightFixedWidth(
- _ width: CGFloat,
- priority: LayoutPriorityType = .almostRequired)
- -> CGSize
- {
- #if os(macOS)
- return CGSize(width: width, height: intrinsicContentSize.height)
- #else
- let targetSize = CGSize(width: width, height: UIView.layoutFittingCompressedSize.height)
-
- return systemLayoutSizeFitting(
- targetSize,
- withHorizontalFittingPriority: priority,
- verticalFittingPriority: .fittingSizeLevel)
- #endif
- }
-
- /// The `systemLayoutSizeFitting(…)` of this view with a compressed width with a fitting size
- /// priority and with the given fixed height and fitting priority.
- @nonobjc
- fileprivate func systemLayoutFittingIntrinsicWidthFixedHeight(
- _ height: CGFloat,
- priority: LayoutPriorityType = .almostRequired)
- -> CGSize
- {
- #if os(macOS)
- return CGSize(width: intrinsicContentSize.width, height: height)
- #else
- let targetSize = CGSize(width: UIView.layoutFittingCompressedSize.width, height: height)
-
- return systemLayoutSizeFitting(
- targetSize,
- withHorizontalFittingPriority: .fittingSizeLevel,
- verticalFittingPriority: priority)
- #endif
- }
-
- /// Whether this view or any of its subviews has a subview that has a double layout pass `UILabel`
- /// as determined by a non-zero `preferredMaxLayoutWidth`, which implies that it should get a
- /// `intrinsicHeightProposedWidth` sizing strategy to allow the label to wrap and grow.
- @nonobjc
- fileprivate func containsDoubleLayoutPassSubviews() -> Bool {
- #if os(macOS)
- return false
- #else
- var contains = false
- if let label = self as? UILabel, label.preferredMaxLayoutWidth > 0 {
- contains = true
- }
- for subview in subviews {
- contains = contains || subview.containsDoubleLayoutPassSubviews()
- }
- return contains
- #endif
- }
-}
-
-// MARK: - CGSize
-
-extension CGSize {
- /// A `CGSize` with `noIntrinsicMetric` for both its width and height.
- fileprivate static var noIntrinsicMetric: CGSize {
- .init(width: ViewType.noIntrinsicMetric, height: ViewType.noIntrinsicMetric)
- }
-
- /// Returns a `CGSize` with its width and/or height replaced with the corresponding field of the
- /// provided `fallback` size if they are `UIView.noIntrinsicMetric`.
- fileprivate func replacingNoIntrinsicMetric(with fallback: CGSize) -> CGSize {
- .init(
- width: width == ViewType.noIntrinsicMetric ? fallback.width : width,
- height: height == ViewType.noIntrinsicMetric ? fallback.height : height)
- }
-}
-#endif
diff --git a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/SwiftUIView.swift b/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/SwiftUIView.swift
deleted file mode 100644
index 8be06f2893c0a27c415f5673429c0fc9d7b1b9c8..0000000000000000000000000000000000000000
--- a/uni_modules/uni-animation-view/utssdk/app-ios/lottie-ios/Private/EmbeddedLibraries/EpoxyCore/SwiftUI/SwiftUIView.swift
+++ /dev/null
@@ -1,150 +0,0 @@
-// Created by eric_horacek on 9/8/22.
-// Copyright © 2022 Airbnb Inc. All rights reserved.
-
-#if canImport(SwiftUI)
-import SwiftUI
-
-// MARK: - SwiftUIView
-
-/// A `UIViewRepresentable` SwiftUI `View` that wraps its `Content` `UIView` within a
-/// `SwiftUIMeasurementContainer`, used to size a UIKit view correctly within a SwiftUI view
-/// hierarchy.
-///
-/// Includes an optional generic `Storage` value, which can be used to compare old and new values
-/// across state changes to prevent redundant view updates.
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-struct SwiftUIView: MeasuringViewRepresentable,
- UIViewConfiguringSwiftUIView
-{
-
- // MARK: Lifecycle
-
- /// Creates a SwiftUI representation of the content view with the given storage and the provided
- /// `makeContent` closure to construct the content whenever `makeUIView(…)` is invoked.
- init(storage: Storage, makeContent: @escaping () -> Content) {
- self.storage = storage
- self.makeContent = makeContent
- }
-
- /// Creates a SwiftUI representation of the content view with the provided `makeContent` closure
- /// to construct it whenever `makeUIView(…)` is invoked.
- init(makeContent: @escaping () -> Content) where Storage == Void {
- storage = ()
- self.makeContent = makeContent
- }
-
- // MARK: Internal
-
- var configurations: [Configuration] = []
-
- var sizing: SwiftUIMeasurementContainerStrategy = .automatic
-
- // MARK: Private
-
- /// The current stored value, with the previous value provided to the configuration closure as
- /// the `oldStorage`.
- private var storage: Storage
-
- /// A closure that's invoked to construct the represented content view.
- private var makeContent: () -> Content
-}
-
-// MARK: UIViewRepresentable
-
-@available(iOS 13.0, tvOS 13.0, macOS 10.15, *)
-extension SwiftUIView {
- func makeCoordinator() -> Coordinator {
- Coordinator(storage: storage)
- }
-
- #if os(macOS)
- func makeNSView(context _: Context) -> SwiftUIMeasurementContainer {
- SwiftUIMeasurementContainer(content: makeContent(), strategy: sizing)
- }
-
- func updateNSView(_ uiView: SwiftUIMeasurementContainer, context: Context) {
- let oldStorage = context.coordinator.storage
- context.coordinator.storage = storage
-
- let configurationContext = ConfigurationContext(
- oldStorage: oldStorage,
- viewRepresentableContext: context,
- container: uiView)
-
- for configuration in configurations {
- configuration(configurationContext)
- }
- }
- #else
- func makeUIView(context _: Context) -> SwiftUIMeasurementContainer