├── Pods ├── Shakuro.CommonTypes │ ├── README.md │ ├── Source │ │ ├── Comparable+Clamp.swift │ │ ├── Lock+Execute.swift │ │ ├── CGPoint+Distance.swift │ │ ├── UICollectionView+SafeUpdate.swift │ │ ├── String+Hash.swift │ │ ├── UIDevice+Uptime.swift │ │ ├── UIApplication+BundleIdentifier.swift │ │ ├── Array+Chunks.swift │ │ ├── GenericCommonError.swift │ │ ├── AsyncResult.swift │ │ ├── UITableView+Reusable.swift │ │ ├── UIStoryboard+Instantiate.swift │ │ ├── DecelerationHelper.swift │ │ ├── CALayer+Transition.swift │ │ ├── UICollectionView+Reusable.swift │ │ ├── NetworkError.swift │ │ ├── GenericError.swift │ │ └── Data+Hash.swift │ └── LICENSE.md ├── R.swift │ ├── rswift │ └── License ├── Target Support Files │ ├── lottie-ios │ │ ├── lottie-ios.modulemap │ │ ├── lottie-ios-dummy.m │ │ ├── lottie-ios-prefix.pch │ │ ├── lottie-ios.debug.xcconfig │ │ ├── lottie-ios.release.xcconfig │ │ ├── lottie-ios-umbrella.h │ │ └── lottie-ios-Info.plist │ ├── R.swift.Library │ │ ├── R.swift.Library.modulemap │ │ ├── R.swift.Library-dummy.m │ │ ├── R.swift.Library-prefix.pch │ │ ├── R.swift.Library-umbrella.h │ │ ├── R.swift.Library.debug.xcconfig │ │ ├── R.swift.Library.release.xcconfig │ │ └── R.swift.Library-Info.plist │ ├── Pods-Thermostat │ │ ├── Pods-Thermostat.modulemap │ │ ├── Pods-Thermostat-dummy.m │ │ ├── Pods-Thermostat-frameworks-Debug-output-files.xcfilelist │ │ ├── Pods-Thermostat-frameworks-Release-output-files.xcfilelist │ │ ├── Pods-Thermostat-frameworks-Debug-input-files.xcfilelist │ │ ├── Pods-Thermostat-frameworks-Release-input-files.xcfilelist │ │ ├── Pods-Thermostat-umbrella.h │ │ ├── Pods-Thermostat-Info.plist │ │ ├── Pods-Thermostat.debug.xcconfig │ │ └── Pods-Thermostat.release.xcconfig │ ├── Shakuro.CommonTypes │ │ ├── Shakuro.CommonTypes.modulemap │ │ ├── Shakuro.CommonTypes-dummy.m │ │ ├── Shakuro.CommonTypes-prefix.pch │ │ ├── Shakuro.CommonTypes-umbrella.h │ │ ├── Shakuro.CommonTypes.debug.xcconfig │ │ ├── Shakuro.CommonTypes.release.xcconfig │ │ └── Shakuro.CommonTypes-Info.plist │ └── R.swift │ │ ├── R.swift.debug.xcconfig │ │ └── R.swift.release.xcconfig ├── lottie-ios │ └── lottie-ios │ │ └── Classes │ │ ├── RenderSystem │ │ ├── LOTRenderNode.h │ │ ├── AnimatorNodes │ │ │ ├── LOTPathAnimator.h │ │ │ ├── LOTPolygonAnimator.h │ │ │ ├── LOTPolystarAnimator.h │ │ │ ├── LOTCircleAnimator.h │ │ │ ├── LOTRoundedRectAnimator.h │ │ │ └── LOTPathAnimator.m │ │ ├── InterpolatorNodes │ │ │ ├── LOTArrayInterpolator.h │ │ │ ├── LOTSizeInterpolator.h │ │ │ ├── LOTPointInterpolator.h │ │ │ ├── LOTColorInterpolator.h │ │ │ ├── LOTNumberInterpolator.h │ │ │ ├── LOTPathInterpolator.h │ │ │ ├── LOTValueInterpolator.h │ │ │ ├── LOTArrayInterpolator.m │ │ │ ├── LOTNumberInterpolator.m │ │ │ ├── LOTColorInterpolator.m │ │ │ ├── LOTSizeInterpolator.m │ │ │ ├── LOTTransformInterpolator.h │ │ │ └── LOTPointInterpolator.m │ │ ├── RenderNodes │ │ │ ├── LOTFillRenderer.h │ │ │ ├── LOTStrokeRenderer.h │ │ │ ├── LOTRepeaterRenderer.h │ │ │ ├── LOTGradientFillRender.h │ │ │ ├── LOTRenderGroup.h │ │ │ └── LOTFillRenderer.m │ │ ├── ManipulatorNodes │ │ │ └── LOTTrimPathNode.h │ │ └── LOTRenderNode.m │ │ ├── Private │ │ ├── LOTCacheProvider.m │ │ ├── LOTAnimationView_Internal.h │ │ └── LOTAnimationCache.m │ │ ├── MacCompatibility │ │ ├── CALayer+Compat.h │ │ ├── CALayer+Compat.m │ │ ├── NSValue+Compat.h │ │ ├── NSValue+Compat.m │ │ ├── LOTPlatformCompat.h │ │ └── UIColor.h │ │ ├── AnimatableLayers │ │ ├── LOTMaskContainer.h │ │ ├── LOTLayerContainer.h │ │ └── LOTCompositionContainer.h │ │ ├── Extensions │ │ ├── LOTHelpers.h │ │ ├── LOTRadialGradientLayer.h │ │ └── LOTBezierPath.h │ │ ├── Models │ │ ├── LOTShapePath.h │ │ ├── LOTShapeGroup.h │ │ ├── LOTShapeTrimPath.h │ │ ├── LOTShapeCircle.h │ │ ├── LOTShapeRectangle.h │ │ ├── LOTModels.h │ │ ├── LOTShapeFill.h │ │ ├── LOTLayerGroup.h │ │ ├── LOTShapeTransform.h │ │ ├── LOTShapePath.m │ │ ├── LOTMask.h │ │ ├── LOTAssetGroup.h │ │ ├── LOTShapeCircle.m │ │ ├── LOTShapeGradientFill.h │ │ ├── LOTShapeRepeater.h │ │ ├── LOTShapeTrimPath.m │ │ ├── LOTShapeStar.h │ │ ├── LOTAsset.h │ │ ├── LOTShapeStroke.h │ │ ├── LOTShapeRectangle.m │ │ ├── LOTShapeFill.m │ │ ├── LOTAsset.m │ │ ├── LOTMask.m │ │ ├── LOTLayerGroup.m │ │ ├── LOTShapeGradientFill.m │ │ ├── LOTShapeStar.m │ │ ├── LOTShapeStroke.m │ │ └── LOTAssetGroup.m │ │ ├── AnimatableProperties │ │ ├── LOTBezierData.h │ │ └── LOTKeyframe.h │ │ └── PublicHeaders │ │ ├── LOTAnimatedControl.h │ │ ├── LOTCacheProvider.h │ │ ├── LOTAnimationCache.h │ │ ├── LOTAnimationView_Compat.h │ │ ├── Lottie.h │ │ ├── LOTAnimatedSwitch.h │ │ └── LOTComposition.h ├── R.swift.Library │ ├── Library │ │ ├── Core │ │ │ ├── NibResource.swift │ │ │ ├── FontResource.swift │ │ │ ├── Identifier.swift │ │ │ ├── StoryboardResource.swift │ │ │ ├── ColorResource.swift │ │ │ ├── ImageResource.swift │ │ │ ├── StoryboardViewControllerResource.swift │ │ │ ├── Validatable.swift │ │ │ ├── ReuseIdentifierProtocol.swift │ │ │ ├── StringResource.swift │ │ │ └── FileResource.swift │ │ ├── UIKit │ │ │ ├── UIViewController+NibResource.swift │ │ │ ├── UINib+NibResource.swift │ │ │ ├── StoryboardResourceWithInitialController+UIKit.swift │ │ │ ├── UIFont+FontResource.swift │ │ │ ├── UIStoryboard+StoryboardResource.swift │ │ │ ├── NibResource+UIKit.swift │ │ │ ├── UIStoryboard+StoryboardViewControllerResource.swift │ │ │ ├── TypedStoryboardSegueInfo+UIStoryboardSegue.swift │ │ │ ├── UIImage+ImageResource.swift │ │ │ ├── UIColor+ColorResource.swift │ │ │ └── UIViewController+StoryboardSegueIdentifierProtocol.swift │ │ └── Foundation │ │ │ ├── Data+FileResource.swift │ │ │ └── Bundle+FileResource.swift │ └── License └── Manifest.lock ├── Resources ├── sample.gif └── thermostat-control.gif ├── ThermostatDemo ├── Resources │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AccentColor.colorset │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── UI │ │ └── Base.lproj │ │ └── LaunchScreen.storyboard ├── AppDelegate.swift └── SceneDelegate.swift ├── ThermostatControl ├── Resources │ ├── ThermostatAssets.xcassets │ │ ├── Contents.json │ │ └── ThermostatImages │ │ │ ├── Contents.json │ │ │ ├── clock.imageset │ │ │ ├── Group 3.png │ │ │ ├── Group 3@2x.png │ │ │ ├── Group 3@3x.png │ │ │ └── Contents.json │ │ │ ├── sun.imageset │ │ │ ├── 001-sun.png │ │ │ ├── 001-sun@2x.png │ │ │ ├── 001-sun@3x.png │ │ │ └── Contents.json │ │ │ ├── cooler.imageset │ │ │ ├── ac-icon.png │ │ │ ├── ac-icon@2x.png │ │ │ ├── ac-icon@3x.png │ │ │ └── Contents.json │ │ │ ├── power.imageset │ │ │ ├── 002-power.png │ │ │ ├── 002-power@2x.png │ │ │ ├── 002-power@3x.png │ │ │ └── Contents.json │ │ │ ├── spinner.imageset │ │ │ ├── spinner.png │ │ │ ├── spinner@2x.png │ │ │ ├── spinner@3x.png │ │ │ └── Contents.json │ │ │ ├── snow.imageset │ │ │ ├── Shape Copy 2.png │ │ │ ├── Shape Copy 2@2x.png │ │ │ ├── Shape Copy 2@3x.png │ │ │ └── Contents.json │ │ │ ├── buttonSelected.imageset │ │ │ ├── Oval Copy1.png │ │ │ ├── Oval Copy1@2x.png │ │ │ ├── Oval Copy1@3x.png │ │ │ └── Contents.json │ │ │ ├── normalButton.imageset │ │ │ ├── Oval Copy 2.png │ │ │ ├── Oval Copy 2@2x.png │ │ │ ├── Oval Copy 2@3x.png │ │ │ └── Contents.json │ │ │ ├── HumidistatShadow.imageset │ │ │ ├── Shadow@2x.png │ │ │ ├── Shadow@3x.png │ │ │ └── Contents.json │ │ │ └── water.imageset │ │ │ ├── 003-raindrop-close-up.png │ │ │ ├── 003-raindrop-close-up@2x.png │ │ │ ├── 003-raindrop-close-up@3x.png │ │ │ └── Contents.json │ └── Fonts │ │ └── Montserrat-Bold.ttf └── Source │ ├── Extensions │ ├── UIView+Rotate.swift │ ├── CGFloat+RoundToNearest.swift │ ├── Bundle+BundleHelper.swift │ └── CGPoint+Distance.swift │ ├── Controls │ ├── TintAlphaButton.swift │ ├── SliderView │ │ ├── DefaultSliderValueTransformer+FactoryMethods.swift │ │ ├── TemperatureUnit.swift │ │ └── SliderValueTransformer.swift │ └── StateAlphaButton.swift │ ├── Stylesheet.swift │ └── DecelerationBehaviour.swift ├── Thermostat.xcodeproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── Thermostat.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── .gitignore ├── Podfile.lock ├── Podfile ├── Thermostat.podspec ├── LICENSE.md └── README.md /Pods/Shakuro.CommonTypes/README.md: -------------------------------------------------------------------------------- 1 | # CommonTypes -------------------------------------------------------------------------------- /Pods/R.swift/rswift: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/Pods/R.swift/rswift -------------------------------------------------------------------------------- /Resources/sample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/Resources/sample.gif -------------------------------------------------------------------------------- /Resources/thermostat-control.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/Resources/thermostat-control.gif -------------------------------------------------------------------------------- /ThermostatDemo/Resources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/Fonts/Montserrat-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/Fonts/Montserrat-Bold.ttf -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/lottie-ios/lottie-ios.modulemap: -------------------------------------------------------------------------------- 1 | framework module Lottie { 2 | umbrella header "lottie-ios-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/R.swift.Library/R.swift.Library.modulemap: -------------------------------------------------------------------------------- 1 | framework module Rswift { 2 | umbrella header "R.swift.Library-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/lottie-ios/lottie-ios-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_lottie_ios : NSObject 3 | @end 4 | @implementation PodsDummy_lottie_ios 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Thermostat/Pods-Thermostat.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_Thermostat { 2 | umbrella header "Pods-Thermostat-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Thermostat/Pods-Thermostat-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_Thermostat : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_Thermostat 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/R.swift.Library/R.swift.Library-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_R_swift_Library : NSObject 3 | @end 4 | @implementation PodsDummy_R_swift_Library 5 | @end 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Shakuro.CommonTypes/Shakuro.CommonTypes.modulemap: -------------------------------------------------------------------------------- 1 | framework module Shakuro_CommonTypes { 2 | umbrella header "Shakuro.CommonTypes-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Shakuro.CommonTypes/Shakuro.CommonTypes-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Shakuro_CommonTypes : NSObject 3 | @end 4 | @implementation PodsDummy_Shakuro_CommonTypes 5 | @end 6 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/clock.imageset/Group 3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/clock.imageset/Group 3.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/sun.imageset/001-sun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/sun.imageset/001-sun.png -------------------------------------------------------------------------------- /ThermostatDemo/Resources/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/cooler.imageset/ac-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/cooler.imageset/ac-icon.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/power.imageset/002-power.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/power.imageset/002-power.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/spinner.imageset/spinner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/spinner.imageset/spinner.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/sun.imageset/001-sun@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/sun.imageset/001-sun@2x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/sun.imageset/001-sun@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/sun.imageset/001-sun@3x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/clock.imageset/Group 3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/clock.imageset/Group 3@2x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/clock.imageset/Group 3@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/clock.imageset/Group 3@3x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/cooler.imageset/ac-icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/cooler.imageset/ac-icon@2x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/cooler.imageset/ac-icon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/cooler.imageset/ac-icon@3x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/power.imageset/002-power@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/power.imageset/002-power@2x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/power.imageset/002-power@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/power.imageset/002-power@3x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/snow.imageset/Shape Copy 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/snow.imageset/Shape Copy 2.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/spinner.imageset/spinner@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/spinner.imageset/spinner@2x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/spinner.imageset/spinner@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/spinner.imageset/spinner@3x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/snow.imageset/Shape Copy 2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/snow.imageset/Shape Copy 2@2x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/snow.imageset/Shape Copy 2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/snow.imageset/Shape Copy 2@3x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/buttonSelected.imageset/Oval Copy1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/buttonSelected.imageset/Oval Copy1.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/normalButton.imageset/Oval Copy 2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/normalButton.imageset/Oval Copy 2.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/HumidistatShadow.imageset/Shadow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/HumidistatShadow.imageset/Shadow@2x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/HumidistatShadow.imageset/Shadow@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/HumidistatShadow.imageset/Shadow@3x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/buttonSelected.imageset/Oval Copy1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/buttonSelected.imageset/Oval Copy1@2x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/buttonSelected.imageset/Oval Copy1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/buttonSelected.imageset/Oval Copy1@3x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/normalButton.imageset/Oval Copy 2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/normalButton.imageset/Oval Copy 2@2x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/normalButton.imageset/Oval Copy 2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/normalButton.imageset/Oval Copy 2@3x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/water.imageset/003-raindrop-close-up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/water.imageset/003-raindrop-close-up.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/water.imageset/003-raindrop-close-up@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/water.imageset/003-raindrop-close-up@2x.png -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/water.imageset/003-raindrop-close-up@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shakurocom/ThermostatControl/HEAD/ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/water.imageset/003-raindrop-close-up@3x.png -------------------------------------------------------------------------------- /Thermostat.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Thermostat/Pods-Thermostat-frameworks-Debug-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rswift.framework 2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Shakuro_CommonTypes.framework 3 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Lottie.framework -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Thermostat/Pods-Thermostat-frameworks-Release-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Rswift.framework 2 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Shakuro_CommonTypes.framework 3 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Lottie.framework -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/Comparable+Clamp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // 4 | 5 | import Foundation 6 | 7 | extension Comparable { 8 | 9 | public func clamped(to limits: ClosedRange) -> Self { 10 | return min(max(self, limits.lowerBound), limits.upperBound) 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Pods/Target Support Files/lottie-ios/lottie-ios-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/R.swift.Library/R.swift.Library-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Thermostat.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Shakuro.CommonTypes/Shakuro.CommonTypes-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Thermostat.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Thermostat.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Thermostat/Pods-Thermostat-frameworks-Debug-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-Thermostat/Pods-Thermostat-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/R.swift.Library/Rswift.framework 3 | ${BUILT_PRODUCTS_DIR}/Shakuro.CommonTypes/Shakuro_CommonTypes.framework 4 | ${BUILT_PRODUCTS_DIR}/lottie-ios/Lottie.framework -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Thermostat/Pods-Thermostat-frameworks-Release-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-Thermostat/Pods-Thermostat-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/R.swift.Library/Rswift.framework 3 | ${BUILT_PRODUCTS_DIR}/Shakuro.CommonTypes/Shakuro_CommonTypes.framework 4 | ${BUILT_PRODUCTS_DIR}/lottie-ios/Lottie.framework -------------------------------------------------------------------------------- /ThermostatControl/Source/Extensions/UIView+Rotate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension UIView { 4 | 5 | /// Rotates the view by the specified angle. 6 | /// - parameter angle: The angle, in radians, by which to rotate the affine transform. 7 | func rotate(by angle: CGFloat) { 8 | transform = transform.rotated(by: angle) 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/Lock+Execute.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2018-2019 Shakuro (https://shakuro.com/) 3 | // Sergey Laschuk 4 | // 5 | 6 | import Foundation 7 | 8 | extension NSLocking { 9 | 10 | public func execute(_ closure: () throws -> ResultType) rethrows -> ResultType { 11 | lock() 12 | defer { unlock() } 13 | return try closure() 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /ThermostatControl/Source/Extensions/CGFloat+RoundToNearest.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | public extension CGFloat { 4 | 5 | /// Returns this value rounded to an integral value using “schoolbook rounding" with threshold. 6 | func roundToNearest(_ threshold: CGFloat) -> CGFloat { 7 | let denominator = 1.0 / threshold 8 | return (self * denominator).rounded() / denominator 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/LOTRenderNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTRenderNode.h 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | 11 | @interface LOTRenderNode : LOTAnimatorNode 12 | 13 | @property (nonatomic, readonly, strong) CAShapeLayer * _Nonnull outputLayer; 14 | 15 | - (NSDictionary * _Nonnull)actionsForRenderLayer; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/Target Support Files/R.swift.Library/R.swift.Library-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double RswiftVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char RswiftVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/CGPoint+Distance.swift: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // 4 | 5 | import CoreGraphics 6 | import Foundation 7 | 8 | extension CGPoint { 9 | 10 | func distance(to point: CGPoint) -> CGFloat { 11 | return sqrt(pow((point.x - x), 2) + pow((point.y - y), 2)) 12 | } 13 | 14 | func distanceSquared(to point: CGPoint) -> CGFloat { 15 | return pow((point.x - x), 2) + pow((point.y - y), 2) 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Thermostat/Pods-Thermostat-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_ThermostatVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_ThermostatVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | */build/* 3 | *.pbxuser 4 | !default.pbxuser 5 | *.mode1v3 6 | !default.mode1v3 7 | *.mode2v3 8 | !default.mode2v3 9 | *.perspectivev3 10 | !default.perspectivev3 11 | xcuserdata 12 | profile 13 | .DS_Store 14 | *.moved-aside 15 | DerivedData 16 | .idea/ 17 | *.hmap 18 | *.xccheckout 19 | 20 | ## Playgrounds 21 | timeline.xctimeline 22 | playground.xcworkspace 23 | 24 | # R.Swift 25 | *.generated.swift 26 | 27 | #CocoaPods 28 | #Pods 29 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Shakuro.CommonTypes/Shakuro.CommonTypes-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Shakuro_CommonTypesVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Shakuro_CommonTypesVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Private/LOTCacheProvider.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTCacheProvider.m 3 | // Lottie 4 | // 5 | // Created by punmy on 2017/7/8. 6 | // 7 | // 8 | 9 | #import "LOTCacheProvider.h" 10 | 11 | @implementation LOTCacheProvider 12 | 13 | static id _imageCache; 14 | 15 | + (id)imageCache { 16 | return _imageCache; 17 | } 18 | 19 | + (void)setImageCache:(id)cache { 20 | _imageCache = cache; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/CALayer+Compat.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Oleksii Pavlovskyi on 2/2/17. 3 | // Copyright (c) 2017 Airbnb. All rights reserved. 4 | // 5 | 6 | #include 7 | 8 | #if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR 9 | #import 10 | #import 11 | 12 | @interface CALayer (Compat) 13 | 14 | @property (nonatomic, assign) BOOL allowsEdgeAntialiasing; 15 | 16 | @end 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPathAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPathAnimator.h 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapePath.h" 11 | 12 | @interface LOTPathAnimator : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapePath:(LOTShapePath *_Nonnull)shapePath; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTArrayInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTArrayInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTValueInterpolator.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface LOTArrayInterpolator : LOTValueInterpolator 14 | 15 | - (NSArray *)numberArrayForFrame:(NSNumber *)frame; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/CALayer+Compat.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Oleksii Pavlovskyi on 2/2/17. 3 | // Copyright (c) 2017 Airbnb. All rights reserved. 4 | // 5 | 6 | #include 7 | 8 | #if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR 9 | #import "CALayer+Compat.h" 10 | 11 | @implementation CALayer (Compat) 12 | 13 | - (BOOL)allowsEdgeAntialiasing { return NO; } 14 | - (void)setAllowsEdgeAntialiasing:(BOOL)allowsEdgeAntialiasing { } 15 | 16 | @end 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/AnimatableLayers/LOTMaskContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTMaskContainer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/19/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTMask.h" 11 | 12 | @interface LOTMaskContainer : CALayer 13 | 14 | - (instancetype _Nonnull)initWithMasks:(NSArray * _Nonnull)masks; 15 | 16 | @property (nonatomic, strong, nullable) NSNumber *currentFrame; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ThermostatControl/Source/Extensions/Bundle+BundleHelper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThermostatBundleHelper.swift 3 | // 4 | 5 | import Foundation 6 | import UIKit 7 | import Shakuro_CommonTypes 8 | 9 | extension Bundle { 10 | 11 | static let thermostatBundleHelper: BundleHelper = { 12 | let bundleHelper = BundleHelper(targetClass: ThermostatViewController.self, bundleName: "Thermostat") 13 | bundleHelper.registerFont(name: "Montserrat-Bold", fontExtension: "ttf") 14 | return bundleHelper 15 | }() 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTFillRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTFillRenderer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | #import "LOTShapeFill.h" 11 | 12 | @interface LOTFillRenderer : LOTRenderNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeFill:(LOTShapeFill *_Nonnull)fill; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Core/NibResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NibResource.swift 3 | // R.swift Library 4 | // 5 | // Created by Mathijs Kadijk on 06-12-15. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | /// Represents a nib file on disk 13 | public protocol NibResourceType { 14 | 15 | /// Bundle this nib is in or nil for main bundle 16 | var bundle: Bundle { get } 17 | 18 | /// Name of the nib file on disk 19 | var name: String { get } 20 | } 21 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/UICollectionView+SafeUpdate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // 4 | 5 | import Foundation 6 | import UIKit 7 | 8 | extension UICollectionView { 9 | 10 | internal func safePerformBatchUpdates(_ updates: (() -> Void)?, completion: ((Bool) -> Void)?) { 11 | if window != nil { 12 | performBatchUpdates(updates, completion: completion) 13 | } else { 14 | // collection view will crash on performBatchUpdates when window == nil 15 | reloadData() 16 | } 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPolygonAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPolygonAnimator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapeStar.h" 11 | 12 | @interface LOTPolygonAnimator : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapePolygon:(LOTShapeStar *_Nonnull)shapeStar; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPolystarAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPolystarAnimator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapeStar.h" 11 | 12 | @interface LOTPolystarAnimator : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeStar:(LOTShapeStar *_Nonnull)shapeStar; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/ManipulatorNodes/LOTTrimPathNode.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTTrimPathNode.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/21/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapeTrimPath.h" 11 | 12 | @interface LOTTrimPathNode : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | trimPath:(LOTShapeTrimPath *_Nonnull)trimPath; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTStrokeRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTStrokeRenderer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/17/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | #import "LOTShapeStroke.h" 11 | 12 | @interface LOTStrokeRenderer : LOTRenderNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeStroke:(LOTShapeStroke *_Nonnull)stroke; 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTCircleAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTCircleAnimator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/19/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapeCircle.h" 11 | 12 | @interface LOTCircleAnimator : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeCircle:(LOTShapeCircle *_Nonnull)shapeCircle; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTRepeaterRenderer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTRepeaterRenderer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/28/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | #import "LOTShapeRepeater.h" 11 | 12 | @interface LOTRepeaterRenderer : LOTRenderNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeRepeater:(LOTShapeRepeater *_Nonnull)repeater; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/String+Hash.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2019 Shakuro (https://shakuro.com/) 3 | // Sergey Laschuk 4 | // 5 | 6 | import Foundation 7 | 8 | extension String { 9 | 10 | public func SHA256() -> String? { 11 | return data(using: String.Encoding.utf8)?.SHA256String() 12 | } 13 | 14 | public func SHA512() -> String? { 15 | return data(using: String.Encoding.utf8)?.SHA512() 16 | } 17 | 18 | public func MD5() -> String? { 19 | return data(using: String.Encoding.utf8)?.MD5() 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/UIDevice+Uptime.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2018 Shakuro (https://shakuro.com/) 3 | // Vlad Onipchenko 4 | // 5 | 6 | import UIKit 7 | 8 | extension UIDevice { 9 | 10 | public static func uptime() -> TimeInterval { 11 | var boottime = timeval() 12 | var size = MemoryLayout.stride 13 | sysctlbyname("kern.boottime", &boottime, &size, nil, 0) 14 | var now = time_t() 15 | time(&now) 16 | return boottime.tv_sec > 0 ? TimeInterval(now - boottime.tv_sec) : 0 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTGradientFillRender.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTGradientFillRender.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | #import "LOTShapeGradientFill.h" 11 | 12 | @interface LOTGradientFillRender : LOTRenderNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeGradientFill:(LOTShapeGradientFill *_Nonnull)fill; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/clock.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Group 3.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Group 3@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Group 3@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/cooler.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "ac-icon.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "ac-icon@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "ac-icon@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/spinner.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "spinner.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "spinner@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "spinner@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/UIApplication+BundleIdentifier.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2017 Shakuro (https://shakuro.com/) 3 | // Andrey Popov 4 | // 5 | 6 | import Foundation 7 | import UIKit 8 | 9 | extension UIApplication { 10 | 11 | public static let bundleIdentifier: String = { 12 | guard let bundleIdentifier = Bundle.main.bundleIdentifier else { 13 | fatalError("\(String(describing: self)) - \(#function): can't read bundle identifier from bundle: \(Bundle.main).") 14 | } 15 | return bundleIdentifier 16 | }() 17 | 18 | } 19 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/power.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "002-power.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "002-power@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "002-power@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTRoundedRectAnimator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTRoundedRectAnimator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/19/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatorNode.h" 10 | #import "LOTShapeRectangle.h" 11 | 12 | @interface LOTRoundedRectAnimator : LOTAnimatorNode 13 | 14 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 15 | shapeRectangle:(LOTShapeRectangle *_Nonnull)shapeRectangle; 16 | 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/buttonSelected.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Oval Copy1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Oval Copy1@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Oval Copy1@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/normalButton.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Oval Copy 2.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Oval Copy 2@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Oval Copy 2@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Core/FontResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FontResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 06-01-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | public protocol FontResourceType { 13 | /// Name of the font 14 | var fontName: String { get } 15 | } 16 | 17 | public struct FontResource: FontResourceType { 18 | /// Name of the font 19 | public let fontName: String 20 | 21 | public init(fontName: String) { 22 | self.fontName = fontName 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTSizeInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTSizeInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/13/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTValueInterpolator.h" 10 | #import "LOTValueDelegate.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTSizeInterpolator : LOTValueInterpolator 15 | 16 | - (CGSize)sizeValueForFrame:(NSNumber *)frame; 17 | 18 | @property (nonatomic, weak, nullable) id delegate; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTPointInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPointInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/12/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTValueInterpolator.h" 10 | #import "LOTValueDelegate.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTPointInterpolator : LOTValueInterpolator 15 | 16 | - (CGPoint)pointValueForFrame:(NSNumber *)frame; 17 | 18 | @property (nonatomic, weak, nullable) id delegate; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Extensions/LOTHelpers.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTHelpers.h 3 | // Lottie 4 | // 5 | // Created by Brandon Withrow on 7/28/16. 6 | // Copyright © 2016 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #ifndef LOTHelpers_h 10 | #define LOTHelpers_h 11 | 12 | #import "UIColor+Expanded.h" 13 | #import "CGGeometry+LOTAdditions.h" 14 | #import "LOTBezierPath.h" 15 | 16 | #define ENABLE_DEBUG_LOGGING NO 17 | #define ENABLE_DEBUG_SHAPES NO 18 | 19 | #endif /* LOTHelpers_h */ 20 | 21 | // TODO Feature Phase 22 | /* 23 | - Trim Path individually 24 | - Image Cache Support 25 | - Skew transform 26 | */ 27 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Extensions/LOTRadialGradientLayer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimationView 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/14/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | #import 9 | #import 10 | 11 | @interface LOTRadialGradientLayer : CALayer 12 | 13 | @property CGPoint startPoint; 14 | @property CGPoint endPoint; 15 | 16 | @property (nonatomic, copy) NSArray *colors; 17 | @property (nonatomic, copy) NSArray *locations; 18 | @property (nonatomic, assign) BOOL isRadial; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/Array+Chunks.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2018 Shakuro (https://shakuro.com/) 3 | // Sergey Laschuk 4 | // 5 | // original: https://www.hackingwithswift.com/example-code/language/how-to-split-an-array-into-chunks 6 | // 7 | 8 | import Foundation 9 | 10 | extension Array { 11 | 12 | // Split array into multiple arrays of given size. 13 | public func chunked(chunkSize: Int) -> [[Element]] { 14 | return stride(from: 0, to: count, by: chunkSize).map({ (startIndex) -> [Element] in 15 | Array(self[startIndex.. 18 | 19 | - (CALayer * _Nullable)layerForKey:(NSString * _Nonnull)keyname; 20 | - (NSArray * _Nonnull)compositionLayers; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTColorInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTColorInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/13/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTValueInterpolator.h" 10 | #import "LOTPlatformCompat.h" 11 | #import "LOTValueDelegate.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface LOTColorInterpolator : LOTValueInterpolator 16 | 17 | - (CGColorRef)colorForFrame:(NSNumber *)frame; 18 | 19 | @property (nonatomic, weak, nullable) id delegate; 20 | 21 | @end 22 | 23 | NS_ASSUME_NONNULL_END 24 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Core/Identifier.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Identifier.swift 3 | // R.swift Library 4 | // 5 | // Created by Mathijs Kadijk on 06-12-15. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | /// Base protocol for all identifiers 13 | public protocol IdentifierType: CustomStringConvertible { 14 | /// Identifier string 15 | var identifier: String { get } 16 | } 17 | 18 | extension IdentifierType { 19 | /// CustomStringConvertible implementation, returns the identifier 20 | public var description: String { 21 | return identifier 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTNumberInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTNumberInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/11/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTValueInterpolator.h" 11 | #import "LOTValueDelegate.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | @interface LOTNumberInterpolator : LOTValueInterpolator 15 | 16 | - (CGFloat)floatValueForFrame:(NSNumber *)frame; 17 | 18 | @property (nonatomic, weak, nullable) id delegate; 19 | 20 | @end 21 | 22 | NS_ASSUME_NONNULL_END 23 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/sun.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "001-sun.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "001-sun@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "001-sun@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "template" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapePath.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapePath.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | @interface LOTShapePath : NSObject 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 15 | 16 | @property (nonatomic, readonly) NSString *keyname; 17 | @property (nonatomic, readonly) BOOL closed; 18 | @property (nonatomic, readonly) NSNumber *index; 19 | @property (nonatomic, readonly) LOTKeyframeGroup *shapePath; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/NSValue+Compat.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Oleksii Pavlovskyi on 2/2/17. 3 | // Copyright (c) 2017 Airbnb. All rights reserved. 4 | // 5 | 6 | #include 7 | 8 | #if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR 9 | #import 10 | 11 | @interface NSValue (Compat) 12 | 13 | + (NSValue *)valueWithCGRect:(CGRect)rect; 14 | + (NSValue *)valueWithCGPoint:(CGPoint)point; 15 | 16 | @property (nonatomic, readonly) CGRect CGRectValue; 17 | @property(nonatomic, readonly) CGPoint CGPointValue; 18 | @property (nonatomic, readonly) CGSize CGSizeValue; 19 | 20 | @end 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeGroup.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShape.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/14/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface LOTShapeGroup : NSObject 13 | 14 | - (instancetype _Nonnull)initWithJSON:(NSDictionary *_Nonnull)jsonDictionary; 15 | 16 | @property (nonatomic, readonly, nonnull) NSString *keyname; 17 | @property (nonatomic, readonly, nonnull) NSArray *items; 18 | 19 | + (id _Nullable)shapeItemWithJSON:(NSDictionary * _Nonnull)itemJSON; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/snow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Shape Copy 2.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Shape Copy 2@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Shape Copy 2@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "template" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTRenderGroup.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTRenderGroup.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | 11 | @interface LOTRenderGroup : LOTRenderNode 12 | 13 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode * _Nullable)inputNode 14 | contents:(NSArray * _Nonnull)contents 15 | keyname:(NSString * _Nullable)keyname; 16 | 17 | @property (nonatomic, strong, readonly) CALayer * _Nonnull containerLayer; 18 | 19 | @end 20 | 21 | 22 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeTrimPath.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeTrimPath.h 3 | // LottieAnimator 4 | // 5 | // Created by brandon_withrow on 7/26/16. 6 | // Copyright © 2016 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | @interface LOTShapeTrimPath : NSObject 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 15 | 16 | @property (nonatomic, readonly) NSString *keyname; 17 | @property (nonatomic, readonly) LOTKeyframeGroup *start; 18 | @property (nonatomic, readonly) LOTKeyframeGroup *end; 19 | @property (nonatomic, readonly) LOTKeyframeGroup *offset; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/water.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "003-raindrop-close-up.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "003-raindrop-close-up@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "003-raindrop-close-up@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | }, 23 | "properties" : { 24 | "template-rendering-intent" : "template" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Core/StoryboardResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StoryboardResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 07-01-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | public protocol StoryboardResourceType { 13 | 14 | /// Bundle this storyboard is in 15 | var bundle: Bundle { get } 16 | 17 | /// Name of the storyboard file on disk 18 | var name: String { get } 19 | } 20 | 21 | public protocol StoryboardResourceWithInitialControllerType: StoryboardResourceType { 22 | 23 | /// Type of the inital controller 24 | associatedtype InitialController 25 | } 26 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTPathInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPathInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/13/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTValueInterpolator.h" 10 | #import "LOTPlatformCompat.h" 11 | #import "LOTBezierPath.h" 12 | #import "LOTValueDelegate.h" 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface LOTPathInterpolator : LOTValueInterpolator 17 | 18 | - (LOTBezierPath *)pathForFrame:(NSNumber *)frame cacheLengths:(BOOL)cacheLengths; 19 | 20 | @property (nonatomic, weak, nullable) id delegate; 21 | 22 | @end 23 | 24 | NS_ASSUME_NONNULL_END 25 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/GenericCommonError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2019 Shakuro (https://shakuro.com/) 3 | // 4 | // 5 | 6 | import Foundation 7 | 8 | public enum GenericCommonError: Int, PresentableError { 9 | 10 | case notAuthorized = 101 11 | case unknown = 102 12 | 13 | public var errorDescription: String { 14 | let dsc: String 15 | switch self { 16 | case .notAuthorized: 17 | dsc = NSLocalizedString("The operation could not be completed. Not authorized.", comment: "") 18 | case .unknown: 19 | dsc = NSLocalizedString("The operation could not be completed.", comment: "") 20 | } 21 | return dsc 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeCircle.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeCircle.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTShapeCircle : NSObject 15 | 16 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 17 | 18 | @property (nonatomic, readonly) NSString *keyname; 19 | @property (nonatomic, readonly) LOTKeyframeGroup *position; 20 | @property (nonatomic, readonly) LOTKeyframeGroup *size; 21 | @property (nonatomic, readonly) BOOL reversed; 22 | 23 | @end 24 | 25 | NS_ASSUME_NONNULL_END 26 | -------------------------------------------------------------------------------- /Pods/Target Support Files/lottie-ios/lottie-ios.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_LDFLAGS = $(inherited) -framework "UIKit" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/lottie-ios 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/Target Support Files/lottie-ios/lottie-ios.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | OTHER_LDFLAGS = $(inherited) -framework "UIKit" 5 | PODS_BUILD_DIR = ${BUILD_DIR} 6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/lottie-ios 9 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | SKIP_INSTALL = YES 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeRectangle.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeRectangle.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | @interface LOTShapeRectangle : NSObject 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 15 | 16 | @property (nonatomic, readonly) NSString *keyname; 17 | @property (nonatomic, readonly) LOTKeyframeGroup *position; 18 | @property (nonatomic, readonly) LOTKeyframeGroup *size; 19 | @property (nonatomic, readonly) LOTKeyframeGroup *cornerRadius; 20 | @property (nonatomic, readonly) BOOL reversed; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/UIKit/UIViewController+NibResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+NibResource.swift 3 | // R.swift Library 4 | // 5 | // Created by Mathijs Kadijk on 06-12-15. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | import UIKit 12 | 13 | public extension UIViewController { 14 | /** 15 | Returns a newly initialized view controller with the nib resource (R.nib.*). 16 | 17 | - parameter nib: The nib resource (R.nib.*) to associate with the view controller. 18 | 19 | - returns: A newly initialized UIViewController object. 20 | */ 21 | convenience init(nib: NibResourceType) { 22 | self.init(nibName: nib.name, bundle: nib.bundle) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/AnimatableProperties/LOTBezierData.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTBezierData.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/10/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTBezierData : NSObject 15 | 16 | - (instancetype)initWithData:(NSDictionary *)bezierData; 17 | 18 | @property (nonatomic, readonly) NSInteger count; 19 | @property (nonatomic, readonly) BOOL closed; 20 | 21 | - (CGPoint)vertexAtIndex:(NSInteger)index; 22 | - (CGPoint)inTangentAtIndex:(NSInteger)index; 23 | - (CGPoint)outTangentAtIndex:(NSInteger)index; 24 | 25 | @end 26 | 27 | NS_ASSUME_NONNULL_END 28 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTModels.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTModels.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #ifndef LOTModels_h 10 | #define LOTModels_h 11 | 12 | #import "LOTKeyframe.h" 13 | #import "LOTComposition.h" 14 | #import "LOTLayer.h" 15 | #import "LOTMask.h" 16 | #import "LOTShapeCircle.h" 17 | #import "LOTShapeFill.h" 18 | #import "LOTShapeGroup.h" 19 | #import "LOTShapePath.h" 20 | #import "LOTShapeRectangle.h" 21 | #import "LOTShapeStroke.h" 22 | #import "LOTShapeTransform.h" 23 | #import "LOTShapeTrimPath.h" 24 | #import "LOTLayerGroup.h" 25 | #import "LOTAsset.h" 26 | #import "LOTShapeGradientFill.h" 27 | 28 | #endif /* LOTModels_h */ 29 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - lottie-ios (2.5.2) 3 | - R.swift (5.2.2): 4 | - R.swift.Library (~> 5.2.0) 5 | - R.swift.Library (5.2.0) 6 | - Shakuro.CommonTypes (1.1.3) 7 | 8 | DEPENDENCIES: 9 | - lottie-ios (= 2.5.2) 10 | - R.swift (= 5.2.2) 11 | - Shakuro.CommonTypes 12 | 13 | SPEC REPOS: 14 | trunk: 15 | - lottie-ios 16 | - R.swift 17 | - R.swift.Library 18 | - Shakuro.CommonTypes 19 | 20 | SPEC CHECKSUMS: 21 | lottie-ios: 3fef45d3fabe63e3c7c2eb603dd64ddfffc73062 22 | R.swift: 7c52cdc57a66840ffe6cbd8a823d732059d42a32 23 | R.swift.Library: 5ba4f1631300caf9a4d890186930da85d540769d 24 | Shakuro.CommonTypes: 97a477905259f2ac278a999ad38af8dfa9dd6c87 25 | 26 | PODFILE CHECKSUM: db2e895ec1559c0056f9cd27f516dad60420b357 27 | 28 | COCOAPODS: 1.11.3 29 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - lottie-ios (2.5.2) 3 | - R.swift (5.2.2): 4 | - R.swift.Library (~> 5.2.0) 5 | - R.swift.Library (5.2.0) 6 | - Shakuro.CommonTypes (1.1.3) 7 | 8 | DEPENDENCIES: 9 | - lottie-ios (= 2.5.2) 10 | - R.swift (= 5.2.2) 11 | - Shakuro.CommonTypes 12 | 13 | SPEC REPOS: 14 | trunk: 15 | - lottie-ios 16 | - R.swift 17 | - R.swift.Library 18 | - Shakuro.CommonTypes 19 | 20 | SPEC CHECKSUMS: 21 | lottie-ios: 3fef45d3fabe63e3c7c2eb603dd64ddfffc73062 22 | R.swift: 7c52cdc57a66840ffe6cbd8a823d732059d42a32 23 | R.swift.Library: 5ba4f1631300caf9a4d890186930da85d540769d 24 | Shakuro.CommonTypes: 97a477905259f2ac278a999ad38af8dfa9dd6c87 25 | 26 | PODFILE CHECKSUM: db2e895ec1559c0056f9cd27f516dad60420b357 27 | 28 | COCOAPODS: 1.11.3 29 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/UIKit/UINib+NibResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UINib+NibResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 08-01-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import UIKit 11 | 12 | public extension UINib { 13 | /** 14 | Returns a UINib object initialized to the nib file of the specified resource (R.nib.*). 15 | 16 | - parameter resource: The resource (R.nib.*) to load 17 | 18 | - returns: The initialized UINib object. An exception is thrown if there were errors during initialization or the nib file could not be located. 19 | */ 20 | convenience init(resource: NibResourceType) { 21 | self.init(nibName: resource.name, bundle: resource.bundle) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeFill.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeFill.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTShapeFill : NSObject 15 | 16 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 17 | 18 | @property (nonatomic, readonly) NSString *keyname; 19 | @property (nonatomic, readonly) BOOL fillEnabled; 20 | @property (nonatomic, readonly) LOTKeyframeGroup *color; 21 | @property (nonatomic, readonly) LOTKeyframeGroup *opacity; 22 | @property (nonatomic, readonly) BOOL evenOddFillRule; 23 | 24 | @end 25 | 26 | NS_ASSUME_NONNULL_END 27 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Core/ColorResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ColorResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Tom Lokhorst on 2016-03-13. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | public protocol ColorResourceType { 13 | 14 | /// Bundle this color is in 15 | var bundle: Bundle { get } 16 | 17 | /// Name of the color 18 | var name: String { get } 19 | } 20 | 21 | public struct ColorResource: ColorResourceType { 22 | 23 | /// Bundle this color is in 24 | public let bundle: Bundle 25 | 26 | /// Name of the color 27 | public let name: String 28 | 29 | public init(bundle: Bundle, name: String) { 30 | self.bundle = bundle 31 | self.name = name 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Core/ImageResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 11-01-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | public protocol ImageResourceType { 13 | 14 | /// Bundle this image is in 15 | var bundle: Bundle { get } 16 | 17 | /// Name of the image 18 | var name: String { get } 19 | } 20 | 21 | public struct ImageResource: ImageResourceType { 22 | 23 | /// Bundle this image is in 24 | public let bundle: Bundle 25 | 26 | /// Name of the image 27 | public let name: String 28 | 29 | public init(bundle: Bundle, name: String) { 30 | self.bundle = bundle 31 | self.name = name 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/UIKit/StoryboardResourceWithInitialController+UIKit.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StoryboardResourceWithInitialController+UIKit.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 07-01-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | import UIKit 12 | 13 | public extension StoryboardResourceWithInitialControllerType { 14 | /** 15 | Instantiates and returns the initial view controller in the view controller graph. 16 | 17 | - returns: The initial view controller in the storyboard. 18 | */ 19 | func instantiateInitialViewController() -> InitialController? { 20 | return UIStoryboard(resource: self).instantiateInitialViewController() as? InitialController 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/NSValue+Compat.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Oleksii Pavlovskyi on 2/2/17. 3 | // Copyright (c) 2017 Airbnb. All rights reserved. 4 | // 5 | 6 | #include 7 | 8 | #if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR 9 | #import "NSValue+Compat.h" 10 | 11 | @implementation NSValue (Compat) 12 | 13 | + (NSValue *)valueWithCGRect:(CGRect)rect { 14 | return [self valueWithRect:rect]; 15 | } 16 | 17 | + (NSValue *)valueWithCGPoint:(CGPoint)point { 18 | return [self valueWithPoint:point]; 19 | } 20 | 21 | - (CGRect)CGRectValue { 22 | return self.rectValue; 23 | } 24 | 25 | - (CGPoint)CGPointValue { 26 | return self.pointValue; 27 | } 28 | 29 | - (CGSize)CGSizeValue { 30 | return self.sizeValue; 31 | } 32 | 33 | @end 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Core/StoryboardViewControllerResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StoryboardViewControllerResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 13-03-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | public protocol StoryboardViewControllerResourceType: IdentifierType { 13 | associatedtype ViewControllerType 14 | } 15 | 16 | public struct StoryboardViewControllerResource: StoryboardViewControllerResourceType { 17 | public typealias ViewControllerType = ViewController 18 | 19 | /// Storyboard identifier of this view controller 20 | public let identifier: String 21 | 22 | public init(identifier: String) { 23 | self.identifier = identifier 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '13.0' 2 | use_frameworks! 3 | 4 | #ToolboxCommit = 'b3053718eb54fb8e5f39d5a1b54f8b0f82577f44' 5 | 6 | target 'Thermostat' do 7 | 8 | pod 'R.swift', '5.2.2' 9 | pod 'lottie-ios', '2.5.2' 10 | pod 'Shakuro.CommonTypes' 11 | 12 | end 13 | 14 | # Post Install "error: IB Designables: Failed to render and update auto layout ..." fix 15 | post_install do |installer| 16 | installer.pods_project.build_configurations.each do |config| 17 | config.build_settings.delete('CODE_SIGNING_ALLOWED') 18 | config.build_settings.delete('CODE_SIGNING_REQUIRED') 19 | end 20 | installer.pods_project.targets.each do |target| 21 | target.build_configurations.each do |config| 22 | config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0' 23 | end 24 | end 25 | 26 | end 27 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTLayerGroup.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTLayerGroup.h 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/16/17. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @class LOTLayer; 15 | @class LOTAssetGroup; 16 | 17 | @interface LOTLayerGroup : NSObject 18 | 19 | - (instancetype)initWithLayerJSON:(NSArray *)layersJSON 20 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 21 | withFramerate:(NSNumber *)framerate; 22 | 23 | @property (nonatomic, readonly) NSArray *layers; 24 | 25 | - (LOTLayer *)layerModelForID:(NSNumber *)layerID; 26 | - (LOTLayer *)layerForReferenceID:(NSString *)referenceID; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Foundation/Data+FileResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Data+FileResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Tom Lokhorst on 2016-03-11. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | public struct NoUrlForResourceError: Error {} 13 | 14 | public extension Data { 15 | 16 | /** 17 | Creates and returns NSData with the contents of the specified file resource (R.file.*). 18 | 19 | - parameter resource: The file resource (R.file.*) 20 | 21 | - returns: A NSData object with the contents of the specified file. 22 | */ 23 | init(resource: FileResourceType) throws { 24 | guard let url = resource.url() else { throw NoUrlForResourceError() } 25 | try self.init(contentsOf: url) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Thermostat.podspec: -------------------------------------------------------------------------------- 1 | 1234# 2 | # 3 | # 4 | 5 | Pod::Spec.new do |s| 6 | s.name = 'Thermostat' 7 | s.version = '1.0.0' 8 | s.summary = 'UI component for iOS' 9 | s.homepage = 'https://github.com/shakurocom/ThermostatControl' 10 | s.license = { :type => 'MIT', :file => 'LICENSE' } 11 | s.authors = {'Vlad Onipchenko' => 'vonipchenko@shakuro.com'} 12 | s.source = { :git => 'https://github.com/shakurocom/ThermostatControl.git', :tag => s.version } 13 | s.source_files = 'ThermostatControl/Source/**/**' 14 | s.resource_bundles = {'Thermostat' => ['ThermostatControl/Resources/**/*']} 15 | 16 | s.swift_version = '5.0' 17 | s.ios.deployment_target = '13.0' 18 | 19 | s.dependency 'Shakuro.CommonTypes', '~>1.1.3' 20 | s.dependency 'lottie-ios', '~>2.5.2' 21 | 22 | end 23 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/UIKit/UIFont+FontResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIFont+FontResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 06-01-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | import UIKit 12 | 13 | public extension UIFont { 14 | /** 15 | Creates and returns a font object for the specified font resource (R.font.*) and size. 16 | 17 | - parameter resource: The font resource (R.font.*) for the specific font to load 18 | - parameter size: The size (in points) to which the font is scaled. This value must be greater than 0.0. 19 | 20 | - returns: A font object of the specified font resource and size. 21 | */ 22 | convenience init?(resource: FontResourceType, size: CGFloat) { 23 | self.init(name: resource.fontName, size: size) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Shakuro.CommonTypes/Shakuro.CommonTypes.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Shakuro.CommonTypes 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Shakuro.CommonTypes 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Shakuro.CommonTypes/Shakuro.CommonTypes.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Shakuro.CommonTypes 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 5 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 6 | PODS_BUILD_DIR = ${BUILD_DIR} 7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Shakuro.CommonTypes 10 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 11 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 12 | SKIP_INSTALL = YES 13 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 14 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTAnimatedControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimatedControl.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 8/25/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class LOTAnimationView; 12 | @class LOTComposition; 13 | 14 | @interface LOTAnimatedControl : UIControl 15 | 16 | // This class is a base class that is intended to be subclassed 17 | 18 | /** 19 | * Map a specific animation layer to a control state. 20 | * When the state is set all layers will be hidden except the specified layer. 21 | **/ 22 | 23 | - (void)setLayerName:(NSString * _Nonnull)layerName forState:(UIControlState)state; 24 | 25 | @property (nonatomic, strong, readonly, nonnull) LOTAnimationView *animationView; 26 | @property (nonatomic, strong, nullable) LOTComposition *animationComp; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeTransform.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeTransform.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | #import "LOTKeyframe.h" 13 | 14 | @interface LOTShapeTransform : NSObject 15 | 16 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 17 | 18 | @property (nonatomic, readonly) NSString *keyname; 19 | @property (nonatomic, readonly) LOTKeyframeGroup *position; 20 | @property (nonatomic, readonly) LOTKeyframeGroup *anchor; 21 | @property (nonatomic, readonly) LOTKeyframeGroup *scale; 22 | @property (nonatomic, readonly) LOTKeyframeGroup *rotation; 23 | @property (nonatomic, readonly) LOTKeyframeGroup *opacity; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Core/Validatable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Validatable.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 17-12-15. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | /// Error thrown during validation 13 | public struct ValidationError: Error, CustomStringConvertible { 14 | /// Human readable description 15 | public let description: String 16 | 17 | public init(description: String) { 18 | self.description = description 19 | } 20 | } 21 | 22 | public protocol Validatable { 23 | /** 24 | Validates this entity and throws if it encounters an invalid situation, a validatable should also validate it sub-validatables if it has any. 25 | 26 | - throws: If there the configuration error a ValidationError is thrown 27 | */ 28 | static func validate() throws 29 | } 30 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/LOTPlatformCompat.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPlatformCompat.h 3 | // Lottie 4 | // 5 | // Created by Oleksii Pavlovskyi on 2/2/17. 6 | // Copyright (c) 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #ifndef LOTPlatformCompat_h 10 | #define LOTPlatformCompat_h 11 | 12 | #include 13 | 14 | #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR 15 | 16 | #import 17 | 18 | #else 19 | 20 | #import 21 | #import "UIColor.h" 22 | #import "CALayer+Compat.h" 23 | #import "NSValue+Compat.h" 24 | #import "UIBezierPath.h" 25 | 26 | NS_INLINE NSString *NSStringFromCGRect(CGRect rect) { 27 | return NSStringFromRect(rect); 28 | } 29 | 30 | NS_INLINE NSString *NSStringFromCGPoint(CGPoint point) { 31 | return NSStringFromPoint(point); 32 | } 33 | 34 | typedef NSEdgeInsets UIEdgeInsets; 35 | 36 | #endif 37 | #endif 38 | -------------------------------------------------------------------------------- /ThermostatControl/Source/Extensions/CGPoint+Distance.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CGPoint+Distance.swift 3 | // 4 | 5 | import CoreGraphics 6 | 7 | extension CGPoint { 8 | 9 | /// Finds the square distance to a point. 10 | /// - parameter point: specified point. 11 | func squaredDistance(to point: CGPoint) -> CGFloat { 12 | let xDistance = x - point.x 13 | let yDistance = y - point.y 14 | return xDistance * xDistance + yDistance * yDistance 15 | } 16 | 17 | /// Finds the distance to a point. 18 | /// - parameter point: specified point. 19 | func distance(to point: CGPoint) -> CGFloat { 20 | return sqrt(squaredDistance(to: point)) 21 | } 22 | 23 | /// Multiplies a point by the specified amount. 24 | static func * (left: CGPoint, right: CGFloat) -> CGPoint { 25 | return CGPoint(x: left.x * right, y: left.y * right) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Pods/Target Support Files/lottie-ios/lottie-ios-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "LOTAnimatedControl.h" 14 | #import "LOTAnimatedSwitch.h" 15 | #import "LOTAnimationCache.h" 16 | #import "LOTAnimationTransitionController.h" 17 | #import "LOTAnimationView.h" 18 | #import "LOTAnimationView_Compat.h" 19 | #import "LOTBlockCallback.h" 20 | #import "LOTCacheProvider.h" 21 | #import "LOTComposition.h" 22 | #import "LOTInterpolatorCallback.h" 23 | #import "LOTKeypath.h" 24 | #import "Lottie.h" 25 | #import "LOTValueCallback.h" 26 | #import "LOTValueDelegate.h" 27 | 28 | FOUNDATION_EXPORT double LottieVersionNumber; 29 | FOUNDATION_EXPORT const unsigned char LottieVersionString[]; 30 | 31 | -------------------------------------------------------------------------------- /Pods/Target Support Files/R.swift.Library/R.swift.Library.debug.xcconfig: -------------------------------------------------------------------------------- 1 | APPLICATION_EXTENSION_API_ONLY = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/R.swift.Library 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/R.swift.Library 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Pods/Target Support Files/R.swift.Library/R.swift.Library.release.xcconfig: -------------------------------------------------------------------------------- 1 | APPLICATION_EXTENSION_API_ONLY = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/R.swift.Library 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/R.swift.Library 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTValueInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTValueInterpolator.h 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 7/10/17. 6 | // 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | #import "LOTValueDelegate.h" 12 | 13 | NS_ASSUME_NONNULL_BEGIN 14 | 15 | @interface LOTValueInterpolator : NSObject 16 | 17 | - (instancetype)initWithKeyframes:(NSArray *)keyframes; 18 | 19 | @property (nonatomic, weak, nullable) LOTKeyframe *leadingKeyframe; 20 | @property (nonatomic, weak, nullable) LOTKeyframe *trailingKeyframe; 21 | @property (nonatomic, readonly) BOOL hasDelegateOverride; 22 | 23 | - (void)setValueDelegate:(id _Nonnull)delegate; 24 | 25 | - (BOOL)hasUpdateForFrame:(NSNumber *)frame; 26 | - (CGFloat)progressForFrame:(NSNumber *)frame; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /ThermostatDemo/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIAppFonts 6 | 7 | Montserrat-Bold.ttf 8 | 9 | CFBundleIdentifier 10 | 11 | UIApplicationSceneManifest 12 | 13 | UIApplicationSupportsMultipleScenes 14 | 15 | UISceneConfigurations 16 | 17 | UIWindowSceneSessionRoleApplication 18 | 19 | 20 | UISceneConfigurationName 21 | Default Configuration 22 | UISceneDelegateClassName 23 | $(PRODUCT_MODULE_NAME).SceneDelegate 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTCacheProvider.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTCacheProvider.h 3 | // Lottie 4 | // 5 | // Created by punmy on 2017/7/8. 6 | // 7 | // 8 | 9 | #import 10 | 11 | #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR 12 | 13 | #import 14 | @compatibility_alias LOTImage UIImage; 15 | 16 | @protocol LOTImageCache; 17 | 18 | #pragma mark - LOTCacheProvider 19 | 20 | @interface LOTCacheProvider : NSObject 21 | 22 | + (id)imageCache; 23 | + (void)setImageCache:(id)cache; 24 | 25 | @end 26 | 27 | #pragma mark - LOTImageCache 28 | 29 | /** 30 | This protocol represent the interface of a image cache which lottie can use. 31 | */ 32 | @protocol LOTImageCache 33 | 34 | @required 35 | - (LOTImage *)imageForKey:(NSString *)key; 36 | - (void)setImage:(LOTImage *)image forKey:(NSString *)key; 37 | 38 | @end 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /Pods/Target Support Files/R.swift/R.swift.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/R.swift 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/R.swift.Library" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/R.swift 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Pods/Target Support Files/R.swift/R.swift.release.xcconfig: -------------------------------------------------------------------------------- 1 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/R.swift 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/R.swift.Library" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 7 | PODS_BUILD_DIR = ${BUILD_DIR} 8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 9 | PODS_ROOT = ${SRCROOT} 10 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/R.swift 11 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 13 | SKIP_INSTALL = YES 14 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 15 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapePath.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapePath.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapePath.h" 10 | 11 | @implementation LOTShapePath 12 | 13 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 14 | self = [super init]; 15 | if (self) { 16 | [self _mapFromJSON:jsonDictionary]; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 22 | 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | _index = jsonDictionary[@"ind"]; 28 | _closed = [jsonDictionary[@"closed"] boolValue]; 29 | NSDictionary *shape = jsonDictionary[@"ks"]; 30 | if (shape) { 31 | _shapePath = [[LOTKeyframeGroup alloc] initWithData:shape]; 32 | } 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/UIKit/UIStoryboard+StoryboardResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIStoryboard+StoryboardResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 07-01-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import UIKit 11 | 12 | public extension UIStoryboard { 13 | /** 14 | Creates and returns a storyboard object for the specified storyboard resource (R.storyboard.*) file. 15 | 16 | - parameter resource: The storyboard resource (R.storyboard.*) for the specific storyboard to load 17 | 18 | - returns: A storyboard object for the specified file. If no storyboard resource file matching name exists, an exception is thrown with description: `Could not find a storyboard named 'XXXXXX' in bundle....` 19 | */ 20 | convenience init(resource: StoryboardResourceType) { 21 | self.init(name: resource.name, bundle: resource.bundle) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ThermostatDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ThermostatControl 4 | // 5 | // Created by Andrew Popov on 08.04.2022. 6 | // 7 | 8 | import UIKit 9 | 10 | @main 11 | class AppDelegate: UIResponder, UIApplicationDelegate { 12 | 13 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 14 | return true 15 | } 16 | 17 | // MARK: UISceneSession Lifecycle 18 | 19 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 20 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 21 | } 22 | 23 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 24 | } 25 | 26 | 27 | } 28 | 29 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTMask.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTMask.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/14/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | typedef enum : NSUInteger { 13 | LOTMaskModeAdd, 14 | LOTMaskModeSubtract, 15 | LOTMaskModeIntersect, 16 | LOTMaskModeUnknown 17 | } LOTMaskMode; 18 | 19 | @interface LOTMask : NSObject 20 | 21 | - (instancetype _Nonnull)initWithJSON:(NSDictionary * _Nonnull)jsonDictionary; 22 | 23 | @property (nonatomic, readonly) BOOL closed; 24 | @property (nonatomic, readonly) BOOL inverted; 25 | @property (nonatomic, readonly) LOTMaskMode maskMode; 26 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *maskPath; 27 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *opacity; 28 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *expansion; 29 | @end 30 | -------------------------------------------------------------------------------- /Pods/Target Support Files/lottie-ios/lottie-ios-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 2.5.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTAssetGroup.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAssetGroup.h 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/17/17. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class LOTAsset; 13 | @class LOTLayerGroup; 14 | @interface LOTAssetGroup : NSObject 15 | @property (nonatomic, readwrite) NSString * _Nullable rootDirectory; 16 | @property (nonatomic, readonly, nullable) NSBundle *assetBundle; 17 | 18 | - (instancetype _Nonnull)initWithJSON:(NSArray * _Nonnull)jsonArray 19 | withAssetBundle:(NSBundle *_Nullable)bundle 20 | withFramerate:(NSNumber * _Nonnull)framerate; 21 | 22 | - (void)buildAssetNamed:(NSString * _Nonnull)refID withFramerate:(NSNumber * _Nonnull)framerate; 23 | 24 | - (void)finalizeInitializationWithFramerate:(NSNumber * _Nonnull)framerate; 25 | 26 | - (LOTAsset * _Nullable)assetModelForID:(NSString * _Nonnull)assetID; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/UIKit/NibResource+UIKit.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NibResource+UIKit.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 06-01-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | import UIKit 12 | 13 | public extension NibResourceType { 14 | /** 15 | Instantiate the nib to get the top-level objects from this nib 16 | 17 | - parameter ownerOrNil: The owner, if the owner parameter is nil, connections to File's Owner are not permitted. 18 | - parameter options: Options are identical to the options specified with -[NSBundle loadNibNamed:owner:options:] 19 | 20 | - returns: An array containing the top-level objects from the NIB 21 | */ 22 | func instantiate(withOwner ownerOrNil: Any?, options optionsOrNil: [UINib.OptionsKey : Any]? = [:]) -> [Any] { 23 | return UINib(resource: self).instantiate(withOwner: ownerOrNil, options: optionsOrNil) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Thermostat/Pods-Thermostat-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Target Support Files/R.swift.Library/R.swift.Library-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 5.2.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTAnimationCache.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimationCache.h 3 | // Lottie 4 | // 5 | // Created by Brandon Withrow on 1/9/17. 6 | // Copyright © 2017 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @class LOTComposition; 14 | 15 | @interface LOTAnimationCache : NSObject 16 | 17 | /// Global Cache 18 | + (instancetype)sharedCache; 19 | 20 | /// Adds animation to the cache 21 | - (void)addAnimation:(LOTComposition *)animation forKey:(NSString *)key; 22 | 23 | /// Returns animation from cache. 24 | - (LOTComposition * _Nullable)animationForKey:(NSString *)key; 25 | 26 | /// Removes a specific animation from the cache 27 | - (void)removeAnimationForKey:(NSString *)key; 28 | 29 | /// Clears Everything from the Cache 30 | - (void)clearCache; 31 | 32 | /// Disables Caching Animation Model Objects 33 | - (void)disableCaching; 34 | 35 | @end 36 | 37 | NS_ASSUME_NONNULL_END 38 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Shakuro.CommonTypes/Shakuro.CommonTypes-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.1.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/AsyncResult.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2019 Shakuro (https://shakuro.com/) 3 | // Sergey Laschuk 4 | // 5 | 6 | import Foundation 7 | 8 | public enum AsyncResult { 9 | 10 | case success(result: ResultType) 11 | case failure(error: Error) 12 | 13 | public func removingType() -> AsyncResult { 14 | switch self { 15 | case .success: return .success(result: ()) 16 | case .failure(let error): return .failure(error: error) 17 | } 18 | } 19 | 20 | } 21 | 22 | public enum CancellableAsyncResult { 23 | 24 | case success(result: ResultType) 25 | case cancelled 26 | case failure(error: Error) 27 | 28 | public func removingType() -> CancellableAsyncResult { 29 | switch self { 30 | case .success: return .success(result: ()) 31 | case .cancelled: return .cancelled 32 | case .failure(let error): return .failure(error: error) 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTAnimationView_Compat.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimationView_Compat.h 3 | // Lottie 4 | // 5 | // Created by Oleksii Pavlovskyi on 2/2/17. 6 | // Copyright (c) 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR 10 | 11 | #import 12 | @compatibility_alias LOTView UIView; 13 | 14 | #else 15 | 16 | #import 17 | @compatibility_alias LOTView NSView; 18 | 19 | typedef NS_ENUM(NSInteger, LOTViewContentMode) { 20 | LOTViewContentModeScaleToFill, 21 | LOTViewContentModeScaleAspectFit, 22 | LOTViewContentModeScaleAspectFill, 23 | LOTViewContentModeRedraw, 24 | LOTViewContentModeCenter, 25 | LOTViewContentModeTop, 26 | LOTViewContentModeBottom, 27 | LOTViewContentModeLeft, 28 | LOTViewContentModeRight, 29 | LOTViewContentModeTopLeft, 30 | LOTViewContentModeTopRight, 31 | LOTViewContentModeBottomLeft, 32 | LOTViewContentModeBottomRight, 33 | }; 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /ThermostatControl/Source/Controls/TintAlphaButton.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | public class TintAlphaButton: StateAlphaButton { 4 | 5 | /// Button tint color when pressed. 6 | var selectedTintColor: UIColor? 7 | 8 | /// Normal button tint color. 9 | var normalTintColor: UIColor? 10 | 11 | override public var isSelected: Bool { 12 | didSet { 13 | if let selectedTint = selectedTintColor, let normalTint = normalTintColor { 14 | tintColor = isSelected ? selectedTint : normalTint 15 | } 16 | } 17 | } 18 | 19 | override init(frame: CGRect) { 20 | super.init(frame: frame) 21 | setup() 22 | } 23 | 24 | required init?(coder aDecoder: NSCoder) { 25 | super.init(coder: aDecoder) 26 | setup() 27 | } 28 | 29 | // MARK: Private 30 | 31 | private func setup() { 32 | isExclusiveTouch = true 33 | adjustsImageWhenDisabled = false 34 | adjustsImageWhenHighlighted = false 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Core/ReuseIdentifierProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ReuseIdentifierProtocol.swift 3 | // R.swift Library 4 | // 5 | // Created by Mathijs Kadijk on 06-12-15. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | /// Reuse identifier protocol 13 | public protocol ReuseIdentifierType: IdentifierType { 14 | /// Type of this reuseable 15 | associatedtype ReusableType 16 | } 17 | 18 | /// Reuse identifier 19 | public struct ReuseIdentifier: ReuseIdentifierType { 20 | /// Type of this reuseable 21 | public typealias ReusableType = Reusable 22 | 23 | /// String identifier of this reusable 24 | public let identifier: String 25 | 26 | /** 27 | Create a new ReuseIdentifier based on the string identifier 28 | 29 | - parameter identifier: The string identifier for this reusable 30 | 31 | - returns: A new ReuseIdentifier 32 | */ 33 | public init(identifier: String) { 34 | self.identifier = identifier 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/UITableView+Reusable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2018 Shakuro (https://shakuro.com/) 3 | // Sergey Popov 4 | // 5 | 6 | import UIKit 7 | 8 | extension UITableView { 9 | 10 | public func dequeueReusableCell(indexPath: IndexPath, reuseIdentifier: String) -> T { 11 | guard let cell = self.dequeueReusableCell(withIdentifier: reuseIdentifier, for: indexPath as IndexPath) as? T else { 12 | fatalError("\(type(of: self)) - \(#function): can't dequeue cell with identifier: \(reuseIdentifier); indexPath: \(indexPath).") 13 | } 14 | return cell 15 | } 16 | 17 | public func dequeueReusableHeaderFooterView(reuseIdentifier: String) -> T { 18 | guard let view = self.dequeueReusableHeaderFooterView(withIdentifier: reuseIdentifier) as? T else { 19 | fatalError("\(type(of: self)) - \(#function): can't dequeue headerFooterView with identifier: \(reuseIdentifier).") 20 | } 21 | return view 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeCircle.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeCircle.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeCircle.h" 10 | 11 | @implementation LOTShapeCircle 12 | 13 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 14 | self = [super init]; 15 | if (self) { 16 | [self _mapFromJSON:jsonDictionary]; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 22 | 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | NSDictionary *position = jsonDictionary[@"p"]; 28 | if (position) { 29 | _position = [[LOTKeyframeGroup alloc] initWithData:position]; 30 | } 31 | 32 | NSDictionary *size= jsonDictionary[@"s"]; 33 | if (size) { 34 | _size = [[LOTKeyframeGroup alloc] initWithData:size]; 35 | } 36 | NSNumber *reversed = jsonDictionary[@"d"]; 37 | _reversed = (reversed.integerValue == 3); 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeGradientFill.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeGradientFill.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/26/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | typedef enum : NSUInteger { 15 | LOTGradientTypeLinear, 16 | LOTGradientTypeRadial 17 | } LOTGradientType; 18 | 19 | @interface LOTShapeGradientFill : NSObject 20 | 21 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 22 | 23 | @property (nonatomic, readonly) NSString *keyname; 24 | @property (nonatomic, readonly) NSNumber *numberOfColors; 25 | @property (nonatomic, readonly) LOTKeyframeGroup *startPoint; 26 | @property (nonatomic, readonly) LOTKeyframeGroup *endPoint; 27 | @property (nonatomic, readonly) LOTKeyframeGroup *gradient; 28 | @property (nonatomic, readonly) LOTKeyframeGroup *opacity; 29 | @property (nonatomic, readonly) BOOL evenOddFillRule; 30 | @property (nonatomic, readonly) LOTGradientType type; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTArrayInterpolator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTArrayInterpolator.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTArrayInterpolator.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTArrayInterpolator 13 | 14 | - (NSArray *)numberArrayForFrame:(NSNumber *)frame { 15 | CGFloat progress = [self progressForFrame:frame]; 16 | if (progress == 0) { 17 | return self.leadingKeyframe.arrayValue; 18 | } 19 | if (progress == 1) { 20 | return self.trailingKeyframe.arrayValue; 21 | } 22 | NSMutableArray *returnArray = [NSMutableArray array]; 23 | for (int i = 0; i < self.leadingKeyframe.arrayValue.count; i ++) { 24 | CGFloat from = [(NSNumber *)self.leadingKeyframe.arrayValue[i] floatValue]; 25 | CGFloat to = [(NSNumber *)self.trailingKeyframe.arrayValue[i] floatValue]; 26 | CGFloat value = LOT_RemapValue(progress, 0, 1, from, to); 27 | [returnArray addObject:@(value)]; 28 | } 29 | return returnArray; 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeRepeater.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeRepeater.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/28/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @interface LOTShapeRepeater : NSObject 15 | 16 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 17 | 18 | @property (nonatomic, readonly) NSString *keyname; 19 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *copies; 20 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *offset; 21 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *anchorPoint; 22 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *scale; 23 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *position; 24 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *rotation; 25 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *startOpacity; 26 | @property (nonatomic, readonly, nullable) LOTKeyframeGroup *endOpacity; 27 | 28 | @end 29 | 30 | NS_ASSUME_NONNULL_END 31 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Shakuro 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeTrimPath.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeTrimPath.m 3 | // LottieAnimator 4 | // 5 | // Created by brandon_withrow on 7/26/16. 6 | // Copyright © 2016 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeTrimPath.h" 10 | 11 | @implementation LOTShapeTrimPath 12 | 13 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 14 | self = [super init]; 15 | if (self) { 16 | [self _mapFromJSON:jsonDictionary]; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 22 | 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | NSDictionary *start = jsonDictionary[@"s"]; 28 | if (start) { 29 | _start = [[LOTKeyframeGroup alloc] initWithData:start]; 30 | } 31 | 32 | NSDictionary *end = jsonDictionary[@"e"]; 33 | if (end) { 34 | _end = [[LOTKeyframeGroup alloc] initWithData:end]; 35 | } 36 | 37 | NSDictionary *offset = jsonDictionary[@"o"]; 38 | if (offset) { 39 | _offset = [[LOTKeyframeGroup alloc] initWithData:offset]; 40 | } 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/Lottie.h: -------------------------------------------------------------------------------- 1 | // 2 | // Lottie.h 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 1/27/17. 6 | // 7 | // Dream Big. 8 | 9 | #if __has_feature(modules) 10 | @import Foundation; 11 | #else 12 | #import 13 | #endif 14 | 15 | #ifndef Lottie_h 16 | #define Lottie_h 17 | 18 | //! Project version number for Lottie. 19 | FOUNDATION_EXPORT double LottieVersionNumber; 20 | 21 | //! Project version string for Lottie. 22 | FOUNDATION_EXPORT const unsigned char LottieVersionString[]; 23 | 24 | #include 25 | 26 | #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR 27 | #import "LOTAnimationTransitionController.h" 28 | #import "LOTAnimatedSwitch.h" 29 | #import "LOTAnimatedControl.h" 30 | #endif 31 | 32 | #if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR 33 | #import "LOTCacheProvider.h" 34 | #endif 35 | 36 | #import "LOTAnimationView.h" 37 | #import "LOTAnimationCache.h" 38 | #import "LOTComposition.h" 39 | #import "LOTBlockCallback.h" 40 | #import "LOTInterpolatorCallback.h" 41 | #import "LOTValueCallback.h" 42 | #import "LOTValueDelegate.h" 43 | 44 | #endif /* Lottie_h */ 45 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeStar.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeStar.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | typedef enum : NSUInteger { 13 | LOTPolystarShapeNone, 14 | LOTPolystarShapeStar, 15 | LOTPolystarShapePolygon 16 | } LOTPolystarShape; 17 | 18 | @interface LOTShapeStar : NSObject 19 | 20 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 21 | 22 | @property (nonatomic, readonly) NSString *keyname; 23 | @property (nonatomic, readonly) LOTKeyframeGroup *outerRadius; 24 | @property (nonatomic, readonly) LOTKeyframeGroup *outerRoundness; 25 | 26 | @property (nonatomic, readonly) LOTKeyframeGroup *innerRadius; 27 | @property (nonatomic, readonly) LOTKeyframeGroup *innerRoundness; 28 | 29 | @property (nonatomic, readonly) LOTKeyframeGroup *position; 30 | @property (nonatomic, readonly) LOTKeyframeGroup *numberOfPoints; 31 | @property (nonatomic, readonly) LOTKeyframeGroup *rotation; 32 | 33 | @property (nonatomic, readonly) LOTPolystarShape type; 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /Pods/R.swift/License: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2020 Mathijs Kadijk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/License: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Mathijs Kadijk 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /ThermostatControl/Source/Controls/SliderView/DefaultSliderValueTransformer+FactoryMethods.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | extension DefaultSliderValueTransformer { 4 | 5 | static func humidityValueTransformer() -> SliderValueTransformer { 6 | return DefaultSliderValueTransformer(suffix: "%") 7 | } 8 | 9 | static func celsiusValueTransformer() -> SliderValueTransformer { 10 | return DefaultSliderValueTransformer(suffix: "", 11 | prefix: "", 12 | roundingThreshold: 0.5, 13 | minimumFractionDigits: 1, 14 | maximumFractionDigits: 1) 15 | } 16 | 17 | static func fahrenheitValueTransformer() -> SliderValueTransformer { 18 | return DefaultSliderValueTransformer(suffix: "", 19 | prefix: "", 20 | roundingThreshold: 1.0, 21 | minimumFractionDigits: 0, 22 | maximumFractionDigits: 0) 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Shakuro (https://shakuro.com/) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/UIStoryboard+Instantiate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2017 Shakuro (https://shakuro.com/) 3 | // Andrey Popov 4 | // 5 | 6 | import UIKit 7 | 8 | extension UIStoryboard { 9 | 10 | /** 11 | Wrapped version of the `instantiateViewController` 12 | 13 | - Parameters: 14 | - withIdentifier: Storyboard ID of the controller, that must be created 15 | 16 | - Returns: 17 | New instance of a UIViewController. 18 | 19 | - Crashes with: 20 | `fatalError` if object with specified identifier not found in storyboard or object has different type 21 | 22 | - Example: 23 | `let exampleVC: ExampleViewController = storyboard.instantiateViewController(withIdentifier: "kExampleViewControllerStoryboardID")` 24 | */ 25 | public func instantiateViewController(withIdentifier identifier: String) -> ControllerType { 26 | guard let resultController: ControllerType = instantiateViewController(withIdentifier: identifier) as? ControllerType else { 27 | fatalError("\(type(of: self)) \(#function): \(identifier).") 28 | } 29 | return resultController 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /ThermostatControl/Source/Controls/SliderView/TemperatureUnit.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | enum TemperatureUnit { 4 | 5 | enum Constant { 6 | static let celsiusToFahrenheitScale: CGFloat = 9.0 / 5.0 7 | static let freezingPointOffset: CGFloat = 32 8 | } 9 | 10 | case fahrenheit 11 | case celsius 12 | 13 | var string: String { 14 | switch self { 15 | case .celsius: 16 | return "°С" 17 | case .fahrenheit: 18 | return "°F" 19 | } 20 | } 21 | 22 | func convertValue(_ value: CGFloat, toUnit: TemperatureUnit) -> CGFloat { 23 | let convertedValue: CGFloat 24 | switch (self, toUnit) { 25 | case (.fahrenheit, .celsius): 26 | // (32°F − 32) / 9/5 = 0°C 27 | convertedValue = (value - Constant.freezingPointOffset) / Constant.celsiusToFahrenheitScale 28 | case (.celsius, .fahrenheit): 29 | // (0°C × 9/5) + 32 = 32°F 30 | convertedValue = (value * Constant.celsiusToFahrenheitScale) + Constant.freezingPointOffset 31 | default: 32 | convertedValue = value 33 | } 34 | return convertedValue 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/AnimatorNodes/LOTPathAnimator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPathAnimator.m 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // 7 | // 8 | 9 | #import "LOTPathAnimator.h" 10 | #import "LOTPathInterpolator.h" 11 | 12 | @implementation LOTPathAnimator { 13 | LOTShapePath *_pathConent; 14 | LOTPathInterpolator *_interpolator; 15 | } 16 | 17 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 18 | shapePath:(LOTShapePath *_Nonnull)shapePath { 19 | self = [super initWithInputNode:inputNode keyName:shapePath.keyname]; 20 | if (self) { 21 | _pathConent = shapePath; 22 | _interpolator = [[LOTPathInterpolator alloc] initWithKeyframes:_pathConent.shapePath.keyframes]; 23 | } 24 | return self; 25 | } 26 | 27 | - (NSDictionary *)valueInterpolators { 28 | return @{@"Path" : _interpolator}; 29 | } 30 | 31 | - (BOOL)needsUpdateForFrame:(NSNumber *)frame { 32 | return [_interpolator hasUpdateForFrame:frame]; 33 | } 34 | 35 | - (void)performLocalUpdate { 36 | self.localPath = [_interpolator pathForFrame:self.currentFrame cacheLengths:self.pathShouldCacheLengths]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Foundation/Bundle+FileResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Bundle+FileResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 10-01-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | public extension Bundle { 13 | /** 14 | Returns the file URL for the given resource (R.file.*). 15 | 16 | - parameter resource: The resource to get the file URL for (R.file.*). 17 | 18 | - returns: The file URL for the resource file (R.file.*) or nil if the file could not be located. 19 | */ 20 | func url(forResource resource: FileResourceType) -> URL? { 21 | return url(forResource: resource.name, withExtension: resource.pathExtension) 22 | } 23 | 24 | /** 25 | Returns the full pathname for the resource (R.file.*). 26 | 27 | - parameter resource: The resource file to get the path for (R.file.*). 28 | 29 | - returns: The full pathname for the resource file (R.file.*) or nil if the file could not be located. 30 | */ 31 | func path(forResource resource: FileResourceType) -> String? { 32 | return path(forResource: resource.name, ofType: resource.pathExtension) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTAsset.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAsset.h 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/16/17. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | 12 | NS_ASSUME_NONNULL_BEGIN 13 | 14 | @class LOTLayerGroup; 15 | @class LOTLayer; 16 | @class LOTAssetGroup; 17 | 18 | @interface LOTAsset : NSObject 19 | 20 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary 21 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 22 | withAssetBundle:(NSBundle *_Nonnull)bundle 23 | withFramerate:(NSNumber *)framerate; 24 | 25 | @property (nonatomic, readonly, nullable) NSString *referenceID; 26 | @property (nonatomic, readonly, nullable) NSNumber *assetWidth; 27 | @property (nonatomic, readonly, nullable) NSNumber *assetHeight; 28 | 29 | @property (nonatomic, readonly, nullable) NSString *imageName; 30 | @property (nonatomic, readonly, nullable) NSString *imageDirectory; 31 | 32 | @property (nonatomic, readonly, nullable) LOTLayerGroup *layerGroup; 33 | 34 | @property (nonatomic, readwrite) NSString *rootDirectory; 35 | @property (nonatomic, readonly) NSBundle *assetBundle; 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /ThermostatControl/Resources/ThermostatAssets.xcassets/ThermostatImages/HumidistatShadow.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "Shadow@2x.png", 9 | "idiom" : "universal", 10 | "resizing" : { 11 | "cap-insets" : { 12 | "bottom" : 142, 13 | "left" : 72, 14 | "right" : 73, 15 | "top" : 143 16 | }, 17 | "center" : { 18 | "height" : 1, 19 | "mode" : "stretch", 20 | "width" : 1 21 | }, 22 | "mode" : "9-part" 23 | }, 24 | "scale" : "2x" 25 | }, 26 | { 27 | "filename" : "Shadow@3x.png", 28 | "idiom" : "universal", 29 | "resizing" : { 30 | "cap-insets" : { 31 | "bottom" : 214, 32 | "left" : 109, 33 | "right" : 109, 34 | "top" : 214 35 | }, 36 | "center" : { 37 | "height" : 1, 38 | "mode" : "stretch", 39 | "width" : 1 40 | }, 41 | "mode" : "9-part" 42 | }, 43 | "scale" : "3x" 44 | } 45 | ], 46 | "info" : { 47 | "author" : "xcode", 48 | "version" : 1 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/UIKit/UIStoryboard+StoryboardViewControllerResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+StoryboardViewControllerResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 13-03-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | import UIKit 12 | 13 | public extension UIStoryboard { 14 | /** 15 | Instantiates and returns the view controller with the specified resource (R.storyboard.*.*). 16 | 17 | - parameter resource: An resource (R.storyboard.*.*) that uniquely identifies the view controller in the storyboard file. If the specified resource does not exist in the storyboard file, this method raises an exception. 18 | 19 | - returns: The view controller corresponding to the specified resource (R.storyboard.*.*). If no view controller is associated, this method throws an exception. 20 | */ 21 | func instantiateViewController(withResource resource: ViewControllerResource) -> ViewControllerResource.ViewControllerType? { 22 | return self.instantiateViewController(withIdentifier: resource.identifier) as? ViewControllerResource.ViewControllerType 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeStroke.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeStroke.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTKeyframe.h" 11 | 12 | typedef enum : NSUInteger { 13 | LOTLineCapTypeButt, 14 | LOTLineCapTypeRound, 15 | LOTLineCapTypeUnknown 16 | } LOTLineCapType; 17 | 18 | typedef enum : NSUInteger { 19 | LOTLineJoinTypeMiter, 20 | LOTLineJoinTypeRound, 21 | LOTLineJoinTypeBevel 22 | } LOTLineJoinType; 23 | 24 | @interface LOTShapeStroke : NSObject 25 | 26 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary; 27 | 28 | @property (nonatomic, readonly) NSString *keyname; 29 | @property (nonatomic, readonly) BOOL fillEnabled; 30 | @property (nonatomic, readonly) LOTKeyframeGroup *color; 31 | @property (nonatomic, readonly) LOTKeyframeGroup *opacity; 32 | @property (nonatomic, readonly) LOTKeyframeGroup *width; 33 | @property (nonatomic, readonly) LOTKeyframeGroup *dashOffset; 34 | @property (nonatomic, readonly) LOTLineCapType capType; 35 | @property (nonatomic, readonly) LOTLineJoinType joinType; 36 | 37 | @property (nonatomic, readonly) NSArray *lineDashPattern; 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeRectangle.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeRectangle.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeRectangle.h" 10 | 11 | @implementation LOTShapeRectangle 12 | 13 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 14 | self = [super init]; 15 | if (self) { 16 | [self _mapFromJSON:jsonDictionary]; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 22 | 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | NSDictionary *position = jsonDictionary[@"p"]; 28 | if (position) { 29 | _position = [[LOTKeyframeGroup alloc] initWithData:position]; 30 | } 31 | 32 | NSDictionary *cornerRadius = jsonDictionary[@"r"]; 33 | if (cornerRadius) { 34 | _cornerRadius = [[LOTKeyframeGroup alloc] initWithData:cornerRadius]; 35 | } 36 | 37 | NSDictionary *size = jsonDictionary[@"s"]; 38 | if (size) { 39 | _size = [[LOTKeyframeGroup alloc] initWithData:size]; 40 | } 41 | NSNumber *reversed = jsonDictionary[@"d"]; 42 | _reversed = (reversed.integerValue == 3); 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/LOTRenderNode.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTRenderNode.m 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // 7 | // 8 | 9 | #import "LOTRenderNode.h" 10 | 11 | @implementation LOTRenderNode 12 | 13 | - (instancetype _Nonnull)initWithInputNode:(LOTAnimatorNode *_Nullable)inputNode 14 | keyName:(NSString * _Nullable)keyname { 15 | self = [super initWithInputNode:inputNode keyName:keyname]; 16 | if (self) { 17 | _outputLayer = [CAShapeLayer new]; 18 | _outputLayer.actions = [self actionsForRenderLayer]; 19 | } 20 | return self; 21 | } 22 | 23 | /// Layer Properties that need to disable implicit animations 24 | - (NSDictionary * _Nonnull)actionsForRenderLayer { 25 | return @{@"path": [NSNull null]}; 26 | } 27 | 28 | /// Local interpolators have changed. Update layer specific properties. 29 | - (void)performLocalUpdate { 30 | 31 | } 32 | 33 | /// The path for rendering has changed. Do any rendering required. 34 | - (void)rebuildOutputs { 35 | 36 | } 37 | 38 | - (LOTBezierPath *)localPath { 39 | return self.inputNode.localPath; 40 | } 41 | 42 | /// Forwards its input node's output path forwards downstream 43 | - (LOTBezierPath *)outputPath { 44 | return self.inputNode.outputPath; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /ThermostatControl/Source/Stylesheet.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | public enum Stylesheet { 4 | 5 | // MARK: - Colors 6 | 7 | public enum Color { 8 | public static let darkThermostat: UIColor = UIColor(red: 95.0/255.0, green: 95.0/255.0, blue: 95.0/255.0, alpha: 1.0) // #5F5F5F 9 | public static let redThermostat: UIColor = UIColor(red: 237.0/255.0, green: 33.0/255.0, blue: 91.0/255.0, alpha: 1.0) // #EC205B 10 | } 11 | 12 | // MARK: - Fonts 13 | 14 | public enum FontFace: String { 15 | case montserratBold = "Montserrat-Bold" 16 | } 17 | 18 | } 19 | 20 | // MARK: - Helpers 21 | 22 | public extension Stylesheet.FontFace { 23 | 24 | func fontWithSize(_ size: CGFloat) -> UIFont { 25 | guard let actualFont: UIFont = UIFont(name: self.rawValue, size: size) else { 26 | debugPrint("Can't load fon with name!!! \(self.rawValue)") 27 | return UIFont.systemFont(ofSize: size, weight: .bold) 28 | } 29 | return actualFont 30 | } 31 | 32 | static func printAvailableFonts() { 33 | for name in UIFont.familyNames { 34 | debugPrint("<<<<<<< Font Family: \(name)") 35 | for fontName in UIFont.fontNames(forFamilyName: name) { 36 | debugPrint("Font Name: \(fontName)") 37 | } 38 | } 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/UIKit/TypedStoryboardSegueInfo+UIStoryboardSegue.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TypedStoryboardSegueInfo+UIStoryboardSegue.swift 3 | // R.swift Library 4 | // 5 | // Created by Mathijs Kadijk on 06-12-15. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | import UIKit 12 | 13 | extension TypedStoryboardSegueInfo { 14 | /** 15 | Returns typed information about the given segue, fails if the segue types don't exactly match types. 16 | 17 | - returns: A newly initialized TypedStoryboardSegueInfo object or nil. 18 | */ 19 | public init?(segueIdentifier: SegueIdentifier, segue: UIStoryboardSegue) 20 | where SegueIdentifier.SegueType == Segue, SegueIdentifier.SourceType == Source, SegueIdentifier.DestinationType == Destination 21 | { 22 | guard let identifier = segue.identifier, 23 | let source = segue.source as? SegueIdentifier.SourceType, 24 | let destination = segue.destination as? SegueIdentifier.DestinationType, 25 | let segue = segue as? SegueIdentifier.SegueType, identifier == segueIdentifier.identifier 26 | else { 27 | return nil 28 | } 29 | 30 | self.segue = segue 31 | self.identifier = identifier 32 | self.source = source 33 | self.destination = destination 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/AnimatableLayers/LOTLayerContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTLayerContainer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/18/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTPlatformCompat.h" 10 | #import "LOTLayer.h" 11 | #import "LOTLayerGroup.h" 12 | #import "LOTKeypath.h" 13 | #import "LOTValueDelegate.h" 14 | 15 | @class LOTValueCallback; 16 | 17 | @interface LOTLayerContainer : CALayer 18 | 19 | - (instancetype _Nonnull)initWithModel:(LOTLayer * _Nullable)layer 20 | inLayerGroup:(LOTLayerGroup * _Nullable)layerGroup; 21 | 22 | @property (nonatomic, readonly, strong, nullable) NSString *layerName; 23 | @property (nonatomic, nullable) NSNumber *currentFrame; 24 | @property (nonatomic, readonly, nonnull) NSNumber *timeStretchFactor; 25 | @property (nonatomic, assign) CGRect viewportBounds; 26 | @property (nonatomic, readonly, nonnull) CALayer *wrapperLayer; 27 | @property (nonatomic, readonly, nonnull) NSDictionary *valueInterpolators; 28 | 29 | - (void)displayWithFrame:(NSNumber * _Nonnull)frame; 30 | - (void)displayWithFrame:(NSNumber * _Nonnull)frame forceUpdate:(BOOL)forceUpdate; 31 | 32 | - (void)searchNodesForKeypath:(LOTKeypath * _Nonnull)keypath; 33 | 34 | - (void)setValueDelegate:(id _Nonnull)delegate 35 | forKeypath:(LOTKeypath * _Nonnull)keypath; 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ThermostatControl/Source/Controls/StateAlphaButton.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | public class StateAlphaButton: UIButton { 4 | 5 | /// Alpha for selected state. 6 | var selectedAlpha: CGFloat? 7 | 8 | override public var isHighlighted: Bool { 9 | didSet { 10 | updateAlpha() 11 | } 12 | } 13 | 14 | override public var isEnabled: Bool { 15 | didSet { 16 | updateAlpha() 17 | } 18 | } 19 | 20 | override public var isSelected: Bool { 21 | didSet { 22 | updateAlpha() 23 | } 24 | } 25 | 26 | override init(frame: CGRect) { 27 | super.init(frame: frame) 28 | setup() 29 | } 30 | 31 | required init?(coder aDecoder: NSCoder) { 32 | super.init(coder: aDecoder) 33 | setup() 34 | } 35 | 36 | // MARK: Private 37 | 38 | private func setup() { 39 | isExclusiveTouch = true 40 | adjustsImageWhenDisabled = false 41 | adjustsImageWhenHighlighted = false 42 | } 43 | 44 | private func updateAlpha() { 45 | if !isEnabled { 46 | alpha = 0.3 47 | } else if isHighlighted { 48 | alpha = 0.6 49 | } else if let actualSelectedAlpha = selectedAlpha, isSelected { 50 | alpha = actualSelectedAlpha 51 | } else { 52 | alpha = 1.0 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/DecelerationHelper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // 4 | 5 | import Foundation 6 | import UIKit 7 | 8 | public struct DecelerationHelper { 9 | 10 | /// - parameter initialVelocity: in points/millisecond 11 | public static func project(value: CGFloat, initialVelocity: CGFloat, decelerationRate: CGFloat) -> CGFloat { 12 | guard decelerationRate < 1.0 else { 13 | assert(false) 14 | return value 15 | } 16 | return value + initialVelocity * decelerationRate / (1.0 - decelerationRate) 17 | } 18 | 19 | /// - parameter initialVelocity: in points/millisecond 20 | public static func project(value: CGPoint, initialVelocity: CGPoint, decelerationRate: CGPoint) -> CGPoint { 21 | let xProjection = project(value: value.x, initialVelocity: initialVelocity.x, decelerationRate: decelerationRate.x) 22 | let yProjection = project(value: value.y, initialVelocity: initialVelocity.y, decelerationRate: decelerationRate.y) 23 | return CGPoint(x: xProjection, y: yProjection) 24 | } 25 | 26 | /// - parameter initialVelocity: in points/millisecond 27 | public static func project(value: CGPoint, initialVelocity: CGPoint, decelerationRate: CGFloat) -> CGPoint { 28 | return project(value: value, initialVelocity: initialVelocity, decelerationRate: CGPoint(x: decelerationRate, y: decelerationRate)) 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Thermostat/Pods-Thermostat.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/R.swift.Library" "${PODS_CONFIGURATION_BUILD_DIR}/Shakuro.CommonTypes" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/R.swift.Library/Rswift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Shakuro.CommonTypes/Shakuro_CommonTypes.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 8 | OTHER_LDFLAGS = $(inherited) -framework "Lottie" -framework "Rswift" -framework "Shakuro_CommonTypes" -framework "UIKit" 9 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 10 | PODS_BUILD_DIR = ${BUILD_DIR} 11 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 12 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 13 | PODS_ROOT = ${SRCROOT}/Pods 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-Thermostat/Pods-Thermostat.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO 3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/R.swift.Library" "${PODS_CONFIGURATION_BUILD_DIR}/Shakuro.CommonTypes" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios" 4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 5 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/R.swift.Library/Rswift.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Shakuro.CommonTypes/Shakuro_CommonTypes.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/Lottie.framework/Headers" 6 | LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' 7 | LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift 8 | OTHER_LDFLAGS = $(inherited) -framework "Lottie" -framework "Rswift" -framework "Shakuro_CommonTypes" -framework "UIKit" 9 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 10 | PODS_BUILD_DIR = ${BUILD_DIR} 11 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 12 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 13 | PODS_ROOT = ${SRCROOT}/Pods 14 | PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates 15 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 16 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/CALayer+Transition.swift: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // Copyright © 2019 Shakuro. All rights reserved. 4 | // 5 | 6 | import UIKit 7 | 8 | extension CALayer { 9 | 10 | public enum TransitionAnimationConstant { 11 | public static let animationKey: String = "custom_layer_transition" 12 | public static let defaultTransitionType: CATransitionType = .fade 13 | public static let defaultDuration: CFTimeInterval = 0.15 14 | public static let defaultTimingFunction: CAMediaTimingFunctionName = .easeInEaseOut 15 | } 16 | 17 | public func addTransitionAnimation(type: CATransitionType = TransitionAnimationConstant.defaultTransitionType, 18 | subType: CATransitionSubtype? = nil, 19 | duration: CFTimeInterval = TransitionAnimationConstant.defaultDuration, 20 | timingFunctionName: CAMediaTimingFunctionName = TransitionAnimationConstant.defaultTimingFunction) { 21 | let transition: CATransition = CATransition() 22 | transition.duration = duration 23 | transition.timingFunction = CAMediaTimingFunction(name: timingFunctionName) 24 | transition.type = type 25 | transition.subtype = subType 26 | transition.isRemovedOnCompletion = true 27 | add(transition, forKey: TransitionAnimationConstant.animationKey) 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/UICollectionView+Reusable.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2018 Shakuro (https://shakuro.com/) 3 | // Sergey Popov 4 | // 5 | 6 | import UIKit 7 | 8 | extension UICollectionView { 9 | 10 | public func dequeueReusableCell(withReuseIdentifier identifier: String, for indexPath: IndexPath) -> T { 11 | guard let cell = self.dequeueReusableCell(withReuseIdentifier: identifier, for: indexPath) as? T else { 12 | fatalError("\(type(of: self)) - \(#function): can't dequeue cell with identifier: \(identifier); indexPath: \(indexPath).") 13 | } 14 | return cell 15 | } 16 | 17 | public func dequeueReusableSupplementaryView(ofKind kind: String, 18 | withReuseIdentifier identifier: String, 19 | for indexPath: IndexPath) -> T { 20 | let supplementaryView = self.dequeueReusableSupplementaryView(ofKind: kind, withReuseIdentifier: identifier, for: indexPath) 21 | guard let typedView = supplementaryView as? T else { 22 | fatalError("\(type(of: self)) - \(#function): " + 23 | "can't dequeue supplemenary view of kind \(kind) with identifier: \(identifier); indexPath: \(indexPath).") 24 | } 25 | return typedView 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeFill.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeFill.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeFill.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTShapeFill 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 15 | self = [super init]; 16 | if (self) { 17 | [self _mapFromJSON:jsonDictionary]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 23 | 24 | if (jsonDictionary[@"nm"] ) { 25 | _keyname = [jsonDictionary[@"nm"] copy]; 26 | } 27 | 28 | NSDictionary *color = jsonDictionary[@"c"]; 29 | if (color) { 30 | _color = [[LOTKeyframeGroup alloc] initWithData:color]; 31 | } 32 | 33 | NSDictionary *opacity = jsonDictionary[@"o"]; 34 | if (opacity) { 35 | _opacity = [[LOTKeyframeGroup alloc] initWithData:opacity]; 36 | [_opacity remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 37 | return LOT_RemapValue(inValue, 0, 100, 0, 1); 38 | }]; 39 | } 40 | 41 | NSNumber *evenOdd = jsonDictionary[@"r"]; 42 | if (evenOdd.integerValue == 2) { 43 | _evenOddFillRule = YES; 44 | } else { 45 | _evenOddFillRule = NO; 46 | } 47 | 48 | NSNumber *fillEnabled = jsonDictionary[@"fillEnabled"]; 49 | _fillEnabled = fillEnabled.boolValue; 50 | } 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/MacCompatibility/UIColor.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor.h 3 | // Lottie 4 | // 5 | // Created by Oleksii Pavlovskyi on 2/2/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #include 10 | 11 | #if !TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR 12 | #import 13 | #import 14 | 15 | @interface UIColor : NSObject 16 | 17 | + (UIColor *)colorWithWhite:(CGFloat)white alpha:(CGFloat)alpha; 18 | + (UIColor *)colorWithHue:(CGFloat)hue saturation:(CGFloat)saturation brightness:(CGFloat)brightness alpha:(CGFloat)alpha; 19 | + (UIColor *)colorWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha; 20 | + (UIColor *)colorWithCGColor:(CGColorRef)cgColor; 21 | 22 | + (UIColor *)blackColor; 23 | + (UIColor *)darkGrayColor; 24 | + (UIColor *)lightGrayColor; 25 | + (UIColor *)whiteColor; 26 | + (UIColor *)grayColor; 27 | + (UIColor *)redColor; 28 | + (UIColor *)greenColor; 29 | + (UIColor *)blueColor; 30 | + (UIColor *)cyanColor; 31 | + (UIColor *)yellowColor; 32 | + (UIColor *)magentaColor; 33 | + (UIColor *)orangeColor; 34 | + (UIColor *)purpleColor; 35 | + (UIColor *)brownColor; 36 | + (UIColor *)clearColor; 37 | 38 | - (UIColor *)colorWithAlphaComponent:(CGFloat)alpha; 39 | 40 | @property (nonatomic, readonly) CGColorRef CGColor; 41 | 42 | @end 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Core/StringResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StringResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Tom Lokhorst on 2016-04-23. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | public protocol StringResourceType { 13 | 14 | /// Key for the string 15 | var key: String { get } 16 | 17 | /// File in containing the string 18 | var tableName: String { get } 19 | 20 | /// Bundle this string is in 21 | var bundle: Bundle { get } 22 | 23 | /// Locales of the a localizable string 24 | var locales: [String] { get } 25 | 26 | /// Comment directly before and/or after the string, if any 27 | var comment: String? { get } 28 | } 29 | 30 | public struct StringResource: StringResourceType { 31 | 32 | /// Key for the string 33 | public let key: String 34 | 35 | /// File in containing the string 36 | public let tableName: String 37 | 38 | /// Bundle this string is in 39 | public let bundle: Bundle 40 | 41 | /// Locales of the a localizable string 42 | public let locales: [String] 43 | 44 | /// Comment directly before and/or after the string, if any 45 | public let comment: String? 46 | 47 | public init(key: String, tableName: String, bundle: Bundle, locales: [String], comment: String?) { 48 | self.key = key 49 | self.tableName = tableName 50 | self.bundle = bundle 51 | self.locales = locales 52 | self.comment = comment 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/UIKit/UIImage+ImageResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+ImageResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 11-01-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import UIKit 11 | 12 | public extension UIImage { 13 | 14 | #if os(iOS) || os(tvOS) 15 | /** 16 | Returns the image from this resource (R.image.*) that is compatible with the trait collection. 17 | 18 | - parameter resource: The resource you want the image of (R.image.*) 19 | - parameter traitCollection: Traits that describe the desired image to retrieve, pass nil to use traits that describe the main screen. 20 | 21 | - returns: An image that exactly or best matches the desired traits with the given resource (R.image.*), or nil if no suitable image was found. 22 | */ 23 | convenience init?(resource: ImageResourceType, compatibleWith traitCollection: UITraitCollection? = nil) { 24 | self.init(named: resource.name, in: resource.bundle, compatibleWith: traitCollection) 25 | } 26 | #endif 27 | 28 | #if os(watchOS) 29 | /** 30 | Returns the image from this resource (R.image.*) that is compatible with the trait collection. 31 | 32 | - parameter resource: The resource you want the image of (R.image.*) 33 | 34 | - returns: An image that exactly or best matches the desired traits with the given resource (R.image.*), or nil if no suitable image was found. 35 | */ 36 | convenience init?(resource: ImageResourceType) { 37 | self.init(named: resource.name) 38 | } 39 | #endif 40 | } 41 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Extensions/LOTBezierPath.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTBezierPath.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/20/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTPlatformCompat.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface LOTBezierPath : NSObject 14 | 15 | + (instancetype)pathWithCGPath:(CGPathRef)path; 16 | 17 | + (instancetype)newPath; 18 | 19 | - (void)LOT_moveToPoint:(CGPoint)point; 20 | 21 | - (void)LOT_addLineToPoint:(CGPoint)point; 22 | 23 | - (void)LOT_addCurveToPoint:(CGPoint)point 24 | controlPoint1:(CGPoint)cp1 25 | controlPoint2:(CGPoint)cp2; 26 | 27 | - (void)LOT_closePath; 28 | 29 | - (void)LOT_removeAllPoints; 30 | 31 | - (void)LOT_appendPath:(LOTBezierPath *)bezierPath; 32 | 33 | - (void)trimPathFromT:(CGFloat)fromT toT:(CGFloat)toT offset:(CGFloat)offset; 34 | 35 | - (void)LOT_applyTransform:(CGAffineTransform)transform; 36 | 37 | @property (nonatomic, assign) BOOL cacheLengths; 38 | 39 | @property (nonatomic, readonly) CGFloat length; 40 | 41 | @property (nonatomic, readonly) CGPathRef CGPath; 42 | @property (nonatomic, readonly) CGPoint currentPoint; 43 | @property (nonatomic) CGFloat lineWidth; 44 | @property (nonatomic) CGLineCap lineCapStyle; 45 | @property (nonatomic) CGLineJoin lineJoinStyle; 46 | @property (nonatomic) CGFloat miterLimit; 47 | @property (nonatomic) CGFloat flatness; 48 | @property (nonatomic) BOOL usesEvenOddFillRule; 49 | @property (readonly, getter=isEmpty) BOOL empty; 50 | @property (nonatomic, readonly) CGRect bounds; 51 | 52 | @end 53 | 54 | NS_ASSUME_NONNULL_END 55 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/AnimatableProperties/LOTKeyframe.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTKeyframe.h 3 | // Pods 4 | // 5 | // Created by brandon_withrow on 7/10/17. 6 | // 7 | // 8 | 9 | #import 10 | #import 11 | #import "LOTPlatformCompat.h" 12 | #import "LOTBezierData.h" 13 | 14 | NS_ASSUME_NONNULL_BEGIN 15 | 16 | @interface LOTKeyframe : NSObject 17 | 18 | - (instancetype)initWithKeyframe:(NSDictionary *)keyframe; 19 | - (instancetype)initWithValue:(id)value; 20 | - (void)remapValueWithBlock:(CGFloat (^)(CGFloat inValue))remapBlock; 21 | - (LOTKeyframe *)copyWithData:(id)data; 22 | 23 | @property (nonatomic, readonly) NSNumber *keyframeTime; 24 | @property (nonatomic, readonly) BOOL isHold; 25 | @property (nonatomic, readonly) CGPoint inTangent; 26 | @property (nonatomic, readonly) CGPoint outTangent; 27 | @property (nonatomic, readonly) CGPoint spatialInTangent; 28 | @property (nonatomic, readonly) CGPoint spatialOutTangent; 29 | 30 | @property (nonatomic, readonly) CGFloat floatValue; 31 | @property (nonatomic, readonly) CGPoint pointValue; 32 | @property (nonatomic, readonly) CGSize sizeValue; 33 | @property (nonatomic, readonly) UIColor *colorValue; 34 | @property (nonatomic, readonly, nullable) LOTBezierData *pathData; 35 | @property (nonatomic, readonly) NSArray *arrayValue; 36 | 37 | @end 38 | 39 | @interface LOTKeyframeGroup : NSObject 40 | 41 | - (instancetype)initWithData:(id)data; 42 | 43 | - (void)remapKeyframesWithBlock:(CGFloat (^)(CGFloat inValue))remapBlock; 44 | 45 | @property (nonatomic, readonly) NSArray *keyframes; 46 | 47 | @end 48 | 49 | NS_ASSUME_NONNULL_END 50 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/UIKit/UIColor+ColorResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+ColorResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Tom Lokhorst on 2017-06-06. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import UIKit 11 | 12 | @available(iOS 11.0, *) 13 | @available(tvOS 11.0, *) 14 | public extension UIColor { 15 | 16 | #if os(iOS) || os(tvOS) 17 | /** 18 | Returns the color from this resource (R.color.*) that is compatible with the trait collection. 19 | 20 | - parameter resource: The resource you want the image of (R.color.*) 21 | - parameter traitCollection: Traits that describe the desired color to retrieve, pass nil to use traits that describe the main screen. 22 | 23 | - returns: A color that exactly or best matches the desired traits with the given resource (R.color.*), or nil if no suitable color was found. 24 | */ 25 | convenience init?(resource: ColorResourceType, compatibleWith traitCollection: UITraitCollection? = nil) { 26 | self.init(named: resource.name, in: resource.bundle, compatibleWith: traitCollection) 27 | } 28 | #endif 29 | 30 | #if os(watchOS) 31 | /** 32 | Returns the color from this resource (R.color.*) that is compatible with the trait collection. 33 | 34 | - parameter resource: The resource you want the image of (R.color.*) 35 | 36 | - returns: A color that exactly or best matches the desired traits with the given resource (R.color.*), or nil if no suitable color was found. 37 | */ 38 | @available(watchOSApplicationExtension 4.0, *) 39 | convenience init?(resource: ColorResourceType) { 40 | self.init(named: resource.name) 41 | } 42 | #endif 43 | } 44 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/NetworkError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2019 Shakuro (https://shakuro.com/) 3 | // 4 | // 5 | 6 | import Foundation 7 | 8 | public protocol NetworkErrorConvertible { 9 | func networkError() -> NetworkError 10 | } 11 | 12 | public struct NetworkError: PresentableError, NetworkErrorConvertible { 13 | 14 | public enum Value { 15 | case invalidHTTPStatusCode(Int) 16 | case apiError(status: Int, faultCode: String, errorDescription: String) 17 | case generalError(errorDescription: String) 18 | } 19 | 20 | public let requestURL: URL? 21 | public let value: Value 22 | public let errorDescription: String 23 | 24 | public var statusCode: Int? { 25 | switch value { 26 | case .invalidHTTPStatusCode(let status), .apiError(let status, _, _): 27 | return status 28 | case .generalError: 29 | return nil 30 | } 31 | } 32 | 33 | public init(value: Value, requestURL: URL?) { 34 | self.value = value 35 | self.requestURL = requestURL 36 | switch value { 37 | case .invalidHTTPStatusCode(let status): 38 | let codeDsc: String = HTTPURLResponse.localizedString(forStatusCode: status) 39 | errorDescription = NSLocalizedString("Response status code was unacceptable:", comment: "") + " \(status) (\(codeDsc))" 40 | case .apiError(_, _, let apiErrorDescription): 41 | errorDescription = apiErrorDescription 42 | case .generalError(let generalErrorDescription): 43 | errorDescription = generalErrorDescription 44 | } 45 | } 46 | 47 | public func networkError() -> NetworkError { 48 | return self 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTAsset.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAsset.m 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/16/17. 6 | // 7 | // 8 | 9 | #import "LOTAsset.h" 10 | #import "LOTLayer.h" 11 | #import "LOTLayerGroup.h" 12 | #import "LOTAssetGroup.h" 13 | 14 | @implementation LOTAsset 15 | 16 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary 17 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 18 | withAssetBundle:(NSBundle *_Nonnull)bundle 19 | withFramerate:(NSNumber *)framerate { 20 | self = [super init]; 21 | if (self) { 22 | _assetBundle = bundle; 23 | [self _mapFromJSON:jsonDictionary 24 | withAssetGroup:assetGroup 25 | withFramerate:framerate]; 26 | } 27 | return self; 28 | } 29 | 30 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary 31 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 32 | withFramerate:(NSNumber *)framerate { 33 | _referenceID = [jsonDictionary[@"id"] copy]; 34 | 35 | if (jsonDictionary[@"w"]) { 36 | _assetWidth = [jsonDictionary[@"w"] copy]; 37 | } 38 | 39 | if (jsonDictionary[@"h"]) { 40 | _assetHeight = [jsonDictionary[@"h"] copy]; 41 | } 42 | 43 | if (jsonDictionary[@"u"]) { 44 | _imageDirectory = [jsonDictionary[@"u"] copy]; 45 | } 46 | 47 | if (jsonDictionary[@"p"]) { 48 | _imageName = [jsonDictionary[@"p"] copy]; 49 | } 50 | 51 | NSArray *layersJSON = jsonDictionary[@"layers"]; 52 | if (layersJSON) { 53 | _layerGroup = [[LOTLayerGroup alloc] initWithLayerJSON:layersJSON 54 | withAssetGroup:assetGroup 55 | withFramerate:framerate]; 56 | } 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTMask.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTMask.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/14/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTMask.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTMask 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 15 | self = [super init]; 16 | if (self) { 17 | [self _mapFromJSON:jsonDictionary]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 23 | NSNumber *closed = jsonDictionary[@"cl"]; 24 | _closed = closed.boolValue; 25 | 26 | NSNumber *inverted = jsonDictionary[@"inv"]; 27 | _inverted = inverted.boolValue; 28 | 29 | NSString *mode = jsonDictionary[@"mode"]; 30 | if ([mode isEqualToString:@"a"]) { 31 | _maskMode = LOTMaskModeAdd; 32 | } else if ([mode isEqualToString:@"s"]) { 33 | _maskMode = LOTMaskModeSubtract; 34 | } else if ([mode isEqualToString:@"i"]) { 35 | _maskMode = LOTMaskModeIntersect; 36 | } else { 37 | _maskMode = LOTMaskModeUnknown; 38 | } 39 | 40 | NSDictionary *maskshape = jsonDictionary[@"pt"]; 41 | if (maskshape) { 42 | _maskPath = [[LOTKeyframeGroup alloc] initWithData:maskshape]; 43 | } 44 | 45 | NSDictionary *opacity = jsonDictionary[@"o"]; 46 | if (opacity) { 47 | _opacity = [[LOTKeyframeGroup alloc] initWithData:opacity]; 48 | [_opacity remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 49 | return LOT_RemapValue(inValue, 0, 100, 0, 1); 50 | }]; 51 | } 52 | 53 | NSDictionary *expansion = jsonDictionary[@"x"]; 54 | if (expansion) { 55 | _expansion = [[LOTKeyframeGroup alloc] initWithData:expansion]; 56 | } 57 | } 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/Core/FileResource.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FileResource.swift 3 | // R.swift.Library 4 | // 5 | // Created by Mathijs Kadijk on 06-01-16. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | 12 | public protocol FileResourceType { 13 | 14 | /// Bundle this file is in 15 | var bundle: Bundle { get } 16 | 17 | /// Name of the file file on disk 18 | var name: String { get } 19 | 20 | /// Extension of the file on disk 21 | var pathExtension: String { get } 22 | } 23 | 24 | public extension FileResourceType { 25 | /// Name of the file on disk with the pathExtension 26 | var fullName: String { 27 | return [name, pathExtension].joined(separator: ".") 28 | } 29 | 30 | /** 31 | Returns the full pathname for this resource. 32 | 33 | - returns: The full pathname for this resource or nil if the file could not be located. 34 | */ 35 | func path() -> String? { 36 | return bundle.path(forResource: self) 37 | } 38 | 39 | /** 40 | Returns the file URL for this resource. 41 | 42 | - returns: The file URL for this resource or nil if the file could not be located. 43 | */ 44 | func url() -> URL? { 45 | return bundle.url(forResource: self) 46 | } 47 | } 48 | 49 | public struct FileResource: FileResourceType { 50 | /// Bundle this file is in 51 | public let bundle: Bundle 52 | 53 | /// Name of the file on disk, without the pathExtension 54 | public let name: String 55 | 56 | /// Extension of the file on disk 57 | public let pathExtension: String 58 | 59 | public init(bundle: Bundle, name: String, pathExtension: String) { 60 | self.bundle = bundle 61 | self.name = name 62 | self.pathExtension = pathExtension 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /ThermostatDemo/Resources/UI/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /Pods/R.swift.Library/Library/UIKit/UIViewController+StoryboardSegueIdentifierProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+StoryboardSegueIdentifierProtocol.swift 3 | // R.swift Library 4 | // 5 | // Created by Mathijs Kadijk on 06-12-15. 6 | // From: https://github.com/mac-cain13/R.swift.Library 7 | // License: MIT License 8 | // 9 | 10 | import Foundation 11 | import UIKit 12 | 13 | public protocol SeguePerformerType { 14 | func performSegue(withIdentifier identifier: String, sender: Any?) 15 | } 16 | 17 | extension UIViewController: SeguePerformerType {} 18 | 19 | public extension SeguePerformerType { 20 | /** 21 | Initiates the segue with the specified identifier (R.segue.*) from the current view controller's storyboard file. 22 | - parameter identifier: The R.segue.* that identifies the triggered segue. 23 | - parameter sender: The object that you want to use to initiate the segue. This object is made available for informational purposes during the actual segue. 24 | - SeeAlso: Library for typed block based segues: [tomlokhorst/SegueManager](https://github.com/tomlokhorst/SegueManager) 25 | */ 26 | func performSegue(withIdentifier identifier: StoryboardSegueIdentifier, sender: Any?) { 27 | performSegue(withIdentifier: identifier.identifier, sender: sender) 28 | } 29 | } 30 | 31 | public extension StoryboardSegue where Source : UIViewController { 32 | /** 33 | Performs this segue on the source view controller 34 | - parameter sender: The object that you want to use to initiate the segue. This object is made available for informational purposes during the actual segue. 35 | */ 36 | func performSegue(sender: Any? = nil) { 37 | source.performSegue(withIdentifier: identifier.identifier, sender: sender) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/AnimatableLayers/LOTCompositionContainer.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTCompositionContainer.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/18/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTLayerContainer.h" 10 | #import "LOTAssetGroup.h" 11 | 12 | @interface LOTCompositionContainer : LOTLayerContainer 13 | 14 | - (instancetype _Nonnull)initWithModel:(LOTLayer * _Nullable)layer 15 | inLayerGroup:(LOTLayerGroup * _Nullable)layerGroup 16 | withLayerGroup:(LOTLayerGroup * _Nullable)childLayerGroup 17 | withAssestGroup:(LOTAssetGroup * _Nullable)assetGroup; 18 | 19 | - (nullable NSArray *)keysForKeyPath:(nonnull LOTKeypath *)keypath; 20 | 21 | - (CGPoint)convertPoint:(CGPoint)point 22 | toKeypathLayer:(nonnull LOTKeypath *)keypath 23 | withParentLayer:(CALayer *_Nonnull)parent; 24 | 25 | - (CGRect)convertRect:(CGRect)rect 26 | toKeypathLayer:(nonnull LOTKeypath *)keypath 27 | withParentLayer:(CALayer *_Nonnull)parent; 28 | 29 | - (CGPoint)convertPoint:(CGPoint)point 30 | fromKeypathLayer:(nonnull LOTKeypath *)keypath 31 | withParentLayer:(CALayer *_Nonnull)parent; 32 | 33 | - (CGRect)convertRect:(CGRect)rect 34 | fromKeypathLayer:(nonnull LOTKeypath *)keypath 35 | withParentLayer:(CALayer *_Nonnull)parent; 36 | 37 | - (void)addSublayer:(nonnull CALayer *)subLayer 38 | toKeypathLayer:(nonnull LOTKeypath *)keypath; 39 | 40 | - (void)maskSublayer:(nonnull CALayer *)subLayer 41 | toKeypathLayer:(nonnull LOTKeypath *)keypath; 42 | 43 | @property (nonatomic, readonly, nonnull) NSArray *childLayers; 44 | @property (nonatomic, readonly, nonnull) NSDictionary *childMap; 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/GenericError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2019 Shakuro (https://shakuro.com/) 3 | // 4 | // 5 | 6 | import Foundation 7 | 8 | // MARK: - PresentableError 9 | 10 | public protocol PresentableError: Error { 11 | var errorDescription: String { get } 12 | } 13 | 14 | // MARK: - GenericError 15 | 16 | public typealias DefaultGenericError = GenericError 17 | 18 | public protocol GenericErrorProtocol: PresentableError { 19 | 20 | var value: Error { get } 21 | var errorDescription: String { get } 22 | 23 | func getValue() -> T? 24 | 25 | } 26 | 27 | public struct GenericError: GenericErrorProtocol { 28 | 29 | public let value: Error 30 | 31 | public var errorDescription: String { 32 | return Interpreter.generateDescription(value) 33 | } 34 | 35 | public init(_ value: Error) { 36 | self.value = value 37 | } 38 | 39 | public func getValue() -> T? { 40 | return value as? T ?? (value as? GenericErrorProtocol)?.getValue() 41 | } 42 | 43 | public func isNotFoundError() -> Bool { 44 | return Interpreter.isNotFoundError(self) 45 | } 46 | 47 | public func isNotAuthorizedError() -> Bool { 48 | return Interpreter.isNotAuthorizedError(self) 49 | } 50 | 51 | public func isCancelledError() -> Bool { 52 | return Interpreter.isCancelledError(self) 53 | } 54 | 55 | public func isRequestTimedOutError() -> Bool { 56 | return Interpreter.isRequestTimedOutError(self) 57 | } 58 | 59 | public func isConnectionError() -> Bool { 60 | return Interpreter.isConnectionError(self) 61 | } 62 | 63 | public func isInternalServerError() -> Bool { 64 | return Interpreter.isInternalServerError(self) 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTNumberInterpolator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTNumberInterpolator.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/11/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTNumberInterpolator.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTNumberInterpolator 13 | 14 | - (CGFloat)floatValueForFrame:(NSNumber *)frame { 15 | CGFloat progress = [self progressForFrame:frame]; 16 | CGFloat returnValue; 17 | if (progress == 0) { 18 | returnValue = self.leadingKeyframe.floatValue; 19 | } else if (progress == 1) { 20 | returnValue = self.trailingKeyframe.floatValue; 21 | } else { 22 | returnValue = LOT_RemapValue(progress, 0, 1, self.leadingKeyframe.floatValue, self.trailingKeyframe.floatValue); 23 | } 24 | if (self.hasDelegateOverride) { 25 | return [self.delegate floatValueForFrame:frame.floatValue 26 | startKeyframe:self.leadingKeyframe.keyframeTime.floatValue 27 | endKeyframe:self.trailingKeyframe.keyframeTime.floatValue 28 | interpolatedProgress:progress 29 | startValue:self.leadingKeyframe.floatValue 30 | endValue:self.trailingKeyframe.floatValue 31 | currentValue:returnValue]; 32 | } 33 | 34 | return returnValue; 35 | } 36 | 37 | - (BOOL)hasDelegateOverride { 38 | return self.delegate != nil; 39 | } 40 | 41 | - (void)setValueDelegate:(id _Nonnull)delegate { 42 | NSAssert(([delegate conformsToProtocol:@protocol(LOTNumberValueDelegate)]), @"Number Interpolator set with incorrect callback type. Expected LOTNumberValueDelegate"); 43 | self.delegate = (id)delegate; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTLayerGroup.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTLayerGroup.m 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/16/17. 6 | // 7 | // 8 | 9 | #import "LOTLayerGroup.h" 10 | #import "LOTLayer.h" 11 | #import "LOTAssetGroup.h" 12 | 13 | @implementation LOTLayerGroup { 14 | NSDictionary *_modelMap; 15 | NSDictionary *_referenceIDMap; 16 | } 17 | 18 | - (instancetype)initWithLayerJSON:(NSArray *)layersJSON 19 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 20 | withFramerate:(NSNumber *)framerate { 21 | self = [super init]; 22 | if (self) { 23 | [self _mapFromJSON:layersJSON withAssetGroup:assetGroup withFramerate:framerate]; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)_mapFromJSON:(NSArray *)layersJSON 29 | withAssetGroup:(LOTAssetGroup * _Nullable)assetGroup 30 | withFramerate:(NSNumber *)framerate { 31 | 32 | NSMutableArray *layers = [NSMutableArray array]; 33 | NSMutableDictionary *modelMap = [NSMutableDictionary dictionary]; 34 | NSMutableDictionary *referenceMap = [NSMutableDictionary dictionary]; 35 | 36 | for (NSDictionary *layerJSON in layersJSON) { 37 | LOTLayer *layer = [[LOTLayer alloc] initWithJSON:layerJSON 38 | withAssetGroup:assetGroup 39 | withFramerate:framerate]; 40 | [layers addObject:layer]; 41 | modelMap[layer.layerID] = layer; 42 | if (layer.referenceID) { 43 | referenceMap[layer.referenceID] = layer; 44 | } 45 | } 46 | 47 | _referenceIDMap = referenceMap; 48 | _modelMap = modelMap; 49 | _layers = layers; 50 | } 51 | 52 | - (LOTLayer *)layerModelForID:(NSNumber *)layerID { 53 | return _modelMap[layerID]; 54 | } 55 | 56 | - (LOTLayer *)layerForReferenceID:(NSString *)referenceID { 57 | return _referenceIDMap[referenceID]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTColorInterpolator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTColorInterpolator.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/13/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTColorInterpolator.h" 10 | #import "LOTPlatformCompat.h" 11 | #import "UIColor+Expanded.h" 12 | 13 | @implementation LOTColorInterpolator 14 | 15 | - (CGColorRef)colorForFrame:(NSNumber *)frame { 16 | CGFloat progress = [self progressForFrame:frame]; 17 | UIColor *returnColor; 18 | 19 | if (progress == 0) { 20 | returnColor = self.leadingKeyframe.colorValue; 21 | } else if (progress == 1) { 22 | returnColor = self.trailingKeyframe.colorValue; 23 | } else { 24 | returnColor = [UIColor LOT_colorByLerpingFromColor:self.leadingKeyframe.colorValue toColor:self.trailingKeyframe.colorValue amount:progress]; 25 | } 26 | if (self.hasDelegateOverride) { 27 | return [self.delegate colorForFrame:frame.floatValue 28 | startKeyframe:self.leadingKeyframe.keyframeTime.floatValue 29 | endKeyframe:self.trailingKeyframe.keyframeTime.floatValue 30 | interpolatedProgress:progress 31 | startColor:self.leadingKeyframe.colorValue.CGColor 32 | endColor:self.trailingKeyframe.colorValue.CGColor 33 | currentColor:returnColor.CGColor]; 34 | } 35 | 36 | return returnColor.CGColor; 37 | } 38 | 39 | - (void)setValueDelegate:(id)delegate { 40 | NSAssert(([delegate conformsToProtocol:@protocol(LOTColorValueDelegate)]), @"Color Interpolator set with incorrect callback type. Expected LOTColorValueDelegate"); 41 | self.delegate = (id)delegate; 42 | } 43 | 44 | - (BOOL)hasDelegateOverride { 45 | return self.delegate != nil; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTSizeInterpolator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTSizeInterpolator.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/13/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTPlatformCompat.h" 10 | #import "LOTSizeInterpolator.h" 11 | #import "CGGeometry+LOTAdditions.h" 12 | 13 | @implementation LOTSizeInterpolator 14 | 15 | - (CGSize)sizeValueForFrame:(NSNumber *)frame { 16 | CGFloat progress = [self progressForFrame:frame]; 17 | CGSize returnSize; 18 | if (progress == 0) { 19 | returnSize = self.leadingKeyframe.sizeValue; 20 | }else if (progress == 1) { 21 | returnSize = self.trailingKeyframe.sizeValue; 22 | } else { 23 | returnSize = CGSizeMake(LOT_RemapValue(progress, 0, 1, self.leadingKeyframe.sizeValue.width, self.trailingKeyframe.sizeValue.width), 24 | LOT_RemapValue(progress, 0, 1, self.leadingKeyframe.sizeValue.height, self.trailingKeyframe.sizeValue.height)); 25 | } 26 | if (self.hasDelegateOverride) { 27 | return [self.delegate sizeForFrame:frame.floatValue 28 | startKeyframe:self.leadingKeyframe.keyframeTime.floatValue 29 | endKeyframe:self.trailingKeyframe.keyframeTime.floatValue 30 | interpolatedProgress:progress startSize:self.leadingKeyframe.sizeValue 31 | endSize:self.trailingKeyframe.sizeValue 32 | currentSize:returnSize]; 33 | } 34 | return returnSize; 35 | } 36 | 37 | - (BOOL)hasDelegateOverride { 38 | return self.delegate != nil; 39 | } 40 | 41 | - (void)setValueDelegate:(id)delegate { 42 | NSAssert(([delegate conformsToProtocol:@protocol(LOTSizeValueDelegate)]), @"Size Interpolator set with incorrect callback type. Expected LOTSizeValueDelegate"); 43 | self.delegate = (id)delegate; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeGradientFill.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeGradientFill.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/26/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeGradientFill.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTShapeGradientFill 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 15 | self = [super init]; 16 | if (self) { 17 | [self _mapFromJSON:jsonDictionary]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | NSNumber *type = jsonDictionary[@"t"]; 28 | 29 | if (type.integerValue != 1) { 30 | _type = LOTGradientTypeRadial; 31 | } else { 32 | _type = LOTGradientTypeLinear; 33 | } 34 | 35 | NSDictionary *start = jsonDictionary[@"s"]; 36 | if (start) { 37 | _startPoint = [[LOTKeyframeGroup alloc] initWithData:start]; 38 | } 39 | 40 | NSDictionary *end = jsonDictionary[@"e"]; 41 | if (end) { 42 | _endPoint = [[LOTKeyframeGroup alloc] initWithData:end]; 43 | } 44 | 45 | NSDictionary *gradient = jsonDictionary[@"g"]; 46 | if (gradient) { 47 | NSDictionary *unwrappedGradient = gradient[@"k"]; 48 | _numberOfColors = gradient[@"p"]; 49 | _gradient = [[LOTKeyframeGroup alloc] initWithData:unwrappedGradient]; 50 | } 51 | 52 | NSDictionary *opacity = jsonDictionary[@"o"]; 53 | if (opacity) { 54 | _opacity = [[LOTKeyframeGroup alloc] initWithData:opacity]; 55 | [_opacity remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 56 | return LOT_RemapValue(inValue, 0, 100, 0, 1); 57 | }]; 58 | } 59 | 60 | NSNumber *evenOdd = jsonDictionary[@"r"]; 61 | if (evenOdd.integerValue == 2) { 62 | _evenOddFillRule = YES; 63 | } else { 64 | _evenOddFillRule = NO; 65 | } 66 | } 67 | @end 68 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeStar.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeStar.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeStar.h" 10 | 11 | @implementation LOTShapeStar 12 | 13 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 14 | self = [super init]; 15 | if (self) { 16 | [self _mapFromJSON:jsonDictionary]; 17 | } 18 | return self; 19 | } 20 | 21 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 22 | 23 | if (jsonDictionary[@"nm"] ) { 24 | _keyname = [jsonDictionary[@"nm"] copy]; 25 | } 26 | 27 | NSDictionary *outerRadius = jsonDictionary[@"or"]; 28 | if (outerRadius) { 29 | _outerRadius = [[LOTKeyframeGroup alloc] initWithData:outerRadius]; 30 | } 31 | 32 | NSDictionary *outerRoundness = jsonDictionary[@"os"]; 33 | if (outerRoundness) { 34 | _outerRoundness = [[LOTKeyframeGroup alloc] initWithData:outerRoundness]; 35 | } 36 | 37 | NSDictionary *innerRadius = jsonDictionary[@"ir"]; 38 | if (innerRadius) { 39 | _innerRadius = [[LOTKeyframeGroup alloc] initWithData:innerRadius]; 40 | } 41 | 42 | NSDictionary *innerRoundness = jsonDictionary[@"is"]; 43 | if (innerRoundness) { 44 | _innerRoundness = [[LOTKeyframeGroup alloc] initWithData:innerRoundness]; 45 | } 46 | 47 | NSDictionary *position = jsonDictionary[@"p"]; 48 | if (position) { 49 | _position = [[LOTKeyframeGroup alloc] initWithData:position]; 50 | } 51 | 52 | NSDictionary *numberOfPoints = jsonDictionary[@"pt"]; 53 | if (numberOfPoints) { 54 | _numberOfPoints = [[LOTKeyframeGroup alloc] initWithData:numberOfPoints]; 55 | } 56 | 57 | NSDictionary *rotation = jsonDictionary[@"r"]; 58 | if (rotation) { 59 | _rotation = [[LOTKeyframeGroup alloc] initWithData:rotation]; 60 | } 61 | 62 | NSNumber *type = jsonDictionary[@"sy"]; 63 | _type = type.integerValue; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTAnimatedSwitch.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimatedSwitch.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 8/25/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimatedControl.h" 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface LOTAnimatedSwitch : LOTAnimatedControl 14 | 15 | /// Convenience method to initialize a control from the Main Bundle by name 16 | + (instancetype _Nonnull)switchNamed:(NSString * _Nonnull)toggleName; 17 | 18 | /// Convenience method to initialize a control from the specified bundle by name 19 | + (instancetype _Nonnull)switchNamed:(NSString * _Nonnull)toggleName inBundle:(NSBundle * _Nonnull)bundle; 20 | 21 | 22 | /// The ON/OFF state of the control. Setting will toggle without animation 23 | @property (nonatomic, getter=isOn) BOOL on; 24 | 25 | /// Enable interactive sliding gesture for toggle 26 | @property (nonatomic) BOOL interactiveGesture; 27 | 28 | /// Set the state of the control with animation 29 | - (void)setOn:(BOOL)on animated:(BOOL)animated; // does not send action 30 | 31 | /// Styling 32 | 33 | /** 34 | * Sets the animation play range for the ON state animation. 35 | * fromProgress is the start of the animation 36 | * toProgress is the end of the animation and also the ON static state 37 | * Defaults 0-1 38 | **/ 39 | - (void)setProgressRangeForOnState:(CGFloat)fromProgress 40 | toProgress:(CGFloat)toProgress NS_SWIFT_NAME(setProgressRangeForOnState(fromProgress:toProgress:)); 41 | 42 | /** 43 | * Sets the animation play range for the OFF state animation. 44 | * fromProgress is the start of the animation 45 | * toProgress is the end of the animation and also the OFF static state 46 | * Defaults 1-0 47 | **/ 48 | - (void)setProgressRangeForOffState:(CGFloat)fromProgress 49 | toProgress:(CGFloat)toProgress NS_SWIFT_NAME(setProgressRangeForOffState(fromProgress:toProgress:)); 50 | 51 | @end 52 | 53 | NS_ASSUME_NONNULL_END 54 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTTransformInterpolator.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTTransformInterpolator.h 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/18/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "LOTNumberInterpolator.h" 11 | #import "LOTPointInterpolator.h" 12 | #import "LOTSizeInterpolator.h" 13 | #import "LOTKeyframe.h" 14 | #import "LOTLayer.h" 15 | 16 | NS_ASSUME_NONNULL_BEGIN 17 | 18 | @interface LOTTransformInterpolator : NSObject 19 | 20 | + (instancetype)transformForLayer:(LOTLayer *)layer; 21 | 22 | - (instancetype)initWithPosition:(NSArray *)position 23 | rotation:(NSArray *)rotation 24 | anchor:(NSArray *)anchor 25 | scale:(NSArray *)scale; 26 | 27 | - (instancetype)initWithPositionX:(NSArray *)positionX 28 | positionY:(NSArray *)positionY 29 | rotation:(NSArray *)rotation 30 | anchor:(NSArray *)anchor 31 | scale:(NSArray *)scale; 32 | 33 | @property (nonatomic, strong) LOTTransformInterpolator * inputNode; 34 | 35 | @property (nonatomic, readonly) LOTPointInterpolator *positionInterpolator; 36 | @property (nonatomic, readonly) LOTPointInterpolator *anchorInterpolator; 37 | @property (nonatomic, readonly) LOTSizeInterpolator *scaleInterpolator; 38 | @property (nonatomic, readonly) LOTNumberInterpolator *rotationInterpolator; 39 | @property (nonatomic, readonly) LOTNumberInterpolator *positionXInterpolator; 40 | @property (nonatomic, readonly) LOTNumberInterpolator *positionYInterpolator; 41 | @property (nonatomic, strong, nullable) NSString *parentKeyName; 42 | 43 | - (CATransform3D)transformForFrame:(NSNumber *)frame; 44 | - (BOOL)hasUpdateForFrame:(NSNumber *)frame; 45 | 46 | @end 47 | 48 | NS_ASSUME_NONNULL_END 49 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Private/LOTAnimationCache.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAnimationCache.m 3 | // Lottie 4 | // 5 | // Created by Brandon Withrow on 1/9/17. 6 | // Copyright © 2017 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTAnimationCache.h" 10 | 11 | const NSInteger kLOTCacheSize = 50; 12 | 13 | @implementation LOTAnimationCache { 14 | NSMutableDictionary *animationsCache_; 15 | NSMutableArray *lruOrderArray_; 16 | } 17 | 18 | + (instancetype)sharedCache { 19 | static LOTAnimationCache *sharedCache = nil; 20 | static dispatch_once_t onceToken; 21 | dispatch_once(&onceToken, ^{ 22 | sharedCache = [[self alloc] init]; 23 | }); 24 | return sharedCache; 25 | } 26 | 27 | - (instancetype)init { 28 | self = [super init]; 29 | if (self) { 30 | animationsCache_ = [[NSMutableDictionary alloc] init]; 31 | lruOrderArray_ = [[NSMutableArray alloc] init]; 32 | } 33 | return self; 34 | } 35 | 36 | - (void)addAnimation:(LOTComposition *)animation forKey:(NSString *)key { 37 | if (lruOrderArray_.count >= kLOTCacheSize) { 38 | NSString *oldKey = lruOrderArray_[0]; 39 | [animationsCache_ removeObjectForKey:oldKey]; 40 | [lruOrderArray_ removeObject:oldKey]; 41 | } 42 | [lruOrderArray_ removeObject:key]; 43 | [lruOrderArray_ addObject:key]; 44 | [animationsCache_ setObject:animation forKey:key]; 45 | } 46 | 47 | - (LOTComposition *)animationForKey:(NSString *)key { 48 | if (!key) { 49 | return nil; 50 | } 51 | LOTComposition *animation = [animationsCache_ objectForKey:key]; 52 | [lruOrderArray_ removeObject:key]; 53 | [lruOrderArray_ addObject:key]; 54 | return animation; 55 | } 56 | 57 | - (void)clearCache { 58 | [animationsCache_ removeAllObjects]; 59 | [lruOrderArray_ removeAllObjects]; 60 | } 61 | 62 | - (void)removeAnimationForKey:(NSString *)key { 63 | [lruOrderArray_ removeObject:key]; 64 | [animationsCache_ removeObjectForKey:key]; 65 | } 66 | 67 | - (void)disableCaching { 68 | [self clearCache]; 69 | animationsCache_ = nil; 70 | lruOrderArray_ = nil; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /ThermostatDemo/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "2x", 6 | "size" : "20x20" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "scale" : "3x", 11 | "size" : "20x20" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "scale" : "2x", 16 | "size" : "29x29" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "scale" : "3x", 21 | "size" : "29x29" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "scale" : "2x", 26 | "size" : "40x40" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "scale" : "2x", 36 | "size" : "60x60" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "scale" : "3x", 41 | "size" : "60x60" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "scale" : "1x", 46 | "size" : "20x20" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "scale" : "2x", 51 | "size" : "20x20" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "scale" : "1x", 56 | "size" : "29x29" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "scale" : "1x", 66 | "size" : "40x40" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "scale" : "2x", 71 | "size" : "40x40" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "scale" : "1x", 76 | "size" : "76x76" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "scale" : "2x", 81 | "size" : "76x76" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "scale" : "2x", 86 | "size" : "83.5x83.5" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "scale" : "1x", 91 | "size" : "1024x1024" 92 | } 93 | ], 94 | "info" : { 95 | "author" : "xcode", 96 | "version" : 1 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Pods/Shakuro.CommonTypes/Source/Data+Hash.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2019-2020 Shakuro (https://shakuro.com/) 3 | // Sergey Laschuk; original found on the Internets 4 | // 5 | 6 | //import CommonCryptoModule 7 | import CommonCrypto 8 | import Foundation 9 | 10 | extension Data { 11 | 12 | public func SHA256String() -> String { 13 | var digest = [UInt8](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH)) 14 | self.withUnsafeBytes { (unsafeBytes: UnsafeRawBufferPointer) -> Void in 15 | CC_SHA256(unsafeBytes.baseAddress, CC_LONG(self.count), &digest) 16 | } 17 | let output: String = digest.reduce(into: "", { (result: inout String, byte) in 18 | result += String(format: "%02x", byte) 19 | }) 20 | return output 21 | } 22 | 23 | public func SHA256Data() -> Data { 24 | var digest = [UInt8](repeating: 0, count: Int(CC_SHA256_DIGEST_LENGTH)) 25 | self.withUnsafeBytes { (unsafeBytes: UnsafeRawBufferPointer) -> Void in 26 | CC_SHA256(unsafeBytes.baseAddress, CC_LONG(self.count), &digest) 27 | } 28 | let output: Data = Data(digest) 29 | return output 30 | } 31 | 32 | public func SHA512() -> String { 33 | var digest = [UInt8](repeating: 0, count: Int(CC_SHA512_DIGEST_LENGTH)) 34 | self.withUnsafeBytes { (unsafeBytes: UnsafeRawBufferPointer) -> Void in 35 | CC_SHA512(unsafeBytes.baseAddress, CC_LONG(self.count), &digest) 36 | } 37 | let output: String = digest.reduce(into: "", { (result: inout String, byte) in 38 | result += String(format: "%02x", byte) 39 | }) 40 | return output 41 | } 42 | 43 | public func MD5() -> String { 44 | var digest = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH)) 45 | self.withUnsafeBytes { (unsafeBytes: UnsafeRawBufferPointer) -> Void in 46 | CC_MD5(unsafeBytes.baseAddress, CC_LONG(self.count), &digest) 47 | } 48 | let output: String = digest.reduce(into: "", { (result: inout String, byte) in 49 | result += String(format: "%02x", byte) 50 | }) 51 | return output 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | # Thermostat 3 | ![Version](https://img.shields.io/badge/version-1.0.0-blue.svg) 4 | ![Platform](https://img.shields.io/badge/platform-iOS-lightgrey.svg) 5 | ![License MIT](https://img.shields.io/badge/license-MIT-green.svg) 6 | 7 | Thermostat is a Swift component designed to control the temperature with a simple swipe. 8 | 9 | - [Requirements](#requirements) 10 | - [Installation](#installation) 11 | - [License](#license) 12 | 13 | Thermostat allows the user to increase or decrease the temperature by swiping the scale up or down. Moreover, one can adjust additional parameters like fan speed and air conditioner mode, turn it on or off, and set a timer. 14 | 15 | ![](Resources/thermostat-control.gif) 16 | 17 | Here’s an example of the Thermostat animation: 18 | 19 | ![](Resources/sample.gif) 20 | 21 | ## Requirements 22 | 23 | - iOS 11.0+ 24 | - Xcode 11.0+ 25 | - Swift 5.0+ 26 | 27 | ## Installation 28 | 29 | ### CocoaPods 30 | 31 | To integrate Thermostat into your Xcode project with CocoaPods, specify it in your `Podfile`: 32 | 33 | ```ruby 34 | pod 'Thermostat', :git => 'https://github.com/shakurocom/ThermostatControl.git', :commit => d985d6caadad129480c0ffac0b72a6bb5d69de3f 35 | ``` 36 | 37 | Then, run the following command: 38 | 39 | ```bash 40 | $ pod install 41 | ``` 42 | 43 | ### Manually 44 | 45 | If you prefer not to use CocoaPods, you can integrate Shakuro.Thermostat simply by copying it to your project. 46 | 47 | ## License 48 | 49 | Shakuro Thermostat is released under the MIT license. [See LICENSE](https://github.com/shakurocom/ScrollableTabs/blob/master/LICENSE.md) for details. 50 | 51 | ## Give it a try and reach us 52 | 53 | Explore our expertise in Native Mobile Development and iOS Development.

54 | 55 | If you need professional assistance with your mobile or web project, feel free to contact our team 56 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTShapeStroke.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTShapeStroke.m 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/15/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import "LOTShapeStroke.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTShapeStroke 13 | 14 | - (instancetype)initWithJSON:(NSDictionary *)jsonDictionary { 15 | self = [super init]; 16 | if (self) { 17 | [self _mapFromJSON:jsonDictionary]; 18 | } 19 | return self; 20 | } 21 | 22 | - (void)_mapFromJSON:(NSDictionary *)jsonDictionary { 23 | 24 | if (jsonDictionary[@"nm"] ) { 25 | _keyname = [jsonDictionary[@"nm"] copy]; 26 | } 27 | 28 | NSDictionary *color = jsonDictionary[@"c"]; 29 | if (color) { 30 | _color = [[LOTKeyframeGroup alloc] initWithData:color]; 31 | } 32 | 33 | NSDictionary *width = jsonDictionary[@"w"]; 34 | if (width) { 35 | _width = [[LOTKeyframeGroup alloc] initWithData:width]; 36 | } 37 | 38 | NSDictionary *opacity = jsonDictionary[@"o"]; 39 | if (opacity) { 40 | _opacity = [[LOTKeyframeGroup alloc] initWithData:opacity]; 41 | [_opacity remapKeyframesWithBlock:^CGFloat(CGFloat inValue) { 42 | return LOT_RemapValue(inValue, 0, 100, 0, 1); 43 | }]; 44 | } 45 | 46 | _capType = [jsonDictionary[@"lc"] integerValue] - 1; 47 | _joinType = [jsonDictionary[@"lj"] integerValue] - 1; 48 | 49 | NSNumber *fillEnabled = jsonDictionary[@"fillEnabled"]; 50 | _fillEnabled = fillEnabled.boolValue; 51 | 52 | NSDictionary *dashOffset = nil; 53 | NSArray *dashes = jsonDictionary[@"d"]; 54 | if (dashes) { 55 | NSMutableArray *dashPattern = [NSMutableArray array]; 56 | for (NSDictionary *dash in dashes) { 57 | if ([dash[@"n"] isEqualToString:@"o"]) { 58 | dashOffset = dash[@"v"]; 59 | continue; 60 | } 61 | // TODO DASH PATTERNS 62 | NSDictionary *value = dash[@"v"]; 63 | LOTKeyframeGroup *keyframeGroup = [[LOTKeyframeGroup alloc] initWithData:value]; 64 | [dashPattern addObject:keyframeGroup]; 65 | } 66 | _lineDashPattern = dashPattern; 67 | } 68 | if (dashOffset) { 69 | _dashOffset = [[LOTKeyframeGroup alloc] initWithData:dashOffset]; 70 | } 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /ThermostatControl/Source/DecelerationBehaviour.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DecelerationBehaviour.swift 3 | // ShakuroApp 4 | // 5 | // Created by Vlad on 07.10.2020. 6 | // Copyright © 2020 Shakuro. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public final class DecelerationBehaviour { 12 | 13 | /// Indicates the minimum speed before stopping. 14 | public var minVelocity: CGFloat = 0 15 | 16 | /// Determines the deceleration factor. 0...1. 1 - will never stop. 17 | public var decelerationFactor: CGFloat = 0 18 | 19 | private var timer: CADisplayLink? 20 | private var currentVelocity: CGFloat = 0 21 | 22 | private var completion: (() -> Void)? 23 | private var update: ((_ distance: CGFloat) -> Void)? 24 | 25 | /// Used to slow down animation 26 | /// - Parameters: 27 | /// - velocity: Initial velocity. 28 | /// - distance: Block to be called for decelaration distance. 29 | /// - completion: Block to be called when minVelocity > velocity. 30 | public func decelerate(velocity: CGFloat, 31 | update: ((_ distance: CGFloat) -> Void)?, 32 | completion: (() -> Void)? = nil) { 33 | stop() 34 | currentVelocity = velocity 35 | self.completion = completion 36 | self.update = update 37 | startTimer() 38 | } 39 | 40 | /// Used to stop animation. 41 | public func stop() { 42 | update = nil 43 | stopTimer() 44 | currentVelocity = 0 45 | completion?() 46 | completion = nil 47 | } 48 | 49 | // MARK: - Private 50 | 51 | private func startTimer() { 52 | stopTimer() 53 | let newTimer = CADisplayLink(target: self, selector: #selector(timerTick)) 54 | newTimer.add(to: RunLoop.main, forMode: .common) 55 | timer = newTimer 56 | } 57 | 58 | private func stopTimer() { 59 | timer?.invalidate() 60 | timer = nil 61 | } 62 | 63 | @objc private func timerTick(_ sender: CADisplayLink) { 64 | currentVelocity *= decelerationFactor 65 | guard currentVelocity >= minVelocity else { 66 | stop() 67 | return 68 | } 69 | let distance = currentVelocity * CGFloat(sender.duration) 70 | update?(distance) 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/InterpolatorNodes/LOTPointInterpolator.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTPointInterpolator.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 7/12/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTPointInterpolator.h" 10 | #import "CGGeometry+LOTAdditions.h" 11 | 12 | @implementation LOTPointInterpolator 13 | 14 | - (CGPoint)pointValueForFrame:(NSNumber *)frame { 15 | CGFloat progress = [self progressForFrame:frame]; 16 | CGPoint returnPoint; 17 | if (progress == 0) { 18 | returnPoint = self.leadingKeyframe.pointValue; 19 | } else if (progress == 1) { 20 | returnPoint = self.trailingKeyframe.pointValue; 21 | } else if (!CGPointEqualToPoint(self.leadingKeyframe.spatialOutTangent, CGPointZero) || 22 | !CGPointEqualToPoint(self.trailingKeyframe.spatialInTangent, CGPointZero)) { 23 | // Spatial Bezier path 24 | CGPoint outTan = LOT_PointAddedToPoint(self.leadingKeyframe.pointValue, self.leadingKeyframe.spatialOutTangent); 25 | CGPoint inTan = LOT_PointAddedToPoint(self.trailingKeyframe.pointValue, self.trailingKeyframe.spatialInTangent); 26 | returnPoint = LOT_PointInCubicCurve(self.leadingKeyframe.pointValue, outTan, inTan, self.trailingKeyframe.pointValue, progress); 27 | } else { 28 | returnPoint = LOT_PointInLine(self.leadingKeyframe.pointValue, self.trailingKeyframe.pointValue, progress); 29 | } 30 | if (self.hasDelegateOverride) { 31 | return [self.delegate pointForFrame:frame.floatValue 32 | startKeyframe:self.leadingKeyframe.keyframeTime.floatValue 33 | endKeyframe:self.trailingKeyframe.keyframeTime.floatValue 34 | interpolatedProgress:progress 35 | startPoint:self.leadingKeyframe.pointValue 36 | endPoint:self.trailingKeyframe.pointValue 37 | currentPoint:returnPoint]; 38 | } 39 | return returnPoint; 40 | } 41 | 42 | - (BOOL)hasDelegateOverride { 43 | return self.delegate != nil; 44 | } 45 | 46 | - (void)setValueDelegate:(id)delegate { 47 | NSAssert(([delegate conformsToProtocol:@protocol(LOTPointValueDelegate)]), @"Point Interpolator set with incorrect callback type. Expected LOTPointValueDelegate"); 48 | self.delegate = (id)delegate; 49 | } 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /ThermostatControl/Source/Controls/SliderView/SliderValueTransformer.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | public struct SliderValue { 4 | let raw: CGFloat 5 | let transformed: CGFloat 6 | let string: String 7 | 8 | static func zero() -> SliderValue { 9 | return SliderValue(raw: 0, transformed: 0, string: "") 10 | } 11 | } 12 | 13 | public protocol SliderValueTransformer { 14 | func transformed(rawValue: CGFloat) -> SliderValue 15 | } 16 | 17 | public class DefaultSliderValueTransformer: SliderValueTransformer { 18 | 19 | let suffix: String 20 | let prefix: String 21 | let roundingThreshold: CGFloat 22 | 23 | private let formatter: NumberFormatter 24 | 25 | /** 26 | - parameter suffix: suffix to use when converting to string 27 | - parameter prefix: prefix to use when converting to string 28 | - parameter roundingThreshold: CGFLoat.rounded() method is used to transform value, but it returns integral values (i.e roundingThreshold == 1), to change this behavior use roundingThreshold parameter (for example threshold==0.5 will allow to round near 0.5 instead of 1) 29 | - parameter minimumFractionDigits: minimum fraction digits to use when converting to string 30 | - parameter maximumFractionDigits: maximum fraction digits to use when converting to string 31 | **/ 32 | init(suffix: String = "", 33 | prefix: String = "", 34 | roundingThreshold: CGFloat = 1, 35 | minimumFractionDigits: Int = 0, 36 | maximumFractionDigits: Int = 0) { 37 | formatter = NumberFormatter() 38 | formatter.minimumFractionDigits = minimumFractionDigits 39 | formatter.maximumFractionDigits = maximumFractionDigits 40 | self.roundingThreshold = roundingThreshold 41 | self.suffix = suffix 42 | self.prefix = prefix 43 | } 44 | 45 | public func transformed(rawValue: CGFloat) -> SliderValue { 46 | let rounded = rawValue.roundToNearest(roundingThreshold) 47 | return SliderValue(raw: rawValue, 48 | transformed: rounded, 49 | string: string(value: rounded)) 50 | 51 | } 52 | 53 | public func string(value: CGFloat) -> String { 54 | let strValue = formatter.string(for: value) ?? String(format: "%.0f", value) 55 | return String(format: "%@%@%@", prefix, strValue, suffix) 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/Models/LOTAssetGroup.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTAssetGroup.m 3 | // Pods 4 | // 5 | // Created by Brandon Withrow on 2/17/17. 6 | // 7 | // 8 | 9 | #import "LOTAssetGroup.h" 10 | #import "LOTAsset.h" 11 | 12 | @implementation LOTAssetGroup { 13 | NSMutableDictionary *_assetMap; 14 | NSDictionary *_assetJSONMap; 15 | } 16 | 17 | - (instancetype _Nonnull)initWithJSON:(NSArray * _Nonnull)jsonArray 18 | withAssetBundle:(NSBundle * _Nullable)bundle 19 | withFramerate:(NSNumber * _Nonnull)framerate { 20 | self = [super init]; 21 | if (self) { 22 | _assetBundle = bundle; 23 | _assetMap = [NSMutableDictionary dictionary]; 24 | NSMutableDictionary *assetJSONMap = [NSMutableDictionary dictionary]; 25 | for (NSDictionary *assetDictionary in jsonArray) { 26 | NSString *referenceID = assetDictionary[@"id"]; 27 | if (referenceID) { 28 | assetJSONMap[referenceID] = assetDictionary; 29 | } 30 | } 31 | _assetJSONMap = assetJSONMap; 32 | } 33 | return self; 34 | } 35 | 36 | - (void)buildAssetNamed:(NSString *)refID 37 | withFramerate:(NSNumber * _Nonnull)framerate { 38 | 39 | if ([self assetModelForID:refID]) { 40 | return; 41 | } 42 | 43 | NSDictionary *assetDictionary = _assetJSONMap[refID]; 44 | if (assetDictionary) { 45 | LOTAsset *asset = [[LOTAsset alloc] initWithJSON:assetDictionary 46 | withAssetGroup:self 47 | withAssetBundle:_assetBundle 48 | withFramerate:framerate]; 49 | _assetMap[refID] = asset; 50 | } 51 | } 52 | 53 | - (void)finalizeInitializationWithFramerate:(NSNumber * _Nonnull)framerate { 54 | for (NSString *refID in _assetJSONMap.allKeys) { 55 | [self buildAssetNamed:refID withFramerate:framerate]; 56 | } 57 | _assetJSONMap = nil; 58 | } 59 | 60 | - (LOTAsset *)assetModelForID:(NSString *)assetID { 61 | return _assetMap[assetID]; 62 | } 63 | 64 | - (void)setRootDirectory:(NSString *)rootDirectory { 65 | _rootDirectory = rootDirectory; 66 | [_assetMap enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull key, LOTAsset * _Nonnull obj, BOOL * _Nonnull stop) { 67 | obj.rootDirectory = rootDirectory; 68 | }]; 69 | } 70 | @end 71 | -------------------------------------------------------------------------------- /ThermostatDemo/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // ThermostatControl 4 | // 5 | // Created by Andrew Popov on 08.04.2022. 6 | // 7 | 8 | import UIKit 9 | 10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 11 | 12 | var window: UIWindow? 13 | 14 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 15 | guard let windowScene = (scene as? UIWindowScene) else { 16 | return 17 | } 18 | let window = UIWindow(windowScene: windowScene) 19 | let viewController = ThermostatViewController.loadFromNib() 20 | window.rootViewController = viewController 21 | window.makeKeyAndVisible() 22 | self.window = window 23 | } 24 | 25 | func sceneDidDisconnect(_ scene: UIScene) { 26 | // Called as the scene is being released by the system. 27 | // This occurs shortly after the scene enters the background, or when its session is discarded. 28 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 29 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead). 30 | } 31 | 32 | func sceneDidBecomeActive(_ scene: UIScene) { 33 | // Called when the scene has moved from an inactive state to an active state. 34 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 35 | } 36 | 37 | func sceneWillResignActive(_ scene: UIScene) { 38 | // Called when the scene will move from an active state to an inactive state. 39 | // This may occur due to temporary interruptions (ex. an incoming phone call). 40 | } 41 | 42 | func sceneWillEnterForeground(_ scene: UIScene) { 43 | // Called as the scene transitions from the background to the foreground. 44 | // Use this method to undo the changes made on entering the background. 45 | } 46 | 47 | func sceneDidEnterBackground(_ scene: UIScene) { 48 | // Called as the scene transitions from the foreground to the background. 49 | // Use this method to save data, release shared resources, and store enough scene-specific state information 50 | // to restore the scene back to its current state. 51 | } 52 | 53 | 54 | } 55 | 56 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/RenderSystem/RenderNodes/LOTFillRenderer.m: -------------------------------------------------------------------------------- 1 | // 2 | // LOTFillRenderer.m 3 | // Lottie 4 | // 5 | // Created by brandon_withrow on 6/27/17. 6 | // Copyright © 2017 Airbnb. All rights reserved. 7 | // 8 | 9 | #import "LOTFillRenderer.h" 10 | #import "LOTColorInterpolator.h" 11 | #import "LOTNumberInterpolator.h" 12 | #import "LOTHelpers.h" 13 | 14 | @implementation LOTFillRenderer { 15 | LOTColorInterpolator *colorInterpolator_; 16 | LOTNumberInterpolator *opacityInterpolator_; 17 | BOOL _evenOddFillRule; 18 | CALayer *centerPoint_DEBUG; 19 | } 20 | 21 | - (instancetype)initWithInputNode:(LOTAnimatorNode *)inputNode 22 | shapeFill:(LOTShapeFill *)fill { 23 | self = [super initWithInputNode:inputNode keyName:fill.keyname]; 24 | if (self) { 25 | colorInterpolator_ = [[LOTColorInterpolator alloc] initWithKeyframes:fill.color.keyframes]; 26 | opacityInterpolator_ = [[LOTNumberInterpolator alloc] initWithKeyframes:fill.opacity.keyframes]; 27 | centerPoint_DEBUG = [CALayer layer]; 28 | centerPoint_DEBUG.bounds = CGRectMake(0, 0, 20, 20); 29 | if (ENABLE_DEBUG_SHAPES) { 30 | [self.outputLayer addSublayer:centerPoint_DEBUG]; 31 | } 32 | _evenOddFillRule = fill.evenOddFillRule; 33 | 34 | self.outputLayer.fillRule = _evenOddFillRule ? @"even-odd" : @"non-zero"; 35 | } 36 | return self; 37 | } 38 | 39 | - (NSDictionary *)valueInterpolators { 40 | return @{@"Color" : colorInterpolator_, 41 | @"Opacity" : opacityInterpolator_}; 42 | } 43 | 44 | - (BOOL)needsUpdateForFrame:(NSNumber *)frame { 45 | return [colorInterpolator_ hasUpdateForFrame:frame] || [opacityInterpolator_ hasUpdateForFrame:frame]; 46 | } 47 | 48 | - (void)performLocalUpdate { 49 | centerPoint_DEBUG.backgroundColor = [colorInterpolator_ colorForFrame:self.currentFrame]; 50 | centerPoint_DEBUG.borderColor = [UIColor lightGrayColor].CGColor; 51 | centerPoint_DEBUG.borderWidth = 2.f; 52 | self.outputLayer.fillColor = [colorInterpolator_ colorForFrame:self.currentFrame]; 53 | self.outputLayer.opacity = [opacityInterpolator_ floatValueForFrame:self.currentFrame]; 54 | } 55 | 56 | - (void)rebuildOutputs { 57 | self.outputLayer.path = self.inputNode.outputPath.CGPath; 58 | } 59 | 60 | - (NSDictionary *)actionsForRenderLayer { 61 | return @{@"backgroundColor": [NSNull null], 62 | @"fillColor": [NSNull null], 63 | @"opacity" : [NSNull null]}; 64 | } 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /Pods/lottie-ios/lottie-ios/Classes/PublicHeaders/LOTComposition.h: -------------------------------------------------------------------------------- 1 | // 2 | // LOTScene.h 3 | // LottieAnimator 4 | // 5 | // Created by Brandon Withrow on 12/14/15. 6 | // Copyright © 2015 Brandon Withrow. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @class LOTLayerGroup; 13 | @class LOTLayer; 14 | @class LOTAssetGroup; 15 | 16 | @interface LOTComposition : NSObject 17 | 18 | /// Load animation by name from the default bundle, Images are also loaded from the bundle 19 | + (nullable instancetype)animationNamed:(nonnull NSString *)animationName NS_SWIFT_NAME(init(name:)); 20 | 21 | /// Loads animation by name from specified bundle, Images are also loaded from the bundle 22 | + (nullable instancetype)animationNamed:(nonnull NSString *)animationName 23 | inBundle:(nonnull NSBundle *)bundle NS_SWIFT_NAME(init(name:bundle:)); 24 | 25 | /// Loads an animation from a specific file path. WARNING Do not use a web URL for file path. 26 | + (nullable instancetype)animationWithFilePath:(nonnull NSString *)filePath NS_SWIFT_NAME(init(filePath:)); 27 | 28 | /// Creates an animation from the deserialized JSON Dictionary 29 | + (nonnull instancetype)animationFromJSON:(nonnull NSDictionary *)animationJSON NS_SWIFT_NAME(init(json:)); 30 | 31 | /// Creates an animation from the deserialized JSON Dictionary, images are loaded from the specified bundle 32 | + (nonnull instancetype)animationFromJSON:(nullable NSDictionary *)animationJSON 33 | inBundle:(nullable NSBundle *)bundle NS_SWIFT_NAME(init(json:bundle:)); 34 | 35 | - (instancetype _Nonnull)initWithJSON:(NSDictionary * _Nullable)jsonDictionary 36 | withAssetBundle:(NSBundle * _Nullable)bundle; 37 | 38 | @property (nonatomic, readonly) CGRect compBounds; 39 | @property (nonatomic, strong, readonly, nullable) NSNumber *startFrame; 40 | @property (nonatomic, strong, readonly, nullable) NSNumber *endFrame; 41 | @property (nonatomic, strong, readonly, nullable) NSNumber *framerate; 42 | @property (nonatomic, readonly) NSTimeInterval timeDuration; 43 | @property (nonatomic, strong, readonly, nullable) LOTLayerGroup *layerGroup; 44 | @property (nonatomic, strong, readonly, nullable) LOTAssetGroup *assetGroup; 45 | @property (nonatomic, strong, readwrite, nullable) NSString *rootDirectory; 46 | @property (nonatomic, strong, readonly, nullable) NSBundle *assetBundle; 47 | @property (nonatomic, copy, nullable) NSString *cacheKey; 48 | 49 | @end 50 | --------------------------------------------------------------------------------