[
  {
    "path": ".github/ISSUE_TEMPLATE",
    "content": "<!--- \nBEFORE SUBMITTING AN ISSUE: Make sure you are on the latest JTAppleCalendar (8.0.5)\nIf you want to continue making an issue, please fill out the required fields below.\n-->\n\n**(Required) Version Number:**\n\n## Description\n\n## Steps To Reproduce\n\n## Expected Behavior\n\n## Additional Context\n"
  },
  {
    "path": ".gitignore",
    "content": "# OS X\n.DS_Store\n\n# Xcode\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.perspectivev3\n!default.perspectivev3\nxcuserdata\n*.xccheckout\nprofile\n*.moved-aside\nDerivedData\n*.hmap\n*.ipa\n\n# Bundler\n.bundle\n\nCarthage\n# We recommend against adding the Pods directory to your .gitignore. However\n# you should judge for yourself, the pros and cons are mentioned at:\n# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control\n# \n# Note: if you ignore the Pods directory, make sure to uncomment\n# `pod install` in .travis.yml\n#\n# Pods/\n#xcshareddata\n/.swiftlint.yml\n/.swift-version\n/Index\nxbcbb2nb\n"
  },
  {
    "path": ".swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": ".swiftpm/xcode/package.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": ".tailor.yml",
    "content": "except:\n    - upper-camel-case\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: objective-c\nosx_image: xcode10\nenv:\n  global:\n  - LC_CTYPE=en_US.UTF-8\n  - LANG=en_US.UTF-8\n  - WORKSPACE=JTAppleCalendar.xcworkspace\n  - IOS_FRAMEWORK_SCHEME=\"JTAppleCalendar iOSTests\"\n  - TVOS_FRAMEWORK_SCHEME=\"JTAppleCalendar tvOSTests\"\n  - IOS_SDK=iphonesimulator12.0\n  - TVOS_SDK=appletvsimulator12.0\n  - EXAMPLE_SCHEME_IOS=\"JTAppleCalendar iOS Example\"\n  matrix:\n    - DESTINATION=\"OS=10.0,name=iPhone 7 Plus\"     SCHEME=\"$IOS_FRAMEWORK_SCHEME\"     SDK=\"$IOS_SDK\"     RUN_TESTS=\"YES\" BUILD_EXAMPLE=\"YES\"  EXAMPLE_SCHEME=\"$EXAMPLE_SCHEME_IOS\"  POD_LINT=\"NO\"\n    - DESTINATION=\"OS=10.0,name=Apple TV 1080p\"    SCHEME=\"$TVOS_FRAMEWORK_SCHEME\"    SDK=\"$TVOS_SDK\"    RUN_TESTS=\"YES\" BUILD_EXAMPLE=\"NO\"  POD_LINT=\"NO\"\nscript:\n  - set -o pipefail\n  - xcodebuild -version\n  - xcodebuild -showsdks\n \n  # Build Framework in Debug and Run Tests if specified\n  - if [ $RUN_TESTS == \"YES\" ]; then\n      xcodebuild -workspace \"$WORKSPACE\" -scheme \"$SCHEME\" -sdk \"$SDK\" -destination \"$DESTINATION\" -configuration Debug ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -c;\n    else\n      xcodebuild -workspace \"$WORKSPACE\" -scheme \"$SCHEME\" -sdk \"$SDK\" -destination \"$DESTINATION\" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;\n    fi\n\n  # Build Example in Debug if specified\n  - if [ $BUILD_EXAMPLE == \"YES\" ]; then\n      xcodebuild -workspace \"$WORKSPACE\" -scheme \"$EXAMPLE_SCHEME\" -sdk \"$SDK\" -destination \"$DESTINATION\" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;\n    fi\n\n  # Run `pod lib lint` if specified\n  - if [ $POD_LINT == \"YES\" ]; then\n      pod lib lint;\n    fi\n"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Change Log\nAll notable changes to this project will be documented in this file.\n`JTAppleCalendar` adheres to [Semantic Versioning](http://semver.org/).\n#### 8.x Releases\n- `8.0.0` Releases - [8.0.0](#800)|[8.0.1](#801)|[8.0.2](#802)|[8.0.3](#803)|[8.0.4](#804)|[8.0.5](#805)\n#### 7.x Releases\n- `7.1.0` Releases - [7.1.0](#710)|[7.1.1](#711)|[7.1.2](#712)|[7.1.3](#713)|[7.1.4](#714)|[7.1.5](#715)|[7.1.6](#716)|[7.1.7](#717)\n- `7.0.0` Releases - [7.0.0](#700)|[7.0.1](#701)|[7.0.2](#702)|[7.0.3](#703)|[7.0.4](#704)|[7.0.5](#705)|[7.0.6](#706)\n\n#### 6.x Releases\n- `6.1.0` Releases - [6.1.0](#610)|[6.1.1](#611)|[6.1.2](#612)|[6.1.3](#613)|[6.1.4](#614)|[6.1.5](#615)|[6.1.6](#616)\n- `6.0.0` Releases - [6.0.0](#600)|[6.0.1](#601)|[6.0.2](#602)|[6.0.3](#603)|[6.0.4](#604)|[6.0.5](#605)\n- `6.0.0` Betas - [6.0.0-beta.1](#600-beta1)\n\n#### 5.x Releases\n- `5.0.0` Releases - [5.0.0](#500)|[5.0.1](#501)\n\n#### 4.x Releases\n- `4.1.0` Releases - [4.1.0](#410)|[4.1.1](#411)|[4.1.2](#412)|[4.1.3](#413)|[4.1.4](#414)\n- `4.0.0` Releases - [4.0.0](#400)|[4.0.1](#401)|[4.0.2](#402)|[4.0.3](#403)\n\n#### 3.x Releases\n- `3.0.0` Releases - [3.0.0](#300)|[3.0.1](#301)\n\n#### 2.x Releases\n- `2.1.0` Releases - [2.1.0](#210)|[2.1.1](#211)|[2.1.2](#212)\n- `2.0.0` Releases - [2.0.0](#200)|[2.0.1](#201)|[2.0.2](#202)|[2.0.3](#203)\n\n#### 1.x Releases\n- `1.1.x` Releases - [1.1.0](#110)| [1.1.1](#111)\n- `1.0.x` Releases - [1.0.0](#100)\n\n---\n## [8.0.5](https://github.com/patchthecode/JTAppleCalendar/releases/tag/8.0.5)\n- fixed latest iOS update issues (https://github.com/patchthecode/JTAppleCalendar/pull/1370)\n- Respect animation parameter (https://github.com/patchthecode/JTAppleCalendar/commit/72e4ac3b5a5af8abe5c094aceefc00801044dfa4)\n- Added preferred position is scoll mode is .none (https://github.com/patchthecode/JTAppleCalendar/commit/31c00c4215e5ae2ab97cd0415cdd41acaebef1f1#diff-0471218aece98915af0d556e7389b414ef1397d811c0fbf94d96ea8323bdc9a4R551-R564)\n## [8.0.4](https://github.com/patchthecode/JTAppleCalendar/releases/tag/8.0.4)\n- fixed warnings (https://github.com/patchthecode/JTAppleCalendar/issues/1307)\n## [8.0.3](https://github.com/patchthecode/JTAppleCalendar/releases/tag/8.0.3)\n- [removed side effect on allowsRangedSelection](https://github.com/patchthecode/JTAppleCalendar/issues/1122)\n- Carthage tag now works again.\n## [8.0.2](https://github.com/patchthecode/JTAppleCalendar/releases/tag/8.0.2)\n- updated range selection . Now you can choose mode as being continous or segmented\n## [8.0.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/8.0.1)\n- [fixed memory leak](https://github.com/patchthecode/JTAppleCalendar/pull/1081)\n## [8.0.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/8.0.0)\nhttps://github.com/patchthecode/JTAppleCalendar/commit/\n- ScrollToDate should now respect section insets\n- [Some dates could not be selected](https://github.com/patchthecode/JTAppleCalendar/commit/eea5725b2fb84e998b2998cf3ba724194b1eb705)\n- updated to Swift 5\n- [Updated range selection logic. Every section is reated as a group](https://github.com/patchthecode/JTAppleCalendar/commit/a28f3b273d8f4d043d8ae1227e351723ed6ea7c7)\n- [StrictBoundary = false together with section inset causes misaligned sections](https://github.com/patchthecode/JTAppleCalendar/commit/23347b26ccda3e65a4f387859263a386b7ef227f)\n- [Single cell deletion fix](https://github.com/patchthecode/JTAppleCalendar/commit/62501f95b5b5a693ab4caa967736d1ee120d0b5d)\n- [Fix crash for japanese calendar](https://github.com/patchthecode/JTAppleCalendar/commit/c06f0eec472e4ef39ac97e031ae55ec1231df1c1)\n- [Animations on the calendar now looks smooth](https://github.com/patchthecode/JTAppleCalendar/commit/a131d7fd2d447a81854194e4d0198519f7ea526e)\n- Can now work with app extensions\n- dropped support for both iOS 8 & 9\n- Added year view support\n- Other enhancements\n\n## [7.1.7](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.1.7)\n- fixed broken cell size change \n- fixed rotation code\n- fixed scrolling issue\n\n## [7.1.6](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.1.6)\n- Updated to swift 4.2\n- small bug fixes\n\n## [7.1.5](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.1.5)\n- Fixed inset bug #419\n- Fixed unowned Crash #624\n\n- Updated by [JayT](https://github.com/patchthecode).\n## [7.1.4](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.1.4)\n- Fixed [programatic selection bug](https://github.com/patchthecode/JTAppleCalendar/commit/de5f0023fb6b157bddb2afa9637c7be0a1bbc636)\n- Updated by [JayT](https://github.com/patchthecode).\n\n## [7.1.3](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.1.3)\n- Fixed rounding error\n- Updated by [JayT](https://github.com/patchthecode).\n\n## [7.1.2](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.1.2)\n- Fixed rounding error - https://github.com/patchthecode/JTAppleCalendar/commit/c4059147f03695b66a044c16cc4f0ec67d87eae2\n    - Updated by [JayT](https://github.com/patchthecode).\n\n## [7.1.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.1.1)\n- Fixed errors - https://github.com/patchthecode/JTAppleCalendar/issues/598\n\n## [7.1.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.1.0)\n- Fixed errors.\n- Made library compatible with iOS8\n- CellState now informs if library made programatic vs user selected tap on cell\n\n## [7.0.6](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.0.6)\n- [bug fix - accidentaly introduced in 7.0.5](https://github.com/patchthecode/JTAppleCalendar/commit/7f60c8c5b2265954ad0041ac4f150c6f4862cdb7)\n- Other code cleanup\n  - Updated by [JayT](https://github.com/patchthecode).\n  - Updated by [mayurdzk](https://github.com/mayurdzk).\n  - Updated by [mgurreta](https://github.com/mgurreta).\n\n## [7.0.5](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.0.5)\n- [bug fix](https://github.com/patchthecode/JTAppleCalendar/commit/bcbb2bc5696cb2f15a6e87e1023c3a9cdf3dfdff)\n- [added anchor dates on reload](https://github.com/patchthecode/JTAppleCalendar/commit/b81158dfd7600e1d31143be4fbfba32af2187253)\n   - Sometimes on reload you do not want to see scrolling. Anchor dates solved that problem.\n- [Fixed double reloading of calendar](https://github.com/patchthecode/JTAppleCalendar/commit/05c6f518de9484d19faba2ae2f7fba2ffb8e9cba)\n- [Fixed crash when resizing from zero height/width](https://github.com/patchthecode/JTAppleCalendar/commit/765d919bb91fa3817d79d78f735bee0b720f3ba3)\n- [Added function to get month data](https://github.com/patchthecode/JTAppleCalendar/commit/502d53d7a815f93e099bb2b81b4c4b6e125b26bb)\n\n## [7.0.4](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.0.4)\n- [Function signature change to fix issue on shouldSelect/shouldDeselect function](https://github.com/patchthecode/JTAppleCalendar/commit/64b2bd1aa8ecab97c8a2bc92020724e97702887a)\n- Reverted unavailability of isSelected on date cells.\n\n## [7.0.3](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.0.3)\n- [Changed order in which delegates are called](https://github.com/patchthecode/JTAppleCalendar/issues/431)\n- [Fixed recursive loop error](https://github.com/patchthecode/JTAppleCalendar/commit/e95ec9806ef932a619329b3f40062ad125b4a17e)\n- [Potential crash fix. Incorrectly used statdard function instead of custom](https://github.com/patchthecode/JTAppleCalendar/commit/3cbfab2382ccb7168a5c22e0081504f43d0d76e6)\n- [ShouldSelect should be called on programatic selection](https://github.com/patchthecode/JTAppleCalendar/commit/4f528d17842848bf3cca4b80ce2fb89958caf614)\n\n## [7.0.2](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.0.2)\n- [Fixed visible scrolling issue](https://github.com/patchthecode/JTAppleCalendar/issues/263)\n- Added check if dev forcefully calls layoutIfNeeded(). Layout should be re-created.\n\n## [7.0.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.0.1)\n- Quickfix for Charthage users. Correct header file was included. \n\n## [7.0.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/7.0.0)\n- Massive changes and minor bug fixes \n   - JTAppleCalendar is now a UICollectionView subclass and can be designed on interface builder.\n   - Months sections distance is now configurable\n   - [Scroll to date can now be done with an offset](https://github.com/patchthecode/JTAppleCalendar/issues/332)\n   - [Decoration-views added](https://github.com/patchthecode/JTAppleCalendar/issues/296). You can now design the calendar with whatever view you choose\n   - Performance load time of dates has been decreased\n   - [Visible fixed](https://github.com/patchthecode/JTAppleCalendar/issues/263)\n   \n## [6.1.6](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.1.6)\n- Fixed - [Memory leak](https://github.com/patchthecode/JTAppleCalendar/issues/333)\n- Fixed - [Over scrolling in vertical mode when scrolled to last date](https://github.com/patchthecode/JTAppleCalendar/issues/344)\n\n## [6.1.5](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.1.5)\n- Fixed - [Crash on reloading items](https://github.com/patchthecode/JTAppleCalendar/issues/327)\n\n## [6.1.4](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.1.4)\n- Fixed - [Crash in speific regions](https://github.com/patchthecode/JTAppleCalendar/issues/323)\n- Fixed - [Scroll to date delegate not called. New introduced bug](https://github.com/patchthecode/JTAppleCalendar/issues/325)\n\n## [6.1.3](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.1.3)\n- Fixed - [Incorrect selected position](https://github.com/patchthecode/JTAppleCalendar/issues/280) when using range selection.\n- Behavior change - Changing the frame size no longer automatically reloads the calendar. This should explicitly be done by the developer.\n- Fixed error - [Reloading cells asynchronously](https://github.com/patchthecode/JTAppleCalendar/issues/304) which caused two errors [here](https://github.com/patchthecode/JTAppleCalendar/issues/304) and [here](https://github.com/patchthecode/JTAppleCalendar/issues/277) - JayT\n- Fixed error - [Last saved offset fixed programatically](https://github.com/patchthecode/JTAppleCalendar/pull/276) - by [KyleConway](https://github.com/KyleConway)\n- Fixed error - [visibleDates() function should exclude headers](https://github.com/patchthecode/JTAppleCalendar/pull/278) - by [KyleConway](https://github.com/KyleConway)\n\n## [6.1.2](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.1.2)\n- Fixed error - deselect all dates should work as expected\n- Fixed error - Introduced in last version. DidScroll delegate was not being called.\n- Fixed error - Vertical calendar was not being displayed correctly in some configurations.\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [6.1.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.1.1)\n- Documentation updates\n\n## [6.1.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.1.0)\n- [Fixed error - triggerScrollToDateDelegate was not called](https://github.com/patchthecode/JTAppleCalendar/issues/235)\n- [Fixed error introduced in last version - scroll To date broke](https://github.com/patchthecode/JTAppleCalendar/issues/223)\n- Performance updates\n- Behavior change - [Library will now honour time zones based on Calenda() instance](https://github.com/patchthecode/JTAppleCalendar/issues/222)\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [6.0.5](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.0.5)\n- [Floating point error fix](https://github.com/patchthecode/JTAppleCalendar/issues/211)\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [6.0.4](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.0.4)\n- [Fixed wrong date bug](https://github.com/patchthecode/JTAppleCalendar/commit/1689586c70e2fbd9785794c4fc8c5f094403e98f)\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [6.0.3](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.0.3)\n- [Fixed wrong date bug](https://github.com/patchthecode/JTAppleCalendar/issues/210)\n- Fixed Scrolling issues with new segment code\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [6.0.2](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.0.2)\n- Fixed error: [Cells are not updated properly because of pre-fetching](https://github.com/patchthecode/JTAppleCalendar/issues/196)\n- New Feature: Gesture functionality added\n- Fixed error: [Fix for vertical direction](https://github.com/patchthecode/JTAppleCalendar/commit/4d48c594e00864dbe470dc64dbfd2e8790dbe783)\n- Fixed error: [Vertical cell size](https://github.com/patchthecode/JTAppleCalendar/commit/8e85b784bfe5ff8669157f42aee17aaee99a9429)\n- Fixed error: [Reload data completionhandler does not work when view is first loaded](https://github.com/patchthecode/JTAppleCalendar/commit/da0a0ad9b22b6e50fa2feec644afaa6902ad4a5e)\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [6.0.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.0.1)\n- Fixed error: [Left over artifacts](https://github.com/patchthecode/JTAppleCalendar/commit/f5be1e1c281cb08337ede276403311b3ee4a4e9f)\n- Fixed error: [Potential infinite loop on scrollViewDidEnd](https://github.com/patchthecode/JTAppleCalendar/commit/a115ff9301118fd93ab8ed960ba33ebeb28b8f7b)\n- Update: [Changed variable names for consistency](https://github.com/patchthecode/JTAppleCalendar/commit/3eca0fddc79a6425c146b65aabd2ff31b0c0d05d)\n- Update: [Added functionality to flip calendar horizontally for ethnic calendars](https://github.com/patchthecode/JTAppleCalendar/commit/a991b898a2ce5bc3a678bcf0b43a8e381e56a840)\n- Update: `ConfigureCaneldar` function signature has changed. \n- Fixed error: [XCode 8.1 has a bug](https://github.com/patchthecode/JTAppleCalendar/commit/97363897006877b62ebfb357cb98160a1b5b291b). So a work around was implemented\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [6.0.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.0.0)\n- Added functionality to get dateCell by CGPoint\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [6.0.0-beta.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/6.0.0-beta.1)\n- Made function names more standardised\n- Added ability enable/disable in-dates/out-dates generation\n- Added ability to choose buldle for xib files\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [5.0.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/5.0.1)\n- Bug Fix: [Crash on negative scroll in vertical mode](https://github.com/patchthecode/JTAppleCalendar/issues/115)\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [5.0.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/5.0.0)\n- Bug Fix: [Double calling of delegate method on finger lift](https://github.com/patchthecode/JTAppleCalendar/issues/102)\n- Bug Fix: [Delegate call fixed when user scrolls to top using status bar](https://github.com/patchthecode/JTAppleCalendar/issues/89)\n- Bug Fix: [Crash when calenader switched to single row](https://github.com/patchthecode/JTAppleCalendar/issues/111)\n- Update: Added range selection\n- Update: [Deprecations](https://github.com/patchthecode/JTAppleCalendar/wiki/Message-to-testers-working-on-master-branch)\n- Update: JTApplecalendar now works for tvOS\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [4.1.4](https://github.com/patchthecode/JTAppleCalendar/releases/tag/4.1.4)\n- Bug Fixes: [Scroll to section bug introduced](https://github.com/patchthecode/JTAppleCalendar/issues/96)\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [4.1.3](https://github.com/patchthecode/JTAppleCalendar/releases/tag/4.1.3)\n- Added missing functionality: To give dev a chance to clean up the cell before being reused.\n- Added missing functionality: Headers can now be registered using classes.\n- Bug Fixes: [Crash when using multiplel instance of JTAppleCalendar](https://github.com/patchthecode/JTAppleCalendar/issues/75)\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [4.1.2](https://github.com/patchthecode/JTAppleCalendar/releases/tag/4.1.1)\n- Fixed issue: removed forced unwrapping of date on deselection. [Caused crash](https://github.com/patchthecode/JTAppleCalendar/issues/69)\n- Fixed issue: on reloading index paths, removed dupicates. Caused visual glitch.\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [4.1.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/4.1.1)\n- Fixed issue: Various bug fixes and enhancements\n   - [Days of the week can now be used in calculations]()\n   - [Cells cannot be decelected sometimes](https://github.com/patchthecode/JTAppleCalendar/issues/67)\n   - [Bug on multiple selection](https://github.com/patchthecode/JTAppleCalendar/issues/64)\n   - [Bug when 2 months are displayed](https://github.com/patchthecode/JTAppleCalendar/issues/63)\n   - performance fix\n- Added functoin to generate dates and select date range\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [4.1.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/4.1.0)\n- Feature Added: Devs can now configure the width and height of a dateCell.\n- Fixed issue: Synchonization issues on calendar start\n- Fixed issue: Fixed layout [Bug](https://github.com/patchthecode/JTAppleCalendar/issues/57)\n- performance fixes\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [4.0.3](https://github.com/patchthecode/JTAppleCalendar/releases/tag/4.0.3)\n- Fixed issue: Performance fixes - Library should work smooth on an iPhone 4s\n- Fixed issue: Scroll to segments were not calling completion handlers\n- Fixed issue: Added fix for device orientation\n- Added missing functionality: Devs can now register cells by type\n  - Updated by [JayT](https://github.com/patchthecode).\n  - Fix added by: [Baptiste Sansierra](https://github.com/patchthecode/JTAppleCalendar/pull/48)\n  - Functionality added by: [Encero](https://github.com/patchthecode/JTAppleCalendar/pull/49)\n\n## [4.0.2](https://github.com/patchthecode/JTAppleCalendar/releases/tag/4.0.2)\n- Fixed issue: Layout issue in 4.0.1. \n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [4.0.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/4.0.1)\n- Fixed issue: Performance fixes \n- Fixed issue: Layout issues\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [4.0.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/4.0.0)\n- Fixed issue: Performance fixes \n- Fixed issue: Changed way numberOfRows is configured. New way solves concurrency issues\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [3.0.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/3.0.1)\n- Fixed issue: Cell Inset was borken with 3.0.0 release\n- Fixed issue: canSelectDate always returned true. \n  - Updated by [JayT](https://github.com/patchthecode).\n  \n## [3.0.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/3.0.0)\n- Fixed: Issue [#20](https://github.com/patchthecode/JTAppleCalendar/issues/20). Layout should be set to needsUpdate when firstDayOfWeek changes\n- Update: Issue [#19](https://github.com/patchthecode/JTAppleCalendar/issues/19). DidScroll delegate will now only get called when user scolls. This makes clear system actions vs user actions.\n- Fixed: Issue [#18](https://github.com/patchthecode/JTAppleCalendar/issues/18). Selecting out-dates now also select their date counterparts.\n- Update: Issue [#16](https://github.com/patchthecode/JTAppleCalendar/issues/16). Headers are now added to the project.\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [2.1.2](https://github.com/patchthecode/JTAppleCalendar/releases/tag/2.1.2)\n- Fixed: When selecting date with delegates disabled, calendar shifted to month offset. This was due to the newly added smooth scrolling feature\n- Update: The CellState for a date now returns more information. It now returns (added to its previous info) a date and a day.\n- Update: New function added so user can query the visible dateCells on the screen: cellStatusForDateAtRow(_: Int, column: Int)\n- Update: With paging disbled, the scrolling now snaps to day\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [2.1.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/2.1.1)\n- Crash on using NSDate() without a formatter for date ranges [Issue 11](https://github.com/patchthecode/JTAppleCalendar/issues/11)\n  - Updated by [JayT](https://github.com/patchthecode).\n\n## [2.1.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/2.1.0)\n- Calendar paging is now an option\n- Scroll to date method will now scroll to a date if paging is set to off. [Issue 10](https://github.com/patchthecode/JTAppleCalendar/issues/10)\n  - Updated by [JayT](https://github.com/patchthecode).\n\n\n## [2.0.3](https://github.com/patchthecode/JTAppleCalendar/releases/tag/2.0.3)\n- Fixed visual bug. Now there should be no flickering when scrolling dates.\n- Updated sample code \n  - Updated by [JayT](https://github.com/patchthecode).\n\n\n## [2.0.2](https://github.com/patchthecode/JTAppleCalendar/releases/tag/2.0.2)\n- Added functionality to not trigger delegates on selecting dates\n- Updated sample code \n  - Updated by [JayT](https://github.com/patchthecode).\n\n\n## [2.0.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/2.0.0)\n- Added function to handle date selection in Arrays\n  - Updated by [JayT](https://github.com/patchthecode).\n\n\n## [2.0.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/2.0.0)\nReleased on 2016-04-5. All issues associated with this milestone can be found using this \n[filter](https://github.com/patchthecode/JTAppleCalendar/milestones/Obvious%20things%20that%20were%20missed%20in%20Initial%20Coding)\n\n#### Updated\n- fixed date selection method. \n- made didSelectDate function return an optional object. The value can be nil if the selected date is off the screen.\n  - Updated by [JayT](https://github.com/patchthecode).\n\n\n## [1.1.1](https://github.com/patchthecode/JTAppleCalendar/releases/tag/1.1.1)\nReleased on 2016-03-20.\n\n#### Updated\n- Updated packages\n- Updated by [JayT](https://github.com/patchthecode).\n\n\n## [1.1.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/1.1.0)\nReleased on 2016-03-28.\n\n#### Updated\n- Added functionality to query current date section\n- Calendar-view now reloads on datasource change\n  - Updated by [JayT](https://github.com/patchthecode).\n\n\n## [1.0.0](https://github.com/patchthecode/JTAppleCalendar/releases/tag/1.0.0)\nReleased on 2016-03-27.\n\n#### Added\n- Initial release of JTAppleCalendar.\n  - Added by [JayT](https://github.com/patchthecode).\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "> [!CAUTION]\n> This document has not been written yet. Please consider submitting a PR to help out\n"
  },
  {
    "path": "JTAppleCalendar.podspec",
    "content": "Pod::Spec.new do |s|\n  s.name             = \"JTAppleCalendar\"\n  s.version          = \"8.0.5\"\n  s.summary          = \"The Unofficial Swift Apple Calendar Library. View. Control. for iOS & tvOS\"\n  s.description      = <<-DESC\nA highly configurable Apple calendar control. Contains features like boundary dates, month and week view. Very light weight.\n                       DESC\n\n  s.homepage         = \"https://patchthecode.com\"\n  # s.screenshots    = \"https://patchthecode.github.io/\"\n  s.license          = 'MIT'\n  s.author           = { \"JayT\" => \"patchthecode@gmail.com\" }\n  s.source           = { :git => \"https://github.com/patchthecode/JTAppleCalendar.git\", :tag => s.version.to_s }\n\n  s.swift_version    = '5'\n\n  s.ios.deployment_target = '11.0'\n  s.tvos.deployment_target = '11.0'\n\n  s.source_files = 'Sources/JTAppleCalendar/*.swift'\n  s.resource_bundles = {'JTAppleCalendar' => ['Sources/JTAppleCalendar/PrivacyInfo.xcprivacy']}\nend\n\n"
  },
  {
    "path": "JTAppleCalendar.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 50;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t3B8DA771233A359100A95526 /* JTACMonthReusableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA758233A358F00A95526 /* JTACMonthReusableView.swift */; };\n\t\t3B8DA772233A359100A95526 /* JTACYearViewProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA759233A358F00A95526 /* JTACYearViewProtocols.swift */; };\n\t\t3B8DA773233A359100A95526 /* JTACMonthView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA75A233A359000A95526 /* JTACMonthView.swift */; };\n\t\t3B8DA774233A359100A95526 /* CalendarStructs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA75B233A359000A95526 /* CalendarStructs.swift */; };\n\t\t3B8DA775233A359100A95526 /* JTACMonthActionFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA75C233A359000A95526 /* JTACMonthActionFunctions.swift */; };\n\t\t3B8DA776233A359100A95526 /* JTACMonthLayoutProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA75D233A359000A95526 /* JTACMonthLayoutProtocol.swift */; };\n\t\t3B8DA777233A359100A95526 /* JTACInteractionYearFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA75E233A359000A95526 /* JTACInteractionYearFunctions.swift */; };\n\t\t3B8DA778233A359100A95526 /* JTACYearView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA75F233A359000A95526 /* JTACYearView.swift */; };\n\t\t3B8DA779233A359100A95526 /* JTAppleCalendar.h in Headers */ = {isa = PBXBuildFile; fileRef = 3B8DA760233A359000A95526 /* JTAppleCalendar.h */; settings = {ATTRIBUTES = (Public, ); }; };\n\t\t3B8DA77A233A359100A95526 /* JTACMonthLayoutVerticalCalendar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA761233A359000A95526 /* JTACMonthLayoutVerticalCalendar.swift */; };\n\t\t3B8DA77B233A359100A95526 /* JTACMonthDelegateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA762233A359000A95526 /* JTACMonthDelegateProtocol.swift */; };\n\t\t3B8DA77C233A359100A95526 /* JTACDayCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA763233A359000A95526 /* JTACDayCell.swift */; };\n\t\t3B8DA77D233A359100A95526 /* JTACMonthLayoutHorizontalCalendar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA764233A359000A95526 /* JTACMonthLayoutHorizontalCalendar.swift */; };\n\t\t3B8DA77E233A359100A95526 /* JTACMonthViewProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA765233A359000A95526 /* JTACMonthViewProtocols.swift */; };\n\t\t3B8DA77F233A359100A95526 /* JTACCollectionMonthViewDelegates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA766233A359000A95526 /* JTACCollectionMonthViewDelegates.swift */; };\n\t\t3B8DA780233A359100A95526 /* GlobalFunctionsAndExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA767233A359000A95526 /* GlobalFunctionsAndExtensions.swift */; };\n\t\t3B8DA781233A359100A95526 /* JTACInteractionMonthFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA768233A359000A95526 /* JTACInteractionMonthFunctions.swift */; };\n\t\t3B8DA782233A359100A95526 /* JTACScrollViewDelegates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA769233A359000A95526 /* JTACScrollViewDelegates.swift */; };\n\t\t3B8DA784233A359100A95526 /* JTACCollectionYearViewDelegates.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA76B233A359000A95526 /* JTACCollectionYearViewDelegates.swift */; };\n\t\t3B8DA785233A359100A95526 /* JTACMonthCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA76C233A359000A95526 /* JTACMonthCell.swift */; };\n\t\t3B8DA786233A359100A95526 /* JTACMonthLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA76D233A359000A95526 /* JTACMonthLayout.swift */; };\n\t\t3B8DA787233A359100A95526 /* CalendarEnums.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA76E233A359000A95526 /* CalendarEnums.swift */; };\n\t\t3B8DA788233A359100A95526 /* JTACMonthQueryFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA76F233A359000A95526 /* JTACMonthQueryFunctions.swift */; };\n\t\t3B8DA789233A359100A95526 /* JTACVariables.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B8DA770233A359100A95526 /* JTACVariables.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXFileReference section */\n\t\t3B8DA758233A358F00A95526 /* JTACMonthReusableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACMonthReusableView.swift; path = Sources/JTAppleCalendar/JTACMonthReusableView.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA759233A358F00A95526 /* JTACYearViewProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACYearViewProtocols.swift; path = Sources/JTAppleCalendar/JTACYearViewProtocols.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA75A233A359000A95526 /* JTACMonthView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACMonthView.swift; path = Sources/JTAppleCalendar/JTACMonthView.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA75B233A359000A95526 /* CalendarStructs.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CalendarStructs.swift; path = Sources/JTAppleCalendar/CalendarStructs.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA75C233A359000A95526 /* JTACMonthActionFunctions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACMonthActionFunctions.swift; path = Sources/JTAppleCalendar/JTACMonthActionFunctions.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA75D233A359000A95526 /* JTACMonthLayoutProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACMonthLayoutProtocol.swift; path = Sources/JTAppleCalendar/JTACMonthLayoutProtocol.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA75E233A359000A95526 /* JTACInteractionYearFunctions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACInteractionYearFunctions.swift; path = Sources/JTAppleCalendar/JTACInteractionYearFunctions.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA75F233A359000A95526 /* JTACYearView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACYearView.swift; path = Sources/JTAppleCalendar/JTACYearView.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA760233A359000A95526 /* JTAppleCalendar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JTAppleCalendar.h; path = Sources/JTAppleCalendar/JTAppleCalendar.h; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA761233A359000A95526 /* JTACMonthLayoutVerticalCalendar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACMonthLayoutVerticalCalendar.swift; path = Sources/JTAppleCalendar/JTACMonthLayoutVerticalCalendar.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA762233A359000A95526 /* JTACMonthDelegateProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACMonthDelegateProtocol.swift; path = Sources/JTAppleCalendar/JTACMonthDelegateProtocol.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA763233A359000A95526 /* JTACDayCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACDayCell.swift; path = Sources/JTAppleCalendar/JTACDayCell.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA764233A359000A95526 /* JTACMonthLayoutHorizontalCalendar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACMonthLayoutHorizontalCalendar.swift; path = Sources/JTAppleCalendar/JTACMonthLayoutHorizontalCalendar.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA765233A359000A95526 /* JTACMonthViewProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACMonthViewProtocols.swift; path = Sources/JTAppleCalendar/JTACMonthViewProtocols.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA766233A359000A95526 /* JTACCollectionMonthViewDelegates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACCollectionMonthViewDelegates.swift; path = Sources/JTAppleCalendar/JTACCollectionMonthViewDelegates.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA767233A359000A95526 /* GlobalFunctionsAndExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = GlobalFunctionsAndExtensions.swift; path = Sources/JTAppleCalendar/GlobalFunctionsAndExtensions.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA768233A359000A95526 /* JTACInteractionMonthFunctions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACInteractionMonthFunctions.swift; path = Sources/JTAppleCalendar/JTACInteractionMonthFunctions.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA769233A359000A95526 /* JTACScrollViewDelegates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACScrollViewDelegates.swift; path = Sources/JTAppleCalendar/JTACScrollViewDelegates.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA76A233A359000A95526 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = Info.plist; path = Sources/JTAppleCalendar/Info.plist; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA76B233A359000A95526 /* JTACCollectionYearViewDelegates.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACCollectionYearViewDelegates.swift; path = Sources/JTAppleCalendar/JTACCollectionYearViewDelegates.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA76C233A359000A95526 /* JTACMonthCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACMonthCell.swift; path = Sources/JTAppleCalendar/JTACMonthCell.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA76D233A359000A95526 /* JTACMonthLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACMonthLayout.swift; path = Sources/JTAppleCalendar/JTACMonthLayout.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA76E233A359000A95526 /* CalendarEnums.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = CalendarEnums.swift; path = Sources/JTAppleCalendar/CalendarEnums.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA76F233A359000A95526 /* JTACMonthQueryFunctions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACMonthQueryFunctions.swift; path = Sources/JTAppleCalendar/JTACMonthQueryFunctions.swift; sourceTree = SOURCE_ROOT; };\n\t\t3B8DA770233A359100A95526 /* JTACVariables.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = JTACVariables.swift; path = Sources/JTAppleCalendar/JTACVariables.swift; sourceTree = SOURCE_ROOT; };\n\t\t3BE7994F233A346B00A37CA8 /* JTAppleCalendar.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = JTAppleCalendar.framework; sourceTree = BUILT_PRODUCTS_DIR; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t3BE7994C233A346B00A37CA8 /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t3BE79945233A346B00A37CA8 = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3BE79951233A346B00A37CA8 /* JTAppleCalendar */,\n\t\t\t\t3BE79950233A346B00A37CA8 /* Products */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t3BE79950233A346B00A37CA8 /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3BE7994F233A346B00A37CA8 /* JTAppleCalendar.framework */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t3BE79951233A346B00A37CA8 /* JTAppleCalendar */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t3B8DA76E233A359000A95526 /* CalendarEnums.swift */,\n\t\t\t\t3B8DA75B233A359000A95526 /* CalendarStructs.swift */,\n\t\t\t\t3B8DA767233A359000A95526 /* GlobalFunctionsAndExtensions.swift */,\n\t\t\t\t3B8DA76A233A359000A95526 /* Info.plist */,\n\t\t\t\t3B8DA766233A359000A95526 /* JTACCollectionMonthViewDelegates.swift */,\n\t\t\t\t3B8DA76B233A359000A95526 /* JTACCollectionYearViewDelegates.swift */,\n\t\t\t\t3B8DA763233A359000A95526 /* JTACDayCell.swift */,\n\t\t\t\t3B8DA768233A359000A95526 /* JTACInteractionMonthFunctions.swift */,\n\t\t\t\t3B8DA75E233A359000A95526 /* JTACInteractionYearFunctions.swift */,\n\t\t\t\t3B8DA75C233A359000A95526 /* JTACMonthActionFunctions.swift */,\n\t\t\t\t3B8DA76C233A359000A95526 /* JTACMonthCell.swift */,\n\t\t\t\t3B8DA762233A359000A95526 /* JTACMonthDelegateProtocol.swift */,\n\t\t\t\t3B8DA76D233A359000A95526 /* JTACMonthLayout.swift */,\n\t\t\t\t3B8DA764233A359000A95526 /* JTACMonthLayoutHorizontalCalendar.swift */,\n\t\t\t\t3B8DA75D233A359000A95526 /* JTACMonthLayoutProtocol.swift */,\n\t\t\t\t3B8DA761233A359000A95526 /* JTACMonthLayoutVerticalCalendar.swift */,\n\t\t\t\t3B8DA76F233A359000A95526 /* JTACMonthQueryFunctions.swift */,\n\t\t\t\t3B8DA758233A358F00A95526 /* JTACMonthReusableView.swift */,\n\t\t\t\t3B8DA75A233A359000A95526 /* JTACMonthView.swift */,\n\t\t\t\t3B8DA765233A359000A95526 /* JTACMonthViewProtocols.swift */,\n\t\t\t\t3B8DA769233A359000A95526 /* JTACScrollViewDelegates.swift */,\n\t\t\t\t3B8DA770233A359100A95526 /* JTACVariables.swift */,\n\t\t\t\t3B8DA75F233A359000A95526 /* JTACYearView.swift */,\n\t\t\t\t3B8DA759233A358F00A95526 /* JTACYearViewProtocols.swift */,\n\t\t\t\t3B8DA760233A359000A95526 /* JTAppleCalendar.h */,\n\t\t\t);\n\t\t\tpath = JTAppleCalendar;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXHeadersBuildPhase section */\n\t\t3BE7994A233A346B00A37CA8 /* Headers */ = {\n\t\t\tisa = PBXHeadersBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t3B8DA779233A359100A95526 /* JTAppleCalendar.h in Headers */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXHeadersBuildPhase section */\n\n/* Begin PBXNativeTarget section */\n\t\t3BE7994E233A346B00A37CA8 /* JTAppleCalendar */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 3BE79957233A346B00A37CA8 /* Build configuration list for PBXNativeTarget \"JTAppleCalendar\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t3BE7994A233A346B00A37CA8 /* Headers */,\n\t\t\t\t3BE7994B233A346B00A37CA8 /* Sources */,\n\t\t\t\t3BE7994C233A346B00A37CA8 /* Frameworks */,\n\t\t\t\t3BE7994D233A346B00A37CA8 /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = JTAppleCalendar;\n\t\t\tproductName = JTAppleCalendar;\n\t\t\tproductReference = 3BE7994F233A346B00A37CA8 /* JTAppleCalendar.framework */;\n\t\t\tproductType = \"com.apple.product-type.framework\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t3BE79946233A346B00A37CA8 /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastUpgradeCheck = 1100;\n\t\t\t\tORGANIZATIONNAME = \"Arnaud Boudou\";\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t3BE7994E233A346B00A37CA8 = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 11.0;\n\t\t\t\t\t\tLastSwiftMigration = 1100;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 3BE79949233A346B00A37CA8 /* Build configuration list for PBXProject \"JTAppleCalendar\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 3BE79945233A346B00A37CA8;\n\t\t\tproductRefGroup = 3BE79950233A346B00A37CA8 /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t3BE7994E233A346B00A37CA8 /* JTAppleCalendar */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t3BE7994D233A346B00A37CA8 /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t3BE7994B233A346B00A37CA8 /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t3B8DA77D233A359100A95526 /* JTACMonthLayoutHorizontalCalendar.swift in Sources */,\n\t\t\t\t3B8DA787233A359100A95526 /* CalendarEnums.swift in Sources */,\n\t\t\t\t3B8DA775233A359100A95526 /* JTACMonthActionFunctions.swift in Sources */,\n\t\t\t\t3B8DA784233A359100A95526 /* JTACCollectionYearViewDelegates.swift in Sources */,\n\t\t\t\t3B8DA77E233A359100A95526 /* JTACMonthViewProtocols.swift in Sources */,\n\t\t\t\t3B8DA789233A359100A95526 /* JTACVariables.swift in Sources */,\n\t\t\t\t3B8DA788233A359100A95526 /* JTACMonthQueryFunctions.swift in Sources */,\n\t\t\t\t3B8DA771233A359100A95526 /* JTACMonthReusableView.swift in Sources */,\n\t\t\t\t3B8DA777233A359100A95526 /* JTACInteractionYearFunctions.swift in Sources */,\n\t\t\t\t3B8DA782233A359100A95526 /* JTACScrollViewDelegates.swift in Sources */,\n\t\t\t\t3B8DA77C233A359100A95526 /* JTACDayCell.swift in Sources */,\n\t\t\t\t3B8DA778233A359100A95526 /* JTACYearView.swift in Sources */,\n\t\t\t\t3B8DA781233A359100A95526 /* JTACInteractionMonthFunctions.swift in Sources */,\n\t\t\t\t3B8DA786233A359100A95526 /* JTACMonthLayout.swift in Sources */,\n\t\t\t\t3B8DA773233A359100A95526 /* JTACMonthView.swift in Sources */,\n\t\t\t\t3B8DA785233A359100A95526 /* JTACMonthCell.swift in Sources */,\n\t\t\t\t3B8DA77F233A359100A95526 /* JTACCollectionMonthViewDelegates.swift in Sources */,\n\t\t\t\t3B8DA77A233A359100A95526 /* JTACMonthLayoutVerticalCalendar.swift in Sources */,\n\t\t\t\t3B8DA774233A359100A95526 /* CalendarStructs.swift in Sources */,\n\t\t\t\t3B8DA776233A359100A95526 /* JTACMonthLayoutProtocol.swift in Sources */,\n\t\t\t\t3B8DA772233A359100A95526 /* JTACYearViewProtocols.swift in Sources */,\n\t\t\t\t3B8DA77B233A359100A95526 /* JTACMonthDelegateProtocol.swift in Sources */,\n\t\t\t\t3B8DA780233A359100A95526 /* GlobalFunctionsAndExtensions.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin XCBuildConfiguration section */\n\t\t3BE79955233A346B00A37CA8 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tVERSION_INFO_PREFIX = \"\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t3BE79956233A346B00A37CA8 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tCURRENT_PROJECT_VERSION = 1;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t\tVERSIONING_SYSTEM = \"apple-generic\";\n\t\t\t\tVERSION_INFO_PREFIX = \"\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t3BE79958233A346B00A37CA8 /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDEVELOPMENT_TEAM = \"\";\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tINFOPLIST_FILE = \"$(SRCROOT)/Sources/JTAppleCalendar/Info.plist\";\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t\t\"@loader_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.patchthecode.JTAppleCalendar;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME:c99extidentifier)\";\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSUPPORTS_MACCATALYST = NO;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t3BE79959233A346B00A37CA8 /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCODE_SIGN_STYLE = Manual;\n\t\t\t\tDEFINES_MODULE = YES;\n\t\t\t\tDEVELOPMENT_TEAM = \"\";\n\t\t\t\tDYLIB_COMPATIBILITY_VERSION = 1;\n\t\t\t\tDYLIB_CURRENT_VERSION = 1;\n\t\t\t\tDYLIB_INSTALL_NAME_BASE = \"@rpath\";\n\t\t\t\tINFOPLIST_FILE = \"$(SRCROOT)/Sources/JTAppleCalendar/Info.plist\";\n\t\t\t\tINSTALL_PATH = \"$(LOCAL_LIBRARY_DIR)/Frameworks\";\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 11.0;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t\t\"@loader_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.patchthecode.JTAppleCalendar;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME:c99extidentifier)\";\n\t\t\t\tPROVISIONING_PROFILE_SPECIFIER = \"\";\n\t\t\t\tSKIP_INSTALL = YES;\n\t\t\t\tSUPPORTS_MACCATALYST = NO;\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t3BE79949233A346B00A37CA8 /* Build configuration list for PBXProject \"JTAppleCalendar\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t3BE79955233A346B00A37CA8 /* Debug */,\n\t\t\t\t3BE79956233A346B00A37CA8 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t3BE79957233A346B00A37CA8 /* Build configuration list for PBXNativeTarget \"JTAppleCalendar\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t3BE79958233A346B00A37CA8 /* Debug */,\n\t\t\t\t3BE79959233A346B00A37CA8 /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\t};\n\trootObject = 3BE79946233A346B00A37CA8 /* Project object */;\n}\n"
  },
  {
    "path": "JTAppleCalendar.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:JTAppleCalendar.xcodeproj\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "JTAppleCalendar.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "JTAppleCalendar.xcodeproj/xcshareddata/xcschemes/JTAppleCalendar.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1100\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"3BE7994E233A346B00A37CA8\"\n               BuildableName = \"JTAppleCalendar.framework\"\n               BlueprintName = \"JTAppleCalendar\"\n               ReferencedContainer = \"container:JTAppleCalendar.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <Testables>\n      </Testables>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <MacroExpansion>\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"3BE7994E233A346B00A37CA8\"\n            BuildableName = \"JTAppleCalendar.framework\"\n            BlueprintName = \"JTAppleCalendar\"\n            ReferencedContainer = \"container:JTAppleCalendar.xcodeproj\">\n         </BuildableReference>\n      </MacroExpansion>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "LICENSE",
    "content": "Copyright (c) 2016 JayT <patchthecode@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n"
  },
  {
    "path": "Package.swift",
    "content": "// swift-tools-version:5.3\n// The swift-tools-version declares the minimum version of Swift required to build this package.\n\nimport PackageDescription\n\nlet package = Package(\n    name: \"JTAppleCalendar\",\n    platforms: [\n        .iOS(.v12),\n    ],\n    products: [\n        .library(\n            name: \"JTAppleCalendar\",\n            targets: [\"JTAppleCalendar\"]),\n    ],\n    targets: [\n        .target(\n            name: \"JTAppleCalendar\",\n            dependencies: [],\n            resources: [.copy(\"PrivacyInfo.xcprivacy\")]),\n        .testTarget(\n            name: \"JTAppleCalendarTests\",\n            dependencies: [\"JTAppleCalendar\"]),\n    ]\n)\n"
  },
  {
    "path": "README.md",
    "content": "[![jtapplecalendarnewlogo](https://cloud.githubusercontent.com/assets/2439146/20656424/a1c98c8e-b4e1-11e6-9833-5fa6430f5a8c.png)](https://github.com/patchthecode/JTAppleCalendar)\n\n[![Version](https://img.shields.io/cocoapods/v/JTAppleCalendar.svg?style=flat)](http://cocoapods.org/pods/JTAppleCalendar) [![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Platform](https://img.shields.io/cocoapods/p/JTAppleCalendar.svg?style=flat)](http://cocoapods.org/pods/JTAppleCalendar) [![License](https://img.shields.io/cocoapods/l/JTAppleCalendar.svg?style=flat)](http://cocoapods.org/pods/JTAppleCalendar) [![](https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_74x21.png)](https://github.com/patchthecode/JTAppleCalendar/wiki/Support) [![Backers on Open Collective](https://opencollective.com/JTAppleCalendar/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/JTAppleCalendar/sponsors/badge.svg)](#sponsors) [![Open Source Helpers](https://www.codetriage.com/patchthecode/jtapplecalendar/badges/users.svg)](https://www.codetriage.com/patchthecode/jtapplecalendar)\n\n#### Q: How will my calendar dateCells look with this library?\n\n**A**: However you want them to look.\n\n<p align=\"center\">\n   <a href=\"https://github.com/patchthecode/JTAppleCalendar/issues/2\">\n      <img src=\"https://cloud.githubusercontent.com/assets/2439146/20638185/d708d542-b353-11e6-8119-fa36c11b66cb.gif\" height=\"450\">\n   </a>\n</p>\n<p align=\"center\">  \n   <a href=\"https://github.com/patchthecode/JTAppleCalendar/issues/2\">More Images</a>\n</p>\n\n## Features\n\n---\n\n- [x] Range selection - select dates in a range. The design is entirely up to you.\n- [x] Boundary dates - limit the calendar date range\n- [x] [Week/month mode](./docs/switch-month-to-week-view/Switch%20between%20month-view%20and%20week-view.md) - show 1 row of weekdays. Or 2, 3 or 6\n- [x] Custom cells - make your day-cells look however you want, with any functionality you want\n- [x] Custom calendar view - make your calendar look however you want, with what ever functionality you want\n- [x] First Day of week - pick anyday to be first day of the week\n- [x] Horizontal or vertical mode\n- [x] Ability to add [month headers](./docs/headers/Headers.md) in varying sizes/styles of your liking\n- [x] Ability to scroll to any month by simply using the date\n- [x] Ability to design your calendar [however you want.](https://github.com/patchthecode/JTAppleCalendar/issues/2) You want it, you build it\n\n---\n\n## How do I use this library?\n\n> [!WARNING]\n> The wiki currently links to an external site that is down. It is recommended to [view the docs](./docs/get-started/Get%20Started.md) at this time, but be aware they may not be up to date currently\n\n### >> [Read the wiki](https://github.com/patchthecode/JTAppleCalendar/wiki/Tutorials) for Tutorials and example code to download or [view the docs](./docs/get-started/Get%20Started.md)\n\n## [Version 8.0.0 migration guide](./docs/migration-guide/v8%20Migration%20Guide.md)\n\n---\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website.\nWant to become a sponsor? Send an email to patchthecode@gmail.com\n\n<a href=\"https://opencollective.com/JTAppleCalendar/sponsor/0/website\" target=\"_blank\"><img src=\"https://opencollective.com/JTAppleCalendar/sponsor/0/avatar.svg\"></a>\n<a href=\"https://opencollective.com/JTAppleCalendar/sponsor/1/website\" target=\"_blank\"><img src=\"https://opencollective.com/JTAppleCalendar/sponsor/1/avatar.svg\"></a>\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].\n<a href=\"graphs/contributors\"><img src=\"https://opencollective.com/JTAppleCalendar/contributors.svg?width=890&button=false\" /></a>\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/JTAppleCalendar#backer)]\n\n<a href=\"https://opencollective.com/JTAppleCalendar#backers\" target=\"_blank\"><img src=\"https://opencollective.com/JTAppleCalendar/backers.svg?width=890\"></a>\n\n## License\n\nJTAppleCalendar is available under the MIT license. See the LICENSE file for more info.\n"
  },
  {
    "path": "SampleJTAppleCalendar/AppDelegate.swift",
    "content": "//\n//  AppDelegate.swift\n//  SampleJTAppleCalendar\n//\n//  Created by Jeron Thomas on 2019-06-25.\n//  Copyright © 2019 OsTech. All rights reserved.\n//\n\nimport UIKit\n\n@UIApplicationMain\nclass AppDelegate: UIResponder, UIApplicationDelegate {\n\n\n\n    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {\n        // Override point for customization after application launch.\n        return true\n    }\n\n    func applicationWillTerminate(_ application: UIApplication) {\n        // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.\n    }\n\n    // MARK: UISceneSession Lifecycle\n\n    func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {\n        // Called when a new scene session is being created.\n        // Use this method to select a configuration to create the new scene with.\n        return UISceneConfiguration(name: \"Default Configuration\", sessionRole: connectingSceneSession.role)\n    }\n\n    func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {\n        // Called when the user discards a scene session.\n        // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.\n        // Use this method to release any resources that were specific to the discarded scenes, as they will not return.\n    }\n\n\n}\n\n"
  },
  {
    "path": "SampleJTAppleCalendar/Assets.xcassets/AppIcon.appiconset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"iphone\",\n      \"size\" : \"60x60\",\n      \"scale\" : \"3x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"20x20\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"29x29\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"40x40\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"76x76\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ipad\",\n      \"size\" : \"83.5x83.5\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"ios-marketing\",\n      \"size\" : \"1024x1024\",\n      \"scale\" : \"1x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "SampleJTAppleCalendar/Assets.xcassets/Contents.json",
    "content": "{\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "SampleJTAppleCalendar/Assets.xcassets/cube.imageset/Contents.json",
    "content": "{\n  \"images\" : [\n    {\n      \"idiom\" : \"universal\",\n      \"filename\" : \"cube.png\",\n      \"scale\" : \"1x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"2x\"\n    },\n    {\n      \"idiom\" : \"universal\",\n      \"scale\" : \"3x\"\n    }\n  ],\n  \"info\" : {\n    \"version\" : 1,\n    \"author\" : \"xcode\"\n  }\n}"
  },
  {
    "path": "SampleJTAppleCalendar/Base.lproj/LaunchScreen.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"13122.16\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" launchScreen=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"01J-lp-oVM\">\n    <dependencies>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13104.12\"/>\n        <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--View Controller-->\n        <scene sceneID=\"EHf-IW-A2E\">\n            <objects>\n                <viewController id=\"01J-lp-oVM\" sceneMemberID=\"viewController\">\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Ze5-6b-2t3\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" xcode11CocoaTouchSystemColor=\"systemBackgroundColor\" cocoaTouchSystemColor=\"whiteColor\"/>\n                        <viewLayoutGuide key=\"safeArea\" id=\"6Tk-OE-BBY\"/>\n                    </view>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"iYj-Kq-Ea1\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"53\" y=\"375\"/>\n        </scene>\n    </scenes>\n</document>\n"
  },
  {
    "path": "SampleJTAppleCalendar/Example Calendars/TestOrientationChanges.swift",
    "content": "//\n//  TestOrientationChanges.swift\n//  JTAppleCalendar\n//\n//  Created by Jay Thomas on 2017-08-19.\n//\n\nimport UIKit\n\nclass TestOrientationChanges: UIViewController {\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        // Do any additional setup after loading the view.\n    }\n\n    \n\n}\n"
  },
  {
    "path": "SampleJTAppleCalendar/Example Calendars/TestPersianCalendar.swift",
    "content": "//\n//  TestPersianCalendar.swift\n//  SampleCalendar\n//\n//  Copyright © 2017 Aminous. All rights reserved.\n//\n\nimport UIKit\nimport JTAppleCalendar\n\nclass TestPersianCalendar: UIViewController {\n    \n    @IBOutlet weak var calendarView: JTACMonthView!\n    \n    lazy var dateFormatter: DateFormatter = {\n        let dateFormatter = DateFormatter()\n        dateFormatter.timeZone = TimeZone(abbreviation: \"UTC\")\n        dateFormatter.dateFormat = \"hh:mm\"\n        return dateFormatter\n    }()\n    \n    let persianDateFormatter: DateFormatter = {\n        let dateFormatter = DateFormatter()\n        dateFormatter.calendar = Calendar(identifier: .persian)\n        dateFormatter.dateFormat = \"yyyy/MM/dd\"\n        return dateFormatter\n    }()\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        // Do any additional setup after loading the view, typically from a nib.\n        setupCalendarView()\n        calendarView.calendarDataSource = self\n        calendarView.calendarDelegate = self\n    }\n    \n    override func didReceiveMemoryWarning() {\n        super.didReceiveMemoryWarning()\n        // Dispose of any resources that can be recreated.\n    }\n    \n    \n    func handleCellSelected(cell: JTACDayCell?, cellState: CellState){\n        guard let validCell = cell as? CalendarCell else { return }\n        if cellState.isSelected {\n            validCell.selectedView.isHidden = false\n        } else {\n            validCell.selectedView.isHidden = true\n        }\n    }\n    \n    func handleCellTextColor(cell: JTACDayCell?, cellState: CellState){\n        guard let validCell = cell as? CalendarCell else { return }\n        if cellState.isSelected {\n            validCell.dateLabel.textColor = UIColor.white\n        } else {\n            let today = Date()\n            persianDateFormatter.dateFormat = \"yyyy MM dd\"\n            let todayDateStr = persianDateFormatter.string(from: today)\n            dateFormatter.dateFormat = \"yyyy MM dd\"\n            let cellDateStr = dateFormatter.string(from: cellState.date)\n            \n            if todayDateStr == cellDateStr {\n                validCell.dateLabel.textColor = UIColor.yellow\n            } else {\n                if cellState.dateBelongsTo == .thisMonth {\n                    validCell.dateLabel.textColor = UIColor.white\n                } else { //i.e. case it belongs to inDate or outDate\n                    validCell.dateLabel.textColor = UIColor.gray\n                }\n            }\n        }\n    }\n    \n    \n    func setupCalendarView(){\n        //Setup calendar spacing\n        calendarView.minimumLineSpacing = 0\n        calendarView.minimumInteritemSpacing = 0\n        \n    }\n}\n\nextension TestPersianCalendar: JTACMonthViewDataSource {\n    func configureCalendar(_ calendar: JTACMonthView) -> ConfigurationParameters {\n        \n        let persianCalendar = Calendar(identifier: .persian)\n        \n        let testFotmatter = DateFormatter()\n        testFotmatter.dateFormat = \"yyyy/MM/dd\"\n        testFotmatter.timeZone = persianCalendar.timeZone\n        testFotmatter.locale = persianCalendar.locale\n        \n        let startDate = testFotmatter.date(from: \"2017/01/01\")!\n        let endDate = testFotmatter.date(from: \"2017/09/30\")!\n        \n        \n        let parameters = ConfigurationParameters(startDate: startDate, endDate: endDate, calendar: persianCalendar)\n        return parameters\n    }\n}\n\nextension TestPersianCalendar: JTACMonthViewDelegate {\n    func calendar(_ calendar: JTACMonthView, willDisplay cell: JTACDayCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {\n        // The code here is the same as cellForItem function\n        let cell = cell as! CellView\n        cell.dayLabel.text = cellState.text\n        \n        handleCellSelected(cell: cell, cellState: cellState)\n        handleCellTextColor(cell: cell, cellState: cellState)\n    }\n    \n    func calendar(_ calendar: JTACMonthView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -> JTACDayCell {\n        let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: \"mainInfo_CalenderCell\", for: indexPath) as! CellView\n        cell.dayLabel.text = cellState.text\n        \n        handleCellSelected(cell: cell, cellState: cellState)\n        handleCellTextColor(cell: cell, cellState: cellState)\n        \n        return cell\n    }\n    \n    \n    func calendar(_ calendar: JTACMonthView, didSelectDate date: Date, cell: JTACDayCell?, cellState: CellState) {\n        print(cellState.dateBelongsTo)\n        handleCellSelected(cell: cell, cellState: cellState)\n        handleCellTextColor(cell: cell, cellState: cellState)\n    }\n    \n    func calendar(_ calendar: JTACMonthView, didDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState) {\n        handleCellSelected(cell: cell, cellState: cellState)\n        handleCellTextColor(cell: cell, cellState: cellState)\n    }\n    \n    \n}\n\nclass CalendarCell: JTACDayCell {\n    @IBOutlet weak var dateLabel: UILabel!\n    @IBOutlet weak var selectedView: UIView!\n}\n\n\n"
  },
  {
    "path": "SampleJTAppleCalendar/Example Calendars/TestRangeSelectionViewController.swift",
    "content": "//\n//  TestRangeSelectionViewController.swift\n//  JTAppleCalendar iOS\n//\n//  Created by Jay Thomas on 2018-08-07.\n//\n\nimport UIKit\nimport JTAppleCalendar\n\nclass TestRangeSelectionViewController: UIViewController {\n    \n    @IBOutlet weak var monthLabel: UILabel!\n    @IBOutlet weak var calendarView: JTACMonthView!\n    let df = DateFormatter()\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        \n        calendarView.visibleDates() { visibleDates in\n            self.setupMonthLabel(date: visibleDates.monthDates.first!.date)\n        }\n        \n        calendarView.allowsMultipleSelection = true\n        calendarView.allowsMultipleSelection = true\n        \n    }\n    \n    func setupMonthLabel(date: Date) {\n        df.dateFormat = \"MMM\"\n        monthLabel.text = df.string(from: date)\n    }\n    \n    func handleConfiguration(cell: JTACDayCell?, cellState: CellState) {\n        guard let cell = cell as? TestRangeSelectionViewControllerCell else { return }\n        handleCellColor(cell: cell, cellState: cellState)\n        handleCellSelection(cell: cell, cellState: cellState)\n    }\n    \n    func handleCellColor(cell: TestRangeSelectionViewControllerCell, cellState: CellState) {\n        if cellState.dateBelongsTo == .thisMonth {\n            cell.label.textColor = .black\n        } else {\n            cell.label.textColor = .gray\n        }\n    }\n    \n    func handleCellSelection(cell: TestRangeSelectionViewControllerCell, cellState: CellState) {\n        cell.selectedView.isHidden = !cellState.isSelected\n        \n            switch cellState.selectedPosition() {\n            case .left:\n                cell.selectedView.layer.cornerRadius = 20\n                cell.selectedView.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMinXMinYCorner]\n            case .middle:\n                cell.selectedView.layer.cornerRadius = 0\n                cell.selectedView.layer.maskedCorners = []\n            case .right:\n                cell.selectedView.layer.cornerRadius = 20\n                cell.selectedView.layer.maskedCorners = [.layerMaxXMaxYCorner, .layerMaxXMinYCorner]\n            case .full:\n                cell.selectedView.layer.cornerRadius = 20\n                cell.selectedView.layer.maskedCorners = [.layerMaxXMaxYCorner, .layerMaxXMinYCorner, .layerMinXMaxYCorner, .layerMinXMinYCorner]\n            default: break\n            }\n        \n        \n    \n    \n    }\n}\n\nextension TestRangeSelectionViewController: JTACMonthViewDelegate, JTACMonthViewDataSource {\n    \n    func calendar(_ calendar: JTACMonthView, willDisplay cell: JTACDayCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {\n        handleConfiguration(cell: cell, cellState: cellState)\n    }\n    \n    func calendar(_ calendar: JTACMonthView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -> JTACDayCell {\n        let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: \"cell\", for: indexPath) as! TestRangeSelectionViewControllerCell\n        cell.label.text = cellState.text\n        self.calendar(calendar, willDisplay: cell, forItemAt: date, cellState: cellState, indexPath: indexPath)\n        return cell\n    }\n    \n    func calendar(_ calendar: JTACMonthView, didScrollToDateSegmentWith visibleDates: DateSegmentInfo) {\n        setupMonthLabel(date: visibleDates.monthDates.first!.date)\n    }\n    \n    func calendar(_ calendar: JTACMonthView, didSelectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {\n        handleConfiguration(cell: cell, cellState: cellState)\n    }\n    \n    func calendar(_ calendar: JTACMonthView, didDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {\n        handleConfiguration(cell: cell, cellState: cellState)\n    }\n    \n    func configureCalendar(_ calendar: JTACMonthView) -> ConfigurationParameters {\n        let df = DateFormatter()\n        df.dateFormat = \"yyyy MM dd\"\n        \n        let startDate = df.date(from: \"2017 01 01\")!\n        let endDate = df.date(from: \"2017 12 31\")!\n        \n        let parameter = ConfigurationParameters(startDate: startDate,\n                                                endDate: endDate,\n                                                numberOfRows: 6,\n                                                generateInDates: .forAllMonths,\n                                                generateOutDates: .tillEndOfGrid,\n                                                firstDayOfWeek: .sunday)\n        return parameter\n    }\n    \n    \n}\n\n\n\nclass TestRangeSelectionViewControllerCell: JTACDayCell {\n    @IBOutlet weak var label: UILabel!\n    @IBOutlet weak var selectedView: UIView!\n}\n"
  },
  {
    "path": "SampleJTAppleCalendar/Example Calendars/TestViewController.swift",
    "content": "//\n//  TestViewController.swift\n//  JTAppleCalendar iOS\n//\n//  Created by Jay Thomas on 2017-07-11.\n//\n\nimport UIKit\nimport JTAppleCalendar\n\nclass TestViewController: UIViewController {\n    @IBOutlet weak var monthLabel: UILabel!\n    @IBOutlet var calendarView: JTACMonthView!\n    @IBOutlet var theView: UIView!\n    @IBOutlet weak var viewHeightConstraint: NSLayoutConstraint!\n    let formatter = DateFormatter()\n    \n    override func viewDidLoad() {\n        super.viewDidLoad()\n        self.calendarView.visibleDates {[unowned self] (visibleDates: DateSegmentInfo) in\n            self.setupViewsOfCalendar(from: visibleDates)\n        }\n\n    }\n    @IBAction func selectABunch(_ sender: UIButton) {\n        formatter.dateFormat = \"yyyy MM dd\"\n        let date = formatter.date(from: \"2017 01 01\")!\n        let date2 = formatter.date(from: \"2017 12 25\")!\n        calendarView.selectDates(from: date, to: date2, triggerSelectionDelegate: true)\n    }\n    @IBAction func zeroHeight(_ sender: UIButton) {\n        let frame = calendarView.frame\n        calendarView.frame = CGRect(x: frame.origin.x,\n                                    y: frame.origin.y,\n                                    width: frame.width,\n                                    height: 0)\n        calendarView.reloadData()\n    }\n    @IBAction func twoHeight(_ sender: UIButton) {\n        let frame = calendarView.frame\n        calendarView.frame = CGRect(x: frame.origin.x,\n                                    y: frame.origin.y,\n                                    width: frame.width,\n                                    height: 50)\n        calendarView.reloadData()\n    }\n    @IBAction func twoHundredHeight(_ sender: UIButton) {\n        let frame = calendarView.frame\n        calendarView.frame = CGRect(x: frame.origin.x,\n                                    y: frame.origin.y,\n                                    width: frame.width,\n                                    height: 200)\n        calendarView.reloadData()\n    }\n    \n    @IBAction func zeroHeightView(_ sender: UIButton) {\n        viewHeightConstraint.constant = 0\n        calendarView.reloadData()\n\n    }\n    @IBAction func twoHeightView(_ sender: UIButton) {\n        viewHeightConstraint.constant = 50\n        calendarView.reloadData()\n    }\n    @IBAction func twoHundredHeightView(_ sender: UIButton) {\n        viewHeightConstraint.constant = 200\n        calendarView.reloadData()\n    }\n    \n    @IBAction func selectOneDate(_ sender: UIButton) {\n        formatter.dateFormat = \"yyyy MM dd\"\n        let date = formatter.date(from: \"2017 01 03\")!\n        calendarView.selectDates([date])\n    }\n    @IBAction func selectOtherDate(_ sender: UIButton) {\n        formatter.dateFormat = \"yyyy MM dd\"\n        let date = formatter.date(from: \"2017 01 31\")!\n        calendarView.selectDates([date])\n    }\n    \n    @IBAction func selectOneMonth(_ sender: UIButton) {\n        formatter.dateFormat = \"yyyy MM dd\"\n        let date = formatter.date(from: \"2017 02 01\")!\n        calendarView.selectDates([date])\n    }\n    @IBAction func reload(_ sender: UIButton) {\n        calendarView.reloadData()\n    }\n    \n    @IBAction func debugthis(_ sender: UIButton) {\n        print(calendarView.selectedDates)\n    }\n    @IBAction func singleSelect(_ sender: UIButton) {\n        calendarView.allowsMultipleSelection = false\n        calendarView.allowsMultipleSelection = false\n    }\n    @IBAction func multiSelect(_ sender: UIButton) {\n        calendarView.allowsMultipleSelection = true\n        calendarView.allowsMultipleSelection = true\n    }\n    func setupViewsOfCalendar(from visibleDates: DateSegmentInfo) {\n        guard let startDate = visibleDates.monthDates.first?.date else {\n            return\n        }\n        let month = Calendar.current.dateComponents([.month], from: startDate).month!\n        let monthName = DateFormatter().monthSymbols[(month-1) % 12]\n        // 0 indexed array\n        let year = Calendar.current.component(.year, from: startDate)\n        monthLabel.text = monthName + \" \" + String(year)\n    }\n    \n    func configureCell(view: JTACDayCell?, cellState: CellState) {\n        guard let myCustomCell = view as? CellView  else { return }\n        handleCellTextColor(view: myCustomCell, cellState: cellState)\n        handleCellSelection(view: myCustomCell, cellState: cellState)\n    }\n    \n    func handleCellSelection(view: CellView, cellState: CellState) {\n        if calendarView.allowsMultipleSelection {\n        switch cellState.selectedPosition() {\n        case .full: view.backgroundColor = .green\n        case .left: view.backgroundColor = .yellow\n        case .right: view.backgroundColor = .red\n        case .middle: view.backgroundColor = .blue\n        case .none: view.backgroundColor = nil\n        }\n        } else {\n            if cellState.isSelected {\n                view.backgroundColor = UIColor.red\n            } else {\n                view.backgroundColor = UIColor.white\n            }\n        }\n    }\n    func handleCellTextColor(view: CellView, cellState: CellState) {\n        if cellState.dateBelongsTo == .thisMonth {\n            view.dayLabel.textColor = UIColor.black\n        } else {\n            view.dayLabel.textColor = UIColor.gray\n        }\n    }\n    \n    var iii: Date?\n}\n\n\nextension TestViewController: JTACMonthViewDataSource, JTACMonthViewDelegate {\n    func calendar(_ calendar: JTACMonthView, willDisplay cell: JTACDayCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {\n        configureCell(view: cell, cellState: cellState)\n    }\n    \n    func calendar(_ calendar: JTACMonthView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -> JTACDayCell {\n        let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: \"cell\", for: indexPath) as! CellView\n        configureCell(view: cell, cellState: cellState)\n        if cellState.text == \"1\" {\n            formatter.dateFormat = \"MMM\"\n            let month = formatter.string(from: date)\n            cell.dayLabel .text = \"\\(month) \\(cellState.text)\"\n        } else {\n            cell.dayLabel .text = cellState.text\n        }\n        return cell\n    }\n    \n    func configureCalendar(_ calendar: JTACMonthView) -> ConfigurationParameters {\n        formatter.dateFormat = \"yyyy MM dd\"\n        formatter.timeZone = Calendar.current.timeZone\n        formatter.locale = Calendar.current.locale\n        \n        \n        let startDate = formatter.date(from: \"2017 01 01\")!\n        let endDate = formatter.date(from: \"2030 02 01\")!\n        \n        let parameters = ConfigurationParameters(startDate: startDate,endDate: endDate)\n        return parameters\n    }\n    \n    \n    func calendar(_ calendar: JTACMonthView, didScrollToDateSegmentWith visibleDates: DateSegmentInfo) {\n        setupViewsOfCalendar(from: visibleDates)\n    }\n    \n    func calendar(_ calendar: JTACMonthView, didSelectDate date: Date, cell: JTACDayCell?, cellState: CellState) {\n        configureCell(view: cell, cellState: cellState)\n    }\n    \n    func calendar(_ calendar: JTACMonthView, didDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState) {\n        configureCell(view: cell, cellState: cellState)\n    }\n    \n    override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {\n        calendarView.viewWillTransition(to: size, with: coordinator, anchorDate: iii)\n    }\n    \n    \n}\n\n\n"
  },
  {
    "path": "SampleJTAppleCalendar/Example Calendars/TestYearViewViewController.swift",
    "content": "//\n//  TestYearViewViewController.swift\n//  JTAppleCalendar\n//\n//  Created by JayT on 2019-05-11.\n//\n\nimport UIKit\nimport JTAppleCalendar\n\nclass TestYearViewViewController: UIViewController {\n    @IBOutlet var calendarView: JTACYearView!\n    let f = DateFormatter()\n    \n    override func viewDidLoad() {\n        calendarView.calendarDataSource  = self\n        calendarView.calendarDelegate  = self\n        super.viewDidLoad()\n    }\n}\n\n\nextension TestYearViewViewController: JTACYearViewDelegate, JTACYearViewDataSource {\n    // Drawing for a whole month cell\n    func calendar(_ calendar: JTACYearView, cellFor item: Any, at date: Date, indexPath: IndexPath) -> JTACMonthCell {\n        if item is Month {\n            let cell = calendar.dequeueReusableJTAppleMonthCell(withReuseIdentifier: \"kkk\", for: indexPath) as! MyCell\n            f.dateFormat = \"MMM\"\n            cell.monthLabel.text = f.string(from: date)\n            return cell\n        } else {\n            let cell = calendar.dequeueReusableJTAppleMonthCell(withReuseIdentifier: \"zzz\", for: indexPath) as! YearHeaderCell\n            f.dateFormat = \"yyyy\"\n            cell.yearLabel.text = f.string(from: date)\n            return cell\n        }\n    }\n    \n    \n    \n    func configureCalendar(_ calendar: JTACYearView) -> (configurationParameters: ConfigurationParameters, months: [Any]) {\n        let df = DateFormatter()\n        df.dateFormat = \"yyyy MM dd\"\n        \n        let sDate = df.date(from: \"2019 01 01\")!\n        let eDate = df.date(from: \"2050 05 31\")!\n        \n        let configParams = ConfigurationParameters(startDate: sDate,\n                                                   endDate: eDate,\n                                                   numberOfRows: 6,\n                                                   calendar: Calendar(identifier: .gregorian),\n                                                   generateInDates: .forAllMonths,\n                                                   generateOutDates: .tillEndOfGrid,\n                                                   firstDayOfWeek: .sunday,\n                                                   hasStrictBoundaries: true)\n        \n        // Get year data\n        let dataSource = calendar.dataSourcefrom(configurationParameters: configParams)\n        \n        // Modify the data source to include a String every 12 data elements.\n        // This string type will be used to add a header.\n        var modifiedDataSource: [Any] = []\n        for index in (0..<dataSource.count) {\n            if index % 12 == 0 { modifiedDataSource.append(\"Year\") }\n            modifiedDataSource.append(dataSource[index])\n        }\n\n        return (configParams, modifiedDataSource)\n    }\n    \n    \n    // Drawing for individual item in a month cell.\n    func calendar(_ calendar: JTACYearView, monthView: JTACCellMonthView, drawingFor rect: CGRect, with date: Date, dateOwner: DateOwner, monthIndex index: Int) {\n        f.dateFormat = \"d\"\n        let dateString = f.string(from: date)\n        \n        let paragraphStyle = NSMutableParagraphStyle()\n        let font = UIFont(name: \"HelveticaNeue\", size: 8)!\n        \n        paragraphStyle.alignment = .center\n        dateString.draw(in: rect, withAttributes: [\n            NSAttributedString.Key.font : font,\n            NSAttributedString.Key.paragraphStyle: paragraphStyle\n        ])\n    }\n    \n    func calendar(_ calendar: JTACYearView, sizeFor item: Any) -> CGSize {\n        if item is Month {\n            let width = (calendar.frame.width - 41 ) / 3\n            let height = width\n            return CGSize(width: width, height: height)\n        } else {\n            let width = calendar.frame.width - 41\n            let height:CGFloat  = 20\n            return CGSize(width: width, height: height)\n        }\n    }\n}\n\n\nclass MyCell: JTACMonthCell {\n    @IBOutlet var monthLabel: UILabel!\n}\n\nclass YearHeaderCell: JTACMonthCell {\n    @IBOutlet var yearLabel: UILabel!\n}\n"
  },
  {
    "path": "SampleJTAppleCalendar/Example Calendars/ViewController.swift",
    "content": "//\n//  ViewController.swift\n//  JTAppleCalendar iOS Example\n//\n//  Created by JayT on 2016-08-10.\n//\n//\n\nimport UIKit\nimport JTAppleCalendar\n\nclass ViewController: UIViewController {\n\n    @IBOutlet weak var customColumn: UITextField!\n    @IBOutlet weak var calendarView: JTACMonthView!\n    @IBOutlet weak var monthLabel: UILabel!\n    @IBOutlet weak var weekViewStack: UIStackView!\n    @IBOutlet var numbers: [UIButton]!\n    @IBOutlet var outDates: [UIButton]!\n    @IBOutlet var inDates: [UIButton]!\n    \n    var numberOfRows = 6\n    let formatter = DateFormatter()\n    var testCalendar = Calendar.current\n    var generateInDates: InDateCellGeneration = .forAllMonths\n    var generateOutDates: OutDateCellGeneration = .tillEndOfGrid\n    var prePostVisibility: ((CellState, CellView?)->())?\n    var hasStrictBoundaries = true\n    let disabledColor = UIColor.lightGray\n    let enabledColor = UIColor.blue\n    var monthSize: MonthSize? = nil\n    var prepostHiddenValue = false\n    var outsideHeaderVisibilityIsOn = true\n    var insideHeaderVisibilityIsOn = false\n    \n    var currentScrollModeIndex = 0\n    var hhh: CGFloat?\n    var allScrollModes: [ScrollingMode] = [\n        .none,\n        .nonStopTo(customInterval: 374, withResistance: 0.5),\n        .nonStopToCell(withResistance: 0.5),\n        .nonStopToSection(withResistance: 0.5),\n        .stopAtEach(customInterval: 374),\n        .stopAtEachCalendarFrame,\n        .stopAtEachSection\n    ]\n    \n    @IBAction func changeScroll(_ sender: Any) {\n        currentScrollModeIndex += 1\n        if currentScrollModeIndex >= allScrollModes.count { currentScrollModeIndex = 0 }\n        calendarView.scrollingMode = allScrollModes[currentScrollModeIndex]\n        print(\"ScrollMode = \\(allScrollModes[currentScrollModeIndex])\")\n        let sender = sender as! UIButton\n        sender.setTitle(\"\\(allScrollModes[currentScrollModeIndex])\", for: .normal)\n        \n    }\n\n    @IBAction func showPrepost(_ sender: UIButton) {\n        prePostVisibility = {state, cell in\n            cell?.isHidden = false\n        }\n        calendarView.reloadData()\n    }\n    @IBAction func hidePrepost(_ sender: UIButton) {\n        prePostVisibility = {state, cell in\n            if state.dateBelongsTo == .thisMonth {\n                cell?.isHidden = false\n            } else {\n                cell?.isHidden = true\n            }\n        }\n        calendarView.reloadData()\n    }\n    \n    @IBAction func toggleInsideHeaders(_ sender: UIButton) {\n        if insideHeaderVisibilityIsOn {\n            monthSize = nil\n            sender.setTitle(\"Inside Header OFF\", for: .normal)\n        } else {\n            monthSize = MonthSize(defaultSize: 50, months: [75: [.feb, .apr]])\n            sender.setTitle(\"Inside Header ON\", for: .normal)\n        }\n        insideHeaderVisibilityIsOn.toggle()\n        calendarView.reloadData()\n    }\n    \n    @IBAction func toggleOutsideHeaders(_ sender: UIButton) {\n        if outsideHeaderVisibilityIsOn {\n            monthLabel.isHidden = true\n            weekViewStack.isHidden = true\n            sender.setTitle(\"Outside Header ON\", for: .normal)\n        } else {\n            monthLabel.isHidden = false\n            weekViewStack.isHidden = false\n            sender.setTitle(\"Outside Header OFF\", for: .normal)\n        }\n        outsideHeaderVisibilityIsOn.toggle()\n    }\n    \n    @IBAction func decreaseCellInset(_ sender: UIButton) {\n        calendarView.minimumLineSpacing -= 0.5\n        calendarView.minimumInteritemSpacing -= 0.5\n        calendarView.reloadData()\n    }\n    \n    @IBAction func increaseCellInset(_ sender: UIButton) {\n        calendarView.minimumLineSpacing += 0.5\n        calendarView.minimumInteritemSpacing += 0.5\n        calendarView.reloadData()\n    }\n    \n    \n    @IBAction func decreaseItemSize(_ sender: UIButton) {\n        calendarView.cellSize -= 1\n        calendarView.reloadData()\n    }\n    \n    @IBAction func increaseItemSize(_ sender: UIButton) {\n        if calendarView.cellSize == 0 { calendarView.cellSize = 54.0}\n        calendarView.cellSize += 1\n        calendarView.reloadData()\n    }\n\n    \n    @IBAction func changeToRow(_ sender: UIButton) {\n        numberOfRows = Int(sender.title(for: .normal)!)!\n\n        for aButton in numbers {\n            aButton.tintColor = disabledColor\n        }\n        sender.tintColor = enabledColor\n        calendarView.reloadData()\n    }\n\n    @IBAction func changeDirection(_ sender: UIButton) {\n        if calendarView.scrollDirection == .horizontal {\n            calendarView.scrollDirection = .vertical\n//            calendarView.cellSize = 25\n            sender.setTitle(\"Scrolling = Vertical\", for: .normal)\n        } else {\n            calendarView.scrollDirection = .horizontal\n//            calendarView.cellSize = 0\n            sender.setTitle(\"Scrolling = Horizontal\", for: .normal)\n        }\n        calendarView.reloadData()\n    }\n    \n    @IBAction func toggleStrictBoundary(sender: UIButton) {\n        hasStrictBoundaries = !hasStrictBoundaries\n        if hasStrictBoundaries {\n            sender.tintColor = enabledColor\n        } else {\n            sender.tintColor = disabledColor\n        }\n        calendarView.reloadData()\n    }\n\n    @IBAction func outDateGeneration(_ sender: UIButton) {\n        for aButton in outDates {\n            aButton.tintColor = disabledColor\n        }\n        sender.tintColor = enabledColor\n\n        switch sender.title(for: .normal)! {\n        case \"EOR\":\n            generateOutDates = .tillEndOfRow\n        case \"EOG\":\n            generateOutDates = .tillEndOfGrid\n        case \"OFF\":\n            generateOutDates = .off\n        default:\n            break\n        }\n        calendarView.reloadData()\n\n    }\n\n    @IBAction func inDateGeneration(_ sender: UIButton) {\n        for aButton in inDates {\n            aButton.tintColor = disabledColor\n        }\n        sender.tintColor = enabledColor\n\n        switch sender.title(for: .normal)! {\n            case \"First\":\n                generateInDates = .forFirstMonthOnly\n            case \"All\":\n                generateInDates = .forAllMonths\n            case \"Off\":\n                generateInDates = .off\n        default:\n            break\n        }\n\n        calendarView.reloadData()\n    }\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        calendarView.register(UINib(nibName: \"PinkSectionHeaderView\", bundle: Bundle.main),\n                              forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader,\n                              withReuseIdentifier: \"PinkSectionHeaderView\")\n        \n//        calendarView.allowsMultipleSelection = true\n        calendarView.scrollToDate(Date())\n        calendarView.selectDates([Date()])\n        \n        self.calendarView.visibleDates {[unowned self] (visibleDates: DateSegmentInfo) in\n            self.setupViewsOfCalendar(from: visibleDates)\n        }\n        \n        setupScrollMode()\n    }\n    \n    var rangeSelectedDates: [Date] = []\n    func didStartRangeSelecting(gesture: UILongPressGestureRecognizer) {\n        let point = gesture.location(in: gesture.view!)\n        rangeSelectedDates = calendarView.selectedDates\n        if let cellState = calendarView.cellStatus(at: point) {\n            let date = cellState.date\n            if !calendarView.selectedDates.contains(date) {\n                let dateRange = calendarView.generateDateRange(from: calendarView.selectedDates.first ?? date, to: date)\n                for aDate in dateRange {\n                    if !rangeSelectedDates.contains(aDate) {\n                        rangeSelectedDates.append(aDate)\n                    }\n                }\n                calendarView.selectDates(from: rangeSelectedDates.first!, to: date, keepSelectionIfMultiSelectionAllowed: true)\n            } else {\n                let indexOfNewlySelectedDate = rangeSelectedDates.firstIndex(of: date)! + 1\n                let lastIndex = rangeSelectedDates.endIndex\n                let followingDay = testCalendar.date(byAdding: .day, value: 1, to: date)!\n                calendarView.selectDates(from: followingDay, to: rangeSelectedDates.last!, keepSelectionIfMultiSelectionAllowed: false)\n                rangeSelectedDates.removeSubrange(indexOfNewlySelectedDate..<lastIndex)\n            }\n        }\n        \n        if gesture.state == .ended {\n            rangeSelectedDates.removeAll()\n        }\n    }\n\n    @IBAction func printSelectedDates() {\n        print(\"\\nSelected dates --->\")\n        for date in calendarView.selectedDates {\n            print(formatter.string(from: date))\n        }\n    }\n\n    @IBAction func resize(_ sender: UIButton) {\n        \n        \n        calendarView.frame = CGRect(\n            x: calendarView.frame.origin.x,\n            y: calendarView.frame.origin.y,\n            width: calendarView.frame.width,\n            height: calendarView.frame.height - 50\n        )\n        \n        let date = calendarView.visibleDates().monthDates.first!.date\n        calendarView.reloadData(withAnchor: date)\n    }\n\n    @IBAction func reloadCalendar(_ sender: UIButton) {\n        let date = Date()\n        calendarView.reloadData(withAnchor: date)\n    }\n\n    @IBAction func next(_ sender: UIButton) {\n        self.calendarView.scrollToSegment(.next)\n    }\n\n    @IBAction func previous(_ sender: UIButton) {\n        self.calendarView.scrollToSegment(.previous)\n    }\n\n    func setupViewsOfCalendar(from visibleDates: DateSegmentInfo) {\n        guard let startDate = visibleDates.monthDates.first?.date else {\n            return\n        }\n        let month = testCalendar.dateComponents([.month], from: startDate).month!\n        let monthName = DateFormatter().monthSymbols[(month-1) % 12]\n        // 0 indexed array\n        let year = testCalendar.component(.year, from: startDate)\n        monthLabel.text = monthName + \" \" + String(year)\n    }\n    \n    func handleCellConfiguration(cell: JTACDayCell?, cellState: CellState) {\n        handleCellSelection(view: cell, cellState: cellState)\n        handleCellTextColor(view: cell, cellState: cellState)\n        prePostVisibility?(cellState, cell as? CellView)\n    }\n    \n    \n    // Function to handle the text color of the calendar\n    func handleCellTextColor(view: JTACDayCell?, cellState: CellState) {\n        guard let myCustomCell = view as? CellView  else {\n            return\n        }\n                \n        if cellState.isSelected {\n            myCustomCell.dayLabel.textColor = .white\n        } else {\n            myCustomCell.dayLabel.textColor = .black\n        }\n        \n        myCustomCell.isHidden = cellState.dateBelongsTo != .thisMonth\n        \n    }\n    \n    override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {\n        let visibleDates = calendarView.visibleDates()\n        calendarView.viewWillTransition(to: .zero, with: coordinator, anchorDate: visibleDates.monthDates.first?.date)\n    }\n\n    // Function to handle the calendar selection\n    func handleCellSelection(view: JTACDayCell?, cellState: CellState) {\n        guard let myCustomCell = view as? CellView else {return }\n//        switch cellState.selectedPosition() {\n//        case .full:\n//            myCustomCell.backgroundColor = .green\n//        case .left:\n//            myCustomCell.backgroundColor = .yellow\n//        case .right:\n//            myCustomCell.backgroundColor = .red\n//        case .middle:\n//            myCustomCell.backgroundColor = .blue\n//        case .none:\n//            myCustomCell.backgroundColor = nil\n//        }\n        \n        if cellState.isSelected {\n            myCustomCell.selectedView.layer.cornerRadius =  13\n            myCustomCell.selectedView.isHidden = false\n        } else {\n            myCustomCell.selectedView.isHidden = true\n        }\n    }\n    \n    \n    @IBAction func decreaseSectionInset(_ sender: UIButton) {\n        \n        calendarView.sectionInset.bottom -= 3\n        calendarView.sectionInset.top -= 3\n        calendarView.sectionInset.left -= 3\n        calendarView.sectionInset.right -= 3\n        \n        calendarView.reloadData()\n    }\n    \n    @IBAction func increaseSectionInset(_ sender: UIButton) {\n                calendarView.sectionInset.bottom += 3\n                calendarView.sectionInset.top += 3\n        calendarView.sectionInset.left += 3\n        calendarView.sectionInset.right += 3\n        calendarView.reloadData()\n    }\n    \n    func setupScrollMode() {\n        currentScrollModeIndex = 6\n        calendarView.scrollingMode = allScrollModes[currentScrollModeIndex]\n    }\n}\n\n// MARK : JTAppleCalendarDelegate\nextension ViewController: JTACMonthViewDelegate, JTACMonthViewDataSource {\n    func configureCalendar(_ calendar: JTACMonthView) -> ConfigurationParameters {\n        \n        formatter.dateFormat = \"yyyy MM dd\"\n        formatter.timeZone = testCalendar.timeZone\n        formatter.locale = testCalendar.locale\n        \n        \n        let startDate = formatter.date(from: \"2018 01 01\")!\n        let endDate = formatter.date(from: \"2020 12 01\")!\n        \n        let parameters = ConfigurationParameters(startDate: startDate,\n                                                 endDate: endDate,\n                                                 numberOfRows: numberOfRows,\n                                                 calendar: testCalendar,\n                                                 generateInDates: generateInDates,\n                                                 generateOutDates: generateOutDates,\n                                                 firstDayOfWeek: .sunday,\n                                                 hasStrictBoundaries: hasStrictBoundaries)\n        return parameters\n    }\n    \n    func configureVisibleCell(myCustomCell: CellView, cellState: CellState, date: Date, indexPath: IndexPath) {\n        myCustomCell.dayLabel.text = cellState.text\n        if testCalendar.isDateInToday(date) {\n            myCustomCell.backgroundColor = .red\n        } else {\n            myCustomCell.backgroundColor = .white\n        }\n        \n        handleCellConfiguration(cell: myCustomCell, cellState: cellState)\n        \n        \n        if cellState.text == \"1\" {\n            let formatter = DateFormatter()\n            formatter.dateFormat = \"MMM\"\n            let month = formatter.string(from: date)\n            myCustomCell.monthLabel.text = \"\\(month) \\(cellState.text)\"\n        } else {\n            myCustomCell.monthLabel.text = \"\"\n        }\n    }\n    \n    func calendar(_ calendar: JTACMonthView, willDisplay cell: JTACDayCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {\n        // This function should have the same code as the cellForItemAt function\n        let myCustomCell = cell as! CellView\n        configureVisibleCell(myCustomCell: myCustomCell, cellState: cellState, date: date, indexPath: indexPath)\n    }\n    \n    func calendar(_ calendar: JTACMonthView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -> JTACDayCell {\n        let myCustomCell = calendar.dequeueReusableCell(withReuseIdentifier: \"CellView\", for: indexPath) as! CellView\n        configureVisibleCell(myCustomCell: myCustomCell, cellState: cellState, date: date, indexPath: indexPath)\n        return myCustomCell\n    }\n\n    func calendar(_ calendar: JTACMonthView, didDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {\n        handleCellConfiguration(cell: cell, cellState: cellState)\n    }\n\n    func calendar(_ calendar: JTACMonthView, didSelectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {\n        handleCellConfiguration(cell: cell, cellState: cellState)\n    }\n    \n    func calendar(_ calendar: JTACMonthView, didScrollToDateSegmentWith visibleDates: DateSegmentInfo) {\n//        print(\"After: \\(calendar.contentOffset.y)\")\n\n    }\n    \n    func calendar(_ calendar: JTACMonthView, willScrollToDateSegmentWith visibleDates: DateSegmentInfo) {\n        setupViewsOfCalendar(from: visibleDates)\n    }\n    \n    func calendar(_ calendar: JTACMonthView, headerViewForDateRange range: (start: Date, end: Date), at indexPath: IndexPath) -> JTACMonthReusableView {\n        let date = range.start\n        let month = testCalendar.component(.month, from: date)\n        formatter.dateFormat = \"MMM\"\n        let header: JTACMonthReusableView\n        if month % 2 > 0 {\n            header = calendar.dequeueReusableJTAppleSupplementaryView(withReuseIdentifier: \"WhiteSectionHeaderView\", for: indexPath)\n            (header as! WhiteSectionHeaderView).title.text = formatter.string(from: date)\n        } else {\n            header = calendar.dequeueReusableJTAppleSupplementaryView(withReuseIdentifier: \"PinkSectionHeaderView\", for: indexPath)\n            (header as! PinkSectionHeaderView).title.text = formatter.string(from: date)\n        }\n        return header\n    }\n    \n    func sizeOfDecorationView(indexPath: IndexPath) -> CGRect {\n        let stride = calendarView.frame.width * CGFloat(indexPath.section)\n        return CGRect(x: stride + 5, y: 5, width: calendarView.frame.width - 10, height: calendarView.frame.height - 10)\n    }\n    \n    func calendarSizeForMonths(_ calendar: JTACMonthView?) -> MonthSize? {\n        return monthSize\n    }\n}\n"
  },
  {
    "path": "SampleJTAppleCalendar/ExampleDateCells/DateCellCreatedWithCode/CodeCellView.swift",
    "content": "//\n//  CodeCellView.swift\n//  JTAppleCalendar\n//\n//  Created by JayT on 2016-05-26.\n//  Copyright © 2016 CocoaPods. All rights reserved.\n//\n\nimport UIKit\nimport JTAppleCalendar\n\nclass CodeCellView: JTACDayCell {\n    let bgColor = UIColor.red\n    // Only override drawRect: if you perform custom drawing.\n    // An empty implementation adversely affects performance during animation.\n\n    override func draw(_ rect: CGRect) {\n        let context = UIGraphicsGetCurrentContext()\n        context?.setFillColor(red: 1.0, green: 0.5, blue: 0.0, alpha: 1.0)\n        let r1 = CGRect(x: 0, y: 0, width: 25, height: 25)\n        context?.addRect(r1)\n        context?.fillPath()\n        context?.setStrokeColor(red: 1.0, green: 1.0, blue: 0.5, alpha: 1.0)\n        context?.addEllipse(in: CGRect(x: 0, y: 0, width: 25, height: 25))\n        context?.strokePath()\n    }\n\n}\n"
  },
  {
    "path": "SampleJTAppleCalendar/ExampleDateCells/DateCellCreatedWithXIB/CellView.swift",
    "content": "//\n//  CellView.swift\n//  testApplicationCalendar\n//\n//  Created by JayT on 2016-03-04.\n//  Copyright © 2016 OS-Tech. All rights reserved.\n//\n\nimport UIKit\nimport JTAppleCalendar\n\nclass CellView: JTACDayCell {\n    @IBOutlet var selectedView: UIView!\n    @IBOutlet var dayLabel: UILabel!\n    @IBOutlet var monthLabel: UILabel!\n}\n"
  },
  {
    "path": "SampleJTAppleCalendar/ExampleDateCells/DateCellCreatedWithXIB/CellView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"11762\" systemVersion=\"16D32\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"11757\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <view contentMode=\"scaleToFill\" id=\"S0w-C3-aBs\" customClass=\"CellView\" customModule=\"JTAppleCalendar_iOS_Example\" customModuleProvider=\"target\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"181\" height=\"144\"/>\n            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n            <subviews>\n                <view hidden=\"YES\" contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"EbV-Fp-hR6\" customClass=\"AnimationView\" customModule=\"JTAppleCalendar_iOS_Example\" customModuleProvider=\"target\">\n                    <rect key=\"frame\" x=\"65.5\" y=\"47\" width=\"50\" height=\"50\"/>\n                    <color key=\"backgroundColor\" red=\"0.30588235294117649\" green=\"0.30588235294117649\" blue=\"0.30588235294117649\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                    <constraints>\n                        <constraint firstAttribute=\"height\" constant=\"20\" id=\"8bC-to-itB\"/>\n                        <constraint firstAttribute=\"width\" constant=\"50\" id=\"foU-pL-TOu\"/>\n                        <constraint firstAttribute=\"width\" constant=\"20\" id=\"kcQ-Q3-xC1\"/>\n                        <constraint firstAttribute=\"height\" constant=\"50\" id=\"kkC-cq-Jrc\"/>\n                    </constraints>\n                    <variation key=\"default\">\n                        <mask key=\"constraints\">\n                            <exclude reference=\"8bC-to-itB\"/>\n                            <exclude reference=\"kcQ-Q3-xC1\"/>\n                        </mask>\n                    </variation>\n                </view>\n                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aT1-uS-ofG\">\n                    <rect key=\"frame\" x=\"69.5\" y=\"62\" width=\"42\" height=\"20.5\"/>\n                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                    <nil key=\"textColor\"/>\n                    <nil key=\"highlightedColor\"/>\n                </label>\n            </subviews>\n            <color key=\"backgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"calibratedWhite\"/>\n            <constraints>\n                <constraint firstItem=\"EbV-Fp-hR6\" firstAttribute=\"centerX\" secondItem=\"S0w-C3-aBs\" secondAttribute=\"centerX\" id=\"F2n-Nl-12g\"/>\n                <constraint firstItem=\"EbV-Fp-hR6\" firstAttribute=\"centerY\" secondItem=\"S0w-C3-aBs\" secondAttribute=\"centerY\" id=\"Xd4-Jh-UKm\"/>\n                <constraint firstItem=\"aT1-uS-ofG\" firstAttribute=\"centerX\" secondItem=\"S0w-C3-aBs\" secondAttribute=\"centerX\" id=\"uCS-0c-tF4\"/>\n                <constraint firstItem=\"aT1-uS-ofG\" firstAttribute=\"centerY\" secondItem=\"S0w-C3-aBs\" secondAttribute=\"centerY\" id=\"uc6-fQ-xIL\"/>\n            </constraints>\n            <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>\n            <userDefinedRuntimeAttributes>\n                <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                    <integer key=\"value\" value=\"2\"/>\n                </userDefinedRuntimeAttribute>\n            </userDefinedRuntimeAttributes>\n            <connections>\n                <outlet property=\"dayLabel\" destination=\"aT1-uS-ofG\" id=\"2KZ-no-pf8\"/>\n                <outlet property=\"selectedView\" destination=\"EbV-Fp-hR6\" id=\"ghg-dp-f1Y\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"-246.5\" y=\"445\"/>\n        </view>\n    </objects>\n</document>\n"
  },
  {
    "path": "SampleJTAppleCalendar/ExampleSectionHeaders/HeaderAsClass/CodePinkSectionHeaderView.swift",
    "content": "//\n//  CodePinkSectionHeaderView.swift\n//  JTAppleCalendar\n//\n//  Created by JayT on 2016-07-15.\n//  Copyright © 2016 CocoaPods. All rights reserved.\n//\n\nimport UIKit\nimport JTAppleCalendar\n\nclass CodePinkSectionHeaderView: JTACMonthReusableView {\n\n     override func draw(_ rect: CGRect) {\n        let context = UIGraphicsGetCurrentContext()!\n        context.setFillColor(red: 1.0, green: 0.5, blue: 0.0, alpha: 1.0)\n        let r1 = CGRect(x: 0, y: 0, width: 25, height: 25)\n        context.addRect(r1)\n        context.fillPath()\n        context.setStrokeColor(red: 1.0, green: 1.0, blue: 0.5, alpha: 1.0)\n        context.addEllipse(in: CGRect(x: 0, y: 0, width: 25, height: 25))\n        context.strokePath()\n     }\n\n}\n"
  },
  {
    "path": "SampleJTAppleCalendar/ExampleSectionHeaders/HeaderAsClass/CodeWhiteSectionHeaderView.swift",
    "content": "//\n//  CodeWhiteSectionHeaderView.swift\n//  JTAppleCalendar\n//\n//  Created by JayT on 2016-07-15.\n//  Copyright © 2016 CocoaPods. All rights reserved.\n//\n\nimport UIKit\nimport JTAppleCalendar\n\nclass CodeWhiteSectionHeaderView: JTACMonthReusableView {\n    // Only override drawRect: if you perform custom drawing.\n    // An empty implementation adversely affects performance during animation.\n\n    override func draw(_ rect: CGRect) {\n        let context = UIGraphicsGetCurrentContext()!\n        context.setFillColor(red: 1.0, green: 2.5, blue: 0.3, alpha: 1.0)\n        let r1 = CGRect(x: 0, y: 0, width: 25, height: 25)         // Size\n        context.addRect(r1)\n        context.fillPath()\n        context.setStrokeColor(red: 1.0, green: 1.0, blue: 0.5, alpha: 1.0)\n        context.addEllipse(in: CGRect(x: 0, y: 0, width: 25, height: 25))\n        context.strokePath()\n    }\n\n}\n"
  },
  {
    "path": "SampleJTAppleCalendar/ExampleSectionHeaders/HeaderAsXibs/PinkSectionHeaderView.swift",
    "content": "//\n//  PinkSectionHeaderView.swift\n//  JTAppleCalendar\n//\n//  Created by JayT on 2016-05-11.\n//  Copyright © 2016 CocoaPods. All rights reserved.\n//\n\nimport UIKit\nimport JTAppleCalendar\n\nclass PinkSectionHeaderView: JTACMonthReusableView {\n    @IBOutlet var title: UILabel!\n}\n"
  },
  {
    "path": "SampleJTAppleCalendar/ExampleSectionHeaders/HeaderAsXibs/PinkSectionHeaderView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"11762\" systemVersion=\"16D32\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"11757\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <view contentMode=\"scaleToFill\" id=\"iN0-l3-epB\" customClass=\"PinkSectionHeaderView\" customModule=\"JTAppleCalendar_iOS_Example\" customModuleProvider=\"target\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"274\" height=\"124\"/>\n            <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n            <subviews>\n                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"my header\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"odf-t5-Cpb\">\n                    <rect key=\"frame\" x=\"96.5\" y=\"51.5\" width=\"81\" height=\"21\"/>\n                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                    <color key=\"textColor\" red=\"0.0\" green=\"0.0\" blue=\"0.0\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                    <nil key=\"highlightedColor\"/>\n                </label>\n            </subviews>\n            <color key=\"backgroundColor\" red=\"0.91764705879999997\" green=\"0.55294117649999996\" blue=\"0.54117647059999996\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n            <constraints>\n                <constraint firstItem=\"odf-t5-Cpb\" firstAttribute=\"centerX\" secondItem=\"iN0-l3-epB\" secondAttribute=\"centerX\" id=\"OSh-hc-7kI\"/>\n                <constraint firstItem=\"odf-t5-Cpb\" firstAttribute=\"centerY\" secondItem=\"iN0-l3-epB\" secondAttribute=\"centerY\" id=\"uUT-8X-D5q\"/>\n            </constraints>\n            <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>\n            <connections>\n                <outlet property=\"title\" destination=\"odf-t5-Cpb\" id=\"iDV-ld-hMj\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"327\" y=\"586\"/>\n        </view>\n    </objects>\n</document>\n"
  },
  {
    "path": "SampleJTAppleCalendar/ExampleSectionHeaders/HeaderAsXibs/WhiteSectionHeaderView.swift",
    "content": "//\n//  WhiteSectionHeaderView.swift\n//  JTAppleCalendar\n//\n//  Created by JayT on 2016-05-16.\n//  Copyright © 2016 CocoaPods. All rights reserved.\n//\nimport UIKit\nimport JTAppleCalendar\n\nclass WhiteSectionHeaderView: JTACMonthReusableView {\n    @IBOutlet weak var title: UILabel!\n}\n"
  },
  {
    "path": "SampleJTAppleCalendar/ExampleSectionHeaders/HeaderAsXibs/WhiteSectionHeaderView.xib",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"3.0\" toolsVersion=\"13156.6\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\">\n    <device id=\"retina4_7\" orientation=\"portrait\">\n        <adaptation id=\"fullscreen\"/>\n    </device>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"13137.5\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <objects>\n        <placeholder placeholderIdentifier=\"IBFilesOwner\" id=\"-1\" userLabel=\"File's Owner\"/>\n        <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"-2\" customClass=\"UIResponder\"/>\n        <view contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"YES\" id=\"MmX-fg-i48\" customClass=\"WhiteSectionHeaderView\" customModule=\"JTAppleCalendar_iOS_Example\" customModuleProvider=\"target\">\n            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n            <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n            <subviews>\n                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"ySe-Ac-V45\">\n                    <rect key=\"frame\" x=\"246\" y=\"394\" width=\"0.0\" height=\"0.0\"/>\n                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                    <nil key=\"textColor\"/>\n                    <nil key=\"highlightedColor\"/>\n                </label>\n            </subviews>\n            <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n            <constraints>\n                <constraint firstItem=\"ySe-Ac-V45\" firstAttribute=\"centerY\" secondItem=\"MmX-fg-i48\" secondAttribute=\"centerY\" id=\"20T-PG-6SO\"/>\n                <constraint firstItem=\"ySe-Ac-V45\" firstAttribute=\"centerX\" secondItem=\"MmX-fg-i48\" secondAttribute=\"centerX\" id=\"8uK-Sn-CwB\"/>\n            </constraints>\n            <connections>\n                <outlet property=\"title\" destination=\"ySe-Ac-V45\" id=\"auT-cR-uJC\"/>\n            </connections>\n            <point key=\"canvasLocation\" x=\"596\" y=\"314\"/>\n        </view>\n    </objects>\n</document>\n"
  },
  {
    "path": "SampleJTAppleCalendar/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UIApplicationSceneManifest</key>\n\t<dict>\n\t\t<key>UIApplicationSupportsMultipleScenes</key>\n\t\t<false/>\n\t\t<key>UISceneConfigurations</key>\n\t\t<dict>\n\t\t\t<key>UIWindowSceneSessionRoleApplication</key>\n\t\t\t<array>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>UILaunchStoryboardName</key>\n\t\t\t\t\t<string>LaunchScreen</string>\n\t\t\t\t\t<key>UISceneConfigurationName</key>\n\t\t\t\t\t<string>Default Configuration</string>\n\t\t\t\t\t<key>UISceneDelegateClassName</key>\n\t\t\t\t\t<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>\n\t\t\t\t\t<key>UISceneStoryboardFile</key>\n\t\t\t\t\t<string>Main</string>\n\t\t\t\t</dict>\n\t\t\t</array>\n\t\t</dict>\n\t</dict>\n\t<key>UILaunchStoryboardName</key>\n\t<string>LaunchScreen</string>\n\t<key>UIMainStoryboardFile</key>\n\t<string>Main</string>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations~ipad</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationPortraitUpsideDown</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"
  },
  {
    "path": "SampleJTAppleCalendar/Main.storyboard",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"22154\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" colorMatched=\"YES\" initialViewController=\"9v8-0V-uqf\">\n    <device id=\"retina6_1\" orientation=\"portrait\" appearance=\"light\"/>\n    <dependencies>\n        <deployment identifier=\"iOS\"/>\n        <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"22130\"/>\n        <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n    </dependencies>\n    <scenes>\n        <!--Calendar Layouts-->\n        <scene sceneID=\"tne-QT-ifu\">\n            <objects>\n                <viewController automaticallyAdjustsScrollViewInsets=\"NO\" id=\"BYZ-38-t0r\" customClass=\"ViewController\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"y3c-jy-aDJ\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"wfy-db-euE\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"8bC-Xf-vdC\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"1000\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" distribution=\"fillEqually\" spacing=\"30\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"sua-xp-Lel\">\n                                <rect key=\"frame\" x=\"73.5\" y=\"92\" width=\"90\" height=\"48\"/>\n                                <subviews>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"o4x-CL-uDB\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"30\" height=\"48\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"30\"/>\n                                        <state key=\"normal\" title=\"&lt;\"/>\n                                        <connections>\n                                            <action selector=\"previous:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"Ltl-hs-ak9\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"9V1-Fk-CiX\">\n                                        <rect key=\"frame\" x=\"60\" y=\"0.0\" width=\"30\" height=\"48\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"30\"/>\n                                        <state key=\"normal\" title=\"&gt;\"/>\n                                        <connections>\n                                            <action selector=\"next:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"5WI-IX-YwM\"/>\n                                        </connections>\n                                    </button>\n                                </subviews>\n                                <constraints>\n                                    <constraint firstAttribute=\"width\" constant=\"90\" id=\"BAy-Is-7Jj\"/>\n                                </constraints>\n                            </stackView>\n                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"cFX-1e-6ck\">\n                                <rect key=\"frame\" x=\"163.5\" y=\"92\" width=\"48\" height=\"48\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"20\"/>\n                                <color key=\"textColor\" red=\"0.29803921568627451\" green=\"0.58039215686274503\" blue=\"0.76862745098039209\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" axis=\"vertical\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"vbP-Kr-0hG\">\n                                <rect key=\"frame\" x=\"16\" y=\"170\" width=\"343\" height=\"250\"/>\n                                <subviews>\n                                    <stackView opaque=\"NO\" contentMode=\"scaleToFill\" axis=\"vertical\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"1YD-90-lES\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"343\" height=\"250\"/>\n                                        <subviews>\n                                            <collectionView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" pagingEnabled=\"YES\" showsHorizontalScrollIndicator=\"NO\" showsVerticalScrollIndicator=\"NO\" dataMode=\"prototypes\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Rcm-BV-nfJ\" customClass=\"JTACMonthView\" customModule=\"JTAppleCalendar\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"343\" height=\"250\"/>\n                                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                <collectionViewFlowLayout key=\"collectionViewLayout\" scrollDirection=\"horizontal\" minimumLineSpacing=\"0.0\" minimumInteritemSpacing=\"0.0\" id=\"Rjk-DW-wpX\">\n                                                    <size key=\"itemSize\" width=\"115\" height=\"91\"/>\n                                                    <size key=\"headerReferenceSize\" width=\"50\" height=\"65\"/>\n                                                    <size key=\"footerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                                    <inset key=\"sectionInset\" minX=\"0.0\" minY=\"0.0\" maxX=\"0.0\" maxY=\"0.0\"/>\n                                                </collectionViewFlowLayout>\n                                                <cells>\n                                                    <collectionViewCell opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" reuseIdentifier=\"CellView\" id=\"uEt-P7-rb4\" customClass=\"CellView\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\">\n                                                        <rect key=\"frame\" x=\"50\" y=\"0.0\" width=\"115\" height=\"91\"/>\n                                                        <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                                        <view key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\">\n                                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"115\" height=\"91\"/>\n                                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                                            <subviews>\n                                                                <view hidden=\"YES\" contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"m60-Zw-bd1\" customClass=\"AnimationView\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\">\n                                                                    <rect key=\"frame\" x=\"44.5\" y=\"32.5\" width=\"26\" height=\"26\"/>\n                                                                    <color key=\"backgroundColor\" red=\"0.30588235289999999\" green=\"0.30588235289999999\" blue=\"0.30588235289999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                                    <constraints>\n                                                                        <constraint firstAttribute=\"height\" constant=\"20\" id=\"5HW-Lu-MNR\"/>\n                                                                        <constraint firstAttribute=\"width\" constant=\"20\" id=\"EUT-3D-fTi\"/>\n                                                                        <constraint firstAttribute=\"height\" constant=\"26\" id=\"pc6-aH-LiK\"/>\n                                                                        <constraint firstAttribute=\"width\" constant=\"26\" id=\"w1C-pM-ewI\"/>\n                                                                    </constraints>\n                                                                    <variation key=\"default\">\n                                                                        <mask key=\"constraints\">\n                                                                            <exclude reference=\"EUT-3D-fTi\"/>\n                                                                            <exclude reference=\"5HW-Lu-MNR\"/>\n                                                                        </mask>\n                                                                    </variation>\n                                                                </view>\n                                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Hcf-AU-Etn\">\n                                                                    <rect key=\"frame\" x=\"32.5\" y=\"35\" width=\"50\" height=\"21.5\"/>\n                                                                    <fontDescription key=\"fontDescription\" type=\"system\" weight=\"black\" pointSize=\"18\"/>\n                                                                    <nil key=\"textColor\"/>\n                                                                    <nil key=\"highlightedColor\"/>\n                                                                </label>\n                                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"trP-HR-Ph0\">\n                                                                    <rect key=\"frame\" x=\"73.5\" y=\"70.5\" width=\"41.5\" height=\"20.5\"/>\n                                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                                    <nil key=\"textColor\"/>\n                                                                    <nil key=\"highlightedColor\"/>\n                                                                </label>\n                                                            </subviews>\n                                                        </view>\n                                                        <color key=\"backgroundColor\" red=\"0.94509803921568625\" green=\"0.94509803921568625\" blue=\"0.94509803921568625\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                        <constraints>\n                                                            <constraint firstAttribute=\"trailing\" secondItem=\"trP-HR-Ph0\" secondAttribute=\"trailing\" id=\"1s3-b6-RRH\"/>\n                                                            <constraint firstItem=\"m60-Zw-bd1\" firstAttribute=\"centerX\" secondItem=\"uEt-P7-rb4\" secondAttribute=\"centerX\" id=\"Jb8-Zw-bpI\"/>\n                                                            <constraint firstItem=\"Hcf-AU-Etn\" firstAttribute=\"centerX\" secondItem=\"uEt-P7-rb4\" secondAttribute=\"centerX\" id=\"LVo-Jl-7sT\"/>\n                                                            <constraint firstItem=\"Hcf-AU-Etn\" firstAttribute=\"centerY\" secondItem=\"uEt-P7-rb4\" secondAttribute=\"centerY\" id=\"h4x-VA-Zb5\"/>\n                                                            <constraint firstAttribute=\"bottom\" secondItem=\"trP-HR-Ph0\" secondAttribute=\"bottom\" id=\"hOI-ai-zcy\"/>\n                                                            <constraint firstItem=\"m60-Zw-bd1\" firstAttribute=\"centerY\" secondItem=\"uEt-P7-rb4\" secondAttribute=\"centerY\" id=\"m9O-rD-wcr\"/>\n                                                        </constraints>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"2\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <outlet property=\"dayLabel\" destination=\"Hcf-AU-Etn\" id=\"0MY-U3-mi4\"/>\n                                                            <outlet property=\"monthLabel\" destination=\"trP-HR-Ph0\" id=\"GhX-kJ-gDJ\"/>\n                                                            <outlet property=\"selectedView\" destination=\"m60-Zw-bd1\" id=\"LDE-yx-EiQ\"/>\n                                                        </connections>\n                                                    </collectionViewCell>\n                                                </cells>\n                                                <collectionReusableView key=\"sectionHeaderView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" reuseIdentifier=\"WhiteSectionHeaderView\" id=\"a4X-fd-9fP\" customClass=\"WhiteSectionHeaderView\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"50\" height=\"250\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <subviews>\n                                                        <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"ZeE-2j-jod\">\n                                                            <rect key=\"frame\" x=\"4.5\" y=\"115\" width=\"41.5\" height=\"20.5\"/>\n                                                            <color key=\"backgroundColor\" red=\"0.20392156859999999\" green=\"0.59607843140000005\" blue=\"0.85882352939999995\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                            <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                            <nil key=\"highlightedColor\"/>\n                                                        </label>\n                                                    </subviews>\n                                                    <color key=\"backgroundColor\" red=\"0.66666666669999997\" green=\"0.66666666669999997\" blue=\"0.66666666669999997\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <constraints>\n                                                        <constraint firstItem=\"ZeE-2j-jod\" firstAttribute=\"centerY\" secondItem=\"a4X-fd-9fP\" secondAttribute=\"centerY\" id=\"Cyu-ep-l1L\"/>\n                                                        <constraint firstItem=\"ZeE-2j-jod\" firstAttribute=\"centerX\" secondItem=\"a4X-fd-9fP\" secondAttribute=\"centerX\" id=\"HGH-VZ-9oo\"/>\n                                                    </constraints>\n                                                    <connections>\n                                                        <outlet property=\"title\" destination=\"ZeE-2j-jod\" id=\"jh4-r9-dhD\"/>\n                                                    </connections>\n                                                </collectionReusableView>\n                                                <connections>\n                                                    <outlet property=\"ibCalendarDataSource\" destination=\"BYZ-38-t0r\" id=\"iWz-vk-QBD\"/>\n                                                    <outlet property=\"ibCalendarDelegate\" destination=\"BYZ-38-t0r\" id=\"2yV-hz-pi4\"/>\n                                                </connections>\n                                            </collectionView>\n                                        </subviews>\n                                    </stackView>\n                                </subviews>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"250\" id=\"Xwi-53-JiG\"/>\n                                </constraints>\n                            </stackView>\n                            <scrollView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"X9n-vl-A2l\">\n                                <rect key=\"frame\" x=\"16\" y=\"435\" width=\"343\" height=\"531\"/>\n                                <subviews>\n                                    <stackView opaque=\"NO\" contentMode=\"scaleToFill\" axis=\"vertical\" distribution=\"fillEqually\" alignment=\"top\" spacing=\"5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"iQI-Hq-aUc\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"426\" height=\"435\"/>\n                                        <subviews>\n                                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" spacing=\"20\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"aZd-el-ynv\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"426\" height=\"50\"/>\n                                                <subviews>\n                                                    <button opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"iq5-na-Ibe\">\n                                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"83\" height=\"50\"/>\n                                                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"numOfRows\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"ykE-Ba-EbA\">\n                                                        <rect key=\"frame\" x=\"103\" y=\"0.0\" width=\"30\" height=\"50\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"1\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"changeToRow:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"LcP-YZ-L7B\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"cDl-9c-uWn\">\n                                                        <rect key=\"frame\" x=\"153\" y=\"0.0\" width=\"30\" height=\"50\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"2\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"changeToRow:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"Eet-to-htT\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Pb9-XQ-mrA\">\n                                                        <rect key=\"frame\" x=\"203\" y=\"0.0\" width=\"30\" height=\"50\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"3\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"changeToRow:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"bDV-6L-J94\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"owT-zj-Nux\">\n                                                        <rect key=\"frame\" x=\"253\" y=\"0.0\" width=\"30\" height=\"50\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"6\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"changeToRow:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"FlW-wz-LnI\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <stackView opaque=\"NO\" contentMode=\"scaleToFill\" spacing=\"5\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wAg-fY-dvR\">\n                                                        <rect key=\"frame\" x=\"303\" y=\"0.0\" width=\"123\" height=\"50\"/>\n                                                    </stackView>\n                                                </subviews>\n                                            </stackView>\n                                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" alignment=\"top\" spacing=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"iXK-tz-k0E\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"55\" width=\"279\" height=\"50\"/>\n                                                <subviews>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"PyG-Eu-ygd\">\n                                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"135\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"Inside Headers OFF\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"toggleInsideHeaders:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"4X6-3J-TpX\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"PTy-sv-Bef\">\n                                                        <rect key=\"frame\" x=\"145\" y=\"0.0\" width=\"134\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"Outside Header ON\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"toggleOutsideHeaders:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"RxF-i8-CWM\"/>\n                                                        </connections>\n                                                    </button>\n                                                </subviews>\n                                            </stackView>\n                                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" distribution=\"fillEqually\" alignment=\"top\" spacing=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Pm2-qg-gpi\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"110\" width=\"304\" height=\"50\"/>\n                                                <subviews>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"UmE-fw-ixS\">\n                                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"147\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"Scrolling = Horizontal\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"changeDirection:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"sZt-zj-FDp\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"1zj-vb-Qsa\">\n                                                        <rect key=\"frame\" x=\"157\" y=\"0.0\" width=\"147\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"StrictBoundary\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"toggleStrictBoundaryWithSender:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"TNJ-aG-yBV\"/>\n                                                        </connections>\n                                                    </button>\n                                                </subviews>\n                                            </stackView>\n                                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" alignment=\"top\" spacing=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"5AH-vM-Sfm\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"165\" width=\"327\" height=\"50\"/>\n                                                <subviews>\n                                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"PRE\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"f8f-oV-Rwk\">\n                                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"31\" height=\"20.5\"/>\n                                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                        <nil key=\"textColor\"/>\n                                                        <nil key=\"highlightedColor\"/>\n                                                    </label>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"vdq-Qe-RXg\">\n                                                        <rect key=\"frame\" x=\"41\" y=\"0.0\" width=\"30\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"First\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"inDateGeneration:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"9Vl-us-QH4\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"pqT-rR-7vp\">\n                                                        <rect key=\"frame\" x=\"81\" y=\"0.0\" width=\"30\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"All\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"inDateGeneration:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"aBo-kX-z49\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"8W7-z1-FLL\">\n                                                        <rect key=\"frame\" x=\"121\" y=\"0.0\" width=\"30\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"Off\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"inDateGeneration:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"gdO-Rg-SbG\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"POST\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"s4K-u3-XNC\">\n                                                        <rect key=\"frame\" x=\"161\" y=\"0.0\" width=\"44\" height=\"20.5\"/>\n                                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                        <nil key=\"textColor\"/>\n                                                        <nil key=\"highlightedColor\"/>\n                                                    </label>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"pY3-9l-obO\">\n                                                        <rect key=\"frame\" x=\"215\" y=\"0.0\" width=\"30\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"EOR\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"outDateGeneration:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"mN9-3x-QXB\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"UFs-LS-ELE\">\n                                                        <rect key=\"frame\" x=\"255\" y=\"0.0\" width=\"32\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"EOG\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"outDateGeneration:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"T24-Gw-0LP\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"lIg-Y1-ODc\">\n                                                        <rect key=\"frame\" x=\"297\" y=\"0.0\" width=\"30\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"OFF\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"outDateGeneration:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"5cw-j5-dio\"/>\n                                                        </connections>\n                                                    </button>\n                                                </subviews>\n                                            </stackView>\n                                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" alignment=\"top\" spacing=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Ymv-Lj-fCZ\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"220\" width=\"331\" height=\"50\"/>\n                                                <subviews>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"UT2-lS-bfU\">\n                                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"42\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"+iSize\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"increaseItemSize:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"Etm-Hs-Zr7\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"QjJ-we-IeA\">\n                                                        <rect key=\"frame\" x=\"52\" y=\"0.0\" width=\"40\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"-iSize\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"decreaseItemSize:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"boh-Mi-Gj8\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"s8M-i8-V2G\">\n                                                        <rect key=\"frame\" x=\"102\" y=\"0.0\" width=\"51\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"+cInset\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"increaseCellInset:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"RzB-dh-gyz\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"lTu-1d-FMQ\">\n                                                        <rect key=\"frame\" x=\"163\" y=\"0.0\" width=\"49\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"-cInset\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"decreaseCellInset:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"aA6-Kb-DWf\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"7P9-mg-F0x\">\n                                                        <rect key=\"frame\" x=\"222\" y=\"0.0\" width=\"51\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"+sInset\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"increaseSectionInset:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"QIG-Tv-j7A\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"J08-1K-kyP\">\n                                                        <rect key=\"frame\" x=\"283\" y=\"0.0\" width=\"48\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"-sInset\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"decreaseSectionInset:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"oQH-XH-uFq\"/>\n                                                        </connections>\n                                                    </button>\n                                                </subviews>\n                                            </stackView>\n                                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" spacing=\"4\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"JUA-it-04n\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"275\" width=\"293\" height=\"50\"/>\n                                                <subviews>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Xa9-2t-dk2\">\n                                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"45\" height=\"50\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"Resize\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"resize:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"z3U-sg-ISt\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wy0-di-wch\">\n                                                        <rect key=\"frame\" x=\"49\" y=\"0.0\" width=\"98\" height=\"50\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"show pre/post\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"showPrepost:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"hNx-Ag-o7h\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"caD-EO-Q2H\">\n                                                        <rect key=\"frame\" x=\"151\" y=\"0.0\" width=\"91\" height=\"50\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"hide pre/post\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"hidePrepost:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"6Yo-mk-p8C\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Hva-aw-jhb\">\n                                                        <rect key=\"frame\" x=\"246\" y=\"0.0\" width=\"47\" height=\"50\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"Reload\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"reloadCalendar:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"XwA-au-nlk\"/>\n                                                        </connections>\n                                                    </button>\n                                                </subviews>\n                                            </stackView>\n                                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" alignment=\"top\" spacing=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GrB-Ci-kGG\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"330\" width=\"179\" height=\"50\"/>\n                                                <subviews>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"lhy-8Z-vQ5\">\n                                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"137\" height=\"30\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <state key=\"normal\" title=\"Change scroll Mode\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"changeScroll:\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"AHX-bA-nSZ\"/>\n                                                        </connections>\n                                                    </button>\n                                                    <textField opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" borderStyle=\"roundedRect\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"DXf-xv-kka\">\n                                                        <rect key=\"frame\" x=\"147\" y=\"0.0\" width=\"32\" height=\"34\"/>\n                                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n                                                        <textInputTraits key=\"textInputTraits\"/>\n                                                    </textField>\n                                                </subviews>\n                                            </stackView>\n                                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" alignment=\"top\" spacing=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"iZb-9u-P1u\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"385\" width=\"123\" height=\"50\"/>\n                                                <subviews>\n                                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"pWe-Sy-KRu\">\n                                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"123\" height=\"28\"/>\n                                                        <color key=\"backgroundColor\" white=\"0.66666666669999997\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"13\"/>\n                                                        <state key=\"normal\" title=\"Print Selected dates\"/>\n                                                        <userDefinedRuntimeAttributes>\n                                                            <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                                <integer key=\"value\" value=\"1\"/>\n                                                            </userDefinedRuntimeAttribute>\n                                                        </userDefinedRuntimeAttributes>\n                                                        <connections>\n                                                            <action selector=\"printSelectedDates\" destination=\"BYZ-38-t0r\" eventType=\"touchUpInside\" id=\"5Ft-E6-dEs\"/>\n                                                        </connections>\n                                                    </button>\n                                                </subviews>\n                                            </stackView>\n                                        </subviews>\n                                    </stackView>\n                                </subviews>\n                                <constraints>\n                                    <constraint firstItem=\"iQI-Hq-aUc\" firstAttribute=\"leading\" secondItem=\"X9n-vl-A2l\" secondAttribute=\"leading\" id=\"JdL-qZ-LAY\"/>\n                                    <constraint firstItem=\"iQI-Hq-aUc\" firstAttribute=\"top\" secondItem=\"X9n-vl-A2l\" secondAttribute=\"top\" id=\"M2d-rz-jRO\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"iQI-Hq-aUc\" secondAttribute=\"bottom\" id=\"MNP-Ia-kWu\"/>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"iQI-Hq-aUc\" secondAttribute=\"trailing\" id=\"xX9-4s-Zmx\"/>\n                                </constraints>\n                            </scrollView>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" distribution=\"fillEqually\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Ik7-d5-Fp7\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"141.5\" width=\"375\" height=\"20.5\"/>\n                                <subviews>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"SUN\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"a95-i7-kdE\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"53.5\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921568627451\" green=\"0.58039215686274503\" blue=\"0.76862745098039209\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"1\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"MON\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"7RE-Ob-lOQ\">\n                                        <rect key=\"frame\" x=\"53.5\" y=\"0.0\" width=\"53.5\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921568627451\" green=\"0.58039215686274503\" blue=\"0.76862745098039209\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"2\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"TUE\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Odu-rD-KxJ\">\n                                        <rect key=\"frame\" x=\"107\" y=\"0.0\" width=\"53.5\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921568627451\" green=\"0.58039215686274503\" blue=\"0.76862745098039209\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"3\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"WED\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"RXo-Gp-Hnh\">\n                                        <rect key=\"frame\" x=\"160.5\" y=\"0.0\" width=\"54\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921568627451\" green=\"0.58039215686274503\" blue=\"0.76862745098039209\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"4\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"THU\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"WEc-7V-dYZ\">\n                                        <rect key=\"frame\" x=\"214.5\" y=\"0.0\" width=\"53.5\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921568627451\" green=\"0.58039215686274503\" blue=\"0.76862745098039209\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"5\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"FRI\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"pdr-yp-csf\">\n                                        <rect key=\"frame\" x=\"268\" y=\"0.0\" width=\"53.5\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921568627451\" green=\"0.58039215686274503\" blue=\"0.76862745098039209\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"6\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"SAT\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"lQ6-Oa-Gic\">\n                                        <rect key=\"frame\" x=\"321.5\" y=\"0.0\" width=\"53.5\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921568627451\" green=\"0.58039215686274503\" blue=\"0.76862745098039209\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                </subviews>\n                            </stackView>\n                        </subviews>\n                        <color key=\"backgroundColor\" red=\"1\" green=\"0.88499589649999999\" blue=\"0.58674398329999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                        <constraints>\n                            <constraint firstItem=\"sua-xp-Lel\" firstAttribute=\"height\" secondItem=\"cFX-1e-6ck\" secondAttribute=\"height\" id=\"7YC-r8-kOX\"/>\n                            <constraint firstItem=\"wfy-db-euE\" firstAttribute=\"top\" secondItem=\"vbP-Kr-0hG\" secondAttribute=\"bottom\" id=\"AMa-yL-cwK\"/>\n                            <constraint firstItem=\"cFX-1e-6ck\" firstAttribute=\"leading\" secondItem=\"sua-xp-Lel\" secondAttribute=\"trailing\" id=\"Chh-5F-eh2\"/>\n                            <constraint firstItem=\"vbP-Kr-0hG\" firstAttribute=\"leading\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"leadingMargin\" id=\"Csi-Q6-zyc\"/>\n                            <constraint firstItem=\"cFX-1e-6ck\" firstAttribute=\"top\" secondItem=\"y3c-jy-aDJ\" secondAttribute=\"bottom\" id=\"GsT-zx-Yef\"/>\n                            <constraint firstItem=\"X9n-vl-A2l\" firstAttribute=\"trailing\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"trailingMargin\" id=\"H7i-AH-bEJ\"/>\n                            <constraint firstItem=\"X9n-vl-A2l\" firstAttribute=\"leading\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"leadingMargin\" id=\"OhL-UJ-Pjf\"/>\n                            <constraint firstItem=\"Ik7-d5-Fp7\" firstAttribute=\"leading\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"leading\" id=\"Q2a-6a-BbW\"/>\n                            <constraint firstItem=\"Ik7-d5-Fp7\" firstAttribute=\"top\" secondItem=\"cFX-1e-6ck\" secondAttribute=\"bottom\" constant=\"1.5\" id=\"R2g-Od-0Bh\"/>\n                            <constraint firstItem=\"cFX-1e-6ck\" firstAttribute=\"centerX\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"centerX\" id=\"RZe-bd-Okb\"/>\n                            <constraint firstItem=\"wfy-db-euE\" firstAttribute=\"top\" secondItem=\"X9n-vl-A2l\" secondAttribute=\"bottom\" id=\"UGt-Iv-oUy\"/>\n                            <constraint firstItem=\"cFX-1e-6ck\" firstAttribute=\"top\" secondItem=\"sua-xp-Lel\" secondAttribute=\"top\" id=\"b1s-dg-I04\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"Ik7-d5-Fp7\" secondAttribute=\"trailing\" id=\"drL-zV-Cn0\"/>\n                            <constraint firstItem=\"X9n-vl-A2l\" firstAttribute=\"top\" secondItem=\"vbP-Kr-0hG\" secondAttribute=\"bottom\" constant=\"15\" id=\"fCQ-UZ-Laj\"/>\n                            <constraint firstItem=\"wfy-db-euE\" firstAttribute=\"top\" secondItem=\"vbP-Kr-0hG\" secondAttribute=\"bottom\" constant=\"200\" id=\"jXl-ia-jmV\"/>\n                            <constraint firstItem=\"vbP-Kr-0hG\" firstAttribute=\"top\" secondItem=\"Ik7-d5-Fp7\" secondAttribute=\"bottom\" constant=\"8\" id=\"qQQ-hd-dti\"/>\n                            <constraint firstItem=\"sua-xp-Lel\" firstAttribute=\"top\" secondItem=\"vbP-Kr-0hG\" secondAttribute=\"bottom\" constant=\"8\" id=\"sY6-Sc-fJp\"/>\n                            <constraint firstItem=\"sua-xp-Lel\" firstAttribute=\"centerX\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"centerX\" id=\"t2y-ba-MSk\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"vbP-Kr-0hG\" secondAttribute=\"trailing\" id=\"trh-p3-iJf\"/>\n                        </constraints>\n                        <variation key=\"default\">\n                            <mask key=\"constraints\">\n                                <exclude reference=\"t2y-ba-MSk\"/>\n                                <exclude reference=\"sY6-Sc-fJp\"/>\n                                <exclude reference=\"AMa-yL-cwK\"/>\n                                <exclude reference=\"jXl-ia-jmV\"/>\n                            </mask>\n                        </variation>\n                    </view>\n                    <navigationItem key=\"navigationItem\" title=\"Calendar Layouts\" id=\"pgi-9Q-fBa\"/>\n                    <freeformSimulatedSizeMetrics key=\"simulatedDestinationMetrics\"/>\n                    <size key=\"freeformSize\" width=\"375\" height=\"1000\"/>\n                    <connections>\n                        <outlet property=\"calendarView\" destination=\"Rcm-BV-nfJ\" id=\"37o-jK-dmJ\"/>\n                        <outlet property=\"customColumn\" destination=\"DXf-xv-kka\" id=\"58h-4C-tCj\"/>\n                        <outlet property=\"monthLabel\" destination=\"cFX-1e-6ck\" id=\"3QP-nf-lUt\"/>\n                        <outlet property=\"weekViewStack\" destination=\"Ik7-d5-Fp7\" id=\"6rD-Rm-wAT\"/>\n                        <outletCollection property=\"outDates\" destination=\"UFs-LS-ELE\" collectionClass=\"NSMutableArray\" id=\"8CL-cf-eXS\"/>\n                        <outletCollection property=\"numbers\" destination=\"cDl-9c-uWn\" collectionClass=\"NSMutableArray\" id=\"BW9-yx-NGw\"/>\n                        <outletCollection property=\"outDates\" destination=\"pY3-9l-obO\" collectionClass=\"NSMutableArray\" id=\"j8F-yr-DnT\"/>\n                        <outletCollection property=\"inDates\" destination=\"vdq-Qe-RXg\" collectionClass=\"NSMutableArray\" id=\"pDr-HZ-B96\"/>\n                        <outletCollection property=\"numbers\" destination=\"Pb9-XQ-mrA\" collectionClass=\"NSMutableArray\" id=\"aTe-0K-A4y\"/>\n                        <outletCollection property=\"numbers\" destination=\"owT-zj-Nux\" collectionClass=\"NSMutableArray\" id=\"ZFg-lf-tvu\"/>\n                        <outletCollection property=\"inDates\" destination=\"pqT-rR-7vp\" collectionClass=\"NSMutableArray\" id=\"eVP-j0-ayt\"/>\n                        <outletCollection property=\"inDates\" destination=\"8W7-z1-FLL\" collectionClass=\"NSMutableArray\" id=\"KHM-iJ-p9E\"/>\n                        <outletCollection property=\"numbers\" destination=\"ykE-Ba-EbA\" collectionClass=\"NSMutableArray\" id=\"TnT-YI-HgS\"/>\n                        <outletCollection property=\"outDates\" destination=\"lIg-Y1-ODc\" collectionClass=\"NSMutableArray\" id=\"ni8-52-JLD\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"3698\" y=\"-294\"/>\n        </scene>\n        <!--Navigation Controller-->\n        <scene sceneID=\"enG-ib-FHj\">\n            <objects>\n                <navigationController automaticallyAdjustsScrollViewInsets=\"NO\" id=\"9v8-0V-uqf\" sceneMemberID=\"viewController\">\n                    <navigationBar key=\"navigationBar\" contentMode=\"scaleToFill\" id=\"B2h-Cd-OxS\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"48\" width=\"414\" height=\"44\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                    </navigationBar>\n                    <connections>\n                        <segue destination=\"N42-HY-4w9\" kind=\"relationship\" relationship=\"rootViewController\" id=\"Dec-Ve-yDy\"/>\n                    </connections>\n                </navigationController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"ypv-Pt-Iyy\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1281\" y=\"245\"/>\n        </scene>\n        <!--Test Range Selection View Controller-->\n        <scene sceneID=\"cAw-IR-4gx\">\n            <objects>\n                <viewController id=\"JjC-p2-LPZ\" customClass=\"TestRangeSelectionViewController\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"enb-Tx-CT1\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"Eb3-tE-ic4\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"AIB-R3-Paq\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" axis=\"vertical\" alignment=\"center\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"6ZD-oY-O4C\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"92\" width=\"414\" height=\"370.5\"/>\n                                <subviews>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Ojx-JA-J5N\">\n                                        <rect key=\"frame\" x=\"186.5\" y=\"0.0\" width=\"41.5\" height=\"20.5\"/>\n                                        <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                        <nil key=\"textColor\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <collectionView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" pagingEnabled=\"YES\" showsHorizontalScrollIndicator=\"NO\" showsVerticalScrollIndicator=\"NO\" dataMode=\"prototypes\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"zg8-Vx-EnL\" customClass=\"JTACMonthView\" customModule=\"JTAppleCalendar\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"20.5\" width=\"414\" height=\"350\"/>\n                                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                                        <constraints>\n                                            <constraint firstAttribute=\"height\" constant=\"350\" id=\"AtV-qG-3NJ\"/>\n                                        </constraints>\n                                        <collectionViewFlowLayout key=\"collectionViewLayout\" scrollDirection=\"horizontal\" minimumLineSpacing=\"0.0\" minimumInteritemSpacing=\"0.0\" id=\"Lyy-8V-VOo\">\n                                            <size key=\"itemSize\" width=\"167\" height=\"164\"/>\n                                            <size key=\"headerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                            <size key=\"footerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                            <inset key=\"sectionInset\" minX=\"0.0\" minY=\"0.0\" maxX=\"0.0\" maxY=\"0.0\"/>\n                                        </collectionViewFlowLayout>\n                                        <cells>\n                                            <collectionViewCell opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" insetsLayoutMarginsFromSafeArea=\"NO\" reuseIdentifier=\"cell\" id=\"BDQ-aa-NRi\" customClass=\"TestRangeSelectionViewControllerCell\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"167\" height=\"164\"/>\n                                                <autoresizingMask key=\"autoresizingMask\"/>\n                                                <view key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" insetsLayoutMarginsFromSafeArea=\"NO\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"167\" height=\"164\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <subviews>\n                                                        <view hidden=\"YES\" contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"rxc-7s-dS4\">\n                                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"167\" height=\"164\"/>\n                                                            <color key=\"backgroundColor\" white=\"0.66666666666666663\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                                                        </view>\n                                                        <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"eil-Oq-XKz\">\n                                                            <rect key=\"frame\" x=\"63\" y=\"72\" width=\"41.5\" height=\"20.5\"/>\n                                                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                            <nil key=\"textColor\"/>\n                                                            <nil key=\"highlightedColor\"/>\n                                                        </label>\n                                                    </subviews>\n                                                </view>\n                                                <constraints>\n                                                    <constraint firstAttribute=\"bottom\" secondItem=\"rxc-7s-dS4\" secondAttribute=\"bottom\" id=\"QFM-k4-gse\"/>\n                                                    <constraint firstAttribute=\"trailing\" secondItem=\"rxc-7s-dS4\" secondAttribute=\"trailing\" id=\"aj8-pO-lvq\"/>\n                                                    <constraint firstItem=\"eil-Oq-XKz\" firstAttribute=\"centerX\" secondItem=\"BDQ-aa-NRi\" secondAttribute=\"centerX\" id=\"fW9-32-I9L\"/>\n                                                    <constraint firstItem=\"eil-Oq-XKz\" firstAttribute=\"centerY\" secondItem=\"BDQ-aa-NRi\" secondAttribute=\"centerY\" id=\"qKW-ra-wZh\"/>\n                                                    <constraint firstItem=\"rxc-7s-dS4\" firstAttribute=\"leading\" secondItem=\"BDQ-aa-NRi\" secondAttribute=\"leading\" id=\"unp-7Z-bO8\"/>\n                                                    <constraint firstItem=\"rxc-7s-dS4\" firstAttribute=\"top\" secondItem=\"BDQ-aa-NRi\" secondAttribute=\"top\" id=\"yIw-dB-Xnh\"/>\n                                                </constraints>\n                                                <connections>\n                                                    <outlet property=\"label\" destination=\"eil-Oq-XKz\" id=\"mBF-I0-cTr\"/>\n                                                    <outlet property=\"selectedView\" destination=\"rxc-7s-dS4\" id=\"NlW-KM-O1f\"/>\n                                                </connections>\n                                            </collectionViewCell>\n                                        </cells>\n                                        <connections>\n                                            <outlet property=\"ibCalendarDataSource\" destination=\"JjC-p2-LPZ\" id=\"ccF-Am-hNk\"/>\n                                            <outlet property=\"ibCalendarDelegate\" destination=\"JjC-p2-LPZ\" id=\"lAx-js-cjJ\"/>\n                                        </connections>\n                                    </collectionView>\n                                </subviews>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"370.5\" id=\"bAt-nQ-fKO\"/>\n                                </constraints>\n                            </stackView>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                        <constraints>\n                            <constraint firstItem=\"6ZD-oY-O4C\" firstAttribute=\"top\" secondItem=\"enb-Tx-CT1\" secondAttribute=\"bottom\" id=\"32s-1s-9rz\"/>\n                            <constraint firstItem=\"6ZD-oY-O4C\" firstAttribute=\"leading\" secondItem=\"AIB-R3-Paq\" secondAttribute=\"leading\" id=\"ItF-Bl-byz\"/>\n                            <constraint firstItem=\"zg8-Vx-EnL\" firstAttribute=\"width\" secondItem=\"AIB-R3-Paq\" secondAttribute=\"width\" id=\"YhA-gl-SCG\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"6ZD-oY-O4C\" secondAttribute=\"trailing\" id=\"lVA-wy-tJD\"/>\n                        </constraints>\n                    </view>\n                    <connections>\n                        <outlet property=\"calendarView\" destination=\"zg8-Vx-EnL\" id=\"4Rd-Fz-EpO\"/>\n                        <outlet property=\"monthLabel\" destination=\"Ojx-JA-J5N\" id=\"3RE-3U-ZT6\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"cuU-Mo-63R\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1386\" y=\"-444\"/>\n        </scene>\n        <!--Test Year View View Controller-->\n        <scene sceneID=\"wO7-mA-HMM\">\n            <objects>\n                <viewController id=\"ZZU-Fx-N6U\" customClass=\"TestYearViewViewController\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"E2D-gB-4ry\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"cEM-w5-hoy\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"pke-tV-doL\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <collectionView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" dataMode=\"prototypes\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Bh9-Ea-ItT\" customClass=\"JTACYearView\" customModule=\"JTAppleCalendar\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"92\" width=\"414\" height=\"400\"/>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"400\" id=\"skL-Tu-a9H\"/>\n                                </constraints>\n                                <collectionViewFlowLayout key=\"collectionViewLayout\" minimumLineSpacing=\"10\" minimumInteritemSpacing=\"10\" id=\"8FJ-Ly-S06\">\n                                    <size key=\"itemSize\" width=\"156\" height=\"135\"/>\n                                    <size key=\"headerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                    <size key=\"footerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                    <inset key=\"sectionInset\" minX=\"10\" minY=\"0.0\" maxX=\"10\" maxY=\"0.0\"/>\n                                </collectionViewFlowLayout>\n                                <cells>\n                                    <collectionViewCell opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" reuseIdentifier=\"kkk\" id=\"C03-vA-CDE\" customClass=\"MyCell\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\">\n                                        <rect key=\"frame\" x=\"10\" y=\"0.0\" width=\"156\" height=\"135\"/>\n                                        <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                        <view key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" insetsLayoutMarginsFromSafeArea=\"NO\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"156\" height=\"135\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <view contentMode=\"scaleToFill\" verticalHuggingPriority=\"249\" verticalCompressionResistancePriority=\"751\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"dkg-wL-Ol1\" customClass=\"JTACCellMonthView\" customModule=\"JTAppleCalendar\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"24\" width=\"156\" height=\"111\"/>\n                                                    <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                                                </view>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"252\" text=\"Jan\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"e8x-Rc-HXw\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"29\" height=\"21\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" weight=\"semibold\" pointSize=\"17\"/>\n                                                    <color key=\"textColor\" red=\"1\" green=\"0.30872617429999999\" blue=\"0.17401843089999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </view>\n                                        <constraints>\n                                            <constraint firstItem=\"dkg-wL-Ol1\" firstAttribute=\"leading\" secondItem=\"C03-vA-CDE\" secondAttribute=\"leading\" id=\"R1F-lB-9B7\"/>\n                                            <constraint firstAttribute=\"trailing\" secondItem=\"dkg-wL-Ol1\" secondAttribute=\"trailing\" id=\"j25-23-mUd\"/>\n                                            <constraint firstItem=\"e8x-Rc-HXw\" firstAttribute=\"leading\" secondItem=\"C03-vA-CDE\" secondAttribute=\"leading\" id=\"mCG-UP-COo\"/>\n                                            <constraint firstItem=\"dkg-wL-Ol1\" firstAttribute=\"top\" secondItem=\"e8x-Rc-HXw\" secondAttribute=\"bottom\" constant=\"3\" id=\"oxu-7n-AYO\"/>\n                                            <constraint firstAttribute=\"bottom\" secondItem=\"dkg-wL-Ol1\" secondAttribute=\"bottom\" id=\"u09-rx-cOc\"/>\n                                            <constraint firstItem=\"e8x-Rc-HXw\" firstAttribute=\"top\" secondItem=\"C03-vA-CDE\" secondAttribute=\"top\" id=\"wBE-yf-IXi\"/>\n                                        </constraints>\n                                        <connections>\n                                            <outlet property=\"monthLabel\" destination=\"e8x-Rc-HXw\" id=\"zQY-0f-qDK\"/>\n                                            <outlet property=\"monthView\" destination=\"dkg-wL-Ol1\" id=\"ooh-80-6zr\"/>\n                                        </connections>\n                                    </collectionViewCell>\n                                    <collectionViewCell opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" reuseIdentifier=\"zzz\" id=\"wk8-2U-Cj3\" customClass=\"YearHeaderCell\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\">\n                                        <rect key=\"frame\" x=\"176\" y=\"50.5\" width=\"199\" height=\"34\"/>\n                                        <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                        <view key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" insetsLayoutMarginsFromSafeArea=\"NO\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"199\" height=\"34\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"252\" misplaced=\"YES\" text=\"2019\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"GWG-e8-t2Q\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"59\" height=\"21\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"boldSystem\" pointSize=\"20\"/>\n                                                    <color key=\"textColor\" red=\"1\" green=\"0.30872617429999999\" blue=\"0.17401843089999999\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </view>\n                                        <constraints>\n                                            <constraint firstItem=\"GWG-e8-t2Q\" firstAttribute=\"leading\" secondItem=\"wk8-2U-Cj3\" secondAttribute=\"leading\" id=\"2UN-nH-hd5\"/>\n                                            <constraint firstItem=\"GWG-e8-t2Q\" firstAttribute=\"top\" secondItem=\"wk8-2U-Cj3\" secondAttribute=\"top\" id=\"j8t-ZH-JBR\"/>\n                                        </constraints>\n                                        <size key=\"customSize\" width=\"199\" height=\"34\"/>\n                                        <connections>\n                                            <outlet property=\"yearLabel\" destination=\"GWG-e8-t2Q\" id=\"UaX-ez-n4E\"/>\n                                        </connections>\n                                    </collectionViewCell>\n                                </cells>\n                                <connections>\n                                    <outlet property=\"ibCalendarDataSource\" destination=\"pke-tV-doL\" id=\"whE-i4-CES\"/>\n                                    <outlet property=\"ibCalendarDelegate\" destination=\"pke-tV-doL\" id=\"Ah0-gC-2nn\"/>\n                                </connections>\n                            </collectionView>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"genericGamma22GrayColorSpace\"/>\n                        <constraints>\n                            <constraint firstItem=\"Bh9-Ea-ItT\" firstAttribute=\"leading\" secondItem=\"pke-tV-doL\" secondAttribute=\"leading\" id=\"Jcr-c1-TdX\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"Bh9-Ea-ItT\" secondAttribute=\"trailing\" id=\"Lmm-gS-Rmd\"/>\n                            <constraint firstItem=\"Bh9-Ea-ItT\" firstAttribute=\"top\" secondItem=\"E2D-gB-4ry\" secondAttribute=\"bottom\" id=\"XNa-ln-pMt\"/>\n                        </constraints>\n                    </view>\n                    <connections>\n                        <outlet property=\"calendarView\" destination=\"Bh9-Ea-ItT\" id=\"hyM-gA-pgb\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"vQa-iq-XYe\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"2256.521739130435\" y=\"-477.45535714285711\"/>\n        </scene>\n        <!--View Controller-->\n        <scene sceneID=\"Pw0-md-6kX\">\n            <objects>\n                <viewController automaticallyAdjustsScrollViewInsets=\"NO\" id=\"N42-HY-4w9\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"QfN-nq-d8b\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"LLl-wr-Ind\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"Gbb-3F-dTi\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" axis=\"vertical\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"wFg-I5-5WX\">\n                                <rect key=\"frame\" x=\"95.5\" y=\"373\" width=\"223\" height=\"150\"/>\n                                <subviews>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"r9b-Va-H2a\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"223\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"Calendar Layouts demonstration\"/>\n                                        <connections>\n                                            <segue destination=\"BYZ-38-t0r\" kind=\"show\" id=\"HXg-uq-MHf\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"2W1-xT-Tgg\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"30\" width=\"223\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"testing resizing/ Orientation\"/>\n                                        <connections>\n                                            <segue destination=\"AVg-Nb-61y\" kind=\"show\" id=\"h9Y-WS-r0J\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"fae-HY-XpN\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"60\" width=\"223\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"Persian Calendar\"/>\n                                        <connections>\n                                            <segue destination=\"HlD-js-bve\" kind=\"show\" id=\"4D4-Ys-Mko\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"IYU-1e-f9F\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"90\" width=\"223\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"Range selection\"/>\n                                        <connections>\n                                            <segue destination=\"JjC-p2-LPZ\" kind=\"show\" id=\"XsD-qK-5c0\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"yTB-iP-SZo\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"120\" width=\"223\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"YearView Calendar\"/>\n                                        <connections>\n                                            <segue destination=\"ZZU-Fx-N6U\" kind=\"show\" id=\"ieI-KL-zST\"/>\n                                        </connections>\n                                    </button>\n                                </subviews>\n                            </stackView>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                        <constraints>\n                            <constraint firstItem=\"wFg-I5-5WX\" firstAttribute=\"centerY\" secondItem=\"Gbb-3F-dTi\" secondAttribute=\"centerY\" id=\"UFd-rM-7Kj\"/>\n                            <constraint firstItem=\"wFg-I5-5WX\" firstAttribute=\"centerX\" secondItem=\"Gbb-3F-dTi\" secondAttribute=\"centerX\" id=\"ybc-Tf-F8D\"/>\n                        </constraints>\n                    </view>\n                    <navigationItem key=\"navigationItem\" id=\"mwu-NM-Hfc\"/>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"SDy-ry-8sg\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"2012\" y=\"244\"/>\n        </scene>\n        <!--Test View Controller-->\n        <scene sceneID=\"Xh3-HE-cqu\">\n            <objects>\n                <viewController id=\"AVg-Nb-61y\" customClass=\"TestViewController\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"2Fr-cm-o6h\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"wxX-Tr-qPJ\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"XpA-6B-Jfk\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <view contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"kyX-nO-Lf1\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"133\" width=\"414\" height=\"271\"/>\n                                <subviews>\n                                    <collectionView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" pagingEnabled=\"YES\" showsHorizontalScrollIndicator=\"NO\" showsVerticalScrollIndicator=\"NO\" dataMode=\"prototypes\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"LAY-EA-ORQ\" customClass=\"JTACMonthView\" customModule=\"JTAppleCalendar\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"271\"/>\n                                        <color key=\"backgroundColor\" red=\"0.93053645360000004\" green=\"0.93053645360000004\" blue=\"0.93053645360000004\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <collectionViewFlowLayout key=\"collectionViewLayout\" scrollDirection=\"horizontal\" minimumLineSpacing=\"0.0\" minimumInteritemSpacing=\"0.0\" id=\"eZW-3P-KnG\">\n                                            <size key=\"itemSize\" width=\"153\" height=\"133\"/>\n                                            <size key=\"headerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                            <size key=\"footerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                            <inset key=\"sectionInset\" minX=\"0.0\" minY=\"0.0\" maxX=\"0.0\" maxY=\"0.0\"/>\n                                        </collectionViewFlowLayout>\n                                        <cells>\n                                            <collectionViewCell opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" reuseIdentifier=\"cell\" id=\"NXg-7B-L4u\" customClass=\"CellView\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\">\n                                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"153\" height=\"133\"/>\n                                                <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                                <view key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\">\n                                                    <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"153\" height=\"133\"/>\n                                                    <autoresizingMask key=\"autoresizingMask\"/>\n                                                    <subviews>\n                                                        <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"date\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"7qW-Ip-gdz\">\n                                                            <rect key=\"frame\" x=\"59.5\" y=\"56.5\" width=\"34\" height=\"20.5\"/>\n                                                            <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                            <nil key=\"textColor\"/>\n                                                            <nil key=\"highlightedColor\"/>\n                                                        </label>\n                                                    </subviews>\n                                                </view>\n                                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                                <constraints>\n                                                    <constraint firstItem=\"7qW-Ip-gdz\" firstAttribute=\"centerY\" secondItem=\"NXg-7B-L4u\" secondAttribute=\"centerY\" id=\"mYT-gv-eLK\"/>\n                                                    <constraint firstItem=\"7qW-Ip-gdz\" firstAttribute=\"centerX\" secondItem=\"NXg-7B-L4u\" secondAttribute=\"centerX\" id=\"uJn-xg-gEQ\"/>\n                                                </constraints>\n                                                <userDefinedRuntimeAttributes>\n                                                    <userDefinedRuntimeAttribute type=\"number\" keyPath=\"layer.borderWidth\">\n                                                        <integer key=\"value\" value=\"1\"/>\n                                                    </userDefinedRuntimeAttribute>\n                                                </userDefinedRuntimeAttributes>\n                                                <connections>\n                                                    <outlet property=\"dayLabel\" destination=\"7qW-Ip-gdz\" id=\"UTY-0U-7Is\"/>\n                                                </connections>\n                                            </collectionViewCell>\n                                        </cells>\n                                        <connections>\n                                            <outlet property=\"ibCalendarDataSource\" destination=\"AVg-Nb-61y\" id=\"aFo-Sc-8XR\"/>\n                                            <outlet property=\"ibCalendarDelegate\" destination=\"AVg-Nb-61y\" id=\"IKL-5m-DWX\"/>\n                                        </connections>\n                                    </collectionView>\n                                </subviews>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"trailing\" secondItem=\"LAY-EA-ORQ\" secondAttribute=\"trailing\" id=\"0wR-tg-pHp\"/>\n                                    <constraint firstItem=\"LAY-EA-ORQ\" firstAttribute=\"leading\" secondItem=\"kyX-nO-Lf1\" secondAttribute=\"leading\" id=\"2lJ-X2-vZx\"/>\n                                    <constraint firstAttribute=\"height\" constant=\"271\" id=\"6If-7S-7eU\"/>\n                                    <constraint firstAttribute=\"bottom\" secondItem=\"LAY-EA-ORQ\" secondAttribute=\"bottom\" id=\"SKt-Xu-dBS\"/>\n                                    <constraint firstItem=\"LAY-EA-ORQ\" firstAttribute=\"top\" secondItem=\"kyX-nO-Lf1\" secondAttribute=\"top\" id=\"erw-7f-krd\"/>\n                                </constraints>\n                            </view>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" distribution=\"fillEqually\" spacing=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"TU3-e8-jQU\">\n                                <rect key=\"frame\" x=\"20\" y=\"404\" width=\"374\" height=\"30\"/>\n                                <subviews>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"mT9-sa-CDD\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"118\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"2 heightCal\"/>\n                                        <connections>\n                                            <action selector=\"twoHeight:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"wfF-Rx-Opp\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"7iF-QA-fsa\">\n                                        <rect key=\"frame\" x=\"128\" y=\"0.0\" width=\"118\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"200 HeightCal\"/>\n                                        <connections>\n                                            <action selector=\"twoHundredHeight:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"U1z-Me-iZW\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"nO2-WK-qB5\">\n                                        <rect key=\"frame\" x=\"256\" y=\"0.0\" width=\"118\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"0 heightCal\"/>\n                                        <connections>\n                                            <action selector=\"zeroHeight:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"NKV-Nu-kXK\"/>\n                                        </connections>\n                                    </button>\n                                </subviews>\n                            </stackView>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" distribution=\"fillEqually\" spacing=\"10\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bqS-br-Qs5\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"434\" width=\"414\" height=\"30\"/>\n                                <subviews>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"e3X-PP-Mqx\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"131.5\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"2 heightV\"/>\n                                        <connections>\n                                            <action selector=\"twoHeightView:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"ywc-pJ-Lfg\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"2yq-DP-rjS\">\n                                        <rect key=\"frame\" x=\"141.5\" y=\"0.0\" width=\"131\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"200 HeightV\"/>\n                                        <connections>\n                                            <action selector=\"twoHundredHeightView:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"L8R-ga-lsE\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"3rt-Bl-Rl9\">\n                                        <rect key=\"frame\" x=\"282.5\" y=\"0.0\" width=\"131.5\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"0 heightV\"/>\n                                        <connections>\n                                            <action selector=\"zeroHeightView:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"8pz-tw-aYb\"/>\n                                        </connections>\n                                    </button>\n                                </subviews>\n                            </stackView>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" distribution=\"fillEqually\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Ctc-L8-eMh\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"112.5\" width=\"414\" height=\"20.5\"/>\n                                <subviews>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"SUN\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Z7b-KP-qsX\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"59\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921570000003\" green=\"0.58039215690000001\" blue=\"0.76862745099999996\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"1\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"MON\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bS7-BN-O3R\">\n                                        <rect key=\"frame\" x=\"59\" y=\"0.0\" width=\"59.5\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921570000003\" green=\"0.58039215690000001\" blue=\"0.76862745099999996\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"2\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"TUE\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"4me-UK-mO9\">\n                                        <rect key=\"frame\" x=\"118.5\" y=\"0.0\" width=\"59\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921570000003\" green=\"0.58039215690000001\" blue=\"0.76862745099999996\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"3\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"WED\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"s2r-pE-MXm\">\n                                        <rect key=\"frame\" x=\"177.5\" y=\"0.0\" width=\"59\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921570000003\" green=\"0.58039215690000001\" blue=\"0.76862745099999996\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"4\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"THU\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"mKO-be-0HH\">\n                                        <rect key=\"frame\" x=\"236.5\" y=\"0.0\" width=\"59\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921570000003\" green=\"0.58039215690000001\" blue=\"0.76862745099999996\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"5\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"FRI\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"JUc-9q-CTG\">\n                                        <rect key=\"frame\" x=\"295.5\" y=\"0.0\" width=\"59.5\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921570000003\" green=\"0.58039215690000001\" blue=\"0.76862745099999996\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                    <label opaque=\"NO\" userInteractionEnabled=\"NO\" tag=\"6\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"SAT\" textAlignment=\"center\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bed-JL-cSI\">\n                                        <rect key=\"frame\" x=\"355\" y=\"0.0\" width=\"59\" height=\"20.5\"/>\n                                        <color key=\"backgroundColor\" red=\"0.29803921570000003\" green=\"0.58039215690000001\" blue=\"0.76862745099999996\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <fontDescription key=\"fontDescription\" name=\"HelveticaNeue-Light\" family=\"Helvetica Neue\" pointSize=\"17\"/>\n                                        <color key=\"textColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n                                        <nil key=\"highlightedColor\"/>\n                                    </label>\n                                </subviews>\n                            </stackView>\n                            <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"d9e-9A-w1w\">\n                                <rect key=\"frame\" x=\"186.5\" y=\"92\" width=\"41.5\" height=\"20.5\"/>\n                                <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                <nil key=\"textColor\"/>\n                                <nil key=\"highlightedColor\"/>\n                            </label>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" distribution=\"fillEqually\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"ULx-90-n0y\">\n                                <rect key=\"frame\" x=\"20\" y=\"464\" width=\"374\" height=\"30\"/>\n                                <subviews>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"he5-OD-oBh\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"124.5\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"Resizing inside TabBar\"/>\n                                        <connections>\n                                            <segue destination=\"9Vk-ez-fic\" kind=\"show\" id=\"d4V-XS-ToU\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"HK3-rn-nG9\">\n                                        <rect key=\"frame\" x=\"124.5\" y=\"0.0\" width=\"125\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"reload\"/>\n                                        <connections>\n                                            <action selector=\"reload:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"Kek-GF-ofn\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"F5Z-I4-eWm\">\n                                        <rect key=\"frame\" x=\"249.5\" y=\"0.0\" width=\"124.5\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"DebugThis\"/>\n                                        <connections>\n                                            <action selector=\"debugthis:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"Fa5-Da-AMY\"/>\n                                        </connections>\n                                    </button>\n                                </subviews>\n                            </stackView>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" distribution=\"fillEqually\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"HBe-aT-7IQ\">\n                                <rect key=\"frame\" x=\"20\" y=\"494\" width=\"394\" height=\"30\"/>\n                                <subviews>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"hAY-Ma-dSs\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"131.5\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"select1Date\"/>\n                                        <connections>\n                                            <action selector=\"selectOneDate:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"MSw-ce-TAS\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"a3c-kq-fCK\">\n                                        <rect key=\"frame\" x=\"131.5\" y=\"0.0\" width=\"131\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"SelectODate\"/>\n                                        <connections>\n                                            <action selector=\"selectOtherDate:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"tJW-Lw-m1V\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"dHk-d9-jd7\">\n                                        <rect key=\"frame\" x=\"262.5\" y=\"0.0\" width=\"131.5\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"Select1Month\"/>\n                                        <connections>\n                                            <action selector=\"selectOneMonth:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"ru2-Ty-6al\"/>\n                                        </connections>\n                                    </button>\n                                </subviews>\n                            </stackView>\n                            <stackView opaque=\"NO\" contentMode=\"scaleToFill\" distribution=\"fillEqually\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"Hwj-Wy-zs2\">\n                                <rect key=\"frame\" x=\"20\" y=\"524\" width=\"374\" height=\"30\"/>\n                                <subviews>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bJf-bb-Owh\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"124.5\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"selectABunch\"/>\n                                        <connections>\n                                            <action selector=\"selectABunch:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"QEQ-qK-fvG\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"AuZ-wk-d5r\">\n                                        <rect key=\"frame\" x=\"124.5\" y=\"0.0\" width=\"125\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"singleSelect\"/>\n                                        <connections>\n                                            <action selector=\"singleSelect:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"Bnm-xU-BWj\"/>\n                                        </connections>\n                                    </button>\n                                    <button opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"center\" contentVerticalAlignment=\"center\" buttonType=\"system\" lineBreakMode=\"middleTruncation\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"o1T-jC-TEI\">\n                                        <rect key=\"frame\" x=\"249.5\" y=\"0.0\" width=\"124.5\" height=\"30\"/>\n                                        <state key=\"normal\" title=\"multiSelect\"/>\n                                        <connections>\n                                            <action selector=\"multiSelect:\" destination=\"AVg-Nb-61y\" eventType=\"touchUpInside\" id=\"xc5-D8-dEm\"/>\n                                        </connections>\n                                    </button>\n                                </subviews>\n                            </stackView>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                        <constraints>\n                            <constraint firstItem=\"TU3-e8-jQU\" firstAttribute=\"top\" secondItem=\"kyX-nO-Lf1\" secondAttribute=\"bottom\" id=\"2r7-2w-dQL\"/>\n                            <constraint firstItem=\"bqS-br-Qs5\" firstAttribute=\"leading\" secondItem=\"XpA-6B-Jfk\" secondAttribute=\"leading\" id=\"3jd-oT-Frz\"/>\n                            <constraint firstItem=\"HBe-aT-7IQ\" firstAttribute=\"top\" secondItem=\"ULx-90-n0y\" secondAttribute=\"bottom\" id=\"7t8-Z1-YDE\"/>\n                            <constraint firstItem=\"bqS-br-Qs5\" firstAttribute=\"top\" secondItem=\"TU3-e8-jQU\" secondAttribute=\"bottom\" id=\"EXo-hd-nWg\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"HBe-aT-7IQ\" secondAttribute=\"trailing\" id=\"I5d-ku-WFN\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"Hwj-Wy-zs2\" secondAttribute=\"trailing\" id=\"JLr-Qs-mLb\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"TU3-e8-jQU\" secondAttribute=\"trailing\" id=\"K3s-3T-4Xp\"/>\n                            <constraint firstItem=\"d9e-9A-w1w\" firstAttribute=\"top\" secondItem=\"2Fr-cm-o6h\" secondAttribute=\"bottom\" id=\"QIx-0I-RIo\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"ULx-90-n0y\" secondAttribute=\"trailing\" id=\"R6w-GA-XOt\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"Ctc-L8-eMh\" secondAttribute=\"trailing\" id=\"R9U-ft-hu6\"/>\n                            <constraint firstItem=\"TU3-e8-jQU\" firstAttribute=\"leading\" secondItem=\"XpA-6B-Jfk\" secondAttribute=\"leadingMargin\" id=\"Rgk-Wc-CsP\"/>\n                            <constraint firstItem=\"kyX-nO-Lf1\" firstAttribute=\"top\" secondItem=\"Ctc-L8-eMh\" secondAttribute=\"bottom\" id=\"SDu-h6-SUF\"/>\n                            <constraint firstItem=\"HBe-aT-7IQ\" firstAttribute=\"leading\" secondItem=\"XpA-6B-Jfk\" secondAttribute=\"leadingMargin\" id=\"V31-tL-Fnj\"/>\n                            <constraint firstItem=\"d9e-9A-w1w\" firstAttribute=\"centerX\" secondItem=\"XpA-6B-Jfk\" secondAttribute=\"centerX\" id=\"ZEY-cJ-hiS\"/>\n                            <constraint firstItem=\"Hwj-Wy-zs2\" firstAttribute=\"leading\" secondItem=\"XpA-6B-Jfk\" secondAttribute=\"leadingMargin\" id=\"aci-9Y-RET\"/>\n                            <constraint firstItem=\"Ctc-L8-eMh\" firstAttribute=\"leading\" secondItem=\"XpA-6B-Jfk\" secondAttribute=\"leading\" id=\"cNt-Qa-XDf\"/>\n                            <constraint firstItem=\"Ctc-L8-eMh\" firstAttribute=\"top\" secondItem=\"d9e-9A-w1w\" secondAttribute=\"bottom\" id=\"iJt-Iz-w7S\"/>\n                            <constraint firstItem=\"Hwj-Wy-zs2\" firstAttribute=\"top\" secondItem=\"HBe-aT-7IQ\" secondAttribute=\"bottom\" id=\"iLN-yP-2DZ\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"kyX-nO-Lf1\" secondAttribute=\"trailing\" id=\"q1h-Hf-VVp\"/>\n                            <constraint firstItem=\"ULx-90-n0y\" firstAttribute=\"leading\" secondItem=\"XpA-6B-Jfk\" secondAttribute=\"leadingMargin\" id=\"t7b-8h-WRI\"/>\n                            <constraint firstItem=\"kyX-nO-Lf1\" firstAttribute=\"leading\" secondItem=\"XpA-6B-Jfk\" secondAttribute=\"leading\" id=\"vXs-df-zYw\"/>\n                            <constraint firstItem=\"ULx-90-n0y\" firstAttribute=\"top\" secondItem=\"bqS-br-Qs5\" secondAttribute=\"bottom\" id=\"wfr-pu-TrS\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"bqS-br-Qs5\" secondAttribute=\"trailing\" id=\"xT0-Ul-JMb\"/>\n                        </constraints>\n                    </view>\n                    <connections>\n                        <outlet property=\"calendarView\" destination=\"LAY-EA-ORQ\" id=\"Ssk-YA-VAW\"/>\n                        <outlet property=\"monthLabel\" destination=\"d9e-9A-w1w\" id=\"SWm-hD-ca5\"/>\n                        <outlet property=\"theView\" destination=\"kyX-nO-Lf1\" id=\"dVR-hK-DgH\"/>\n                        <outlet property=\"viewHeightConstraint\" destination=\"6If-7S-7eU\" id=\"Xox-5J-Je6\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"836-AM-umk\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"2136.8000000000002\" y=\"1040.3298350824589\"/>\n        </scene>\n        <!--Item 2-->\n        <scene sceneID=\"MDA-4K-9en\">\n            <objects>\n                <viewController id=\"eae-HW-MRG\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"p2l-uL-c5j\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"9aO-Wa-gd5\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"VKx-z3-f3S\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <containerView opaque=\"NO\" contentMode=\"scaleToFill\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"M9X-If-dms\">\n                                <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                                <connections>\n                                    <segue destination=\"AVg-Nb-61y\" kind=\"embed\" id=\"Koe-cZ-02p\"/>\n                                </connections>\n                            </containerView>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                        <constraints>\n                            <constraint firstItem=\"M9X-If-dms\" firstAttribute=\"top\" secondItem=\"VKx-z3-f3S\" secondAttribute=\"top\" id=\"7nP-VD-LUJ\"/>\n                            <constraint firstItem=\"M9X-If-dms\" firstAttribute=\"leading\" secondItem=\"VKx-z3-f3S\" secondAttribute=\"leading\" id=\"WWg-do-jK4\"/>\n                            <constraint firstAttribute=\"bottom\" secondItem=\"M9X-If-dms\" secondAttribute=\"bottom\" id=\"puU-qd-ofe\"/>\n                            <constraint firstAttribute=\"trailing\" secondItem=\"M9X-If-dms\" secondAttribute=\"trailing\" id=\"zgm-Nu-nOX\"/>\n                        </constraints>\n                    </view>\n                    <tabBarItem key=\"tabBarItem\" title=\"Item 2\" id=\"d3m-FW-Ggh\"/>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"gdA-CW-1dw\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"1387\" y=\"1922\"/>\n        </scene>\n        <!--Item 1-->\n        <scene sceneID=\"DlA-DD-Si6\">\n            <objects>\n                <viewController id=\"KE1-nc-IVX\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"qZB-bL-IhW\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"qYy-dV-JLY\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"hDs-co-hYo\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                    </view>\n                    <tabBarItem key=\"tabBarItem\" title=\"Item 1\" id=\"n0h-3A-xvi\"/>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"GMT-7Q-uFA\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"3562.4000000000001\" y=\"1717.6911544227887\"/>\n        </scene>\n        <!--Tab Bar Controller-->\n        <scene sceneID=\"JRB-7D-eqT\">\n            <objects>\n                <tabBarController id=\"9Vk-ez-fic\" sceneMemberID=\"viewController\">\n                    <tabBar key=\"tabBar\" contentMode=\"scaleToFill\" insetsLayoutMarginsFromSafeArea=\"NO\" id=\"xrJ-AH-oyt\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"49\"/>\n                        <autoresizingMask key=\"autoresizingMask\"/>\n                        <color key=\"backgroundColor\" white=\"0.0\" alpha=\"0.0\" colorSpace=\"calibratedWhite\"/>\n                    </tabBar>\n                    <connections>\n                        <segue destination=\"KE1-nc-IVX\" kind=\"relationship\" relationship=\"viewControllers\" id=\"h2X-wU-2CX\"/>\n                        <segue destination=\"eae-HW-MRG\" kind=\"relationship\" relationship=\"viewControllers\" id=\"H9j-4V-cbg\"/>\n                    </connections>\n                </tabBarController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"r1J-my-52A\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"2137\" y=\"2022\"/>\n        </scene>\n        <!--Test Persian Calendar-->\n        <scene sceneID=\"nMz-cV-epT\">\n            <objects>\n                <viewController id=\"HlD-js-bve\" customClass=\"TestPersianCalendar\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\" sceneMemberID=\"viewController\">\n                    <layoutGuides>\n                        <viewControllerLayoutGuide type=\"top\" id=\"P1C-Or-tGY\"/>\n                        <viewControllerLayoutGuide type=\"bottom\" id=\"N8b-FH-Trs\"/>\n                    </layoutGuides>\n                    <view key=\"view\" contentMode=\"scaleToFill\" id=\"s7Y-6m-fMo\">\n                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"414\" height=\"896\"/>\n                        <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n                        <subviews>\n                            <collectionView clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"scaleToFill\" semanticContentAttribute=\"forceRightToLeft\" pagingEnabled=\"YES\" showsHorizontalScrollIndicator=\"NO\" showsVerticalScrollIndicator=\"NO\" dataMode=\"prototypes\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"tGp-5A-HoB\" customClass=\"JTACMonthView\" customModule=\"JTAppleCalendar\">\n                                <rect key=\"frame\" x=\"20\" y=\"92\" width=\"374\" height=\"350\"/>\n                                <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                                <constraints>\n                                    <constraint firstAttribute=\"height\" constant=\"350\" id=\"huH-du-iDR\"/>\n                                </constraints>\n                                <collectionViewFlowLayout key=\"collectionViewLayout\" scrollDirection=\"horizontal\" minimumLineSpacing=\"10\" minimumInteritemSpacing=\"10\" id=\"EGp-cx-e6n\">\n                                    <size key=\"itemSize\" width=\"128\" height=\"100\"/>\n                                    <size key=\"headerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                    <size key=\"footerReferenceSize\" width=\"0.0\" height=\"0.0\"/>\n                                    <inset key=\"sectionInset\" minX=\"0.0\" minY=\"0.0\" maxX=\"0.0\" maxY=\"0.0\"/>\n                                </collectionViewFlowLayout>\n                                <cells>\n                                    <collectionViewCell opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" reuseIdentifier=\"mainInfo_CalenderCell\" id=\"9IX-La-ckj\" customClass=\"CellView\" customModule=\"SampleJTAppleCalendar\" customModuleProvider=\"target\">\n                                        <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"128\" height=\"100\"/>\n                                        <autoresizingMask key=\"autoresizingMask\" flexibleMaxX=\"YES\" flexibleMaxY=\"YES\"/>\n                                        <view key=\"contentView\" opaque=\"NO\" clipsSubviews=\"YES\" multipleTouchEnabled=\"YES\" contentMode=\"center\" insetsLayoutMarginsFromSafeArea=\"NO\">\n                                            <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"128\" height=\"100\"/>\n                                            <autoresizingMask key=\"autoresizingMask\"/>\n                                            <subviews>\n                                                <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"Label\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"k2k-jO-xlv\">\n                                                    <rect key=\"frame\" x=\"43\" y=\"39.5\" width=\"42\" height=\"21\"/>\n                                                    <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n                                                    <nil key=\"textColor\"/>\n                                                    <nil key=\"highlightedColor\"/>\n                                                </label>\n                                            </subviews>\n                                        </view>\n                                        <constraints>\n                                            <constraint firstItem=\"k2k-jO-xlv\" firstAttribute=\"centerY\" secondItem=\"9IX-La-ckj\" secondAttribute=\"centerY\" id=\"isD-9c-nAN\"/>\n                                            <constraint firstItem=\"k2k-jO-xlv\" firstAttribute=\"centerX\" secondItem=\"9IX-La-ckj\" secondAttribute=\"centerX\" id=\"mYQ-bh-RXI\"/>\n                                        </constraints>\n                                        <connections>\n                                            <outlet property=\"dayLabel\" destination=\"k2k-jO-xlv\" id=\"RAJ-UZ-3JV\"/>\n                                        </connections>\n                                    </collectionViewCell>\n                                </cells>\n                                <connections>\n                                    <outlet property=\"ibCalendarDataSource\" destination=\"HlD-js-bve\" id=\"98l-dH-4se\"/>\n                                    <outlet property=\"ibCalendarDelegate\" destination=\"HlD-js-bve\" id=\"IGp-Sa-4BZ\"/>\n                                </connections>\n                            </collectionView>\n                        </subviews>\n                        <color key=\"backgroundColor\" white=\"1\" alpha=\"1\" colorSpace=\"calibratedWhite\"/>\n                        <constraints>\n                            <constraint firstItem=\"tGp-5A-HoB\" firstAttribute=\"top\" secondItem=\"P1C-Or-tGY\" secondAttribute=\"bottom\" id=\"F51-lE-bRJ\"/>\n                            <constraint firstAttribute=\"trailingMargin\" secondItem=\"tGp-5A-HoB\" secondAttribute=\"trailing\" id=\"buR-IC-oMu\"/>\n                            <constraint firstItem=\"tGp-5A-HoB\" firstAttribute=\"leading\" secondItem=\"s7Y-6m-fMo\" secondAttribute=\"leadingMargin\" id=\"uEQ-dC-VXJ\"/>\n                        </constraints>\n                    </view>\n                    <connections>\n                        <outlet property=\"calendarView\" destination=\"tGp-5A-HoB\" id=\"hBk-VA-kt3\"/>\n                    </connections>\n                </viewController>\n                <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"Nrl-O7-pxw\" userLabel=\"First Responder\" sceneMemberID=\"firstResponder\"/>\n            </objects>\n            <point key=\"canvasLocation\" x=\"3156\" y=\"588\"/>\n        </scene>\n    </scenes>\n    <inferredMetricsTieBreakers>\n        <segue reference=\"h9Y-WS-r0J\"/>\n    </inferredMetricsTieBreakers>\n</document>\n"
  },
  {
    "path": "SampleJTAppleCalendar/SceneDelegate.swift",
    "content": "//\n//  SceneDelegate.swift\n//  SampleJTAppleCalendar\n//\n//  Created by Jeron Thomas on 2019-06-25.\n//  Copyright © 2019 OsTech. All rights reserved.\n//\n\nimport UIKit\n\nclass SceneDelegate: UIResponder, UIWindowSceneDelegate {\n\n    var window: UIWindow?\n\n\n    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {\n        // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.\n        // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.\n        // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).\n        guard let _ = (scene as? UIWindowScene) else { return }\n    }\n\n    func sceneDidDisconnect(_ scene: UIScene) {\n        // Called as the scene is being released by the system.\n        // This occurs shortly after the scene enters the background, or when its session is discarded.\n        // Release any resources associated with this scene that can be re-created the next time the scene connects.\n        // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead).\n    }\n\n    func sceneDidBecomeActive(_ scene: UIScene) {\n        // Called when the scene has moved from an inactive state to an active state.\n        // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.\n    }\n\n    func sceneWillResignActive(_ scene: UIScene) {\n        // Called when the scene will move from an active state to an inactive state.\n        // This may occur due to temporary interruptions (ex. an incoming phone call).\n    }\n\n    func sceneWillEnterForeground(_ scene: UIScene) {\n        // Called as the scene transitions from the background to the foreground.\n        // Use this method to undo the changes made on entering the background.\n    }\n\n    func sceneDidEnterBackground(_ scene: UIScene) {\n        // Called as the scene transitions from the foreground to the background.\n        // Use this method to save data, release shared resources, and store enough scene-specific state information\n        // to restore the scene back to its current state.\n    }\n\n\n}\n\n"
  },
  {
    "path": "SampleJTAppleCalendar.xcodeproj/project.pbxproj",
    "content": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 52;\n\tobjects = {\n\n/* Begin PBXBuildFile section */\n\t\t6B4E465422C202DD00D0F78E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E465322C202DD00D0F78E /* AppDelegate.swift */; };\n\t\t6B4E465622C202DD00D0F78E /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E465522C202DD00D0F78E /* SceneDelegate.swift */; };\n\t\t6B4E465D22C202DF00D0F78E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6B4E465C22C202DF00D0F78E /* Assets.xcassets */; };\n\t\t6B4E466022C202DF00D0F78E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6B4E465E22C202DF00D0F78E /* LaunchScreen.storyboard */; };\n\t\t6B4E468822C2150100D0F78E /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E468222C2150100D0F78E /* ViewController.swift */; };\n\t\t6B4E468922C2150100D0F78E /* TestRangeSelectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E468322C2150100D0F78E /* TestRangeSelectionViewController.swift */; };\n\t\t6B4E468A22C2150100D0F78E /* TestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E468422C2150100D0F78E /* TestViewController.swift */; };\n\t\t6B4E468B22C2150100D0F78E /* TestOrientationChanges.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E468522C2150100D0F78E /* TestOrientationChanges.swift */; };\n\t\t6B4E468C22C2150100D0F78E /* TestYearViewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E468622C2150100D0F78E /* TestYearViewViewController.swift */; };\n\t\t6B4E468D22C2150100D0F78E /* TestPersianCalendar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E468722C2150100D0F78E /* TestPersianCalendar.swift */; };\n\t\t6B4E469422C2151500D0F78E /* CodeCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E469022C2151500D0F78E /* CodeCellView.swift */; };\n\t\t6B4E469522C2151500D0F78E /* CellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E469222C2151500D0F78E /* CellView.swift */; };\n\t\t6B4E469622C2151500D0F78E /* CellView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6B4E469322C2151500D0F78E /* CellView.xib */; };\n\t\t6B4E46A022C2151E00D0F78E /* CodeWhiteSectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E469922C2151E00D0F78E /* CodeWhiteSectionHeaderView.swift */; };\n\t\t6B4E46A122C2151E00D0F78E /* CodePinkSectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E469A22C2151E00D0F78E /* CodePinkSectionHeaderView.swift */; };\n\t\t6B4E46A222C2151E00D0F78E /* WhiteSectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E469C22C2151E00D0F78E /* WhiteSectionHeaderView.swift */; };\n\t\t6B4E46A322C2151E00D0F78E /* PinkSectionHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6B4E469D22C2151E00D0F78E /* PinkSectionHeaderView.xib */; };\n\t\t6B4E46A422C2151E00D0F78E /* PinkSectionHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6B4E469E22C2151E00D0F78E /* PinkSectionHeaderView.swift */; };\n\t\t6B4E46A522C2151E00D0F78E /* WhiteSectionHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6B4E469F22C2151E00D0F78E /* WhiteSectionHeaderView.xib */; };\n\t\t6B4E46E622C2174C00D0F78E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6B4E46E522C2174C00D0F78E /* Main.storyboard */; };\n\t\t6BBDD4DF22E3E7FF001BE4E0 /* JTAppleCalendar in Frameworks */ = {isa = PBXBuildFile; productRef = 6BBDD4DE22E3E7FF001BE4E0 /* JTAppleCalendar */; };\n\t\t6BE6BE5C23807BA600148D6E /* SampleJTAppleCalendarUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BE6BE5B23807BA600148D6E /* SampleJTAppleCalendarUITests.swift */; };\n/* End PBXBuildFile section */\n\n/* Begin PBXContainerItemProxy section */\n\t\t6BE6BE5E23807BA600148D6E /* PBXContainerItemProxy */ = {\n\t\t\tisa = PBXContainerItemProxy;\n\t\t\tcontainerPortal = 6B4E464822C202DD00D0F78E /* Project object */;\n\t\t\tproxyType = 1;\n\t\t\tremoteGlobalIDString = 6B4E464F22C202DD00D0F78E;\n\t\t\tremoteInfo = SampleJTAppleCalendar;\n\t\t};\n/* End PBXContainerItemProxy section */\n\n/* Begin PBXFileReference section */\n\t\t6B4E465022C202DD00D0F78E /* SampleJTAppleCalendar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SampleJTAppleCalendar.app; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t6B4E465322C202DD00D0F78E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = \"<group>\"; };\n\t\t6B4E465522C202DD00D0F78E /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = \"<group>\"; };\n\t\t6B4E465C22C202DF00D0F78E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = \"<group>\"; };\n\t\t6B4E465F22C202DF00D0F78E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = \"<group>\"; };\n\t\t6B4E466122C202DF00D0F78E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n\t\t6B4E466722C202FB00D0F78E /* JTAppleCalendar */ = {isa = PBXFileReference; lastKnownFileType = folder; name = JTAppleCalendar; path = ../JTAppleCalendar; sourceTree = \"<group>\"; };\n\t\t6B4E468222C2150100D0F78E /* ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = \"<group>\"; };\n\t\t6B4E468322C2150100D0F78E /* TestRangeSelectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestRangeSelectionViewController.swift; sourceTree = \"<group>\"; };\n\t\t6B4E468422C2150100D0F78E /* TestViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestViewController.swift; sourceTree = \"<group>\"; };\n\t\t6B4E468522C2150100D0F78E /* TestOrientationChanges.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestOrientationChanges.swift; sourceTree = \"<group>\"; };\n\t\t6B4E468622C2150100D0F78E /* TestYearViewViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestYearViewViewController.swift; sourceTree = \"<group>\"; };\n\t\t6B4E468722C2150100D0F78E /* TestPersianCalendar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestPersianCalendar.swift; sourceTree = \"<group>\"; };\n\t\t6B4E469022C2151500D0F78E /* CodeCellView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CodeCellView.swift; sourceTree = \"<group>\"; };\n\t\t6B4E469222C2151500D0F78E /* CellView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CellView.swift; sourceTree = \"<group>\"; };\n\t\t6B4E469322C2151500D0F78E /* CellView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CellView.xib; sourceTree = \"<group>\"; };\n\t\t6B4E469922C2151E00D0F78E /* CodeWhiteSectionHeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CodeWhiteSectionHeaderView.swift; sourceTree = \"<group>\"; };\n\t\t6B4E469A22C2151E00D0F78E /* CodePinkSectionHeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CodePinkSectionHeaderView.swift; sourceTree = \"<group>\"; };\n\t\t6B4E469C22C2151E00D0F78E /* WhiteSectionHeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WhiteSectionHeaderView.swift; sourceTree = \"<group>\"; };\n\t\t6B4E469D22C2151E00D0F78E /* PinkSectionHeaderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PinkSectionHeaderView.xib; sourceTree = \"<group>\"; };\n\t\t6B4E469E22C2151E00D0F78E /* PinkSectionHeaderView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PinkSectionHeaderView.swift; sourceTree = \"<group>\"; };\n\t\t6B4E469F22C2151E00D0F78E /* WhiteSectionHeaderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WhiteSectionHeaderView.xib; sourceTree = \"<group>\"; };\n\t\t6B4E46E522C2174C00D0F78E /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = \"<group>\"; };\n\t\t6BE6BE5923807BA600148D6E /* SampleJTAppleCalendarUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SampleJTAppleCalendarUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };\n\t\t6BE6BE5B23807BA600148D6E /* SampleJTAppleCalendarUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleJTAppleCalendarUITests.swift; sourceTree = \"<group>\"; };\n\t\t6BE6BE5D23807BA600148D6E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = \"<group>\"; };\n/* End PBXFileReference section */\n\n/* Begin PBXFrameworksBuildPhase section */\n\t\t6B4E464D22C202DD00D0F78E /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t6BBDD4DF22E3E7FF001BE4E0 /* JTAppleCalendar in Frameworks */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t6BE6BE5623807BA600148D6E /* Frameworks */ = {\n\t\t\tisa = PBXFrameworksBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXFrameworksBuildPhase section */\n\n/* Begin PBXGroup section */\n\t\t6B4E464722C202DD00D0F78E = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6B4E466722C202FB00D0F78E /* JTAppleCalendar */,\n\t\t\t\t6B4E465222C202DD00D0F78E /* SampleJTAppleCalendar */,\n\t\t\t\t6BE6BE5A23807BA600148D6E /* SampleJTAppleCalendarUITests */,\n\t\t\t\t6B4E465122C202DD00D0F78E /* Products */,\n\t\t\t\t6B4E466822C2032B00D0F78E /* Frameworks */,\n\t\t\t);\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6B4E465122C202DD00D0F78E /* Products */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6B4E465022C202DD00D0F78E /* SampleJTAppleCalendar.app */,\n\t\t\t\t6BE6BE5923807BA600148D6E /* SampleJTAppleCalendarUITests.xctest */,\n\t\t\t);\n\t\t\tname = Products;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6B4E465222C202DD00D0F78E /* SampleJTAppleCalendar */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6B4E46E522C2174C00D0F78E /* Main.storyboard */,\n\t\t\t\t6B4E468122C2150100D0F78E /* Example Calendars */,\n\t\t\t\t6B4E468E22C2151500D0F78E /* ExampleDateCells */,\n\t\t\t\t6B4E469722C2151E00D0F78E /* ExampleSectionHeaders */,\n\t\t\t\t6B4E465322C202DD00D0F78E /* AppDelegate.swift */,\n\t\t\t\t6B4E465522C202DD00D0F78E /* SceneDelegate.swift */,\n\t\t\t\t6B4E465C22C202DF00D0F78E /* Assets.xcassets */,\n\t\t\t\t6B4E465E22C202DF00D0F78E /* LaunchScreen.storyboard */,\n\t\t\t\t6B4E466122C202DF00D0F78E /* Info.plist */,\n\t\t\t);\n\t\t\tpath = SampleJTAppleCalendar;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6B4E466822C2032B00D0F78E /* Frameworks */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t);\n\t\t\tname = Frameworks;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6B4E468122C2150100D0F78E /* Example Calendars */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6B4E468222C2150100D0F78E /* ViewController.swift */,\n\t\t\t\t6B4E468322C2150100D0F78E /* TestRangeSelectionViewController.swift */,\n\t\t\t\t6B4E468422C2150100D0F78E /* TestViewController.swift */,\n\t\t\t\t6B4E468522C2150100D0F78E /* TestOrientationChanges.swift */,\n\t\t\t\t6B4E468622C2150100D0F78E /* TestYearViewViewController.swift */,\n\t\t\t\t6B4E468722C2150100D0F78E /* TestPersianCalendar.swift */,\n\t\t\t);\n\t\t\tpath = \"Example Calendars\";\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6B4E468E22C2151500D0F78E /* ExampleDateCells */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6B4E468F22C2151500D0F78E /* DateCellCreatedWithCode */,\n\t\t\t\t6B4E469122C2151500D0F78E /* DateCellCreatedWithXIB */,\n\t\t\t);\n\t\t\tpath = ExampleDateCells;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6B4E468F22C2151500D0F78E /* DateCellCreatedWithCode */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6B4E469022C2151500D0F78E /* CodeCellView.swift */,\n\t\t\t);\n\t\t\tpath = DateCellCreatedWithCode;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6B4E469122C2151500D0F78E /* DateCellCreatedWithXIB */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6B4E469222C2151500D0F78E /* CellView.swift */,\n\t\t\t\t6B4E469322C2151500D0F78E /* CellView.xib */,\n\t\t\t);\n\t\t\tpath = DateCellCreatedWithXIB;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6B4E469722C2151E00D0F78E /* ExampleSectionHeaders */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6B4E469822C2151E00D0F78E /* HeaderAsClass */,\n\t\t\t\t6B4E469B22C2151E00D0F78E /* HeaderAsXibs */,\n\t\t\t);\n\t\t\tpath = ExampleSectionHeaders;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6B4E469822C2151E00D0F78E /* HeaderAsClass */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6B4E469922C2151E00D0F78E /* CodeWhiteSectionHeaderView.swift */,\n\t\t\t\t6B4E469A22C2151E00D0F78E /* CodePinkSectionHeaderView.swift */,\n\t\t\t);\n\t\t\tpath = HeaderAsClass;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6B4E469B22C2151E00D0F78E /* HeaderAsXibs */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6B4E469C22C2151E00D0F78E /* WhiteSectionHeaderView.swift */,\n\t\t\t\t6B4E469D22C2151E00D0F78E /* PinkSectionHeaderView.xib */,\n\t\t\t\t6B4E469E22C2151E00D0F78E /* PinkSectionHeaderView.swift */,\n\t\t\t\t6B4E469F22C2151E00D0F78E /* WhiteSectionHeaderView.xib */,\n\t\t\t);\n\t\t\tpath = HeaderAsXibs;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n\t\t6BE6BE5A23807BA600148D6E /* SampleJTAppleCalendarUITests */ = {\n\t\t\tisa = PBXGroup;\n\t\t\tchildren = (\n\t\t\t\t6BE6BE5B23807BA600148D6E /* SampleJTAppleCalendarUITests.swift */,\n\t\t\t\t6BE6BE5D23807BA600148D6E /* Info.plist */,\n\t\t\t);\n\t\t\tpath = SampleJTAppleCalendarUITests;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXGroup section */\n\n/* Begin PBXNativeTarget section */\n\t\t6B4E464F22C202DD00D0F78E /* SampleJTAppleCalendar */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 6B4E466422C202DF00D0F78E /* Build configuration list for PBXNativeTarget \"SampleJTAppleCalendar\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t6B4E464C22C202DD00D0F78E /* Sources */,\n\t\t\t\t6B4E464D22C202DD00D0F78E /* Frameworks */,\n\t\t\t\t6B4E464E22C202DD00D0F78E /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t);\n\t\t\tname = SampleJTAppleCalendar;\n\t\t\tpackageProductDependencies = (\n\t\t\t\t6BBDD4DE22E3E7FF001BE4E0 /* JTAppleCalendar */,\n\t\t\t);\n\t\t\tproductName = SampleJTAppleCalendar;\n\t\t\tproductReference = 6B4E465022C202DD00D0F78E /* SampleJTAppleCalendar.app */;\n\t\t\tproductType = \"com.apple.product-type.application\";\n\t\t};\n\t\t6BE6BE5823807BA600148D6E /* SampleJTAppleCalendarUITests */ = {\n\t\t\tisa = PBXNativeTarget;\n\t\t\tbuildConfigurationList = 6BE6BE6223807BA600148D6E /* Build configuration list for PBXNativeTarget \"SampleJTAppleCalendarUITests\" */;\n\t\t\tbuildPhases = (\n\t\t\t\t6BE6BE5523807BA600148D6E /* Sources */,\n\t\t\t\t6BE6BE5623807BA600148D6E /* Frameworks */,\n\t\t\t\t6BE6BE5723807BA600148D6E /* Resources */,\n\t\t\t);\n\t\t\tbuildRules = (\n\t\t\t);\n\t\t\tdependencies = (\n\t\t\t\t6BE6BE5F23807BA600148D6E /* PBXTargetDependency */,\n\t\t\t);\n\t\t\tname = SampleJTAppleCalendarUITests;\n\t\t\tproductName = SampleJTAppleCalendarUITests;\n\t\t\tproductReference = 6BE6BE5923807BA600148D6E /* SampleJTAppleCalendarUITests.xctest */;\n\t\t\tproductType = \"com.apple.product-type.bundle.ui-testing\";\n\t\t};\n/* End PBXNativeTarget section */\n\n/* Begin PBXProject section */\n\t\t6B4E464822C202DD00D0F78E /* Project object */ = {\n\t\t\tisa = PBXProject;\n\t\t\tattributes = {\n\t\t\t\tLastSwiftUpdateCheck = 1110;\n\t\t\t\tLastUpgradeCheck = 1100;\n\t\t\t\tORGANIZATIONNAME = OsTech;\n\t\t\t\tTargetAttributes = {\n\t\t\t\t\t6B4E464F22C202DD00D0F78E = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 11.0;\n\t\t\t\t\t};\n\t\t\t\t\t6BE6BE5823807BA600148D6E = {\n\t\t\t\t\t\tCreatedOnToolsVersion = 11.1;\n\t\t\t\t\t\tTestTargetID = 6B4E464F22C202DD00D0F78E;\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t\tbuildConfigurationList = 6B4E464B22C202DD00D0F78E /* Build configuration list for PBXProject \"SampleJTAppleCalendar\" */;\n\t\t\tcompatibilityVersion = \"Xcode 9.3\";\n\t\t\tdevelopmentRegion = en;\n\t\t\thasScannedForEncodings = 0;\n\t\t\tknownRegions = (\n\t\t\t\ten,\n\t\t\t\tBase,\n\t\t\t);\n\t\t\tmainGroup = 6B4E464722C202DD00D0F78E;\n\t\t\tpackageReferences = (\n\t\t\t\t6BBDD4DD22E3E7FF001BE4E0 /* XCRemoteSwiftPackageReference \"JTAppleCalendar\" */,\n\t\t\t);\n\t\t\tproductRefGroup = 6B4E465122C202DD00D0F78E /* Products */;\n\t\t\tprojectDirPath = \"\";\n\t\t\tprojectRoot = \"\";\n\t\t\ttargets = (\n\t\t\t\t6B4E464F22C202DD00D0F78E /* SampleJTAppleCalendar */,\n\t\t\t\t6BE6BE5823807BA600148D6E /* SampleJTAppleCalendarUITests */,\n\t\t\t);\n\t\t};\n/* End PBXProject section */\n\n/* Begin PBXResourcesBuildPhase section */\n\t\t6B4E464E22C202DD00D0F78E /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t6B4E46E622C2174C00D0F78E /* Main.storyboard in Resources */,\n\t\t\t\t6B4E469622C2151500D0F78E /* CellView.xib in Resources */,\n\t\t\t\t6B4E46A522C2151E00D0F78E /* WhiteSectionHeaderView.xib in Resources */,\n\t\t\t\t6B4E466022C202DF00D0F78E /* LaunchScreen.storyboard in Resources */,\n\t\t\t\t6B4E465D22C202DF00D0F78E /* Assets.xcassets in Resources */,\n\t\t\t\t6B4E46A322C2151E00D0F78E /* PinkSectionHeaderView.xib in Resources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t6BE6BE5723807BA600148D6E /* Resources */ = {\n\t\t\tisa = PBXResourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXResourcesBuildPhase section */\n\n/* Begin PBXSourcesBuildPhase section */\n\t\t6B4E464C22C202DD00D0F78E /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t6B4E469422C2151500D0F78E /* CodeCellView.swift in Sources */,\n\t\t\t\t6B4E46A222C2151E00D0F78E /* WhiteSectionHeaderView.swift in Sources */,\n\t\t\t\t6B4E468D22C2150100D0F78E /* TestPersianCalendar.swift in Sources */,\n\t\t\t\t6B4E468B22C2150100D0F78E /* TestOrientationChanges.swift in Sources */,\n\t\t\t\t6B4E468C22C2150100D0F78E /* TestYearViewViewController.swift in Sources */,\n\t\t\t\t6B4E46A422C2151E00D0F78E /* PinkSectionHeaderView.swift in Sources */,\n\t\t\t\t6B4E468A22C2150100D0F78E /* TestViewController.swift in Sources */,\n\t\t\t\t6B4E468822C2150100D0F78E /* ViewController.swift in Sources */,\n\t\t\t\t6B4E46A022C2151E00D0F78E /* CodeWhiteSectionHeaderView.swift in Sources */,\n\t\t\t\t6B4E469522C2151500D0F78E /* CellView.swift in Sources */,\n\t\t\t\t6B4E46A122C2151E00D0F78E /* CodePinkSectionHeaderView.swift in Sources */,\n\t\t\t\t6B4E465422C202DD00D0F78E /* AppDelegate.swift in Sources */,\n\t\t\t\t6B4E465622C202DD00D0F78E /* SceneDelegate.swift in Sources */,\n\t\t\t\t6B4E468922C2150100D0F78E /* TestRangeSelectionViewController.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n\t\t6BE6BE5523807BA600148D6E /* Sources */ = {\n\t\t\tisa = PBXSourcesBuildPhase;\n\t\t\tbuildActionMask = 2147483647;\n\t\t\tfiles = (\n\t\t\t\t6BE6BE5C23807BA600148D6E /* SampleJTAppleCalendarUITests.swift in Sources */,\n\t\t\t);\n\t\t\trunOnlyForDeploymentPostprocessing = 0;\n\t\t};\n/* End PBXSourcesBuildPhase section */\n\n/* Begin PBXTargetDependency section */\n\t\t6BE6BE5F23807BA600148D6E /* PBXTargetDependency */ = {\n\t\t\tisa = PBXTargetDependency;\n\t\t\ttarget = 6B4E464F22C202DD00D0F78E /* SampleJTAppleCalendar */;\n\t\t\ttargetProxy = 6BE6BE5E23807BA600148D6E /* PBXContainerItemProxy */;\n\t\t};\n/* End PBXTargetDependency section */\n\n/* Begin PBXVariantGroup section */\n\t\t6B4E465E22C202DF00D0F78E /* LaunchScreen.storyboard */ = {\n\t\t\tisa = PBXVariantGroup;\n\t\t\tchildren = (\n\t\t\t\t6B4E465F22C202DF00D0F78E /* Base */,\n\t\t\t);\n\t\t\tname = LaunchScreen.storyboard;\n\t\t\tsourceTree = \"<group>\";\n\t\t};\n/* End PBXVariantGroup section */\n\n/* Begin XCBuildConfiguration section */\n\t\t6B4E466222C202DF00D0F78E /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = dwarf;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tENABLE_TESTABILITY = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_DYNAMIC_NO_PIC = NO;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_OPTIMIZATION_LEVEL = 0;\n\t\t\t\tGCC_PREPROCESSOR_DEFINITIONS = (\n\t\t\t\t\t\"DEBUG=1\",\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t);\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 13.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tONLY_ACTIVE_ARCH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-Onone\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t6B4E466322C202DF00D0F78E /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tALWAYS_SEARCH_USER_PATHS = NO;\n\t\t\t\tCLANG_ANALYZER_NONNULL = YES;\n\t\t\t\tCLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;\n\t\t\t\tCLANG_CXX_LANGUAGE_STANDARD = \"gnu++14\";\n\t\t\t\tCLANG_CXX_LIBRARY = \"libc++\";\n\t\t\t\tCLANG_ENABLE_MODULES = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_ARC = YES;\n\t\t\t\tCLANG_ENABLE_OBJC_WEAK = YES;\n\t\t\t\tCLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;\n\t\t\t\tCLANG_WARN_BOOL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_COMMA = YES;\n\t\t\t\tCLANG_WARN_CONSTANT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;\n\t\t\t\tCLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;\n\t\t\t\tCLANG_WARN_DOCUMENTATION_COMMENTS = YES;\n\t\t\t\tCLANG_WARN_EMPTY_BODY = YES;\n\t\t\t\tCLANG_WARN_ENUM_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_INFINITE_RECURSION = YES;\n\t\t\t\tCLANG_WARN_INT_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;\n\t\t\t\tCLANG_WARN_OBJC_LITERAL_CONVERSION = YES;\n\t\t\t\tCLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;\n\t\t\t\tCLANG_WARN_RANGE_LOOP_ANALYSIS = YES;\n\t\t\t\tCLANG_WARN_STRICT_PROTOTYPES = YES;\n\t\t\t\tCLANG_WARN_SUSPICIOUS_MOVE = YES;\n\t\t\t\tCLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;\n\t\t\t\tCLANG_WARN_UNREACHABLE_CODE = YES;\n\t\t\t\tCLANG_WARN__DUPLICATE_METHOD_MATCH = YES;\n\t\t\t\tCOPY_PHASE_STRIP = NO;\n\t\t\t\tDEBUG_INFORMATION_FORMAT = \"dwarf-with-dsym\";\n\t\t\t\tENABLE_NS_ASSERTIONS = NO;\n\t\t\t\tENABLE_STRICT_OBJC_MSGSEND = YES;\n\t\t\t\tGCC_C_LANGUAGE_STANDARD = gnu11;\n\t\t\t\tGCC_NO_COMMON_BLOCKS = YES;\n\t\t\t\tGCC_WARN_64_TO_32_BIT_CONVERSION = YES;\n\t\t\t\tGCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;\n\t\t\t\tGCC_WARN_UNDECLARED_SELECTOR = YES;\n\t\t\t\tGCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;\n\t\t\t\tGCC_WARN_UNUSED_FUNCTION = YES;\n\t\t\t\tGCC_WARN_UNUSED_VARIABLE = YES;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 13.0;\n\t\t\t\tMTL_ENABLE_DEBUG_INFO = NO;\n\t\t\t\tMTL_FAST_MATH = YES;\n\t\t\t\tSDKROOT = iphoneos;\n\t\t\t\tSWIFT_COMPILATION_MODE = wholemodule;\n\t\t\t\tSWIFT_OPTIMIZATION_LEVEL = \"-O\";\n\t\t\t\tVALIDATE_PRODUCT = YES;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t6B4E466522C202DF00D0F78E /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = WE23L742P8;\n\t\t\t\tINFOPLIST_FILE = SampleJTAppleCalendar/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.Ostech.SampleJTAppleCalendar;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t6B4E466622C202DF00D0F78E /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = WE23L742P8;\n\t\t\t\tINFOPLIST_FILE = SampleJTAppleCalendar/Info.plist;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = com.Ostech.SampleJTAppleCalendar;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n\t\t6BE6BE6023807BA600148D6E /* Debug */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = WE23L742P8;\n\t\t\t\tINFOPLIST_FILE = SampleJTAppleCalendarUITests/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 13.1;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t\t\"@loader_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = NoneInc.SampleJTAppleCalendarUITests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tTEST_TARGET_NAME = SampleJTAppleCalendar;\n\t\t\t};\n\t\t\tname = Debug;\n\t\t};\n\t\t6BE6BE6123807BA600148D6E /* Release */ = {\n\t\t\tisa = XCBuildConfiguration;\n\t\t\tbuildSettings = {\n\t\t\t\tCODE_SIGN_STYLE = Automatic;\n\t\t\t\tDEVELOPMENT_TEAM = WE23L742P8;\n\t\t\t\tINFOPLIST_FILE = SampleJTAppleCalendarUITests/Info.plist;\n\t\t\t\tIPHONEOS_DEPLOYMENT_TARGET = 13.1;\n\t\t\t\tLD_RUNPATH_SEARCH_PATHS = (\n\t\t\t\t\t\"$(inherited)\",\n\t\t\t\t\t\"@executable_path/Frameworks\",\n\t\t\t\t\t\"@loader_path/Frameworks\",\n\t\t\t\t);\n\t\t\t\tPRODUCT_BUNDLE_IDENTIFIER = NoneInc.SampleJTAppleCalendarUITests;\n\t\t\t\tPRODUCT_NAME = \"$(TARGET_NAME)\";\n\t\t\t\tSWIFT_VERSION = 5.0;\n\t\t\t\tTARGETED_DEVICE_FAMILY = \"1,2\";\n\t\t\t\tTEST_TARGET_NAME = SampleJTAppleCalendar;\n\t\t\t};\n\t\t\tname = Release;\n\t\t};\n/* End XCBuildConfiguration section */\n\n/* Begin XCConfigurationList section */\n\t\t6B4E464B22C202DD00D0F78E /* Build configuration list for PBXProject \"SampleJTAppleCalendar\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t6B4E466222C202DF00D0F78E /* Debug */,\n\t\t\t\t6B4E466322C202DF00D0F78E /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t6B4E466422C202DF00D0F78E /* Build configuration list for PBXNativeTarget \"SampleJTAppleCalendar\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t6B4E466522C202DF00D0F78E /* Debug */,\n\t\t\t\t6B4E466622C202DF00D0F78E /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n\t\t6BE6BE6223807BA600148D6E /* Build configuration list for PBXNativeTarget \"SampleJTAppleCalendarUITests\" */ = {\n\t\t\tisa = XCConfigurationList;\n\t\t\tbuildConfigurations = (\n\t\t\t\t6BE6BE6023807BA600148D6E /* Debug */,\n\t\t\t\t6BE6BE6123807BA600148D6E /* Release */,\n\t\t\t);\n\t\t\tdefaultConfigurationIsVisible = 0;\n\t\t\tdefaultConfigurationName = Release;\n\t\t};\n/* End XCConfigurationList section */\n\n/* Begin XCRemoteSwiftPackageReference section */\n\t\t6BBDD4DD22E3E7FF001BE4E0 /* XCRemoteSwiftPackageReference \"JTAppleCalendar\" */ = {\n\t\t\tisa = XCRemoteSwiftPackageReference;\n\t\t\trepositoryURL = \"https://github.com/patchthecode/JTAppleCalendar\";\n\t\t\trequirement = {\n\t\t\t\tkind = upToNextMajorVersion;\n\t\t\t\tminimumVersion = 8.0.1;\n\t\t\t};\n\t\t};\n/* End XCRemoteSwiftPackageReference section */\n\n/* Begin XCSwiftPackageProductDependency section */\n\t\t6BBDD4DE22E3E7FF001BE4E0 /* JTAppleCalendar */ = {\n\t\t\tisa = XCSwiftPackageProductDependency;\n\t\t\tpackage = 6BBDD4DD22E3E7FF001BE4E0 /* XCRemoteSwiftPackageReference \"JTAppleCalendar\" */;\n\t\t\tproductName = JTAppleCalendar;\n\t\t};\n/* End XCSwiftPackageProductDependency section */\n\t};\n\trootObject = 6B4E464822C202DD00D0F78E /* Project object */;\n}\n"
  },
  {
    "path": "SampleJTAppleCalendar.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n   version = \"1.0\">\n   <FileRef\n      location = \"self:\">\n   </FileRef>\n</Workspace>\n"
  },
  {
    "path": "SampleJTAppleCalendar.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>IDEDidComputeMac32BitWarning</key>\n\t<true/>\n</dict>\n</plist>\n"
  },
  {
    "path": "SampleJTAppleCalendar.xcodeproj/xcshareddata/xcschemes/SampleJTAppleCalendar.xcscheme",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n   LastUpgradeVersion = \"1100\"\n   version = \"1.3\">\n   <BuildAction\n      parallelizeBuildables = \"YES\"\n      buildImplicitDependencies = \"YES\">\n      <BuildActionEntries>\n         <BuildActionEntry\n            buildForTesting = \"YES\"\n            buildForRunning = \"YES\"\n            buildForProfiling = \"YES\"\n            buildForArchiving = \"YES\"\n            buildForAnalyzing = \"YES\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"6B4E464F22C202DD00D0F78E\"\n               BuildableName = \"SampleJTAppleCalendar.app\"\n               BlueprintName = \"SampleJTAppleCalendar\"\n               ReferencedContainer = \"container:SampleJTAppleCalendar.xcodeproj\">\n            </BuildableReference>\n         </BuildActionEntry>\n      </BuildActionEntries>\n   </BuildAction>\n   <TestAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\">\n      <Testables>\n         <TestableReference\n            skipped = \"NO\">\n            <BuildableReference\n               BuildableIdentifier = \"primary\"\n               BlueprintIdentifier = \"6BE6BE5823807BA600148D6E\"\n               BuildableName = \"SampleJTAppleCalendarUITests.xctest\"\n               BlueprintName = \"SampleJTAppleCalendarUITests\"\n               ReferencedContainer = \"container:SampleJTAppleCalendar.xcodeproj\">\n            </BuildableReference>\n         </TestableReference>\n      </Testables>\n   </TestAction>\n   <LaunchAction\n      buildConfiguration = \"Debug\"\n      selectedDebuggerIdentifier = \"Xcode.DebuggerFoundation.Debugger.LLDB\"\n      selectedLauncherIdentifier = \"Xcode.DebuggerFoundation.Launcher.LLDB\"\n      launchStyle = \"0\"\n      useCustomWorkingDirectory = \"NO\"\n      ignoresPersistentStateOnLaunch = \"NO\"\n      debugDocumentVersioning = \"YES\"\n      debugServiceExtension = \"internal\"\n      allowLocationSimulation = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"6B4E464F22C202DD00D0F78E\"\n            BuildableName = \"SampleJTAppleCalendar.app\"\n            BlueprintName = \"SampleJTAppleCalendar\"\n            ReferencedContainer = \"container:SampleJTAppleCalendar.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </LaunchAction>\n   <ProfileAction\n      buildConfiguration = \"Release\"\n      shouldUseLaunchSchemeArgsEnv = \"YES\"\n      savedToolIdentifier = \"\"\n      useCustomWorkingDirectory = \"NO\"\n      debugDocumentVersioning = \"YES\">\n      <BuildableProductRunnable\n         runnableDebuggingMode = \"0\">\n         <BuildableReference\n            BuildableIdentifier = \"primary\"\n            BlueprintIdentifier = \"6B4E464F22C202DD00D0F78E\"\n            BuildableName = \"SampleJTAppleCalendar.app\"\n            BlueprintName = \"SampleJTAppleCalendar\"\n            ReferencedContainer = \"container:SampleJTAppleCalendar.xcodeproj\">\n         </BuildableReference>\n      </BuildableProductRunnable>\n   </ProfileAction>\n   <AnalyzeAction\n      buildConfiguration = \"Debug\">\n   </AnalyzeAction>\n   <ArchiveAction\n      buildConfiguration = \"Release\"\n      revealArchiveInOrganizer = \"YES\">\n   </ArchiveAction>\n</Scheme>\n"
  },
  {
    "path": "SampleJTAppleCalendarUITests/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>1</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "SampleJTAppleCalendarUITests/SampleJTAppleCalendarUITests.swift",
    "content": "//\n//  SampleJTAppleCalendarUITests.swift\n//  SampleJTAppleCalendarUITests\n//\n//  Created by Jeron Thomas on 2019-11-16.\n//  Copyright © 2019 OsTech. All rights reserved.\n//\n\nimport XCTest\n\nclass SampleJTAppleCalendarUITests: XCTestCase {\n\n    override func setUp() {\n        // Put setup code here. This method is called before the invocation of each test method in the class.\n\n        // In UI tests it is usually best to stop immediately when a failure occurs.\n        continueAfterFailure = false\n\n        // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.\n    }\n\n    override func tearDown() {\n        // Put teardown code here. This method is called after the invocation of each test method in the class.\n    }\n\n    func testExample() {\n        // UI tests must launch the application that they test.\n        let app = XCUIApplication()\n        app.launch()\n        print(\"\")\n        \n        \n\n        // Use recording to get started writing UI tests.\n        // Use XCTAssert and related functions to verify your tests produce the correct results.\n    }\n\n    func testLaunchPerformance() {\n        if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) {\n                        // This measures how long it takes to launch your application.\n            measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) {\n                XCUIApplication().launch()\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/CalendarEnums.swift",
    "content": "//\n//  CalendarEnums.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport UIKit\n\n/// Describes a scroll destination\npublic enum SegmentDestination {\n    /// next the destination is the following segment\n    case next\n    /// previous the destination is the previous segment\n    case previous\n    /// start the destination is the start segment\n    case start\n    /// end the destination is the end segment\n    case end\n}\n/// Describes the types of out-date cells to be generated.\npublic enum OutDateCellGeneration {\n    /// tillEndOfRow will generate dates till it reaches the end of a row.\n    /// endOfGrid will continue generating until it has filled a 6x7 grid.\n    /// Off-mode will generate no postdates\n    case tillEndOfRow, tillEndOfGrid, off\n}\n\n/// Describes the types of out-date cells to be generated.\npublic enum InDateCellGeneration {\n    /// forFirstMonthOnly will generate dates for the first month only\n    /// forAllMonths will generate dates for all months\n    /// off setting will generate no dates\n    case forFirstMonthOnly, forAllMonths, off\n}\n\n/// Describes the calendar reading direction\n/// Useful for regions that read text from right to left\npublic enum ReadingOrientation {\n    /// Reading orientation is from right to left\n    case rightToLeft\n    /// Reading orientation is from left to right\n    case leftToRight\n}\n\n/// Configures the behavior of the scrolling mode of the calendar\npublic enum ScrollingMode: Equatable {\n    /// stopAtEachCalendarFrame - non-continuous scrolling that will stop at each frame\n    case stopAtEachCalendarFrame\n    /// stopAtEachSection - non-continuous scrolling that will stop at each section\n    case stopAtEachSection\n    /// stopAtEach - non-continuous scrolling that will stop at each custom interval\n    case stopAtEach(customInterval: CGFloat)\n    /// nonStopToSection - continuous scrolling that will stop at a section\n    case nonStopToSection(withResistance: CGFloat)\n    /// nonStopToCell - continuous scrolling that will stop at a cell\n    case nonStopToCell(withResistance: CGFloat)\n    /// nonStopTo - continuous scrolling that will stop at acustom interval, do not use 0 as custom interval\n    case nonStopTo(customInterval: CGFloat, withResistance: CGFloat)\n    /// none - continuous scrolling that will eventually stop at a point\n    case none\n    \n    func pagingIsEnabled() -> Bool {\n        switch self {\n        case .stopAtEachCalendarFrame: return true\n        default: return false\n        }\n    }\n    \n    public static func ==(lhs: ScrollingMode, rhs: ScrollingMode) -> Bool {\n        switch (lhs, rhs) {\n        case (.none, .none),\n             (.stopAtEachCalendarFrame, .stopAtEachCalendarFrame),\n             (.stopAtEachSection, .stopAtEachSection): return true\n        case (let .stopAtEach(customInterval: v1), let .stopAtEach(customInterval: v2)): return v1 == v2\n        case (let .nonStopToSection(withResistance: v1), let .nonStopToSection(withResistance: v2)): return v1 == v2\n        case (let .nonStopToCell(withResistance: v1), let .nonStopToCell(withResistance: v2)): return v1 == v2\n        case (let .nonStopTo(customInterval: v1, withResistance: x1), let .nonStopTo(customInterval: v2, withResistance: x2)): return v1 == v2 && x1 == x2\n        default: return false\n        }\n    }\n}\n\n/// Describes which month owns the date\npublic enum DateOwner: Int {\n    /// Describes which month owns the date\n    case thisMonth = 0,\n        previousMonthWithinBoundary,\n        previousMonthOutsideBoundary,\n        followingMonthWithinBoundary,\n        followingMonthOutsideBoundary\n}\n/// Months of the year\npublic enum MonthsOfYear: Int, CaseIterable {\n    case jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec\n}\n\n/// Selection position of a range-selected date cell\npublic enum SelectionRangePosition: Int {\n    /// Selection position\n    case left = 1, middle, right, full, none\n}\n\n/// Between month segments, the range selection can either be visually disconnected or connected\npublic enum RangeSelectionMode {\n  case segmented, continuous\n}\n\n/// Signifies whether or not a selection was done programatically or by the user\npublic enum SelectionType: String {\n    /// Selection type\n    case programatic, userInitiated\n}\n\n/// Days of the week. By setting your calendar's first day of the week,\n/// you can change which day is the first for the week. Sunday is the default value.\npublic enum DaysOfWeek: Int, CaseIterable {\n    /// Days of the week.\n    case sunday = 1, monday, tuesday, wednesday, thursday, friday, saturday\n}\n\ninternal enum DelayedTaskType {\n    case scroll, general\n}\n\ninternal enum SelectionAction {\n    case didSelect, didDeselect\n}\n\ninternal enum ShouldSelectionAction {\n    case shouldSelect, shouldDeselect\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/CalendarStructs.swift",
    "content": "//\n//  CalendarStructs.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n\nimport UIKit\n\n/// Describes which month the cell belongs to\n/// - ThisMonth: Cell belongs to the current month\n/// - PreviousMonthWithinBoundary: Cell belongs to the previous month.\n/// Previous month is included in the date boundary you have set in your\n/// delegate - PreviousMonthOutsideBoundary: Cell belongs to the previous\n/// month. Previous month is not included in the date boundary you have set\n/// in your delegate - FollowingMonthWithinBoundary: Cell belongs to the\n/// following month. Following month is included in the date boundary you have\n/// set in your delegate - FollowingMonthOutsideBoundary: Cell belongs to the\n/// following month. Following month is not included in the date boundary you\n/// have set in your delegate You can use these cell states to configure how\n/// you want your date cells to look. Eg. you can have the colors belonging\n/// to the month be in color black, while the colors of previous months be in\n/// color gray.\npublic struct CellState {\n    /// returns true if a cell is selected\n    public let isSelected: Bool\n    /// returns the date as a string\n    public let text: String\n    /// returns the a description of which month owns the date\n    public let dateBelongsTo: DateOwner\n    /// returns the date\n    public let date: Date\n    /// returns the day\n    public let day: DaysOfWeek\n    /// returns the row in which the date cell appears visually\n    public let row: () -> Int\n    /// returns the column in which the date cell appears visually\n    public let column: () -> Int\n    /// returns the section the date cell belongs to\n    public let dateSection: () -> (range: (start: Date, end: Date), month: Int, rowCount: Int)\n    /// returns the position of a selection in the event you wish to do range selection\n    public let selectedPosition: () -> SelectionRangePosition\n    /// returns the cell.\n    /// Useful if you wish to display something at the cell's frame/position\n    public var cell: () -> JTACDayCell?\n    /// Shows if a cell's selection/deselection was done either programatically or by the user\n    /// This variable is guranteed to be non-nil inside of a didSelect/didDeselect function\n    public var selectionType: SelectionType? = nil\n}\n\n/// Defines the parameters which configures the calendar.\npublic struct ConfigurationParameters {\n    /// The start date boundary of your calendar\n    var startDate: Date\n    /// The end-date boundary of your calendar\n    var endDate: Date\n    /// Number of rows you want to calendar to display per date section\n    var numberOfRows: Int\n    /// Your calendar() Instance\n    var calendar: Calendar\n    /// Describes the types of in-date cells to be generated.\n    var generateInDates: InDateCellGeneration\n    /// Describes the types of out-date cells to be generated.\n    var generateOutDates: OutDateCellGeneration\n    /// Sets the first day of week\n    var firstDayOfWeek: DaysOfWeek\n    /// Determine if dates of a month should stay in its section \n    /// or if it can flow into another months section. This value is ignored\n    /// if your calendar has registered headers\n    var hasStrictBoundaries: Bool\n    \n    /// init-function\n    public init(startDate: Date,\n                endDate: Date,\n                numberOfRows: Int = 6,\n                calendar: Calendar = Calendar.current,\n                generateInDates: InDateCellGeneration = .forAllMonths,\n                generateOutDates: OutDateCellGeneration = .tillEndOfGrid,\n                firstDayOfWeek: DaysOfWeek? = nil,\n                hasStrictBoundaries: Bool? = nil) {\n        self.startDate = startDate\n        self.endDate = endDate\n\n        if numberOfRows > 0 && numberOfRows < 7 {\n            self.numberOfRows = numberOfRows\n        } else {\n            self.numberOfRows = 6\n        }\n\n        if let nonNilHasStrictBoundaries = hasStrictBoundaries {\n            self.hasStrictBoundaries = nonNilHasStrictBoundaries\n        } else {\n            self.hasStrictBoundaries = self.numberOfRows > 1 ? true : false\n        }\n        self.calendar = calendar\n        self.generateInDates = generateInDates\n        self.generateOutDates = generateOutDates\n        \n        if let firstDayOfWeek = firstDayOfWeek {\n            self.firstDayOfWeek = firstDayOfWeek\n        } else {\n            self.firstDayOfWeek = DaysOfWeek(rawValue: calendar.firstWeekday) ?? .sunday\n        }\n    }\n}\n\npublic struct MonthSize {\n    var defaultSize: CGFloat\n    var months: [CGFloat:[MonthsOfYear]]?\n    var dates: [CGFloat: [Date]]?\n    \n    public init(defaultSize: CGFloat, months: [CGFloat:[MonthsOfYear]]? = nil, dates: [CGFloat: [Date]]? = nil) {\n        self.defaultSize = defaultSize\n        self.months = months\n        self.dates = dates\n    }\n}\n\nstruct CalendarData {\n    var months: [Month]\n    var totalSections: Int\n    var sectionToMonthMap: [Int: Int]\n    var totalDays: Int\n}\n\n/// Defines a month structure.\npublic struct Month {\n    /// Index of the month\n    let index: Int\n    \n    /// Start index day for the month.\n    /// The start is total number of days of previous months\n    let startDayIndex: Int\n\n    /// Start cell index for the month.\n    /// The start is total number of cells of previous months\n    let startCellIndex: Int\n\n    /// The total number of items in this array are the total number\n    /// of sections. The actual number is the number of items in each section\n    let sections: [Int]\n\n    /// Number of inDates for this month\n    public let inDates: Int\n\n    /// Number of outDates for this month\n    public let outDates: Int\n\n    /// Maps a section to the index in the total number of sections\n    let sectionIndexMaps: [Int: Int]\n\n    /// Number of rows for the month\n    public let rows: Int\n    \n    /// Name of the month\n    public let name: MonthsOfYear\n\n    // Return the total number of days for the represented month\n    public let numberOfDaysInMonth: Int\n\n    // Return the total number of day cells\n    // to generate for the represented month\n    var numberOfDaysInMonthGrid: Int {\n        return numberOfDaysInMonth + inDates + outDates\n    }\n\n    var startSection: Int {\n        return sectionIndexMaps.keys.min()!\n    }\n    \n    // Return the section in which a day is contained\n    func indexPath(forDay number: Int) -> IndexPath? {\n        let sectionInfo = sectionFor(day: number)\n        let externalSection = sectionInfo.externalSection\n        let internalSection = sectionInfo.internalSection\n        let dateOfStartIndex = sections[0..<internalSection].reduce(0, +) - inDates + 1\n        let itemIndex = number - dateOfStartIndex\n\n        return IndexPath(item: itemIndex, section: externalSection)\n    }\n    \n    private func sectionFor(day: Int) -> (externalSection: Int, internalSection: Int) {\n        var variableNumber = day\n        let possibleSection = sections.firstIndex {\n            let retval = variableNumber + inDates <= $0\n            variableNumber -= $0\n            return retval\n            }!\n        return (sectionIndexMaps.key(for: possibleSection)!, possibleSection)\n    }\n\n    // Return the number of rows for a section in the month\n    func numberOfRows(for section: Int, developerSetRows: Int) -> Int {\n        var retval: Int\n        guard let theSection = sectionIndexMaps[section] else {\n            return 0\n        }\n        let fullRows = rows / developerSetRows\n        let partial = sections.count - fullRows\n\n        if theSection + 1 <= fullRows {\n            retval = developerSetRows\n        } else if fullRows == 0 && partial > 0 {\n            retval = rows\n        } else {\n            retval = 1\n        }\n        return retval\n    }\n\n    // Returns the maximum number of a rows for a completely full section\n    func maxNumberOfRowsForFull(developerSetRows: Int) -> Int {\n        var retval: Int\n        let fullRows = rows / developerSetRows\n        if fullRows < 1 {\n            retval = rows\n        } else {\n            retval = developerSetRows\n        }\n        return retval\n    }\n    \n    func boundaryIndicesFor(section: Int) -> (startIndex: Int, endIndex: Int)? {\n        // Check internal sections to see\n        if !(0..<sections.count ~=  section) {\n            return nil\n        }\n        let startIndex = section == 0 ? inDates : 0\n        var endIndex =  sections[section] - 1\n        if section + 1  == sections.count {\n            endIndex -= inDates + 1\n        }\n        return (startIndex: startIndex, endIndex: endIndex)\n    }\n}\n\nclass JTAppleDateConfigGenerator {\n    \n    static let shared =  JTAppleDateConfigGenerator()\n    private init() {}\n    \n    func setupMonthInfoDataForStartAndEndDate(_ parameters: ConfigurationParameters)\n        -> (months: [Month], monthMap: [Int: Int], totalSections: Int, totalDays: Int) {\n            let differenceComponents = parameters.calendar.dateComponents([.month], from: parameters.startDate, to: parameters.endDate)\n            let numberOfMonths = differenceComponents.month! + 1\n            // if we are for example on the same month\n            // and the difference is 0 we still need 1 to display it\n            var monthArray: [Month] = []\n            var monthIndexMap: [Int: Int] = [:]\n            var section = 0\n            var startIndexForMonth = 0\n            var startCellIndexForMonth = 0\n            var totalDays = 0\n            let numberOfRowsPerSectionThatUserWants = parameters.numberOfRows\n            // Section represents # of months. section is used as an offset\n            // to determine which month to calculate\n            \n            // Track the month name index\n            var monthNameIndex = parameters.calendar.component(.month, from: parameters.startDate) - 1\n            let allMonthsOfYear = MonthsOfYear.allCases\n            \n            for monthIndex in 0 ..< numberOfMonths {\n                if let currentMonthDate = parameters.calendar.date(byAdding: .month, value: monthIndex, to: parameters.startDate) {\n                    var numberOfDaysInMonthVariable = parameters.calendar.range(of: .day, in: .month, for: currentMonthDate)!.count\n                    let numberOfDaysInMonthFixed = numberOfDaysInMonthVariable\n                    var numberOfRowsToGenerateForCurrentMonth = 0\n                    var numberOfPreDatesForThisMonth = 0\n                    let predatesGeneration = parameters.generateInDates\n                    if predatesGeneration != .off {\n                        numberOfPreDatesForThisMonth = numberOfInDatesForMonth(currentMonthDate, firstDayOfWeek: parameters.firstDayOfWeek, calendar: parameters.calendar)\n                        numberOfDaysInMonthVariable += numberOfPreDatesForThisMonth\n                        if predatesGeneration == .forFirstMonthOnly && monthIndex != 0 {\n                            numberOfDaysInMonthVariable -= numberOfPreDatesForThisMonth\n                            numberOfPreDatesForThisMonth = 0\n                        }\n                    }\n                    \n                    if parameters.generateOutDates == .tillEndOfGrid {\n                        numberOfRowsToGenerateForCurrentMonth = maxNumberOfRowsPerMonth\n                    } else {\n                        let actualNumberOfRowsForThisMonth = Int(ceil(Float(numberOfDaysInMonthVariable) / Float(maxNumberOfDaysInWeek)))\n                        numberOfRowsToGenerateForCurrentMonth = actualNumberOfRowsForThisMonth\n                    }\n                    var numberOfPostDatesForThisMonth = 0\n                    let postGeneration = parameters.generateOutDates\n                    switch postGeneration {\n                    case .tillEndOfGrid, .tillEndOfRow:\n                        numberOfPostDatesForThisMonth =\n                            maxNumberOfDaysInWeek * numberOfRowsToGenerateForCurrentMonth - (numberOfDaysInMonthFixed + numberOfPreDatesForThisMonth)\n                        numberOfDaysInMonthVariable += numberOfPostDatesForThisMonth\n                    default:\n                        break\n                    }\n                    var sectionsForTheMonth: [Int] = []\n                    var sectionIndexMaps: [Int: Int] = [:]\n                    for index in 0..<6 {\n                        // Max number of sections in the month\n                        if numberOfDaysInMonthVariable < 1 {\n                            break\n                        }\n                        monthIndexMap[section] = monthIndex\n                        sectionIndexMaps[section] = index\n                        var numberOfDaysInCurrentSection = numberOfRowsPerSectionThatUserWants * maxNumberOfDaysInWeek\n                        if numberOfDaysInCurrentSection > numberOfDaysInMonthVariable {\n                            numberOfDaysInCurrentSection = numberOfDaysInMonthVariable\n                            // assert(false)\n                        }\n                        totalDays += numberOfDaysInCurrentSection\n                        sectionsForTheMonth.append(numberOfDaysInCurrentSection)\n                        numberOfDaysInMonthVariable -= numberOfDaysInCurrentSection\n                        section += 1\n                    }\n                    monthArray.append(Month(\n                        index: monthIndex,\n                        startDayIndex: startIndexForMonth,\n                        startCellIndex: startCellIndexForMonth,\n                        sections: sectionsForTheMonth,\n                        inDates: numberOfPreDatesForThisMonth,\n                        outDates: numberOfPostDatesForThisMonth,\n                        sectionIndexMaps: sectionIndexMaps,\n                        rows: numberOfRowsToGenerateForCurrentMonth,\n                        name: allMonthsOfYear[monthNameIndex],\n                        numberOfDaysInMonth: numberOfDaysInMonthFixed\n                    ))\n                    startIndexForMonth += numberOfDaysInMonthFixed\n                    startCellIndexForMonth += numberOfDaysInMonthFixed + numberOfPreDatesForThisMonth + numberOfPostDatesForThisMonth\n                    \n                    // Increment month name\n                    monthNameIndex += 1\n                    if monthNameIndex > 11 { monthNameIndex = 0 }\n                }\n            }\n            return (monthArray, monthIndexMap, section, totalDays)\n    }\n    \n    private func numberOfInDatesForMonth(_ date: Date, firstDayOfWeek: DaysOfWeek, calendar: Calendar) -> Int {\n        let firstDayCalValue: Int\n        switch firstDayOfWeek {\n        case .monday: firstDayCalValue = 6\n        case .tuesday: firstDayCalValue = 5\n        case .wednesday: firstDayCalValue = 4\n        case .thursday: firstDayCalValue = 10\n        case .friday: firstDayCalValue = 9\n        case .saturday: firstDayCalValue = 8\n        default: firstDayCalValue = 7\n        }\n        \n        var firstWeekdayOfMonthIndex = calendar.component(.weekday, from: date)\n        firstWeekdayOfMonthIndex -= 1\n        // firstWeekdayOfMonthIndex should be 0-Indexed\n        // push it modularly so that we take it back one day so that the\n        // first day is Monday instead of Sunday which is the default\n        return (firstWeekdayOfMonthIndex + firstDayCalValue) % maxNumberOfDaysInWeek\n    }\n}\n\n/// Contains the information for visible dates of the calendar.\npublic struct DateSegmentInfo {\n    /// Visible pre-dates\n    public let indates: [(date: Date, indexPath: IndexPath)]\n    /// Visible month-dates\n    public let monthDates: [(date: Date, indexPath: IndexPath)]\n    /// Visible post-dates\n    public let outdates: [(date: Date, indexPath: IndexPath)]\n}\n\nstruct SelectedCellData {\n    let indexPath: IndexPath\n    let date: Date\n    var counterIndexPath: IndexPath?\n    let cellState: CellState\n    \n    enum DateOwnerCategory {\n        case inDate, outDate, monthDate\n    }\n    \n    var dateBelongsTo: DateOwnerCategory {\n        switch cellState.dateBelongsTo {\n        case .thisMonth: return .monthDate\n        case .previousMonthOutsideBoundary, .previousMonthWithinBoundary: return .inDate\n        case .followingMonthWithinBoundary, .followingMonthOutsideBoundary: return .outDate\n        }\n    }\n    \n    init(indexPath: IndexPath, counterIndexPath: IndexPath? = nil, date: Date, cellState: CellState) {\n        self.indexPath        = indexPath\n        self.date             = date\n        self.cellState        = cellState\n        self.counterIndexPath = counterIndexPath\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/GlobalFunctionsAndExtensions.swift",
    "content": "//\n//  GlobalFunctionsAndExtensions.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\nextension Calendar {\n    static let formatter: DateFormatter = {\n        let dateFormatter = DateFormatter()\n        dateFormatter.dateFormat = \"yyyy MM dd\"\n        dateFormatter.isLenient = true\n        return dateFormatter\n    }()\n    \n\n    func startOfMonth(for date: Date) -> Date? {\n        guard let interval = self.dateInterval(of: .month, for: date) else { return nil }\n        return interval.start\n    }\n    \n    func endOfMonth(for date: Date) -> Date? {\n        guard let interval = self.dateInterval(of: .month, for: date) else { return nil }\n        return self.date(byAdding: DateComponents(day: -1), to: interval.end)\n    }\n    \n    private func dateFormatterComponents(from date: Date) -> (month: Int, year: Int)? {\n        \n        // Setup the dateformatter to this instance's settings\n        Calendar.formatter.timeZone = self.timeZone\n        Calendar.formatter.locale = self.locale\n        Calendar.formatter.calendar = self\n        \n        let comp = self.dateComponents([.year, .month], from: date)\n        \n        guard\n            let month = comp.month,\n            let year = comp.year else {\n                return nil\n        }\n        return (month, year)\n    }\n}\n\nextension Dictionary where Value: Equatable {\n    func key(for value: Value) -> Key? {\n        guard let index = firstIndex(where: { $0.1 == value }) else {\n            return nil\n        }\n        return self[index].0\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/Info.plist",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>$(DEVELOPMENT_LANGUAGE)</string>\n\t<key>CFBundleExecutable</key>\n\t<string>$(EXECUTABLE_NAME)</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>$(PRODUCT_NAME)</string>\n\t<key>CFBundlePackageType</key>\n\t<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleVersion</key>\n\t<string>$(CURRENT_PROJECT_VERSION)</string>\n</dict>\n</plist>\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACCollectionMonthViewDelegates.swift",
    "content": "//\n//  JTACCollectionViewDelegates.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport UIKit\n\nextension JTACMonthView: UICollectionViewDelegate, UICollectionViewDataSource {\n    /// Asks your data source object to provide a\n    /// supplementary view to display in the collection view.\n    public func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView {\n        guard\n            let validDate = monthInfoFromSection(indexPath.section),\n            let delegate = calendarDelegate else {\n                developerError(string: \"Either date could not be generated or delegate was nil\")\n                assert(false, \"Date could not be generated for section. This is a bug. Contact the developer\")\n                return UICollectionReusableView()\n        }\n        \n        let headerView = delegate.calendar(self, headerViewForDateRange: validDate.range, at: indexPath)\n        headerView.transform.a = semanticContentAttribute == .forceRightToLeft ? -1 : 1\n        return headerView\n    }\n    \n    public func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {\n        if !pathsToReload.contains(indexPath) { return }\n        pathsToReload.remove(indexPath)\n        let cellState: CellState\n        if let validCachedCellState = selectedCellData[indexPath]?.cellState {\n            cellState = validCachedCellState\n        } else {\n            cellState = cellStateFromIndexPath(indexPath)\n        }\n        calendarDelegate!.calendar(self, willDisplay: cell as! JTACDayCell, forItemAt: cellState.date, cellState: cellState, indexPath: indexPath)\n    }\n    \n    /// Tells the delegate that the item at the specified index path was highlighted.\n    public func collectionView(_ collectionView: UICollectionView, didHighlightItemAt indexPath: IndexPath) {\n        guard\n            let delegate = calendarDelegate,\n            let infoOfDate = dateOwnerInfoFromPath(indexPath) else {\n                return\n        }\n        let cell = collectionView.cellForItem(at: indexPath) as? JTACDayCell\n        let cellState = cellStateFromIndexPath(indexPath, withDateInfo: infoOfDate, selectionType: .userInitiated)\n        delegate.calendar(self, didHighlightDate: cellState.date, cell: cell, cellState: cellState, indexPath: indexPath)\n    }\n    \n    /// Tells the delegate that the item at the specified index path was unhighlighted.\n    public func collectionView(_ collectionView: UICollectionView, didUnhighlightItemAt indexPath: IndexPath) {\n        guard\n            let delegate = calendarDelegate,\n            let infoOfDate = dateOwnerInfoFromPath(indexPath) else {\n                return\n        }\n        let cell = collectionView.cellForItem(at: indexPath) as? JTACDayCell\n        let cellState = cellStateFromIndexPath(indexPath, withDateInfo: infoOfDate, selectionType: .userInitiated)\n        delegate.calendar(self, didUnhighlightDate: cellState.date, cell: cell, cellState: cellState, indexPath: indexPath)\n    }\n    \n    /// Asks your data source object for the cell that corresponds\n    /// to the specified item in the collection view.\n    public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {\n        guard let delegate = calendarDelegate else {\n            print(\"Your delegate does not conform to JTAppleCalendarMonthViewDelegate\")\n            assert(false)\n            return UICollectionViewCell()\n        }\n        let cellState = cellStateFromIndexPath(indexPath)\n        let configuredCell = delegate.calendar(self, cellForItemAt: cellState.date, cellState: cellState, indexPath: indexPath)\n        \n        pathsToReload.remove(indexPath)\n        configuredCell.transform.a = semanticContentAttribute == .forceRightToLeft ? -1 : 1\n        return configuredCell\n    }\n    \n    /// Asks your data sourceobject for the number of sections in\n    /// the collection view. The number of sections in collectionView.\n    public func numberOfSections(in collectionView: UICollectionView) -> Int {\n        return monthMap.count\n    }\n    \n    /// Asks your data source object for the number of items in the\n    /// specified section. The number of rows in section.\n    public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {\n        if calendarViewLayout.cellCache.isEmpty {return 0}\n        guard let count =  calendarViewLayout.cellCache[section]?.count else {\n            developerError(string: \"cellCacheSection does not exist.\")\n            return 0\n        }\n        return count\n    }\n    \n    /// Asks the delegate if the specified item should be selected.\n    /// true if the item should be selected or false if it should not.\n    public func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool {\n        return handleShouldSelectionValueChange(collectionView, action: .shouldSelect, indexPath: indexPath, selectionType: .userInitiated)\n    }\n    \n    /// Asks the delegate if the specified item should be deselected.\n    /// true if the item should be deselected or false if it should not.\n    public func collectionView(_ collectionView: UICollectionView, shouldDeselectItemAt indexPath: IndexPath) -> Bool {\n        return handleShouldSelectionValueChange(collectionView, action: .shouldDeselect, indexPath: indexPath, selectionType: .userInitiated)\n    }\n\n    /// Tells the delegate that the item at the specified index\n    /// path was selected. The collection view calls this method when the\n    /// user successfully selects an item in the collection view.\n    /// It does not call this method when you programmatically\n    /// set the selection.\n    public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {\n        handleSelectionValueChanged(collectionView, action: .didSelect, indexPath: indexPath, selectionType: .userInitiated)\n    }\n    \n    /// Tells the delegate that the item at the specified path was deselected.\n    /// The collection view calls this method when the user successfully\n    /// deselects an item in the collection view.\n    /// It does not call this method when you programmatically deselect items.\n    public func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) {\n        handleSelectionValueChanged(collectionView, action: .didDeselect, indexPath: indexPath, selectionType: .userInitiated)\n    }\n    \n    public func sizeOfDecorationView(indexPath: IndexPath) -> CGRect {\n        guard let size = calendarDelegate?.sizeOfDecorationView(indexPath: indexPath) else { return .zero }\n        return size\n    }\n    \n    func handleSelectionValueChanged(_ collectionView: UICollectionView, action: SelectionAction, indexPath: IndexPath, selectionType: SelectionType, shouldTriggerSelectionDelegate: Bool = true) {\n        guard\n            let delegate = calendarDelegate,\n            let infoOfDate = dateOwnerInfoFromPath(indexPath) else {\n                return\n        }\n        // index paths to be reloaded should be index to the left and right of the selected index\n        var localPathsToReload: Set<IndexPath> = allowsRangedSelection ? validForwardAndBackwordSelectedIndexes(forIndexPath: indexPath, restrictToSection: false).set : []\n        \n        let cell = collectionView.cellForItem(at: indexPath) as? JTACDayCell\n        if !shouldTriggerSelectionDelegate || cell == nil {\n            pathsToReload.insert(indexPath)\n            localPathsToReload.insert(indexPath)\n        }\n        \n        let isSelected = action == .didSelect ? true : false\n        \n        // If cell has a counterpart cell, then select it as well\n        let cellState = cellStateFromIndexPath(indexPath, withDateInfo: infoOfDate, cell: cell, isSelected: isSelected, selectionType: selectionType)\n        \n        // Update model\n        let cleanupAction: (IndexPath, Date, DateOwner) -> IndexPath?\n        \n        if action == .didSelect {\n            cleanupAction = selectCounterPartCellIndexPath\n            addCellToSelectedSet(indexPath, date: infoOfDate.date, cellState: cellState)\n        } else {\n            cleanupAction = deselectCounterPartCellIndexPath\n            deleteCellFromSelectedSetIfSelected(indexPath)\n        }\n        \n        // check if the paths to reload (forward&backward indexes) also have counterpart dates\n        if !localPathsToReload.isEmpty {\n            let reloadPaths = localPathsToReload\n            for path in reloadPaths {\n                if let validCounterPath = selectedCellData[path]?.counterIndexPath {\n                    localPathsToReload.insert(validCounterPath)\n                }\n            }\n        }\n        \n        if let counterPartIndexPath = cleanupAction(indexPath, infoOfDate.date, cellState.dateBelongsTo) {\n            localPathsToReload.insert(counterPartIndexPath)\n            let counterPathsToReload = allowsRangedSelection ? validForwardAndBackwordSelectedIndexes(forIndexPath: counterPartIndexPath, restrictToSection: false).set : []\n            localPathsToReload.formUnion(counterPathsToReload)\n        }\n        \n        setMinMaxDate()\n        \n        if shouldTriggerSelectionDelegate {\n            if action == .didSelect {\n                delegate.calendar(self, didSelectDate: infoOfDate.date, cell: cell, cellState: cellState, indexPath: indexPath)\n            } else {\n                delegate.calendar(self, didDeselectDate: infoOfDate.date, cell: cell, cellState: cellState, indexPath: indexPath)\n            }\n        }\n        \n        if !localPathsToReload.isEmpty {\n            batchReloadIndexPaths(Array(localPathsToReload))\n        }\n    }\n    \n    func setMinMaxDate() {\n        let selectedCellData = self.selectedCellData\n        let sortedKeys = selectedCellData.keys.sorted()\n        guard\n            let firstIndex = sortedKeys.first,\n            let lastIndex = sortedKeys.last else {\n                selectedCells.first = nil\n                selectedCells.last = nil\n                return\n        }\n        let date = selectedCellData[firstIndex]!.date\n        selectedCells.first = (date, firstIndex)\n        selectedCells.last = (date, lastIndex)\n    }\n    \n    func handleShouldSelectionValueChange(_ collectionView: UICollectionView, action: ShouldSelectionAction, indexPath: IndexPath, selectionType: SelectionType) -> Bool {\n        if let\n            delegate = calendarDelegate,\n            let infoOfDate = dateOwnerInfoFromPath(indexPath) {\n            let cell = collectionView.cellForItem(at: indexPath) as? JTACDayCell\n            let cellState = cellStateFromIndexPath(indexPath,\n                                                   withDateInfo: infoOfDate,\n                                                   selectionType: selectionType)\n            switch action {\n            case .shouldSelect:\n                return delegate.calendar(self, shouldSelectDate: infoOfDate.date, cell: cell, cellState: cellState, indexPath: indexPath)\n            case .shouldDeselect:\n                return delegate.calendar(self, shouldDeselectDate: infoOfDate.date, cell: cell, cellState: cellState, indexPath: indexPath)\n            }\n        }\n        return false\n    }\n    \n    public func indexPathForPreferredFocusedView(in collectionView: UICollectionView) -> IndexPath? {\n        if let delegate = calendarDelegate {\n            return delegate.indexPathForPreferredFocusedView(in: collectionView)\n        }\n        return nil\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACCollectionYearViewDelegates.swift",
    "content": "//\n//  JTACCollectionYearViewDelegates.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport UIKit\nimport Foundation\n\nextension JTACYearView: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {\n    public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {\n        return monthData.count\n    }\n    \n    public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {\n        guard\n            let delegate = calendarDelegate,\n            monthData.count > indexPath.item else {\n                print(\"Invalid startup parameters. Exiting calendar setup.\")\n                assert(false)\n                return UICollectionViewCell()\n        }\n        \n        if let monthData = monthData[indexPath.item] as? Month {\n            guard let date = configurationParameters.calendar.date(byAdding: .month, value: monthData.index, to: configurationParameters.startDate) else {\n                print(\"Invalid startup parameters. Exiting calendar setup.\")\n                assert(false)\n                return UICollectionViewCell()\n            }\n            \n            let cell = delegate.calendar(self, cellFor: self.monthData[indexPath.item], at: date, indexPath: indexPath)\n            cell.setupWith(configurationParameters: configurationParameters,\n                           month: monthData,\n                           delegate: self)\n            return cell\n        } else {\n            let date = findFirstMonthCellDate(cellIndex: indexPath.item, monthData: monthData)\n            return delegate.calendar(self, cellFor: self.monthData[indexPath.item], at: date, indexPath: indexPath)\n        }\n    }\n    \n    func findFirstMonthCellDate(cellIndex: Int, monthData: [Any]) -> Date {\n        var retval = configurationParameters.endDate\n        for index in cellIndex..<monthData.count {\n            if let aMonth = monthData[index] as? Month {\n                guard let date = configurationParameters.calendar.date(byAdding: .month, value: aMonth.index, to: configurationParameters.startDate) else {\n                    print(\"Invalid startup parameters. Exiting calendar setup.\")\n                    assert(false)\n                    return configurationParameters.endDate\n                }\n                retval = date\n                break\n            }\n        }\n        \n        return retval\n    }\n    \n    public func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {\n        guard let size = calendarDelegate?.calendar(self, sizeFor: monthData[indexPath.item]) else {\n            let width: CGFloat = monthData[indexPath.item] is Month ? (frame.width - 40) / 3 : frame.width\n            let height = width\n            return CGSize(width: width, height: height)\n        }\n        return size\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACDayCell.swift",
    "content": "//\n//  JTACDayCell.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport UIKit\n\n/// The JTAppleDayCell class defines the attributes and\n/// behavior of the cells that appear in JTAppleCalendarMonthView objects.\n@available(*, unavailable, renamed: \"JTACDayCell\")\nopen class JTAppleCell: UICollectionViewCell{}\nopen class JTACDayCell: UICollectionViewCell {\n    @available(*, message: \"Using isSelected only to determing when selection occurs is ok. For other cases please use cellState.isSelected to avoid synchronization issues.\")\n    open override var isSelected: Bool {\n        get { return super.isSelected }\n        set { super.isSelected = newValue}\n    }\n    \n    /// Cell view that will be customized\n\tpublic override init(frame: CGRect) {\n\t\tsuper.init(frame: frame)\n\t}\n\n\t/// Returns an object initialized from data in a given unarchiver.\n\trequired public init?(coder aDecoder: NSCoder) {\n\t\tsuper.init(coder: aDecoder)\n\t}\n    \n    /// Prepares the receiver for service after it has been loaded from an Interface Builder archive, or nib file.\n    open override func awakeFromNib() {\n        super.awakeFromNib()\n        \n        self.contentView.frame = self.bounds\n        self.contentView.autoresizingMask = [.flexibleWidth, .flexibleHeight]\n    }\n\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACInteractionMonthFunctions.swift",
    "content": "//\n//  JTACInteractionMonthFunctions.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport UIKit\n\nextension JTACMonthView {\n    \n    /// Returns the cellStatus of a date that is visible on the screen.\n    /// If the row and column for the date cannot be found,\n    /// then nil is returned\n    /// - Paramater row: Int row of the date to find\n    /// - Paramater column: Int column of the date to find\n    /// - returns:\n    ///     - CellState: The state of the found cell\n    public func cellStatusForDate(at row: Int, column: Int) -> CellState? {\n        guard let section = currentSection() else {\n            return nil\n        }\n        let convertedRow = (row * maxNumberOfDaysInWeek) + column\n        let indexPathToFind = IndexPath(item: convertedRow, section: section)\n        if let date = dateOwnerInfoFromPath(indexPathToFind) {\n            let stateOfCell = cellStateFromIndexPath(indexPathToFind, withDateInfo: date)\n            return stateOfCell\n        }\n        return nil\n    }\n    \n    /// Returns the cell status for a given date\n    /// - Parameter: date Date of the cell you want to find\n    /// - returns:\n    ///     - CellState: The state of the found cell\n    public func cellStatus(for date: Date) -> CellState? {\n        if !calendarLayoutIsLoaded || isReloadDataInProgress { return nil }\n        // validate the path\n        let paths = pathsFromDates([date])\n        // Jt101 change this function to also return\n        // information like the dateInfoFromPath function\n        if paths.isEmpty { return nil }\n        let cell = cellForItem(at: paths[0]) as? JTACDayCell\n        let stateOfCell = cellStateFromIndexPath(paths[0], cell: cell)\n        return stateOfCell\n    }\n    \n    /// Returns the cell status for a given date\n    /// - Parameter: date Date of the cell you want to find\n    /// - returns:\n    ///     - CellState: The state of the found cell\n    public func cellStatus(for date: Date, completionHandler: @escaping (_ cellStatus: CellState?) ->()) {\n        if !calendarLayoutIsLoaded || isReloadDataInProgress {\n            addToDelayedHandlers {[unowned self] in\n                self.cellStatus(for: date, completionHandler: completionHandler)\n            }\n            return\n        }\n        let retval = cellStatus(for: date)\n        completionHandler(retval)\n    }\n    \n    func addToDelayedHandlers(function: @escaping ()->()) {\n        if isScrollInProgress {\n            scrollDelayedExecutionClosure.append { function() }\n        } else {\n            generalDelayedExecutionClosure.append { function() }\n        }\n    }\n    \n    /// Returns the month status for a given date\n    /// - Parameter: date Date of the cell you want to find\n    /// - returns:\n    ///     - Month: The state of the found month\n    public func monthStatus(for date: Date) -> Month? {\n        guard\n            let calendar = _cachedConfiguration?.calendar,\n            let startMonth = startOfMonthCache,\n            let monthIndex = calendar.dateComponents([.month], from: startMonth, to: date).month else {\n                return nil\n        }\n        return monthInfo[monthIndex]\n    }\n    \n    /// Returns the cell status for a given point\n    /// - Parameter: point of the cell you want to find\n    /// - returns:\n    ///     - CellState: The state of the found cell\n    public func cellStatus(at point: CGPoint) -> CellState? {\n        if let indexPath = indexPathForItem(at: point) {\n            let cell = cellForItem(at: indexPath) as? JTACDayCell\n            return cellStateFromIndexPath(indexPath, cell: cell)\n        }\n        return nil\n    }\n    \n    /// Deselect all selected dates\n    /// - Parameter: this funciton triggers a delegate call by default. Set this to false if you do not want this\n    /// - Parameter keepDeselectionIfMultiSelectionAllowed:\n    ///    if (in range selection) there are 4 dates. -> selected, unselected, selected, selected. (S | U | S | S)\n    ///    Deselecting those 4 dates again would give U | S | U | U. With KeepDeselection, this becomes U | U | U | U\n    public func deselectAllDates(triggerSelectionDelegate: Bool = true) {\n        deselect(dates: selectedDates, triggerSelectionDelegate: triggerSelectionDelegate)\n    }\n    \n    /// Deselect dates\n    /// - Parameter: Dates - The dates to deselect\n    /// - Parameter: triggerSelectionDelegate - this funciton triggers a delegate call by default. Set this to false if you do not want this\n    /// - Parameter keepDeselectionIfMultiSelectionAllowed:\n    ///    if (in range selection) there are 4 dates. -> selected, unselected, selected, selected. (S | U | S | S)\n    ///    Deselecting those 4 dates again would give U | S | U | U. With KeepDeselection, this becomes U | U | U | U\n    public func deselect(dates: [Date], triggerSelectionDelegate: Bool = true, keepDeselectionIfMultiSelectionAllowed: Bool = false) {\n        if allowsMultipleSelection {\n            var filteredDates: [Date] = dates\n            if keepDeselectionIfMultiSelectionAllowed {\n                filteredDates = dates.filter { self.selectedDatesSet.contains(calendar.startOfDay(for: $0)) }\n            }\n            selectDates(filteredDates, triggerSelectionDelegate: triggerSelectionDelegate, keepSelectionIfMultiSelectionAllowed: false)\n        } else {\n            let paths = pathsFromDates(dates)\n            guard !paths.isEmpty else { return }\n            assert(paths.count < 2, \"WARNING: you are trying to deselect multiple dates with allowsMultipleSelection == false. Only the first date will be deselected.\")\n            collectionView(self, didDeselectItemAt: paths[0])\n        }\n    }\n    \n    /// Notifies the container that the size of its view is about to change.\n    public func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator, anchorDate: Date?) {\n        DispatchQueue.main.async { [weak self] in\n            guard let _self = self else { return }\n            _self.reloadData(withAnchor: anchorDate)\n        }\n    }\n    \n    /// Generates a range of dates from from a startDate to an\n    /// endDate you provide\n    /// Parameter startDate: Start date to generate dates from\n    /// Parameter endDate: End date to generate dates to\n    /// returns:\n    ///     - An array of the successfully generated dates\n    public func generateDateRange(from startDate: Date, to endDate: Date) -> [Date] {\n        if startDate > endDate { return [] }\n        var returnDates: [Date] = []\n        var currentDate = startDate\n        repeat {\n            returnDates.append(currentDate)\n            currentDate = calendar.startOfDay(for: calendar.date(\n                byAdding: .day, value: 1, to: currentDate)!)\n        } while currentDate <= endDate\n        return returnDates\n    }\n    \n    /// Registers a class for use in creating supplementary views for the collection view.\n    /// For now, the calendar only supports: 'UICollectionElementKindSectionHeader' for the forSupplementaryViewOfKind(parameter)\n    open override func register(_ viewClass: AnyClass?, forSupplementaryViewOfKind elementKind: String, withReuseIdentifier identifier: String) {\n        super.register(viewClass, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: identifier)\n    }\n    \n    /// Registers a class for use in creating supplementary views for the collection view.\n    /// For now, the calendar only supports: 'UICollectionElementKindSectionHeader' for the forSupplementaryViewOfKind(parameter)\n    open override func register(_ nib: UINib?, forSupplementaryViewOfKind kind: String, withReuseIdentifier identifier: String) {\n        super.register(nib, forSupplementaryViewOfKind: UICollectionView.elementKindSectionHeader, withReuseIdentifier: identifier)\n    }\n    \n    /// Dequeues re-usable calendar cells\n    public func dequeueReusableJTAppleSupplementaryView(withReuseIdentifier identifier: String, for indexPath: IndexPath) -> JTACMonthReusableView {\n        guard let headerView = dequeueReusableSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader,\n                                                                withReuseIdentifier: identifier,\n                                                                for: indexPath) as? JTACMonthReusableView else {\n                                                                    developerError(string: \"Error initializing Header View with identifier: '\\(identifier)'\")\n                                                                    return JTACMonthReusableView()\n        }\n        return headerView\n    }\n    \n    /// Registers a nib for use in creating Decoration views for the collection view.\n    public func registerDecorationView(nib: UINib?) {\n        calendarViewLayout.register(nib, forDecorationViewOfKind: decorationViewID)\n    }\n    /// Registers a class for use in creating Decoration views for the collection view.\n    public func register(viewClass className: AnyClass?, forDecorationViewOfKind kind: String) {\n        calendarViewLayout.register(className, forDecorationViewOfKind: decorationViewID)\n    }\n    /// Dequeues a reuable calendar cell\n    public func dequeueReusableJTAppleCell(withReuseIdentifier identifier: String, for indexPath: IndexPath) -> JTACDayCell {\n        guard let cell = dequeueReusableCell(withReuseIdentifier: identifier, for: indexPath) as? JTACDayCell else {\n            developerError(string: \"Error initializing Cell View with identifier: '\\(identifier)'\")\n            return JTACDayCell()\n        }\n        return cell\n    }\n    \n    /// Reloads the data on the calendar view. Scroll delegates are not\n    //  triggered with this function.\n    /// - Parameter date: An anchordate that the calendar will\n    ///                   scroll to after reload completes\n    /// - Parameter animation: Scroll is animated if this is set to true\n    /// - Parameter completionHandler: This closure will run after\n    ///                                the reload is complete\n    public func reloadData(withAnchor date: Date? = nil, completionHandler: (() -> Void)? = nil) {\n        if isReloadDataInProgress {\n            calendarViewLayout.delayedExecutionClosure.append {[weak self] in\n                guard let _ = self else { return }\n                completionHandler?()\n            }\n            return\n        }\n        if isScrollInProgress {\n            scrollDelayedExecutionClosure.append {[unowned self] in\n                self.reloadData(completionHandler: completionHandler)\n            }\n            return\n        }\n        \n        isReloadDataInProgress = true\n        anchorDate = date\n        \n        let selectedDates = self.selectedDates\n        let data = reloadDelegateDataSource()\n        if data.shouldReload {\n            calendarViewLayout.clearCache()\n            setupMonthInfoAndMap(with: data.configParameters)\n            selectedCellData = [:]\n        }\n\n        // Restore the selected index paths if dates were already selected.\n        if !selectedDates.isEmpty {\n            calendarViewLayout.delayedExecutionClosure.append {[weak self] in\n                guard let _self = self else { return}\n                _self.isReloadDataInProgress = false\n                _self.selectDates(selectedDates, triggerSelectionDelegate: false, keepSelectionIfMultiSelectionAllowed: true)\n            }\n        }\n\n        // Add calendar reload completion \n        calendarViewLayout.delayedExecutionClosure.append {[weak self] in\n            guard let _self = self else { return }\n            _self.isReloadDataInProgress = false\n            completionHandler?()\n            if !_self.generalDelayedExecutionClosure.isEmpty { _self.executeDelayedTasks(.general) }\n        }\n        calendarViewLayout.reloadWasTriggered = true\n        DispatchQueue.main.async {\n            super.reloadData()\n        }\n    }\n    \n    /// Reload the date of specified date-cells on the calendar-view\n    /// - Parameter dates: Date-cells with these specified\n    ///                    dates will be reloaded\n    public func reloadDates(_ dates: [Date]) {\n        var paths: Set<IndexPath> = []\n        for date in dates {\n            let aPath = pathsFromDates([date])\n            if let validPath = aPath.first {\n                paths.insert(validPath)\n                let cellState = cellStateFromIndexPath(validPath)\n                if let validCounterPartCellPath = indexPathOfdateCellCounterPath(date,dateOwner: cellState.dateBelongsTo) {\n                    paths.insert(validCounterPartCellPath)\n                }\n            }\n        }\n        batchReloadIndexPaths(Array(paths))\n    }\n    \n    /// Select a date-cell range\n    /// - Parameter startDate: Date to start the selection from\n    /// - Parameter endDate: Date to end the selection from\n    /// - Parameter triggerDidSelectDelegate: Triggers the delegate\n    ///   function only if the value is set to true.\n    /// Sometimes it is necessary to setup some dates without triggereing\n    /// the delegate e.g. For instance, when youre initally setting up data\n    /// in your viewDidLoad\n    /// - Parameter keepSelectionIfMultiSelectionAllowed: This is only\n    ///   applicable in allowedMultiSelection = true.\n    /// This overrides the default toggle behavior of selection.\n    /// If true, selected cells will remain selected.\n    public func selectDates(from startDate: Date, to endDate: Date, triggerSelectionDelegate: Bool = true, keepSelectionIfMultiSelectionAllowed: Bool = false) {\n        selectDates(generateDateRange(from: startDate, to: endDate),\n                    triggerSelectionDelegate: triggerSelectionDelegate,\n                    keepSelectionIfMultiSelectionAllowed: keepSelectionIfMultiSelectionAllowed)\n    }\n    \n    /// Deselect all selected dates within a range\n    /// - Parameter: start - Start of date range to deselect\n    /// - Parameter: end of date range to deselect\n    /// - Parameter keepDeselectionIfMultiSelectionAllowed:\n    ///    if (in range selection) there are 4 dates. -> selected, unselected, selected, selected. (S | U | S | S)\n    ///    Deselecting those 4 dates again would give U | S | U | U. With KeepDeselection, this becomes U | U | U | U\n    public func deselectDates(from start: Date, to end: Date? = nil, triggerSelectionDelegate: Bool = true, keepDeselectionIfMultiSelectionAllowed: Bool = false) {\n        if selectedDates.isEmpty { return }\n        let end = end ?? selectedDates.last!\n        let dates = selectedDates.filter { $0 >= start && $0 <= end }\n        deselect(dates: dates, triggerSelectionDelegate: triggerSelectionDelegate, keepDeselectionIfMultiSelectionAllowed: keepDeselectionIfMultiSelectionAllowed)\n        \n    }\n    \n    /// Select a date-cells\n    /// - Parameter date: The date-cell with this date will be selected\n    /// - Parameter triggerDidSelectDelegate: Triggers the delegate function\n    ///    only if the value is set to true.\n    /// Sometimes it is necessary to setup some dates without triggereing\n    /// the delegate e.g. For instance, when youre initally setting up data\n    /// in your viewDidLoad\n    /// - Parameter keepSelectionIfMultiSelectionAllowed:\n    ///    if (in range selection) there are 4 dates. -> selected, unselected, selected, selected. (S | U | S | S)\n    ///    Selecting those 4 dates again would give U | S | U | U. With KeepSelection, this becomes S | S | S | S\n    public func selectDates(_ dates: [Date], triggerSelectionDelegate: Bool = true, keepSelectionIfMultiSelectionAllowed: Bool = false) {\n        if dates.isEmpty { return }\n        if (!calendarLayoutIsLoaded || isReloadDataInProgress) {\n            // If the calendar is not yet fully loaded.\n            // Add the task to the delayed queue\n            generalDelayedExecutionClosure.append {[unowned self] in\n                self.selectDates(dates,\n                                 triggerSelectionDelegate: triggerSelectionDelegate,\n                                 keepSelectionIfMultiSelectionAllowed: keepSelectionIfMultiSelectionAllowed)\n            }\n            return\n        }\n        var allIndexPathsToReload: Set<IndexPath> = []\n        var validDatesToSelect = dates\n        // If user is trying to select multiple dates with\n        // multiselection disabled, then only select the last object\n        if !allowsMultipleSelection, let dateToSelect = dates.last {\n            validDatesToSelect = [dateToSelect]\n        }\n        \n        for date in validDatesToSelect {\n            let date = calendar.startOfDay(for: date)\n            let components = calendar.dateComponents([.year, .month, .day], from: date)\n            let firstDayOfDate = calendar.date(from: components)!\n            \n            // If the date is not within valid boundaries, then exit\n            if !(firstDayOfDate >= startOfMonthCache! && firstDayOfDate <= endOfMonthCache!) { continue }\n            \n            let pathFromDates = pathsFromDates([date])\n            // If the date path youre searching for, doesnt exist, return\n            if pathFromDates.isEmpty { continue }\n            let sectionIndexPath = pathFromDates[0]\n            \n            // Remove old selections\n            if allowsMultipleSelection {\n                // If multiple selection is on. Multiple selection behaves differently to singleselection.\n                // It behaves like a toggle. unless keepSelectionIfMultiSelectionAllowed is true.\n                // If user wants to force selection if multiselection is enabled, then removed the selected dates from generated dates\n                if keepSelectionIfMultiSelectionAllowed, selectedDates.contains(date) {\n                    guard\n                        let selectedIndexPaths = indexPathsForSelectedItems,\n                        selectedIndexPaths.contains(sectionIndexPath) else {\n                            // Select the item if it is not selected (not included in indexPathsForSelectedItems).\n                            // This makes the cell to be in selected state thus, if selected physically, will call the didDeselect function\n                            programaticallySelectItem(at: sectionIndexPath, shouldTriggerSelectionDelegate: triggerSelectionDelegate)\n                            continue\n                    }\n                    // Just add it to be reloaded, if it is already selected\n                    allIndexPathsToReload.insert(sectionIndexPath)\n                } else {\n                    if selectedCellData[sectionIndexPath] != nil { // If this cell is already selected, then deselect it\n                        programaticallyDeselectItem(at: sectionIndexPath, shouldTriggerSelectionDelegate: triggerSelectionDelegate)\n                    } else { // If this cell is unselected, then select it\n                        programaticallySelectItem(at: sectionIndexPath, shouldTriggerSelectionDelegate: triggerSelectionDelegate)\n                    }\n                }\n            } else {\n                // If single selection is ON\n                let selectedIndexPaths = selectedCellData\n                \n                if let cellData = (selectedIndexPaths.filter { $0.key != sectionIndexPath  }.first) {\n                    programaticallyDeselectItem(at: cellData.value.indexPath, shouldTriggerSelectionDelegate: triggerSelectionDelegate)\n                }\n                // Add new selections Must be added here. If added in delegate didSelectItemAtIndexPath\n                programaticallySelectItem(at: sectionIndexPath, shouldTriggerSelectionDelegate: triggerSelectionDelegate)\n            }\n        }\n        // If triggering was false, although the selectDelegates weren't\n        // called, we do want the cell refreshed. Reload to call itemAtIndexPath\n        if !triggerSelectionDelegate && !allIndexPathsToReload.isEmpty {\n            // Because sometimes if not on main thread, it will not get the\n            // visible cells in the following function\n            DispatchQueue.main.async {\n                self.batchReloadIndexPaths(Array(allIndexPathsToReload))\n            }\n        }\n    }\n\n    func programaticallyDeselectItem(at indexPath: IndexPath, shouldTriggerSelectionDelegate: Bool) {\n        if !handleShouldSelectionValueChange(self, action: .shouldDeselect, indexPath: indexPath, selectionType: .programatic) { return }\n        deselectItem(at: indexPath, animated: false)\n        handleSelectionValueChanged(self, action: .didDeselect, indexPath: indexPath, selectionType: .programatic, shouldTriggerSelectionDelegate: shouldTriggerSelectionDelegate)\n    }\n\n    func programaticallySelectItem(at indexPath: IndexPath, shouldTriggerSelectionDelegate: Bool) {\n        if !handleShouldSelectionValueChange(self, action: .shouldSelect, indexPath: indexPath, selectionType: .programatic) { return }\n        selectItem(at: indexPath, animated: false, scrollPosition: [])\n        handleSelectionValueChanged(self, action: .didSelect, indexPath: indexPath, selectionType: .programatic, shouldTriggerSelectionDelegate: shouldTriggerSelectionDelegate)\n    }\n    \n    /// Scrolls the calendar view to the next section view. It will execute a completion handler at the end of scroll animation if provided.\n    /// - Paramater direction: Indicates a direction to scroll\n    /// - Paramater animateScroll: Bool indicating if animation should be enabled\n    /// - Parameter triggerScrollToDateDelegate: trigger delegate if set to true\n    /// - Parameter completionHandler: A completion handler that will be executed at the end of the scroll animation\n    public func scrollToSegment(_ destination: SegmentDestination,\n                                triggerScrollToDateDelegate: Bool = true,\n                                animateScroll: Bool = true,\n                                extraAddedOffset: CGFloat = 0,\n                                completionHandler: (() -> Void)? = nil) {\n        if functionIsUnsafeSafeToRun {\n            addToDelayedHandlers {[unowned self] in\n                self.scrollToSegment(destination,\n                                     triggerScrollToDateDelegate: triggerScrollToDateDelegate,\n                                     animateScroll: animateScroll,\n                                     extraAddedOffset: extraAddedOffset,\n                                     completionHandler: completionHandler)\n            }\n            return\n        }\n\n        let fixedScrollSize: CGFloat\n        var xOffset: CGFloat = 0\n        var yOffset: CGFloat = 0\n        \n        switch scrollDirection {\n        case .horizontal:\n            if calendarViewLayout.thereAreHeaders || _cachedConfiguration?.generateOutDates == .tillEndOfGrid {\n                fixedScrollSize = calendarViewLayout.sizeOfContentForSection(0)\n            } else {\n                fixedScrollSize = frame.width\n            }\n            \n            var section = contentOffset.x / fixedScrollSize\n            let roundedSection = round(section)\n            if abs(roundedSection - section) < errorDelta { section = roundedSection }\n            section = CGFloat(Int(section))\n            \n            xOffset = (fixedScrollSize * section)\n            switch destination {\n            case .next:\n                xOffset += fixedScrollSize\n            case .previous:\n                xOffset -= fixedScrollSize\n            case .end:\n                xOffset = contentSize.width - frame.width\n            case .start:\n                xOffset = 0\n            }\n            \n            if xOffset <= 0 {\n                xOffset = 0\n            } else if xOffset >= contentSize.width - frame.width {\n                xOffset = contentSize.width - frame.width\n            }\n        case .vertical:\n            fallthrough\n        default:\n            guard let currentSection = currentSection() else { return }\n            if (destination == .next && currentSection + 1 >= numberOfSections(in: self)) ||\n                destination == .previous && currentSection - 1 < 0 ||\n                numberOfSections(in: self) < 0 {\n                return\n            }\n            \n            if calendarViewLayout.thereAreHeaders {\n                \n                switch destination {\n                case .next:\n                    scrollToHeaderInSection(currentSection + 1, extraAddedOffset: extraAddedOffset, completionHandler: completionHandler)\n                case .previous:\n                    scrollToHeaderInSection(currentSection - 1, extraAddedOffset: extraAddedOffset, completionHandler: completionHandler)\n                case .start:\n                    scrollToHeaderInSection(0, extraAddedOffset: extraAddedOffset, completionHandler: completionHandler)\n                case .end:\n                    scrollToHeaderInSection(numberOfSections(in: self) - 1, extraAddedOffset: extraAddedOffset, completionHandler: completionHandler)\n                }\n                return\n            } else {\n                switch destination {\n                case .next: yOffset = calendarViewLayout.cachedValue(for: 0, section: currentSection + 1)?.3 ?? contentSize.height // Set to max on nil\n                case .end: yOffset = contentSize.height // Set to max\n                case .previous: yOffset = calendarViewLayout.cachedValue(for: 0, section: currentSection - 1)?.3 ?? 0 // Set min on nil\n                case .start: yOffset = 0 // Set to min\n                }\n            }\n            \n            if yOffset <= 0 {\n                yOffset = 0\n            } else if yOffset >= contentSize.height - frame.height {\n                yOffset = contentSize.height - frame.height\n            }\n        }\n        \n        scrollTo(point: CGPoint(x: xOffset, y: yOffset),\n                 triggerScrollToDateDelegate: triggerScrollToDateDelegate,\n                 isAnimationEnabled: animateScroll,\n                 extraAddedOffset: extraAddedOffset,\n                 completionHandler: completionHandler)\n    }\n    \n    /// Scrolls the calendar view to the start of a section view containing a specified date.\n    /// - Paramater date: The calendar view will scroll to a date-cell containing this date if it exists\n    /// - Parameter triggerScrollToDateDelegate: Trigger delegate if set to true\n    /// - Paramater animateScroll: Bool indicating if animation should be enabled\n    /// - Paramater preferredScrollPositionIndex: Integer indicating the end scroll position on the screen.\n    /// This value indicates column number for Horizontal scrolling and row number for a vertical scrolling calendar\n    /// - Parameter completionHandler: A completion handler that will be executed at the end of the scroll animation\n    public func scrollToDate(_ date: Date,\n                             triggerScrollToDateDelegate: Bool = true,\n                             animateScroll: Bool = true,\n                             preferredScrollPosition: UICollectionView.ScrollPosition? = nil,\n                             extraAddedOffset: CGFloat = 0,\n                             completionHandler: (() -> Void)? = nil) {\n        \n        // Ensure scrolling to date is safe to run\n        if functionIsUnsafeSafeToRun {\n            if !animateScroll  { anchorDate = date} // Gets rid of visible scrolling when calendar starts\n            addToDelayedHandlers {[unowned self] in\n                self.scrollToDate(date,\n                                  triggerScrollToDateDelegate: triggerScrollToDateDelegate,\n                                  animateScroll: animateScroll,\n                                  preferredScrollPosition: preferredScrollPosition,\n                                  extraAddedOffset: extraAddedOffset,\n                                  completionHandler: completionHandler)\n            }\n            return\n        }\n        \n        // Set triggereing of delegate on scroll\n        self.triggerScrollToDateDelegate = triggerScrollToDateDelegate\n        \n        // Ensure date is within valid boundary\n        let components = calendar.dateComponents([.year, .month, .day], from: date)\n        let firstDayOfDate = calendar.date(from: components)!\n        if !((firstDayOfDate >= startOfMonthCache!) && (firstDayOfDate <= endOfMonthCache!)) { return }\n        \n        // Get valid indexPath of date to scroll to\n        let retrievedPathsFromDates = pathsFromDates([date])\n        if retrievedPathsFromDates.isEmpty { return }\n        let sectionIndexPath = pathsFromDates([date])[0]\n        \n        if scrollingMode == .none {\n            self.scrollToItem(at: sectionIndexPath,\n                              at: preferredScrollPosition ?? (scrollDirection == .horizontal ? .left : .top),\n                              animated: animateScroll)\n        } else {\n            guard let point = targetPointForItemAt(indexPath: sectionIndexPath) else {\n                assert(false, \"Could not determine CGPoint. This is an error. contact developer on github. In production, there will not be a crash, but scrolling will not occur\")\n                return\n            }\n            scrollTo(point: point,\n                     triggerScrollToDateDelegate: triggerScrollToDateDelegate,\n                     isAnimationEnabled: animateScroll,\n                     extraAddedOffset: extraAddedOffset,\n                     completionHandler: completionHandler)\n        }\n    }\n    \n    /// Scrolls the calendar view to the start of a section view header.\n    /// If the calendar has no headers registered, then this function does nothing\n    /// - Paramater date: The calendar view will scroll to the header of\n    /// a this provided date\n    public func scrollToHeaderForDate(_ date: Date,\n                                      triggerScrollToDateDelegate: Bool = false,\n                                      withAnimation animation: Bool = false,\n                                      extraAddedOffset: CGFloat = 0,\n                                      completionHandler: (() -> Void)? = nil) {\n        if functionIsUnsafeSafeToRun {\n            if !animation  { anchorDate = date}\n            addToDelayedHandlers { [unowned self] in\n                self.scrollToHeaderForDate(date,\n                                           triggerScrollToDateDelegate: triggerScrollToDateDelegate,\n                                           withAnimation: animation,\n                                           extraAddedOffset: extraAddedOffset,\n                                           completionHandler: completionHandler)\n            }\n            return\n        }\n        let path = pathsFromDates([date])\n        // Return if date was incalid and no path was returned\n        if path.isEmpty { return }\n        scrollToHeaderInSection(\n            path[0].section,\n            triggerScrollToDateDelegate: triggerScrollToDateDelegate,\n            withAnimation: animation,\n            extraAddedOffset: extraAddedOffset,\n            completionHandler: completionHandler\n        )\n    }\n    \n    /// Returns the visible dates of the calendar.\n    /// - returns:\n    ///     - DateSegmentInfo\n    public func visibleDates()-> DateSegmentInfo {\n        return datesAtCurrentOffset()\n    }\n    \n    /// Returns the visible dates of the calendar.\n    /// - returns:\n    ///     - DateSegmentInfo\n    public func visibleDates(_ completionHandler: @escaping (_ dateSegmentInfo: DateSegmentInfo) ->()) {\n        if functionIsUnsafeSafeToRun {\n            addToDelayedHandlers { [unowned self] in self.visibleDates(completionHandler) }\n            return\n        }\n        let retval = visibleDates()\n        completionHandler(retval)\n    }\n    \n    /// Retrieves the current section\n    public func currentSection() -> Int? {\n        let minVisiblePaths = calendarViewLayout.minimumVisibleIndexPaths()\n        return minVisiblePaths.cellIndex?.section\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACInteractionYearFunctions.swift",
    "content": "//\n//  UserInteractionYearFunctions.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\n\nextension JTACYearView {\n   \n    /// Dequeues a reuable calendar cell\n    public func dequeueReusableJTAppleMonthCell(withReuseIdentifier identifier: String, for indexPath: IndexPath) -> JTACMonthCell {\n        guard let cell = dequeueReusableCell(withReuseIdentifier: identifier, for: indexPath) as? JTACMonthCell else {\n            assert(false, \"Error initializing Cell View with identifier: '\\(identifier)'\")\n            return JTACMonthCell()\n        }\n        return cell\n    }\n    \n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACMonthActionFunctions.swift",
    "content": "//\n//  JTACMonthActionFunctions.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport UIKit\n\nextension JTACMonthView {\n    /// Lays out subviews.\n    override open func layoutSubviews() {\n        super.layoutSubviews()\n        if !generalDelayedExecutionClosure.isEmpty, calendarLayoutIsLoaded {\n            executeDelayedTasks(.general)\n        }\n    }\n    \n    func setupMonthInfoAndMap(with data: ConfigurationParameters? = nil) {\n        theData = setupMonthInfoDataForStartAndEndDate(with: data)\n    }\n    \n    func developerError(string: String) {\n        print(string)\n        print(developerErrorMessage)\n        assert(false)\n    }\n    \n    func setupNewLayout(from oldLayout: JTACMonthLayoutProtocol) {\n        let newLayout = JTACMonthLayout(withDelegate: self)\n        newLayout.scrollDirection = oldLayout.scrollDirection\n        newLayout.sectionInset = oldLayout.sectionInset\n        newLayout.minimumInteritemSpacing = oldLayout.minimumInteritemSpacing\n        newLayout.minimumLineSpacing = oldLayout.minimumLineSpacing\n        \n        \n        collectionViewLayout = newLayout\n        \n        scrollDirection = newLayout.scrollDirection\n        sectionInset = newLayout.sectionInset\n        minimumLineSpacing = newLayout.minimumLineSpacing\n        minimumInteritemSpacing = newLayout.minimumInteritemSpacing\n\n        transform.a = semanticContentAttribute == .forceRightToLeft ? -1 : 1\n        \n        super.dataSource = self\n        super.delegate = self\n        decelerationRate = .fast\n        \n        #if os(iOS)\n            if isPagingEnabled {\n                scrollingMode = .stopAtEachCalendarFrame\n            } else {\n                scrollingMode = .none\n            }\n        #endif\n    }\n    \n    func scrollToHeaderInSection(_ section: Int,\n                                 triggerScrollToDateDelegate: Bool = false,\n                                 withAnimation animation: Bool = true,\n                                 extraAddedOffset: CGFloat,\n                                 completionHandler: (() -> Void)? = nil) {\n        if !calendarViewLayout.thereAreHeaders { return }\n        let indexPath = IndexPath(item: 0, section: section)\n        guard let attributes = calendarViewLayout.layoutAttributesForSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, at: indexPath) else { return }\n        \n        isScrollInProgress = true\n        if let validHandler = completionHandler { scrollDelayedExecutionClosure.append(validHandler) }\n        \n        self.triggerScrollToDateDelegate = triggerScrollToDateDelegate\n        \n        let maxYCalendarOffset = max(0, self.contentSize.height - self.frame.size.height)\n        var topOfHeader = CGPoint(x: attributes.frame.origin.x - sectionInset.left, y: min(maxYCalendarOffset, attributes.frame.origin.y))\n        if scrollDirection == .horizontal { topOfHeader.x += extraAddedOffset} else { topOfHeader.y += extraAddedOffset }\n        DispatchQueue.main.async {\n            self.setContentOffset(topOfHeader, animated: animation)\n            if (animation && self.calendarOffsetIsAlreadyAtScrollPosition(forOffset: topOfHeader)) ||\n                !animation {\n                self.scrollViewDidEndScrollingAnimation(self)\n            }\n            self.isScrollInProgress = false\n        }\n    }\n    \n    // Subclasses cannot use this function\n    @available(*, unavailable)\n    open override func reloadData() {\n        super.reloadData()\n    }\n    \n    func scrollTo(point: CGPoint, triggerScrollToDateDelegate: Bool? = nil, isAnimationEnabled: Bool, extraAddedOffset: CGFloat, completionHandler: (() -> Void)?) {\n        isScrollInProgress = true\n        if let validCompletionHandler = completionHandler { scrollDelayedExecutionClosure.append(validCompletionHandler) }\n        self.triggerScrollToDateDelegate = triggerScrollToDateDelegate\n        var point = point\n        if scrollDirection == .horizontal { point.x += extraAddedOffset } else { point.y += extraAddedOffset }\n        DispatchQueue.main.async() {\n            self.setContentOffset(point, animated: isAnimationEnabled)\n            if (isAnimationEnabled && self.calendarOffsetIsAlreadyAtScrollPosition(forOffset: point)) ||\n                !isAnimationEnabled {\n                self.scrollViewDidEndScrollingAnimation(self)\n            }\n        }\n    }\n    \n    func setupMonthInfoDataForStartAndEndDate(with optionalConfig: ConfigurationParameters? = nil) -> CalendarData {\n        var months = [Month]()\n        var monthMap = [Int: Int]()\n        var totalSections = 0\n        var totalDays = 0\n        \n        \n        // first use the config passed in\n        // If nil, fetch the config from the datasource\n        let possibleConfig = optionalConfig ?? calendarDataSource?.configureCalendar(self)\n        \n        let validConfig: ConfigurationParameters\n        if let valid = possibleConfig {\n            validConfig = valid\n        } else {\n            assert(false, \"Using default parameters. Your config should not have been nil here. In production, your dates will be an incorrect default date\")\n            validConfig = ConfigurationParameters(startDate: Date(), endDate: Date().addingTimeInterval(1))\n        }\n        \n        let comparison = validConfig.calendar.compare(validConfig.startDate, to: validConfig.endDate, toGranularity: .nanosecond)\n        if comparison == ComparisonResult.orderedDescending {\n            assert(false, \"Error, your start date cannot be greater than your end date\\n\")\n            return (CalendarData(months: [], totalSections: 0, sectionToMonthMap: [:], totalDays: 0))\n        }\n        \n        // Set the new cache\n        _cachedConfiguration = validConfig\n        \n        if let\n            startMonth = calendar.startOfMonth(for: validConfig.startDate),\n            let endMonth = calendar.endOfMonth(for: validConfig.endDate) {\n            startOfMonthCache = startMonth\n            endOfMonthCache   = endMonth\n            // Create the parameters for the date format generator\n            let parameters = ConfigurationParameters(startDate: startOfMonthCache,\n                                                     endDate: endOfMonthCache,\n                                                     numberOfRows: validConfig.numberOfRows,\n                                                     calendar: calendar,\n                                                     generateInDates: validConfig.generateInDates,\n                                                     generateOutDates: validConfig.generateOutDates,\n                                                     firstDayOfWeek: validConfig.firstDayOfWeek,\n                                                     hasStrictBoundaries: validConfig.hasStrictBoundaries)\n            \n            let generatedData = dateGenerator.setupMonthInfoDataForStartAndEndDate(parameters)\n            months = generatedData.months\n            monthMap = generatedData.monthMap\n            totalSections = generatedData.totalSections\n            totalDays = generatedData.totalDays\n        }\n        \n        let data = CalendarData(months: months, totalSections: totalSections, sectionToMonthMap: monthMap, totalDays: totalDays)\n        return data\n    }\n    \n    func batchReloadIndexPaths(_ indexPaths: [IndexPath]) {\n        let visiblePaths = indexPathsForVisibleItems\n        var visibleCellsToReload: [JTACDayCell: IndexPath] = [:]\n        \n        for path in indexPaths {\n            if calendarViewLayout.cachedValue(for: path.item, section: path.section) == nil { continue }\n            pathsToReload.insert(path)\n            if visiblePaths.contains(path) {\n                visibleCellsToReload[cellForItem(at: path) as! JTACDayCell] = path\n            }\n        }\n        \n        // Reload the visible paths\n        if !visibleCellsToReload.isEmpty {\n            for (cell, path) in visibleCellsToReload {\n                self.collectionView(self, willDisplay: cell, forItemAt: path)\n            }\n        }\n    }\n    \n    func addCellToSelectedSet(_ indexPath: IndexPath, date: Date, cellState: CellState) {\n        selectedCellData[indexPath] = SelectedCellData(indexPath: indexPath, date: date, cellState: cellState)\n    }\n    \n    func deleteCellFromSelectedSetIfSelected(_ indexPath: IndexPath) {\n        selectedCellData.removeValue(forKey: indexPath)\n        deselectItem(at: indexPath, animated: false)\n    }\n    \n    // Returns an indexPath if valid one was found\n    func deselectCounterPartCellIndexPath(_ indexPath: IndexPath, date: Date, dateOwner: DateOwner) -> IndexPath? {\n        guard let counterPartCellIndexPath = indexPathOfdateCellCounterPath(date, dateOwner: dateOwner) else { return nil }\n        deleteCellFromSelectedSetIfSelected(counterPartCellIndexPath)\n        return counterPartCellIndexPath\n    }\n    \n    func selectCounterPartCellIndexPath(_ indexPath: IndexPath, date: Date, dateOwner: DateOwner) -> IndexPath? {\n        guard let counterPartCellIndexPath = indexPathOfdateCellCounterPath(date, dateOwner: dateOwner) else { return nil }\n        let counterPartCellState = cellStateFromIndexPath(counterPartCellIndexPath, isSelected: true)\n        addCellToSelectedSet(counterPartCellIndexPath, date: date, cellState: counterPartCellState)\n        \n        // Update the selectedCellData counterIndexPathData\n        selectedCellData[indexPath]?.counterIndexPath = counterPartCellIndexPath\n        selectedCellData[counterPartCellIndexPath]?.counterIndexPath = indexPath\n        \n        if allowsMultipleSelection {\n            // only if multiple selection is enabled. With single selection, we do not want the counterpart cell to be\n            // selected in place of the main cell. With multiselection, however, all can be selected\n            selectItem(at: counterPartCellIndexPath, animated: false, scrollPosition: [])\n        }\n        return counterPartCellIndexPath\n    }\n    \n    func executeDelayedTasks(_ type: DelayedTaskType) {\n        let tasksToExecute: [(() -> Void)]\n        switch type {\n        case .scroll:\n            tasksToExecute = scrollDelayedExecutionClosure\n            scrollDelayedExecutionClosure.removeAll()\n        case .general:\n            tasksToExecute = generalDelayedExecutionClosure\n            generalDelayedExecutionClosure.removeAll()\n        }\n        for aTaskToExecute in tasksToExecute { aTaskToExecute() }\n    }\n    \n    // Only reload the dates if the datasource information has changed\n    func reloadDelegateDataSource() -> (shouldReload: Bool, configParameters: ConfigurationParameters?) {\n        var retval: (Bool, ConfigurationParameters?) = (false, nil)\n        if let\n            newDateBoundary = calendarDataSource?.configureCalendar(self) {\n            // Jt101 do a check in each var to see if\n            // user has bad star/end dates\n            let newStartOfMonth = calendar.startOfMonth(for: newDateBoundary.startDate)\n            let newEndOfMonth   = calendar.endOfMonth(for: newDateBoundary.endDate)\n            let oldStartOfMonth = calendar.startOfMonth(for: startDateCache)\n            let oldEndOfMonth   = calendar.endOfMonth(for: endDateCache)\n            let newLastMonth    = sizesForMonthSection()\n            let calendarLayout  = calendarViewLayout\n            \n            if\n                // ConfigParameters were changed\n                newStartOfMonth                     != oldStartOfMonth ||\n                newEndOfMonth                       != oldEndOfMonth ||\n                newDateBoundary.calendar            != _cachedConfiguration?.calendar ||\n                newDateBoundary.numberOfRows        != _cachedConfiguration?.numberOfRows ||\n                newDateBoundary.generateInDates     != _cachedConfiguration?.generateInDates ||\n                newDateBoundary.generateOutDates    != _cachedConfiguration?.generateOutDates ||\n                newDateBoundary.firstDayOfWeek      != _cachedConfiguration?.firstDayOfWeek ||\n                newDateBoundary.hasStrictBoundaries != _cachedConfiguration?.hasStrictBoundaries ||\n                // Other layout information were changed\n                minimumInteritemSpacing  != calendarLayout.minimumInteritemSpacing ||\n                minimumLineSpacing       != calendarLayout.minimumLineSpacing ||\n                sectionInset             != calendarLayout.sectionInset ||\n                lastMonthSize            != newLastMonth ||\n                allowsDateCellStretching != calendarLayout.allowsDateCellStretching ||\n                scrollDirection          != calendarLayout.scrollDirection ||\n                calendarLayout.isDirty {\n                    lastMonthSize = newLastMonth\n                    retval = (true, newDateBoundary)\n            }\n        }\n        \n        return retval\n    }\n    \n    func remapSelectedDatesWithCurrentLayout() -> (selected:(indexPaths:[IndexPath], counterPaths:[IndexPath]), selectedDates: [Date]) {\n        var retval = (selected:(indexPaths:[IndexPath](), counterPaths:[IndexPath]()), selectedDates: [Date]())\n        if !selectedDates.isEmpty {\n            let selectedDates = self.selectedDates\n            \n            // Get the new paths\n            let newPaths = pathsFromDates(selectedDates)\n            \n            // Get the new counter Paths\n            var newCounterPaths: [IndexPath] = []\n            for date in selectedDates {\n                if let counterPath = indexPathOfdateCellCounterPath(date, dateOwner: .thisMonth) {\n                    newCounterPaths.append(counterPath)\n                }\n            }\n            \n            // Append paths\n            retval.selected.indexPaths.append(contentsOf: newPaths)\n            retval.selected.counterPaths.append(contentsOf: newCounterPaths)\n            \n            // Append dates to retval\n            for allPaths in [newPaths, newCounterPaths] {\n                for path in allPaths {\n                    guard let dateFromPath = dateOwnerInfoFromPath(path)?.date else { continue }\n                    retval.selectedDates.append(dateFromPath)\n                }\n            }\n        }\n        return retval\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACMonthCell.swift",
    "content": "//\n//  JTACMonthCell.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\nimport UIKit\n\npublic protocol JTACCellMonthViewDelegate: AnyObject {\n    func monthView(_ monthView: JTACCellMonthView,\n                  drawingFor segmentRect: CGRect,\n                  with date: Date,\n                  dateOwner: DateOwner,\n                  monthIndex: Int)\n}\n\nopen class JTACMonthCell: UICollectionViewCell {\n    @IBOutlet var monthView: JTACCellMonthView?\n    weak var delegate: JTACCellMonthViewDelegate?\n    \n    func setupWith(configurationParameters: ConfigurationParameters,\n                   month: Month,\n                   delegate: JTACCellMonthViewDelegate) {\n        guard let monthView = monthView else { assert(false); return }\n        self.delegate = delegate\n        monthView.setupWith(configurationParameters: configurationParameters,\n                            month: month,\n                            delegate: self)\n    }\n}\n\nextension JTACMonthCell: JTACCellMonthViewDelegate {\n    public func monthView(_ monthView: JTACCellMonthView,\n                          drawingFor segmentRect: CGRect,\n                          with date: Date,\n                          dateOwner: DateOwner,\n                          monthIndex: Int) {\n        delegate?.monthView(monthView, drawingFor: segmentRect, with: date, dateOwner: dateOwner, monthIndex: monthIndex)\n    }\n}\n\n\n\n\nopen class JTACCellMonthView: UIView {\n    var sectionInset = UIEdgeInsets.zero\n    var month: Month!\n    var configurationParameters: ConfigurationParameters!\n    weak var delegate: JTACCellMonthViewDelegate?\n    var scrollDirection: UICollectionView.ScrollDirection = .horizontal\n    \n    func setupWith(configurationParameters: ConfigurationParameters, month: Month, delegate: JTACCellMonthViewDelegate? = nil) {\n        self.configurationParameters = configurationParameters\n        self.delegate = delegate\n        self.month = month\n        \n        setNeedsDisplay()  // force reloading of the drawRect code to update the view.\n    }\n\n    override open func draw(_ rect: CGRect) {\n        super.draw(rect)\n\n        var xCellOffset: CGFloat = 0\n        var yCellOffset: CGFloat = 0\n        \n        let numberOfDaysInCurrentSection = month.sections.first!\n        for dayCounter in 1...numberOfDaysInCurrentSection {\n            \n            let width = (frame.width - ((sectionInset.left / 7) + (sectionInset.right / 7))) / 7\n            let height = (frame.height - sectionInset.top - sectionInset.bottom) / 6\n            \n            let rect = CGRect(x: xCellOffset, y: yCellOffset, width: width, height: height)\n            guard let dateWithOwner = dateFromIndex(dayCounter - 1, month: month,\n                                                    startOfMonthCache: configurationParameters.startDate,\n                                                    endOfMonthCache: configurationParameters.endDate) else { continue }\n\n            \n            delegate?.monthView(self,\n                                drawingFor: rect,\n                                with: dateWithOwner.date,\n                                dateOwner: dateWithOwner.owner,\n                                monthIndex: month.index)\n\n            xCellOffset += width\n            \n            if dayCounter == numberOfDaysInCurrentSection || dayCounter % maxNumberOfDaysInWeek == 0 {\n                // We are at the last item in the section\n                // && if we have headers\n                xCellOffset = sectionInset.left\n                yCellOffset += height\n            }\n        }\n    }\n    \n    private func dateFromIndex(_ index: Int, month: Month, startOfMonthCache: Date, endOfMonthCache: Date) -> (date: Date, owner: DateOwner)? { // Returns nil if date is out of scope\n        // Calculate the offset\n        let offSet = month.inDates\n        \n        let dayIndex = month.startDayIndex + index - offSet\n        var dateOwner: DateOwner\n        \n        guard let validDate = configurationParameters.calendar.date(byAdding: .day, value: dayIndex, to: startOfMonthCache) else { return nil }\n        \n        if index >= offSet && index < month.numberOfDaysInMonth + offSet {\n            dateOwner = .thisMonth\n        } else if index < offSet {\n            // This is a preDate\n            \n            if validDate < startOfMonthCache {\n                dateOwner = .previousMonthOutsideBoundary\n            } else {\n                dateOwner = .previousMonthWithinBoundary\n            }\n        } else {\n            // This is a postDate\n            if validDate > endOfMonthCache {\n                dateOwner = .followingMonthOutsideBoundary\n            } else {\n                dateOwner = .followingMonthWithinBoundary\n            }\n        }\n        return (validDate, dateOwner)\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACMonthDelegateProtocol.swift",
    "content": "//\n//  JTACMonthDelegateProtocol.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\nimport Foundation\nimport UIKit\n\nprotocol JTACMonthDelegateProtocol: AnyObject {\n    // Variables\n    var allowsDateCellStretching: Bool {get set}\n    var _cachedConfiguration: ConfigurationParameters? {get set}\n    var calendarDataSource: JTACMonthViewDataSource? {get set}\n    var cellSize: CGFloat {get set}\n    var anchorDate: Date? {get set}\n    var calendarLayoutIsLoaded: Bool {get}\n    var minimumInteritemSpacing: CGFloat  {get set}\n    var minimumLineSpacing: CGFloat {get set}\n    var monthInfo: [Month] {get set}\n    var monthMap: [Int: Int] {get set}\n    var scrollDirection: UICollectionView.ScrollDirection {get set}\n    var sectionInset: UIEdgeInsets {get set}\n    var totalDays: Int {get}\n    var requestedContentOffset: CGPoint {get}\n    \n    // Functions\n    func pathsFromDates(_ dates: [Date]) -> [IndexPath]\n    func sizeOfDecorationView(indexPath: IndexPath) -> CGRect\n    func sizesForMonthSection() -> [AnyHashable:CGFloat]\n    func targetPointForItemAt(indexPath: IndexPath, preferredScrollPosition: UICollectionView.ScrollPosition?) -> CGPoint?\n}\n\nextension JTACMonthView: JTACMonthDelegateProtocol { }\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACMonthLayout.swift",
    "content": "//\n//  JTACMonthLayout.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\nimport UIKit\n\n/// Methods in this class are meant to be overridden and will be called by its collection view to gather layout information.\nclass JTACMonthLayout: UICollectionViewLayout, JTACMonthLayoutProtocol {\n    \n    var allowsDateCellStretching = true\n    var firstContentOffsetWasSet = false\n    \n    var lastSetCollectionViewSize: CGRect = .zero\n    \n    var cellSize: CGSize = CGSize.zero\n    var shouldUseUserItemSizeInsteadOfDefault: Bool { return (delegate?.cellSize ?? 0) == 0 ? false: true }\n    var scrollDirection: UICollectionView.ScrollDirection = .horizontal\n    var maxMissCount: Int = 0\n    var cellCache: [Int: [(item: Int, section: Int, xOffset: CGFloat, yOffset: CGFloat, width: CGFloat, height: CGFloat)]] = [:]\n    var headerCache: [Int: (item: Int, section: Int, xOffset: CGFloat, yOffset: CGFloat, width: CGFloat, height: CGFloat)] = [:]\n    var decorationCache: [IndexPath:UICollectionViewLayoutAttributes] = [:]\n    var endOfSectionOffsets: [CGFloat] = []\n    var lastWrittenCellAttribute: (Int, Int, CGFloat, CGFloat, CGFloat, CGFloat)!\n    var xStride: CGFloat = 0\n    var minimumInteritemSpacing: CGFloat = 0\n    var minimumLineSpacing: CGFloat = 0\n    var sectionInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)\n    var headerSizes: [AnyHashable:CGFloat] = [:]\n    var focusIndexPath: IndexPath?\n    var isCalendarLayoutLoaded: Bool { return !cellCache.isEmpty }\n    var layoutIsReadyToBePrepared: Bool {\n        guard let delegate = delegate else { return false }\n        return !(!cellCache.isEmpty  || delegate.calendarDataSource == nil)\n    }\n\n    var monthMap: [Int: Int] = [:]\n    var numberOfRows: Int = 0\n    var strictBoundaryRulesShouldApply: Bool = false\n    var thereAreHeaders: Bool { return !headerSizes.isEmpty }\n    var thereAreDecorationViews = false\n    \n    weak var delegate: JTACMonthDelegateProtocol?\n    \n    var currentHeader: (section: Int, size: CGSize)? // Tracks the current header size\n    var currentCell: (section: Int, width: CGFloat, height: CGFloat)? // Tracks the current cell size\n    var contentHeight: CGFloat = 0 // Content height of calendarView\n    var contentWidth: CGFloat = 0 // Content wifth of calendarView\n    var xCellOffset: CGFloat = 0\n    var yCellOffset: CGFloat = 0\n    var endSeparator: CGFloat = 0\n    override var flipsHorizontallyInOppositeLayoutDirection: Bool { return true }\n    \n    var delayedExecutionClosure: [(() -> Void)] = []\n    func executeDelayedTasks() {\n        DispatchQueue.main.asyncAfter(deadline: .now() + 0.01) {\n            let tasksToExecute = self.delayedExecutionClosure\n            self.delayedExecutionClosure.removeAll()\n            \n            for aTaskToExecute in tasksToExecute {\n                aTaskToExecute()\n            }\n        }\n    }\n    \n    var daysInSection: [Int: Int] = [:] // temporary caching\n    var monthInfo: [Month] = []\n    \n    var reloadWasTriggered = false\n    var isDirty: Bool {\n        return updatedLayoutCellSize != cellSize\n    }\n    \n    var updatedLayoutCellSize: CGSize {\n        guard let delegate = delegate, let cachedConfiguration = delegate._cachedConfiguration else { return .zero }\n        \n        // Default Item height and width\n        var height: CGFloat = collectionView!.bounds.size.height / CGFloat(cachedConfiguration.numberOfRows)\n        var width: CGFloat = collectionView!.bounds.size.width / CGFloat(maxNumberOfDaysInWeek)\n        \n        if shouldUseUserItemSizeInsteadOfDefault { // If delegate item size was set\n            if scrollDirection == .horizontal {\n                width = delegate.cellSize\n            } else {\n                height = delegate.cellSize\n            }\n        }\n        \n        return CGSize(width: width, height: height)\n    }\n    \n    open override func register(_ nib: UINib?, forDecorationViewOfKind elementKind: String) {\n        super.register(nib, forDecorationViewOfKind: elementKind)\n        thereAreDecorationViews = true\n    }\n    \n    open override func register(_ viewClass: AnyClass?, forDecorationViewOfKind elementKind: String) {\n        super.register(viewClass, forDecorationViewOfKind: elementKind)\n        thereAreDecorationViews = true\n    }\n\n    init(withDelegate delegate: JTACMonthDelegateProtocol) {\n        super.init()\n        self.delegate = delegate\n    }\n    /// Tells the layout object to update the current layout.\n    open override func prepare() {\n        \n        // set the last content size before the if statement which can possible return if layout is not yet ready to be prepared. Avoids inf loop\n        // with layout subviews\n        lastSetCollectionViewSize = collectionView!.frame\n        \n        if !layoutIsReadyToBePrepared {\n            // Layout may not be ready, but user might have reloaded with an anchor date\n            let requestedOffset = delegate?.requestedContentOffset ?? .zero\n            if requestedOffset != .zero { collectionView!.setContentOffset(requestedOffset, animated: false) }\n            \n            // execute any other delayed tasks\n            executeDelayedTasks()\n            return\n        }\n        \n        setupDataFromDelegate()\n        \n        if scrollDirection == .vertical {\n            configureVerticalLayout()\n        } else {\n            configureHorizontalLayout()\n        }\n        \n        // Get rid of header data if dev didnt register headers.\n        // They were used for calculation but are not needed to be displayed\n        if !thereAreHeaders {\n            headerCache.removeAll()\n        }\n        \n        // Set the first content offset only once. This will prevent scrolling animation on viewDidload.\n        if !firstContentOffsetWasSet, let delegate = delegate {\n            firstContentOffsetWasSet = true\n            let firstContentOffset = delegate.requestedContentOffset\n            collectionView!.setContentOffset(firstContentOffset, animated: false)\n        }\n        daysInSection.removeAll() // Clear chache\n        reloadWasTriggered = false\n        executeDelayedTasks()\n    }\n    \n    func setupDataFromDelegate() {\n        guard let delegate = delegate, let cachedConfiguration = delegate._cachedConfiguration else { return }\n        // get information from the delegate\n        headerSizes = delegate.sizesForMonthSection() // update first. Other variables below depend on it\n        strictBoundaryRulesShouldApply = thereAreHeaders || cachedConfiguration.hasStrictBoundaries\n        numberOfRows = cachedConfiguration.numberOfRows\n        monthMap = delegate.monthMap\n        allowsDateCellStretching = delegate.allowsDateCellStretching\n        monthInfo = delegate.monthInfo\n        scrollDirection = delegate.scrollDirection\n        maxMissCount = scrollDirection == .horizontal ? maxNumberOfRowsPerMonth : maxNumberOfDaysInWeek\n        minimumInteritemSpacing = delegate.minimumInteritemSpacing\n        minimumLineSpacing = delegate.minimumLineSpacing\n        sectionInset = delegate.sectionInset\n        cellSize = updatedLayoutCellSize\n    }\n    \n    func indexPath(direction: SegmentDestination, of section:Int, item: Int) -> IndexPath? {\n        var retval: IndexPath?\n        switch direction {\n        case .next:\n            if let data = cellCache[section], !data.isEmpty, 0..<data.count ~= item + 1 {\n                retval = IndexPath(item: item + 1, section: section)\n            } else if let data = cellCache[section + 1], !data.isEmpty {\n                retval = IndexPath(item: 0, section: section + 1)\n            }\n        case .previous:\n            if let data = cellCache[section], !data.isEmpty, 0..<data.count ~= item - 1 {\n                retval = IndexPath(item: item - 1, section: section)\n            } else if let data = cellCache[section - 1], !data.isEmpty {\n                retval = IndexPath(item: data.count - 1, section: section - 1)\n            }\n        default:\n            break\n        }\n        return retval\n    }\n    \n    /// Returns the width and height of the collection view’s contents.\n    /// The width and height of the collection view’s contents.\n    open override var collectionViewContentSize: CGSize {\n        return CGSize(width: contentWidth, height: contentHeight)\n    }\n    override func invalidateLayout() {\n        super.invalidateLayout()\n        \n        if isDirty && reloadWasTriggered {\n            clearCache()\n        }\n    }\n\n    /// Returns the layout attributes for all of the cells\n    /// and views in the specified rectangle.\n    override open func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {\n        let startSectionIndex = startIndexFrom(rectOrigin: rect.origin)\n        // keep looping until there were no interception rects\n        var attributes: [UICollectionViewLayoutAttributes] = []\n        var beganIntercepting = false\n        var missCount = 0\n        \n        outterLoop: for sectionIndex in startSectionIndex..<cellCache.count {\n            if let validSection = cellCache[sectionIndex], !validSection.isEmpty {\n                if thereAreDecorationViews {\n                    let attrib = layoutAttributesForDecorationView(ofKind: decorationViewID, at: IndexPath(item: 0, section: sectionIndex))!\n                    attributes.append(attrib)\n                }\n                \n                // Add header view attributes\n                if thereAreHeaders {\n                    let data = headerCache[sectionIndex]!\n\n                    if CGRect(x: data.xOffset, y: data.yOffset, width: data.width, height: data.height).intersects(rect) {\n                        let attrib = layoutAttributesForSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, at: IndexPath(item: data.item, section: data.section))\n                        attributes.append(attrib!)\n                    }\n                }\n                \n                for val in validSection {\n                    if CGRect(x: val.xOffset, y: val.yOffset, width: val.width, height: val.height).intersects(rect) {\n                        missCount = 0\n                        beganIntercepting = true\n                        let attrib = layoutAttributesForItem(at: IndexPath(item: val.item, section: val.section))\n                        attributes.append(attrib!)\n                    } else {\n                        missCount += 1\n                        // If there are at least 8 misses in a row\n                        // since intercepting began, then this\n                        // section has no more interceptions.\n                        // So break\n                        if missCount > maxMissCount && beganIntercepting { break outterLoop }\n                    }\n                }\n            }\n        }\n        return attributes\n    }\n    \n    /// Returns the layout attributes for the item at the specified index\n    /// path. A layout attributes object containing the information to apply\n    /// to the item’s cell.\n    override open func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {\n        // If this index is already cached, then return it else,\n        // apply a new layout attribut to it\n        if let alreadyCachedCellAttrib = cellAttributeFor(indexPath.item, section: indexPath.section) {\n            return alreadyCachedCellAttrib\n        }\n        return nil\n    }\n    \n    func supplementaryAttributeFor(item: Int, section: Int, elementKind: String) -> UICollectionViewLayoutAttributes? {\n        var retval: UICollectionViewLayoutAttributes?\n        if let cachedData = headerCache[section] {\n            \n            let attributes = UICollectionViewLayoutAttributes(forSupplementaryViewOfKind: elementKind, with: IndexPath(item: item, section: section))\n            attributes.frame = CGRect(x: cachedData.xOffset, y: cachedData.yOffset, width: cachedData.width, height: cachedData.height)\n            retval = attributes\n        }\n        return retval\n    }\n    \n    func cachedValue(for item: Int, section: Int) -> (item: Int, section: Int, xOffset: CGFloat, yOffset: CGFloat, width: CGFloat, height: CGFloat)? {\n        if\n            let alreadyCachedCellAttrib = cellCache[section],\n            item < alreadyCachedCellAttrib.count,\n            item >= 0 {\n            \n            return alreadyCachedCellAttrib[item]\n        }\n        return nil\n    }\n    \n    func sizeOfSection(_ section: Int) -> CGFloat {\n        guard let cellOfSection = cellCache[section]?.first else { return 0 }\n        var offSet: CGFloat\n        if scrollDirection == .horizontal {\n            offSet = cellOfSection.width * 7\n        } else {\n            offSet = cellOfSection.height * CGFloat(numberOfDaysInSection(section))\n            if\n                thereAreHeaders,\n                let headerHeight = headerCache[section]?.height {\n                    offSet += headerHeight\n            }\n        }\n        \n        let startOfSection = endOfSectionOffsets[section]\n        let endOfSection = endOfSectionOffsets[section + 1]\n        return endOfSection - startOfSection\n    }\n    \n    func cellAttributeFor(_ item: Int, section: Int) -> UICollectionViewLayoutAttributes? {\n        guard let cachedValue = cachedValue(for: item, section: section) else { return nil }\n        let attrib = UICollectionViewLayoutAttributes(forCellWith: IndexPath(item: item, section: section))\n        \n        attrib.frame = CGRect(x: cachedValue.xOffset, y: cachedValue.yOffset, width: cachedValue.width, height: cachedValue.height)\n        if minimumInteritemSpacing > 0, minimumLineSpacing > 0 {\n            var frame = attrib.frame.insetBy(dx: minimumInteritemSpacing / 2, dy: minimumLineSpacing / 2)\n            if frame == .null { frame = attrib.frame.insetBy(dx: 0, dy: 0) }\n            attrib.frame = frame\n        }\n        return attrib\n    }\n    \n    func determineToApplyAttribs(_ item: Int, section: Int)\n        -> (item: Int, section: Int, xOffset: CGFloat, yOffset: CGFloat, width: CGFloat, height: CGFloat)? {\n        let monthIndex = monthMap[section]!\n        let numberOfDays = numberOfDaysInSection(monthIndex)\n        // return nil on invalid range\n        if !(0...monthMap.count ~= section) || !(0...numberOfDays  ~= item) { return nil }\n        \n        let size = sizeForitemAtIndexPath(item, section: section)\n        let y = scrollDirection == .horizontal ? yCellOffset + sectionInset.top : yCellOffset\n        return (item, section, xCellOffset + xStride, y, size.width, size.height)\n    }\n    \n    func determineToApplySupplementaryAttribs(_ item: Int, section: Int)\n        -> (item: Int, section: Int, xOffset: CGFloat, yOffset: CGFloat, width: CGFloat, height: CGFloat)? {\n        var retval:  (item: Int, section: Int, xOffset: CGFloat, yOffset: CGFloat, width: CGFloat, height: CGFloat)?\n        \n        let headerHeight = cachedHeaderHeightForSection(section)\n        \n        switch scrollDirection {\n        case .horizontal:\n            let modifiedSize = sizeForitemAtIndexPath(item, section: section)\n            let width = (modifiedSize.width * 7)\n            retval = (item, section, contentWidth + sectionInset.left, sectionInset.top, width , headerHeight)\n        case .vertical:\n            // Use the calculaed header size and force the width\n            // of the header to take up 7 columns\n            // We cache the header here so we dont call the\n            // delegate so much\n            fallthrough\n        default:\n            let modifiedSize = (width: collectionView!.frame.width, height: headerHeight)\n            retval = (item, section, sectionInset.left, yCellOffset , modifiedSize.width - (sectionInset.left + sectionInset.right), modifiedSize.height)\n        }\n        \n        if retval?.width == 0, retval?.height == 0 {\n            return nil\n        }\n        return retval\n    }\n    \n    open override func layoutAttributesForDecorationView(ofKind elementKind: String, at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {\n        if let alreadyCachedVal = decorationCache[indexPath] { return alreadyCachedVal }\n        \n        let retval = UICollectionViewLayoutAttributes(forDecorationViewOfKind: decorationViewID, with: indexPath)\n        decorationCache[indexPath] = retval\n        retval.frame = delegate?.sizeOfDecorationView(indexPath: indexPath) ?? .zero\n        retval.zIndex = -1\n        return retval\n    }\n    \n    \n    /// Returns the layout attributes for the specified supplementary view.\n    open override func layoutAttributesForSupplementaryView(ofKind elementKind: String, at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {\n        if let alreadyCachedHeaderAttrib = supplementaryAttributeFor(item: indexPath.item, section: indexPath.section, elementKind: elementKind) {\n            return alreadyCachedHeaderAttrib\n        }\n        \n        return nil\n    }\n    \n    func numberOfDaysInSection(_ index: Int) -> Int {\n        if let days = daysInSection[index] { return days }\n        let days = monthInfo[index].numberOfDaysInMonthGrid\n        daysInSection[index] = days\n        return days\n    }\n    \n    func numberOfRowsInSection(_ index: Int) -> Int {\n        let numberOfDays = CGFloat(numberOfDaysInSection(index))\n        return Int(ceil(numberOfDays / CGFloat(numberOfRows)))\n    }\n    \n    func cachedHeaderHeightForSection(_ section: Int) -> CGFloat {\n        var retval: CGFloat = 0\n        // We look for most specific to less specific\n        // Section = specific dates\n        // Months = generic months\n        // Default = final resort\n        \n        if let height = headerSizes[section] {\n            retval = height\n        } else {\n            let monthIndex = monthMap[section]!\n            let monthName = monthInfo[monthIndex].name\n            if let height = headerSizes[monthName] {\n                retval = height\n            } else if let height = headerSizes[\"default\"] {\n                retval = height\n            }\n        }\n\n        return retval\n    }\n    \n    func sizeForitemAtIndexPath(_ item: Int, section: Int) -> (width: CGFloat, height: CGFloat) {\n        if let cachedCell  = currentCell,\n            cachedCell.section == section {\n            \n            if !strictBoundaryRulesShouldApply, scrollDirection == .horizontal,\n                !cellCache.isEmpty {\n                \n                if let x = cellCache[0]?[0] {\n                    return (x.width, x.height)\n                } else {\n                    return (0, 0)\n                }\n            } else {\n                return (cachedCell.width, cachedCell.height)\n            }\n        }\n        let width = cellSize.width - ((sectionInset.left / 7) + (sectionInset.right / 7))\n        var size: (width: CGFloat, height: CGFloat) = (width, cellSize.height)\n        if shouldUseUserItemSizeInsteadOfDefault {\n            if scrollDirection == .vertical {\n                size.height = cellSize.height\n            } else {\n                size.width = cellSize.width\n                let headerHeight =  strictBoundaryRulesShouldApply ? cachedHeaderHeightForSection(section) : 0\n                let currentMonth = monthInfo[monthMap[section]!]\n                let recalculatedNumOfRows = allowsDateCellStretching ? CGFloat(currentMonth.maxNumberOfRowsForFull(developerSetRows: numberOfRows)) : CGFloat(maxNumberOfRowsPerMonth)\n                size.height = (collectionView!.frame.height - headerHeight - sectionInset.top - sectionInset.bottom) / recalculatedNumOfRows\n                currentCell = (section: section, width: size.width, height: size.height)\n            }\n        } else {\n            // Get header size if it already cached\n            let headerHeight =  strictBoundaryRulesShouldApply ? cachedHeaderHeightForSection(section) : 0\n            var height: CGFloat = 0\n            let currentMonth = monthInfo[monthMap[section]!]\n            let numberOfRowsForSection: Int\n            if allowsDateCellStretching {\n                numberOfRowsForSection\n                    = strictBoundaryRulesShouldApply ? currentMonth.maxNumberOfRowsForFull(developerSetRows: numberOfRows) : numberOfRows\n            } else {\n                numberOfRowsForSection = maxNumberOfRowsPerMonth\n            }\n            height      = (collectionView!.frame.height - headerHeight - sectionInset.top - sectionInset.bottom) / CGFloat(numberOfRowsForSection)\n            size.height = height > 0 ? height : 0\n            currentCell = (section: section, width: size.width, height: size.height)\n        }\n        return size\n    }\n    \n    func numberOfRowsForMonth(_ index: Int) -> Int {\n        let monthIndex = monthMap[index]!\n        return monthInfo[monthIndex].rows\n    }\n    \n    func startIndexFrom(rectOrigin offset: CGPoint) -> Int {\n        let key =  scrollDirection == .horizontal ? offset.x : offset.y\n        return startIndexBinarySearch(endOfSectionOffsets, offset: key)\n    }\n    \n    func sizeOfContentForSection(_ section: Int) -> CGFloat {\n        switch scrollDirection {\n        case .horizontal:\n            return cellCache[section]![0].width * CGFloat(maxNumberOfDaysInWeek) + sectionInset.left + sectionInset.right\n        case .vertical:\n            fallthrough\n        default:\n            let headerSizeOfSection = !headerCache.isEmpty ? headerCache[section]!.height : 0\n            return cellCache[section]![0].height * CGFloat(numberOfRowsForMonth(section)) + headerSizeOfSection\n            \n        }\n    }\n    \n    func sectionFromOffset(_ theOffSet: CGFloat) -> Int {\n        var val: Int = 0\n        for (index, sectionSizeValue) in endOfSectionOffsets.enumerated() {\n            if abs(theOffSet - sectionSizeValue) < errorDelta {\n                continue\n            }\n            if theOffSet < sectionSizeValue {\n                val = index\n                break\n            }\n        }\n        return val\n    }\n    \n    func startIndexBinarySearch<T: Comparable>(_ val: [T], offset: T) -> Int {\n        if val.count < 3 {\n            return 0\n        } // If the range is less than 2 just break here.\n        var midIndex: Int = 0\n        var startIndex = 0\n        var endIndex = val.count - 1\n        while startIndex < endIndex {\n            midIndex = startIndex + (endIndex - startIndex) / 2\n            if midIndex + 1  >= val.count || offset >= val[midIndex] &&\n                offset < val[midIndex + 1] ||  val[midIndex] == offset {\n                break\n            } else if val[midIndex] < offset {\n                startIndex = midIndex + 1\n            } else {\n                endIndex = midIndex\n            }\n        }\n        return midIndex\n    }\n    \n    /// Returns an object initialized from data in a given unarchiver.\n    /// self, initialized using the data in decoder.\n    required public init?(coder aDecoder: NSCoder) {\n        delegate = (aDecoder.value(forKey: \"delegate\") as! JTACMonthDelegateProtocol)\n        cellCache = aDecoder.value(forKey: \"delegate\") as! [Int : [(Int, Int, CGFloat, CGFloat, CGFloat, CGFloat)]]\n        headerCache = aDecoder.value(forKey: \"delegate\") as! [Int : (Int, Int, CGFloat, CGFloat, CGFloat, CGFloat)]\n        headerSizes = aDecoder.value(forKey: \"delegate\") as! [AnyHashable:CGFloat]\n        super.init(coder: aDecoder)\n    }\n    \n    // This function ignores decoration views //JT101 for setting proposal\n    func minimumVisibleIndexPaths() -> (cellIndex: IndexPath?, headerIndex: IndexPath?) {\n        let visibleItems: [UICollectionViewLayoutAttributes]\n        if scrollDirection == .horizontal {\n            visibleItems = elementsAtRect(excludeHeaders: true)\n        } else {\n            visibleItems = elementsAtRect()\n        }\n        \n        var cells: [IndexPath] = []\n        var headers: [IndexPath] = []\n        for item in visibleItems {\n            switch item.representedElementCategory {\n            case .cell:\n                cells.append(item.indexPath)\n            case .supplementaryView:\n                headers.append(item.indexPath)\n            case .decorationView:\n                fallthrough\n            default: break\n            }\n        }\n        return (cells.min(), headers.min())\n    }\n    \n    func elementsAtRect(excludeHeaders: Bool? = false, from rect: CGRect? = nil) -> [UICollectionViewLayoutAttributes] {\n        let aRect = rect ?? CGRect(x: collectionView!.contentOffset.x + 1, y: collectionView!.contentOffset.y + 1, width: collectionView!.frame.width - 2, height: collectionView!.frame.height - 2)\n        guard let attributes = layoutAttributesForElements(in: aRect), !attributes.isEmpty else {\n            return []\n        }\n        if excludeHeaders == true {\n            return attributes.filter { $0.representedElementKind != UICollectionView.elementKindSectionHeader }\n        }\n        return attributes\n    }\n\n    func clearCache() {\n        headerCache.removeAll()\n        cellCache.removeAll()\n        endOfSectionOffsets.removeAll()\n        decorationCache.removeAll()\n        currentHeader = nil\n        currentCell = nil\n        lastWrittenCellAttribute = nil\n        xCellOffset = 0\n        yCellOffset = 0\n        contentHeight = 0\n        contentWidth = 0\n        xStride = 0\n        firstContentOffsetWasSet = false\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACMonthLayoutHorizontalCalendar.swift",
    "content": "//\n//  JTACMonthLayoutHorizontalCalendar.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nextension JTACMonthLayout {\n    func configureHorizontalLayout() {\n        var virtualSection = 0\n        var totalDayCounter = 0\n        let fullSection = numberOfRows * maxNumberOfDaysInWeek\n        \n        xCellOffset = sectionInset.left\n        endSeparator = sectionInset.left + sectionInset.right\n        \n        for aMonth in monthInfo {\n            for numberOfDaysInCurrentSection in aMonth.sections {\n                // Generate and cache the headers\n                if let aHeaderAttr = determineToApplySupplementaryAttribs(0, section: virtualSection) {\n                    headerCache[virtualSection] = aHeaderAttr\n                    if strictBoundaryRulesShouldApply {\n                        contentWidth += aHeaderAttr.width\n                        yCellOffset = aHeaderAttr.height\n                    }\n                }\n                // Generate and cache the cells\n                for dayCounter in 1...numberOfDaysInCurrentSection {\n                    guard let attribute = determineToApplyAttribs(dayCounter - 1, section: virtualSection)  else { continue }\n                    if cellCache[virtualSection] == nil { cellCache[virtualSection] = [] }\n                    cellCache[virtualSection]!.append(attribute)\n                    lastWrittenCellAttribute = attribute\n                    xCellOffset += attribute.width\n                    \n                    if strictBoundaryRulesShouldApply {\n                        if dayCounter == numberOfDaysInCurrentSection || dayCounter % maxNumberOfDaysInWeek == 0 {\n                            // We are at the last item in the section\n                            // && if we have headers\n                            xCellOffset = sectionInset.left\n                            yCellOffset += attribute.height\n                        }\n                    } else {\n                        totalDayCounter += 1\n                        if totalDayCounter % fullSection == 0 {\n                            yCellOffset = 0\n                            xCellOffset = sectionInset.left\n                            contentWidth += (attribute.width * 7) + endSeparator\n                            xStride = contentWidth\n                            endOfSectionOffsets.append(contentWidth)\n                        } else {\n                            if totalDayCounter >= delegate?.totalDays ?? 0 {\n                                contentWidth += (attribute.width * 7) + endSeparator\n                                endOfSectionOffsets.append(contentWidth)\n                            }\n                            if totalDayCounter % maxNumberOfDaysInWeek == 0 {\n                                xCellOffset = sectionInset.left\n                                yCellOffset += attribute.height\n                            }\n                        }\n                    }\n                }\n                \n                // Save the content size for each section\n                if strictBoundaryRulesShouldApply {\n                    contentWidth += endSeparator\n                    endOfSectionOffsets.append(contentWidth)\n                    xStride = endOfSectionOffsets[virtualSection]\n                }\n                virtualSection += 1\n            }\n        }\n        contentHeight = self.collectionView!.bounds.size.height\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACMonthLayoutProtocol.swift",
    "content": "//\n//  JTACMonthLayoutProtocol.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport UIKit\n\nprotocol JTACMonthLayoutProtocol: AnyObject {\n    var minimumInteritemSpacing: CGFloat {get set}\n    var minimumLineSpacing: CGFloat {get set}\n    var sectionInset: UIEdgeInsets {get set}\n    var scrollDirection: UICollectionView.ScrollDirection {get set}\n}\n\nextension UICollectionViewFlowLayout: JTACMonthLayoutProtocol {}\n\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACMonthLayoutVerticalCalendar.swift",
    "content": "//\n//  JTACMonthLayoutVerticalCalendar.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nextension JTACMonthLayout {\n    \n    func configureVerticalLayout() {\n        var virtualSection = 0\n        var totalDayCounter = 0\n        let fullSection = numberOfRows * maxNumberOfDaysInWeek\n        \n        xCellOffset   = sectionInset.left\n        yCellOffset   = sectionInset.top\n        contentHeight = sectionInset.top\n        endSeparator  = sectionInset.top + sectionInset.bottom\n        \n        for aMonth in monthInfo {\n            for numberOfDaysInCurrentSection in aMonth.sections {\n                // Generate and cache the headers\n                if let aHeaderAttr = determineToApplySupplementaryAttribs(0, section: virtualSection) {\n                    headerCache[virtualSection] = aHeaderAttr\n                    if strictBoundaryRulesShouldApply {\n                        contentHeight += aHeaderAttr.height\n                        yCellOffset += aHeaderAttr.height\n                    }\n                }\n                // Generate and cache the cells\n                for dayCounter in 1...numberOfDaysInCurrentSection {\n                    totalDayCounter += 1\n                    guard let attribute = determineToApplyAttribs(dayCounter - 1, section: virtualSection) else { continue }\n                    if cellCache[virtualSection] == nil { cellCache[virtualSection] = [] }\n                    cellCache[virtualSection]!.append(attribute)\n                    lastWrittenCellAttribute = attribute\n                    xCellOffset += attribute.width\n                    \n                    if strictBoundaryRulesShouldApply {\n                        if dayCounter == numberOfDaysInCurrentSection || dayCounter % maxNumberOfDaysInWeek == 0 {\n                            // We are at the last item in the\n                            // section && if we have headers\n                            \n                            xCellOffset = sectionInset.left\n                            yCellOffset += attribute.height\n                            contentHeight += attribute.height\n                            \n                            if dayCounter == numberOfDaysInCurrentSection {\n                                yCellOffset   += sectionInset.top\n                                contentHeight += sectionInset.top\n                                endOfSectionOffsets.append(contentHeight - sectionInset.top)\n                            }\n                        }\n                    } else {\n                        if totalDayCounter % fullSection == 0 {\n                            \n                            yCellOffset += attribute.height + sectionInset.top\n                            xCellOffset = sectionInset.left\n                            contentHeight = yCellOffset\n                            endOfSectionOffsets.append(contentHeight - sectionInset.top)\n                            \n                        } else {\n                            if totalDayCounter >= delegate?.totalDays ?? 0 {\n                                yCellOffset += attribute.height + sectionInset.top\n                                contentHeight = yCellOffset\n                                endOfSectionOffsets.append(contentHeight - sectionInset.top)\n                            }\n                            \n                            if totalDayCounter % maxNumberOfDaysInWeek == 0 {\n                                xCellOffset = sectionInset.left\n                                yCellOffset += attribute.height\n                            }\n                        }\n                    }\n                }\n                virtualSection += 1\n            }\n        }\n        contentWidth = self.collectionView!.bounds.size.width\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACMonthQueryFunctions.swift",
    "content": "//\n//  JTACMonthQueryFunctions.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport UIKit\n\nextension JTACMonthView {\n    func validForwardAndBackwordSelectedIndexes(forIndexPath indexPath: IndexPath, restrictToSection: Bool = true) -> (forwardIndex: IndexPath?, backIndex: IndexPath?, set: Set<IndexPath>) {\n        var retval: (forwardIndex: IndexPath?, backIndex: IndexPath?, set: Set<IndexPath>) = (forwardIndex: nil, backIndex: nil, set: [])\n        if let validForwardIndex = calendarViewLayout.indexPath(direction: .next, of: indexPath.section, item: indexPath.item),\n            (restrictToSection ? validForwardIndex.section == indexPath.section : true),\n            selectedCellData[validForwardIndex] != nil {\n            retval.forwardIndex = validForwardIndex\n            retval.set.insert(validForwardIndex)\n        }\n        if\n            let validBackwardIndex = calendarViewLayout.indexPath(direction: .previous, of: indexPath.section, item: indexPath.item),\n            (restrictToSection ? validBackwardIndex.section == indexPath.section : true),\n            selectedCellData[validBackwardIndex] != nil {\n            retval.backIndex = validBackwardIndex\n            retval.set.insert(validBackwardIndex)\n        }\n        return retval\n    }\n    \n    // Determines the CGPoint of an index path. The point will vary depending on the scrollingMode\n    func targetPointForItemAt(indexPath: IndexPath, preferredScrollPosition: UICollectionView.ScrollPosition? = nil) -> CGPoint? {\n        guard let targetCellFrame = calendarViewLayout.layoutAttributesForItem(at: indexPath)?.frame else { // Jt101 This was changed !!\n            return nil\n        }\n\n        var x: CGFloat = scrollDirection == .horizontal ? targetCellFrame.origin.x : 0\n        var y: CGFloat = scrollDirection == .vertical ? targetCellFrame.origin.y : 0\n        \n        let theTargetContentOffset: CGFloat = scrollDirection == .horizontal ? targetCellFrame.origin.x : targetCellFrame.origin.y\n        var fixedScrollSize: CGFloat = 0\n        switch scrollingMode {\n        case let .stopAtEach(customInterval: x): fixedScrollSize = x\n        case let .nonStopTo(customInterval: x, withResistance: _): fixedScrollSize = x\n        case .stopAtEachCalendarFrame: fixedScrollSize = scrollDirection == .horizontal ? self.frame.width : self.frame.height\n        default: break\n        }\n\n        switch scrollingMode {\n        case .stopAtEachCalendarFrame, .stopAtEach, .nonStopTo:\n            assert(fixedScrollSize != 0, \"You should not try to divide by zero.\")\n            let frameSection = theTargetContentOffset / fixedScrollSize\n            let roundedFrameSection = floor(frameSection)\n            if scrollDirection == .horizontal {\n                x = roundedFrameSection * fixedScrollSize\n            } else {\n                // vertical is fixed scroll segments because here, we're using stop at frame and custom fixed size\n                y = roundedFrameSection * fixedScrollSize\n            }\n        case .stopAtEachSection, .nonStopToSection:\n            if scrollDirection == .horizontal  {\n                let section = calendarViewLayout.sectionFromOffset(theTargetContentOffset)\n                guard let validValue = calendarViewLayout.cachedValue(for: 0, section: section)?.2 else { return nil}\n                x = validValue - sectionInset.left\n            } else {\n                // If headers, then find the section headers cgpoint for a cellDate. I no headers, then find the first cell's cgpoint of section\n                if !calendarViewLayout.thereAreHeaders {\n                    let section = calendarViewLayout.sectionFromOffset(theTargetContentOffset)\n                    guard let validAttrib = calendarViewLayout.cachedValue(for: 0, section: section)?.3 else { return nil }\n                    y = validAttrib - sectionInset.top\n                } else {\n                    let section = calendarViewLayout.sectionFromOffset(theTargetContentOffset)\n                    guard let validSectionHeaderData = calendarViewLayout.headerCache[section] else { return nil }\n                    y = validSectionHeaderData.3 - sectionInset.top\n                }\n            }\n        default: break\n        }\n        return CGPoint(x: x, y: y)\n    }\n    \n    func calendarOffsetIsAlreadyAtScrollPosition(forOffset offset: CGPoint) -> Bool {\n        var retval = false\n        // If the scroll is set to animate, and the target content\n        // offset is already on the screen, then the\n        // didFinishScrollingAnimation\n        // delegate will not get called. Once animation is on let's\n        // force a scroll so the delegate MUST get caalled\n        let theOffset = scrollDirection == .horizontal ? offset.x : offset.y\n        let divValue = scrollDirection == .horizontal ? frame.width : frame.height\n        let sectionForOffset = Int(theOffset / divValue)\n        let calendarCurrentOffset = scrollDirection == .horizontal ? contentOffset.x : contentOffset.y\n        if calendarCurrentOffset == theOffset || (scrollingMode.pagingIsEnabled() && (sectionForOffset ==  currentSection())) {\n            retval = true\n        }\n        return retval\n    }\n    \n    func calendarOffsetIsAlreadyAtScrollPosition(forIndexPath indexPath: IndexPath) -> Bool {\n        var retval = false\n        // If the scroll is set to animate, and the target content offset\n        // is already on the screen, then the didFinishScrollingAnimation\n        // delegate will not get called. Once animation is on let's force\n        // a scroll so the delegate MUST get caalled\n        if let attributes = calendarViewLayout.layoutAttributesForItem(at: indexPath) { // JT101 this was changed!!!!\n            let layoutOffset: CGFloat\n            let calendarOffset: CGFloat\n            if scrollDirection == .horizontal {\n                layoutOffset = attributes.frame.origin.x\n                calendarOffset = contentOffset.x\n            } else {\n                layoutOffset = attributes.frame.origin.y\n                calendarOffset = contentOffset.y\n            }\n            if  calendarOffset == layoutOffset {\n                retval = true\n            }\n        }\n        return retval\n    }\n    \n    func indexPathOfdateCellCounterPath(_ date: Date, dateOwner: DateOwner) -> IndexPath? {\n        if (_cachedConfiguration?.generateInDates == .off ||\n            _cachedConfiguration?.generateInDates == .forFirstMonthOnly) &&\n            _cachedConfiguration?.generateOutDates == .off {\n            return nil\n        }\n        var retval: IndexPath?\n        if dateOwner != .thisMonth {\n            // If the cell is anything but this month, then the cell belongs\n            // to either a previous of following month\n            // Get the indexPath of the counterpartCell\n            let counterPathIndex = pathsFromDates([date])\n            if !counterPathIndex.isEmpty {\n                retval = counterPathIndex[0]\n            }\n        } else {\n            // If the date does belong to this month,\n            // then lets find out if it has a counterpart date\n            if date < startOfMonthCache || date > endOfMonthCache {\n                return retval\n            }\n            guard let dayIndex = calendar.dateComponents([.day], from: date).day else {\n                print(\"Invalid Index\")\n                return nil\n            }\n            if case 1...13 = dayIndex {\n                // then check the previous month\n                // get the index path of the last day of the previous month\n                let periodApart = calendar.dateComponents([.month], from: startOfMonthCache, to: date)\n                guard\n                    let monthSectionIndex = periodApart.month, monthSectionIndex - 1 >= 0 else {\n                        // If there is no previous months,\n                        // there are no counterpart dates\n                        return retval\n                }\n                let previousMonthInfo = monthInfo[monthSectionIndex - 1]\n                // If there are no postdates for the previous month,\n                // then there are no counterpart dates\n                if previousMonthInfo.outDates < 1 || dayIndex > previousMonthInfo.outDates {\n                    return retval\n                }\n                guard\n                    let prevMonth = calendar.date(byAdding: .month, value: -1, to: date),\n                    let lastDayOfPrevMonth = calendar.endOfMonth(for: prevMonth) else {\n                        assert(false, \"Error generating date in indexPathOfdateCellCounterPath(). Contact the developer on github\")\n                        return retval\n                }\n                \n                let indexPathOfLastDayOfPreviousMonth = pathsFromDates([lastDayOfPrevMonth])\n                if indexPathOfLastDayOfPreviousMonth.isEmpty {\n                    print(\"out of range error in indexPathOfdateCellCounterPath() upper. This should not happen. Contact developer on github\")\n                    return retval\n                }\n                let lastDayIndexPath = indexPathOfLastDayOfPreviousMonth[0]\n                var section = lastDayIndexPath.section\n                var itemIndex = lastDayIndexPath.item + dayIndex\n                // Determine if the sections/item needs to be adjusted\n                \n                let numberOfItemsInSection = collectionView(self, numberOfItemsInSection: section)\n                guard numberOfItemsInSection > 0 else {\n                    assert(false, \"Number of sections in calendar = 0. Possible fixes (1) is your calendar visible size 0,0? (2) is your calendar already loaded/visible?\")\n                    return nil\n                }\n                let extraSection = itemIndex / numberOfItemsInSection\n                let extraIndex = itemIndex % numberOfItemsInSection\n                section += extraSection\n                itemIndex = extraIndex\n                let reCalcRapth = IndexPath(item: itemIndex, section: section)\n                retval = reCalcRapth\n            } else if case 23...31 = dayIndex { // check the following month\n                let periodApart = calendar.dateComponents([.month], from: startOfMonthCache, to: date)\n                let monthSectionIndex = periodApart.month!\n                if monthSectionIndex + 1 >= monthInfo.count {\n                    return retval\n                }\n                \n                // If there is no following months, there are no counterpart dates\n                let followingMonthInfo = monthInfo[monthSectionIndex + 1]\n                if followingMonthInfo.inDates < 1 {\n                    return retval\n                }\n                // If there are no predates for the following month then there are no counterpart dates\n                let lastDateOfCurrentMonth = calendar.endOfMonth(for: date)!\n                let lastDay = calendar.component(.day, from: lastDateOfCurrentMonth)\n                let section = followingMonthInfo.startSection\n                let index = dayIndex - lastDay + (followingMonthInfo.inDates - 1)\n                if index < 0 {\n                    return retval\n                }\n                retval = IndexPath(item: index, section: section)\n            }\n        }\n        return retval\n    }\n    \n    func sizesForMonthSection() -> [AnyHashable:CGFloat] {\n        var retval: [AnyHashable:CGFloat] = [:]\n        guard\n            let headerSizes = calendarDelegate?.calendarSizeForMonths(self),\n            headerSizes.defaultSize > 0 else {\n                return retval\n        }\n        \n        // Build the default\n        retval[\"default\"] = headerSizes.defaultSize\n        \n        // Build the every-month data\n        if let allMonths = headerSizes.months {\n            for (size, months) in allMonths {\n                for month in months {\n                    assert(retval[month] == nil, \"You have duplicated months. Please revise your month size data.\")\n                    retval[month] = size\n                }\n            }\n        }\n        \n        // Build the specific month data\n        if let specificSections = headerSizes.dates {\n            for (size, dateArray) in specificSections {\n                let paths = pathsFromDates(dateArray)\n                for path in paths {\n                    retval[path.section] = size\n                }\n            }\n        }\n        return retval\n    }\n    \n    func pathsFromDates(_ dates: [Date]) -> [IndexPath] {\n        var returnPaths: [IndexPath] = []\n        for date in dates {\n            if calendar.startOfDay(for: date) >= startOfMonthCache! && calendar.startOfDay(for: date) <= endOfMonthCache! {\n                let periodApart = calendar.dateComponents([.month], from: startOfMonthCache, to: date)\n                let day = calendar.dateComponents([.day], from: date).day!\n                guard let monthSectionIndex = periodApart.month else { continue }\n                let currentMonthInfo = monthInfo[monthSectionIndex]\n                if let indexPath = currentMonthInfo.indexPath(forDay: day) {\n                    returnPaths.append(indexPath)\n                }\n            }\n        }\n        return returnPaths\n    }\n    \n    func cellStateFromIndexPath(_ indexPath: IndexPath,\n                                withDateInfo info: (date: Date, owner: DateOwner)? = nil,\n                                cell: JTACDayCell? = nil,\n                                isSelected: Bool? = nil,\n                                selectionType: SelectionType? = nil) -> CellState {\n        let validDateInfo: (date: Date, owner: DateOwner)\n        if let nonNilDateInfo = info {\n            validDateInfo = nonNilDateInfo\n        } else {\n            guard let newDateInfo = dateOwnerInfoFromPath(indexPath) else {\n                developerError(string: \"Error this should not be nil. Contact developer Jay on github by opening a request\")\n                return CellState(isSelected: false,\n                                 text: \"\",\n                                 dateBelongsTo: .thisMonth,\n                                 date: Date(),\n                                 day: .sunday,\n                                 row: { return 0 },\n                                 column: { return 0 },\n                                 dateSection: { return (range: (Date(), Date()), month: 0, rowCount: 0) },\n                                 selectedPosition: {return .left},\n                                 cell: {return nil},\n                                 selectionType: nil)\n            }\n            validDateInfo = newDateInfo\n        }\n        let date = validDateInfo.date\n        let dateBelongsTo = validDateInfo.owner\n        \n        let currentDay = calendar.component(.day, from: date)\n        let componentWeekDay = calendar.component(.weekday, from: date)\n        let cellText = String(describing: currentDay)\n        let dayOfWeek = DaysOfWeek(rawValue: componentWeekDay)!\n        \n        let selectedPosition = { [unowned self] () -> SelectionRangePosition in\n            let selectedDates = self.selectedDatesSet\n            if !selectedDates.contains(date) || selectedDates.isEmpty  { return .none }\n          \n            let isLTRDirection = UIView.userInterfaceLayoutDirection(\n            for: self.semanticContentAttribute) == .leftToRight\n          let restrictToSection = self.rangeSelectionMode == .segmented\n          let validSelectedIndexes = self.validForwardAndBackwordSelectedIndexes(forIndexPath: indexPath, restrictToSection: restrictToSection)\n            let dateBeforeIsSelected = validSelectedIndexes.backIndex != nil\n            let dateAfterIsSelected = validSelectedIndexes.forwardIndex != nil\n            \n            var position: SelectionRangePosition\n            \n            if dateBeforeIsSelected, dateAfterIsSelected {\n                position = .middle\n            } else if !dateBeforeIsSelected, dateAfterIsSelected {\n                position = isLTRDirection ? .left : .right\n            } else if dateBeforeIsSelected, !dateAfterIsSelected {\n                position = isLTRDirection ? .right : .left\n            } else if !dateBeforeIsSelected, !dateAfterIsSelected  {\n                position = .full\n            } else {\n                position = .none\n            }\n\n            return position\n        }\n        \n        let cellState = CellState(\n            isSelected: isSelected ?? (selectedCellData[indexPath] != nil),\n            text: cellText,\n            dateBelongsTo: dateBelongsTo,\n            date: date,\n            day: dayOfWeek,\n            row: { return indexPath.item / maxNumberOfDaysInWeek },\n            column: { return indexPath.item % maxNumberOfDaysInWeek },\n            dateSection: { [unowned self] in\n                return self.monthInfoFromSection(indexPath.section)!\n            },\n            selectedPosition: selectedPosition,\n            cell: { return cell },\n            selectionType: selectionType\n        )\n        return cellState\n    }\n    \n    func monthInfoFromSection(_ section: Int) -> (range: (start: Date, end: Date), month: Int, rowCount: Int)? {\n        guard let monthIndex = monthMap[section] else {\n            return nil\n        }\n        let monthData = monthInfo[monthIndex]\n        \n        guard\n            let monthDataMapSection = monthData.sectionIndexMaps[section],\n            let indices = monthData.boundaryIndicesFor(section: monthDataMapSection) else {\n                return nil\n        }\n        let startIndexPath = IndexPath(item: indices.startIndex, section: section)\n        let endIndexPath = IndexPath(item: indices.endIndex, section: section)\n        guard\n            let startDate = dateOwnerInfoFromPath(startIndexPath)?.date,\n            let endDate = dateOwnerInfoFromPath(endIndexPath)?.date else {\n                return nil\n        }\n        if let monthDate = calendar.date(byAdding: .month, value: monthIndex, to: startDateCache) {\n            let monthNumber = calendar.dateComponents([.month], from: monthDate)\n            let numberOfRowsForSection = monthData.numberOfRows(for: section, developerSetRows: _cachedConfiguration?.numberOfRows ?? 0)\n            return ((startDate, endDate), monthNumber.month!, numberOfRowsForSection)\n        }\n        return nil\n    }\n    \n    func dateSegmentInfoFrom(visible indexPaths: [IndexPath]) -> DateSegmentInfo {\n        var inDates    = [(Date, IndexPath)]()\n        var monthDates = [(Date, IndexPath)]()\n        var outDates   = [(Date, IndexPath)]()\n        \n        for indexPath in indexPaths {\n            let info = dateOwnerInfoFromPath(indexPath)\n            if let validInfo = info  {\n                switch validInfo.owner {\n                case .thisMonth:\n                    monthDates.append((validInfo.date, indexPath))\n                case .previousMonthWithinBoundary, .previousMonthOutsideBoundary:\n                    inDates.append((validInfo.date, indexPath))\n                default:\n                    outDates.append((validInfo.date, indexPath))\n                }\n            }\n        }\n        \n        let retval = DateSegmentInfo(indates: inDates, monthDates: monthDates, outdates: outDates)\n        return retval\n    }\n    \n    func dateOwnerInfoFromPath(_ indexPath: IndexPath) -> (date: Date, owner: DateOwner)? { // Returns nil if date is out of scope\n        guard let monthIndex = monthMap[indexPath.section] else {\n            return nil\n        }\n        let monthData = monthInfo[monthIndex]\n        // Calculate the offset\n        let offSet: Int\n        var numberOfDaysToAddToOffset: Int = 0\n        switch monthData.sectionIndexMaps[indexPath.section]! {\n        case 0:\n            offSet = monthData.inDates\n        default:\n            offSet = 0\n            let currentSectionIndexMap = monthData.sectionIndexMaps[indexPath.section]!\n            numberOfDaysToAddToOffset = monthData.sections[0..<currentSectionIndexMap].reduce(0, +)\n            numberOfDaysToAddToOffset -= monthData.inDates\n        }\n        \n        var dayIndex = 0\n        var dateOwner: DateOwner = .thisMonth\n        let date: Date?\n        if indexPath.item >= offSet && indexPath.item + numberOfDaysToAddToOffset < monthData.numberOfDaysInMonth + offSet {\n            // This is a month date\n            dayIndex = monthData.startDayIndex + indexPath.item - offSet + numberOfDaysToAddToOffset\n            date = calendar.date(byAdding: .day, value: dayIndex, to: startOfMonthCache)\n        } else if indexPath.item < offSet {\n            // This is a preDate\n            dayIndex = indexPath.item - offSet  + monthData.startDayIndex\n            date = calendar.date(byAdding: .day, value: dayIndex, to: startOfMonthCache)\n            if date! < startOfMonthCache {\n                dateOwner = .previousMonthOutsideBoundary\n            } else {\n                dateOwner = .previousMonthWithinBoundary\n            }\n        } else {\n            // This is a postDate\n            dayIndex =  monthData.startDayIndex - offSet + indexPath.item + numberOfDaysToAddToOffset\n            date = calendar.date(byAdding: .day, value: dayIndex, to: startOfMonthCache)\n            if date! > endOfMonthCache {\n                dateOwner = .followingMonthOutsideBoundary\n            } else {\n                dateOwner = .followingMonthWithinBoundary\n            }\n        }\n        guard let validDate = date else { return nil }\n        return (validDate, dateOwner)\n    }\n    \n    func datesAtCurrentOffset(_ offset: CGPoint? = nil) -> DateSegmentInfo {\n        \n        let rect: CGRect?\n        if let offset = offset {\n            rect = CGRect(x: offset.x + 1, y: offset.y + 1, width: frame.width - 2, height: frame.height - 2)\n        } else {\n            rect = nil\n        }\n        \n        let emptySegment = DateSegmentInfo(indates: [], monthDates: [], outdates: [])\n        \n        guard calendarLayoutIsLoaded else { return emptySegment }\n        \n        let cellAttributes = calendarViewLayout.elementsAtRect(excludeHeaders: true, from: rect)\n        let indexPaths: [IndexPath] = cellAttributes.map { $0.indexPath }.sorted()\n        return dateSegmentInfoFrom(visible: indexPaths)\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACMonthReusableView.swift",
    "content": "//\n//  JTACMonthReusableView.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\nimport UIKit\n\n/// The header view class of the calendar\n@available(*, unavailable, renamed: \"JTACMonthReusableView\")\nopen class JTAppleCollectionReusableView: UICollectionReusableView {}\nopen class JTACMonthReusableView: UICollectionReusableView {\n    /// Initializes and returns a newly allocated view object with the specified frame rectangle.\n    public override init(frame: CGRect) {\n        super.init(frame: frame)\n    }\n\n    /// Returns an object initialized from data in a given unarchiver.\n    /// self, initialized using the data in decoder.\n    required public init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACMonthView.swift",
    "content": "//\n//  JTACMonthView.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\nimport UIKit\n\nlet maxNumberOfDaysInWeek = 7 // Should not be changed\nlet maxNumberOfRowsPerMonth = 6 // Should not be changed\nlet developerErrorMessage = \"There was an error in this code section. Please contact the developer on GitHub\"\nlet decorationViewID = \"Are you ready for the life after this one?\"\nlet errorDelta: CGFloat = 0.0000001\n\n\n/// An instance of JTAppleCalendarMonthView (or simply, a calendar view) is a\n/// means for displaying and interacting with a gridstyle layout of date-cells\n@available(*, unavailable, renamed: \"JTACMonthView\")\nopen class JTAppleCalendarView: UICollectionView {}\nopen class JTACMonthView: UICollectionView {\n    \n    /// Configures the size of your date cells\n    @IBInspectable open var cellSize: CGFloat = 0 {\n        didSet {\n            if oldValue == cellSize { return }\n            calendarViewLayout.invalidateLayout()\n        }\n    }\n    \n    /// Stores the first and last selected date cel\n    open var selectedCells: (first: (date: Date, indexPath: IndexPath)?, last:  (date: Date, indexPath: IndexPath)?)\n    \n    /// The scroll direction of the sections in JTAppleCalendar.\n    open var scrollDirection: UICollectionView.ScrollDirection = .horizontal\n    \n    /// The configuration parameters setup by the developer in the confogureCalendar function\n    open var cachedConfiguration: ConfigurationParameters? { return _cachedConfiguration }\n    \n    /// Enables/Disables the stretching of date cells. When enabled cells will stretch to fit the width of a month in case of a <= 5 row month.\n    open var allowsDateCellStretching = true\n    \n    /// Alerts the calendar that range selection will be checked. If you are\n    /// not using rangeSelection and you enable this,\n    /// then whenever you click on a datecell, you may notice a very fast\n    /// refreshing of the date-cells both left and right of the cell you\n    /// just selected.\n    open var allowsRangedSelection: Bool = false\n  \n    open var rangeSelectionMode: RangeSelectionMode = .segmented\n  \n    /// The object that acts as the delegate of the calendar view.\n    weak open var calendarDelegate: JTACMonthViewDelegate? {\n        didSet { lastMonthSize = sizesForMonthSection() }\n    }\n    \n    /// The object that acts as the data source of the calendar view.\n    weak open var calendarDataSource: JTACMonthViewDataSource? {\n        didSet { setupMonthInfoAndMap() } // Refetch the data source for a data source change\n    }\n    \n    var triggerScrollToDateDelegate: Bool? = true\n    var isScrollInProgress                 = false\n    var isReloadDataInProgress             = false\n    \n    // Keeps track of scroll target location. If isScrolling, and user taps while scrolling\n    var endScrollTargetLocation: CGFloat = 0\n    var lastMovedScrollDirection: CGFloat = 0\n    \n    var generalDelayedExecutionClosure: [(() -> Void)] = []\n    var scrollDelayedExecutionClosure: [(() -> Void)]  = []\n    \n    let dateGenerator = JTAppleDateConfigGenerator.shared\n    \n    /// Implemented by subclasses to initialize a new object (the receiver) immediately after memory for it has been allocated.\n    public init() {\n        super.init(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout())\n        setupNewLayout(from: collectionViewLayout as! JTACMonthLayoutProtocol)\n    }\n    \n    /// Initializes and returns a newly allocated collection view object with the specified frame and layout.\n    @available(*, unavailable, message: \"Please use JTAppleCalendarMonthView() instead. It manages its own layout.\")\n    public override init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) {\n        super.init(frame: frame, collectionViewLayout: UICollectionViewFlowLayout())\n        setupNewLayout(from: collectionViewLayout as! JTACMonthLayoutProtocol)\n    }\n    \n    /// Initializes using decoder object\n    required public init?(coder aDecoder: NSCoder) {\n        super.init(coder: aDecoder)\n        setupNewLayout(from: collectionViewLayout as! JTACMonthLayoutProtocol)\n    }\n    \n    // Configuration parameters from the dataSource\n    var _cachedConfiguration: ConfigurationParameters?\n    // Set the start of the month\n    var startOfMonthCache: Date!\n    // Set the end of month\n    var endOfMonthCache: Date!\n    var selectedCellData: [IndexPath:SelectedCellData] = [:]\n    var pathsToReload: Set<IndexPath> = [] //Paths to reload because of prefetched cells\n    \n    var anchorDate: Date?\n    \n    var requestedContentOffset: CGPoint {\n        var retval = CGPoint(x: -contentInset.left, y: -contentInset.top)\n        guard let date = anchorDate else { return retval }\n        \n        // reset the initial scroll date once used.\n        anchorDate = nil\n        \n        // Ensure date is within valid boundary\n        let components = calendar.dateComponents([.year, .month, .day], from: date)\n        let firstDayOfDate = calendar.date(from: components)!\n        if !((firstDayOfDate >= startOfMonthCache!) && (firstDayOfDate <= endOfMonthCache!)) { return retval }\n        \n        // Get valid indexPath of date to scroll to\n        let retrievedPathsFromDates = pathsFromDates([date])\n        if retrievedPathsFromDates.isEmpty { return retval }\n        let sectionIndexPath = pathsFromDates([date])[0]\n        \n        \n        if calendarViewLayout.thereAreHeaders && scrollDirection == .vertical {\n            let indexPath = IndexPath(item: 0, section: sectionIndexPath.section)\n            guard let attributes = calendarViewLayout.layoutAttributesForSupplementaryView(ofKind: UICollectionView.elementKindSectionHeader, at: indexPath) else { return retval }\n            \n            let maxYCalendarOffset = max(0, self.contentSize.height - self.frame.size.height)\n            retval = CGPoint(x: attributes.frame.origin.x,y: min(maxYCalendarOffset, attributes.frame.origin.y))\n            //            if self.scrollDirection == .horizontal { topOfHeader.x += extraAddedOffset} else { topOfHeader.y += extraAddedOffset }\n            \n        } else {\n            switch scrollingMode {\n            case .stopAtEach, .stopAtEachSection, .stopAtEachCalendarFrame:\n                if scrollDirection == .horizontal || (scrollDirection == .vertical && !calendarViewLayout.thereAreHeaders) {\n                    retval = self.targetPointForItemAt(indexPath: sectionIndexPath) ?? retval\n                }\n            default:\n                break\n            }\n        }\n        return retval\n    }\n    \n    var _sectionInset: UIEdgeInsets = .zero\n    open var sectionInset: UIEdgeInsets {\n        set {\n            _sectionInset.top =  newValue.top < 0 ? 0 : newValue.top\n            _sectionInset.bottom =  newValue.bottom < 0 ? 0 : newValue.bottom\n            _sectionInset.left =  newValue.left < 0 ? 0 : newValue.left\n            _sectionInset.right =  newValue.right < 0 ? 0 : newValue.right\n        }\n        get { return _sectionInset }\n    }\n    \n    var _minimumInteritemSpacing: CGFloat = 0\n    open var minimumInteritemSpacing: CGFloat {\n        set { _minimumInteritemSpacing = newValue < 0 ? 0 : newValue }\n        get { return _minimumInteritemSpacing }\n    }\n\n    var _minimumLineSpacing: CGFloat = 0\n    open var minimumLineSpacing: CGFloat {\n        set { _minimumLineSpacing = newValue < 0 ? 0 : newValue }\n        get { return _minimumLineSpacing }\n    }\n    \n    lazy var theData: CalendarData = {\n        return self.setupMonthInfoDataForStartAndEndDate()\n    }()\n    \n    var lastMonthSize: [AnyHashable:CGFloat] = [:]\n    \n    var monthMap: [Int: Int] {\n        get { return theData.sectionToMonthMap }\n        set { theData.sectionToMonthMap = newValue }\n    }\n\n    var decelerationRateMatchingScrollingMode: CGFloat {\n        switch scrollingMode {\n        case .stopAtEachCalendarFrame: return UIScrollView.DecelerationRate.fast.rawValue\n        case .stopAtEach, .stopAtEachSection: return UIScrollView.DecelerationRate.fast.rawValue\n        case .nonStopToSection, .nonStopToCell, .nonStopTo, .none: return UIScrollView.DecelerationRate.normal.rawValue\n        }\n    }\n\n    /// Configure the scrolling behavior\n    open var scrollingMode: ScrollingMode = .stopAtEachCalendarFrame {\n        didSet {\n            decelerationRate = UIScrollView.DecelerationRate(rawValue: decelerationRateMatchingScrollingMode)\n            #if os(iOS)\n                switch scrollingMode {\n                case .stopAtEachCalendarFrame:\n                    isPagingEnabled = true\n                default:\n                    isPagingEnabled = false\n                }\n            #endif\n        }\n    }\n}\n\nextension JTACMonthView {\n    /// A semantic description of the view’s contents, used to determine whether the view should be flipped when switching between left-to-right and right-to-left layouts.\n    open override var semanticContentAttribute: UISemanticContentAttribute {\n        didSet {\n            var superviewIsRTL =  false\n            if let validSuperView = superview?.effectiveUserInterfaceLayoutDirection { superviewIsRTL = validSuperView == .rightToLeft && semanticContentAttribute == .unspecified }\n            transform.a = semanticContentAttribute == .forceRightToLeft || superviewIsRTL ? -1: 1\n        }\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACMonthViewProtocols.swift",
    "content": "//\n//  JTACMonthViewProtocols.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\nimport UIKit\n\n/// The JTAppleCalendarMonthViewDataSource protocol is adopted by an\n/// object that mediates the application’s data model for a\n/// the JTAppleCalendarMonthViewDataSource object. data source provides the\n/// the calendar-view object with the information it needs to construct and\n/// then modify it self\n@available(*, unavailable, renamed: \"JTACMonthViewDataSource\")\npublic protocol JTAppleCalendarViewDataSource: AnyObject {}\npublic protocol JTACMonthViewDataSource: AnyObject {\n    /// Asks the data source to return the start and end boundary dates\n    /// as well as the calendar to use. You should properly configure\n    /// your calendar at this point.\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view requesting this information.\n    /// - returns:\n    ///     - ConfigurationParameters instance:\n    func configureCalendar(_ calendar: JTACMonthView) -> ConfigurationParameters\n}\n\n/// The delegate of a JTAppleCalendarMonthView object must adopt the\n/// JTAppleCalendarMonthViewDelegate protocol Optional methods of the protocol\n/// allow the delegate to manage selections, and configure the cells\n@available(*, unavailable, renamed: \"JTACMonthViewDelegate\")\npublic protocol JTAppleCalendarViewDelegate: AnyObject {}\npublic protocol JTACMonthViewDelegate: AnyObject {\n    /// Asks the delegate if selecting the date-cell with a specified date is\n    /// allowed\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view requesting this information.\n    ///     - date: The date attached to the date-cell.\n    ///     - cell: The date-cell view. This can be customized at this point.\n    ///     - cellState: The month the date-cell belongs to.\n    /// - returns: A Bool value indicating if the operation can be done.\n    func calendar(_ calendar: JTACMonthView, shouldSelectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) -> Bool\n\n    /// Asks the delegate if de-selecting the\n    /// date-cell with a specified date is allowed\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view requesting this information.\n    ///     - date: The date attached to the date-cell.\n    ///     - cell: The date-cell view. This can be customized at this point.\n    ///     - cellState: The month the date-cell belongs to.\n    /// - returns: A Bool value indicating if the operation can be done.\n    func calendar(_ calendar: JTACMonthView, shouldDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) -> Bool\n\n    /// Tells the delegate that a date-cell with a specified date was selected\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view giving this information.\n    ///     - date: The date attached to the date-cell.\n    ///     - cell: The date-cell view. This can be customized at this point.\n    ///             This may be nil if the selected cell is off the screen\n    ///     - cellState: The month the date-cell belongs to.\n    func calendar(_ calendar: JTACMonthView, didSelectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath)\n    \n    /// Tells the delegate that a date-cell\n    /// with a specified date was de-selected\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view giving this information.\n    ///     - date: The date attached to the date-cell.\n    ///     - cell: The date-cell view. This can be customized at this point.\n    ///             This may be nil if the selected cell is off the screen\n    ///     - cellState: The month the date-cell belongs to.\n    func calendar(_ calendar: JTACMonthView, didDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath)\n    \n    /// Tells the delegate that the item at the specified index path was highlighted.\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view giving this information.\n    ///     - date: The date attached to the date-cell.\n    ///     - cellState: The month the date-cell belongs to.\n    func calendar(_ calendar: JTACMonthView, didHighlightDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath)\n    \n    /// Tells the delegate that the item at the specified index path was un-highlighted.\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view giving this information.\n    ///     - date: The date attached to the date-cell.\n    ///     - cellState: The month the date-cell belongs to.\n    func calendar(_ calendar: JTACMonthView, didUnhighlightDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath)\n\n    /// Tells the delegate that the JTAppleCalendar view\n    /// scrolled to a segment beginning and ending with a particular date\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view giving this information.\n    ///     - startDate: The date at the start of the segment.\n    ///     - endDate: The date at the end of the segment.\n    func calendar(_ calendar: JTACMonthView, didScrollToDateSegmentWith visibleDates: DateSegmentInfo)\n\n    /// Tells the delegate that the JTAppleCalendar view\n    /// will scroll to a segment beginning and ending with a particular date\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view giving this information.\n    ///     - startDate: The date at the start of the segment.\n    ///     - endDate: The date at the end of the segment.\n    func calendar(_ calendar: JTACMonthView, willScrollToDateSegmentWith visibleDates: DateSegmentInfo)\n    \n    /// Tells the delegate that the JTAppleCalendar is about to display\n    /// a date-cell. This is the point of customization for your date cells\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view giving this information.\n    ///     - date: The date attached to the cell.\n    ///     - cellState: The month the date-cell belongs to.\n    ///     - indexPath: use this value when dequeing cells\n    func calendar(_ calendar: JTACMonthView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -> JTACDayCell\n\n    /// Tells the delegate that the JTAppleCalendar is about to\n    /// display a header. This is the point of customization for your headers\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view giving this information.\n    ///     - date: The date attached to the header.\n    ///     - indexPath: use this value when dequeing cells\n    func calendar(_ calendar: JTACMonthView, headerViewForDateRange range: (start: Date, end: Date), at indexPath: IndexPath) -> JTACMonthReusableView\n    \n    /// Informs the delegate that the user just lifted their finger from swiping the calendar\n    func scrollDidEndDecelerating(for calendar: JTACMonthView)\n    \n    /// Tells the delegate that a scroll occured\n    func calendarDidScroll(_ calendar: JTACMonthView)\n    \n    /// Called to retrieve the size to be used for the month headers\n    func calendarSizeForMonths(_ calendar: JTACMonthView?) -> MonthSize?\n    \n    /// Implement the function to configure calendar cells. The code that will go in here is the same\n    /// that you will code for your cellForItem function. This function is only called to address\n    /// inconsistencies in the visual appearance as stated by Apple: https://developer.apple.com/documentation/uikit/uicollectionview/1771771-prefetchingenabled\n    /// a date-cell. This is the point of customization for your date cells\n    /// - Parameters:\n    ///     - calendar: The JTAppleCalendar view giving this information.\n    ///     - cell: The cell\n    ///     - date: date attached to the cell\n    ///     - cellState: The month the date-cell belongs to.\n    ///     - indexPath: use this value when dequeing cells\n    func calendar(_ calendar: JTACMonthView, willDisplay cell: JTACDayCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath)\n    \n    /// Called to retrieve the size to be used for decoration views\n    func sizeOfDecorationView(indexPath: IndexPath) -> CGRect\n    \n    /// Called in case of tvOS\n    func indexPathForPreferredFocusedView(in: UICollectionView) -> IndexPath?\n}\n\n/// Default delegate functions\npublic extension JTACMonthViewDelegate {\n    func calendar(_ calendar: JTACMonthView, shouldSelectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) -> Bool { return true }\n    func calendar(_ calendar: JTACMonthView, shouldDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) -> Bool { return true }\n    func calendar(_ calendar: JTACMonthView, didSelectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {}\n    func calendar(_ calendar: JTACMonthView, didDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {}\n    func calendar(_ calendar: JTACMonthView, didHighlightDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {}\n    func calendar(_ calendar: JTACMonthView, didUnhighlightDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) {}\n    func calendar(_ calendar: JTACMonthView, willScrollToDateSegmentWith visibleDates: DateSegmentInfo) {}\n    func calendar(_ calendar: JTACMonthView, didScrollToDateSegmentWith visibleDates: DateSegmentInfo) {}\n    func calendar(_ calendar: JTACMonthView, headerViewForDateRange range: (start: Date, end: Date), at indexPath: IndexPath) -> JTACMonthReusableView {\n        assert(false, \"You have implemted a header size function, but forgot to implement the `headerViewForDateRange` function\")\n        return JTACMonthReusableView()\n    }\n    func calendarDidScroll(_ calendar: JTACMonthView) {}\n    func calendarSizeForMonths(_ calendar: JTACMonthView?) -> MonthSize? { return nil }\n    func sizeOfDecorationView(indexPath: IndexPath) -> CGRect { return .zero }\n    func scrollDidEndDecelerating(for calendar: JTACMonthView) {}\n    func indexPathForPreferredFocusedView(in: UICollectionView) -> IndexPath? { return nil }\n\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACScrollViewDelegates.swift",
    "content": "//\n//  JTACScrollViewDelegates.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport UIKit\n\nextension JTACMonthView: UIScrollViewDelegate {\n    /// Inform the scrollViewDidEndDecelerating\n    /// function that scrolling just occurred\n    public func scrollViewDidScrollToTop(_ scrollView: UIScrollView) {\n        scrollViewDidEndDecelerating(self)\n    }\n\n    /// Tells the delegate when the user finishes scrolling the content.\n    open func scrollViewWillEndDragging(_ scrollView: UIScrollView, withVelocity velocity: CGPoint, targetContentOffset: UnsafeMutablePointer<CGPoint>) {\n        guard let theCurrentSection = currentSection() else { return }\n        \n        let maxContentOffset: CGFloat\n        var theCurrentContentOffset: CGFloat = 0,\n        theTargetContentOffset: CGFloat = 0,\n        directionVelocity: CGFloat = 0\n        let calendarLayout = calendarViewLayout\n        if scrollDirection == .horizontal {\n            theCurrentContentOffset = scrollView.contentOffset.x\n            theTargetContentOffset = targetContentOffset.pointee.x\n            directionVelocity = velocity.x\n            maxContentOffset = scrollView.contentSize.width - scrollView.frame.width\n        } else {\n            theCurrentContentOffset = scrollView.contentOffset.y\n            theTargetContentOffset = targetContentOffset.pointee.y\n            directionVelocity = velocity.y\n            maxContentOffset = scrollView.contentSize.height - scrollView.frame.height\n        }\n\n        let gestureTranslation = self.panGestureRecognizer.translation(in: self)\n        let translation = self.scrollDirection == .horizontal ? gestureTranslation.x : gestureTranslation.y\n        \n        \n        \n        let setTargetContentOffset = {(finalOffset: CGFloat) -> Void in\n            if self.scrollDirection == .horizontal {\n                targetContentOffset.pointee.x = finalOffset\n            } else {\n                targetContentOffset.pointee.y = finalOffset\n            }\n            self.endScrollTargetLocation = finalOffset\n        }\n        \n        if directionVelocity == 0.0 {\n            decelerationRate = .fast\n        }\n\n        if theCurrentContentOffset >= maxContentOffset { setTargetContentOffset(maxContentOffset) ; return }\n        if theCurrentContentOffset <= 0 { setTargetContentOffset(0); return }\n\n        switch scrollingMode {\n        case .stopAtEachCalendarFrame:\n            let interval = scrollDirection == .horizontal ? scrollView.frame.width : scrollView.frame.height\n            let offset = scrollDecision(currentScrollDirectionValue: translation,\n                                                    previousScrollDirectionValue: lastMovedScrollDirection,\n                                                    forward: { () -> CGFloat in return ceil(theCurrentContentOffset / interval) * interval },\n                                                    backward: { () -> CGFloat in return floor(theCurrentContentOffset / interval) * interval})\n            setTargetContentOffset(offset)\n            \n        case let .stopAtEach(customInterval: interval): \n            let offset = scrollDecision(currentScrollDirectionValue: translation,\n                                                    previousScrollDirectionValue: lastMovedScrollDirection,\n                                                    forward: { return ceil(theCurrentContentOffset / interval) * interval },\n                                                    backward: { return floor(theCurrentContentOffset / interval) * interval})\n            setTargetContentOffset(offset)\n        case .stopAtEachSection:\n            let section = scrollDecision(currentScrollDirectionValue: translation,\n                                                     previousScrollDirectionValue: lastMovedScrollDirection,\n                                                     forward: { return theCurrentSection},\n                                                     backward: { return theCurrentSection - 1},\n                                                     fixed: { return theCurrentSection})\n\n            guard section >= 0, section < calendarLayout.endOfSectionOffsets.count else {setTargetContentOffset(0); return}\n            let endOfCurrentSectionOffset = calendarLayout.endOfSectionOffsets[theCurrentSection]\n            let endOfPreviousSectionOffset = calendarLayout.endOfSectionOffsets[theCurrentSection - 1 < 0 ? 0 : theCurrentSection - 1]\n            let midPoint = (endOfCurrentSectionOffset + endOfPreviousSectionOffset) / 2\n            let maxSnap = calendarLayout.endOfSectionOffsets[section]\n            \n            let userPercentage: CGFloat = 20\n            let modifiedPercentage = CGFloat((100 - userPercentage) / 100.0)\n            \n            let snapForward = midPoint - ((maxSnap - midPoint) * modifiedPercentage)\n            \n            scrollDecision(currentScrollDirectionValue: translation,\n                           previousScrollDirectionValue: lastMovedScrollDirection,\n                           forward: {\n                                if theCurrentContentOffset >= snapForward || directionVelocity > 0 {\n                                    setTargetContentOffset(endOfCurrentSectionOffset)\n                                } else {\n                                    setTargetContentOffset(endOfPreviousSectionOffset)\n                                }\n                           },\n                           backward: {\n                                if theCurrentContentOffset <= snapForward || directionVelocity < 0 {\n                                    setTargetContentOffset(endOfPreviousSectionOffset)\n                                } else {\n                                    setTargetContentOffset(endOfCurrentSectionOffset)\n                                }\n                           })\n        case let .nonStopToCell(withResistance: resistance), let .nonStopToSection(withResistance: resistance):\n            \n            let (recalculatedOffset, elementProperties) = rectAfterApplying(resistance: resistance,\n                                                                            targetContentOffset: theTargetContentOffset,\n                                                                            currentContentOffset: theCurrentContentOffset,\n                                                                            currentScrollDirectionValue: translation,\n                                                                            previousScrollDirectionValue: lastMovedScrollDirection)\n            \n            guard let validElementProperties = elementProperties else { setTargetContentOffset(recalculatedOffset); return }\n\n            switch scrollingMode {\n            case .nonStopToCell:\n                let midPoint = scrollDirection == .horizontal ? (validElementProperties.xOffset + (validElementProperties.xOffset + validElementProperties.width)) / 2 : (validElementProperties.yOffset + ( validElementProperties.yOffset + validElementProperties.height)) / 2\n                let calculatedOffSet: CGFloat\n                if recalculatedOffset > midPoint || theTargetContentOffset >= maxContentOffset {\n                    calculatedOffSet = self.scrollDirection == .horizontal ? validElementProperties.xOffset + validElementProperties.width : validElementProperties.yOffset + validElementProperties.height\n                } else {\n                    calculatedOffSet = self.scrollDirection == .horizontal ? validElementProperties.xOffset : validElementProperties.yOffset\n                }\n                setTargetContentOffset(calculatedOffSet)\n            case .nonStopToSection:\n                let stopSection = scrollDecision(currentScrollDirectionValue: translation,\n                                                             previousScrollDirectionValue: lastMovedScrollDirection,\n                                                             forward: { validElementProperties.section },\n                                                             backward: {validElementProperties.section - 1})\n \n                let calculatedOffSet = (stopSection < 0 || stopSection > calendarLayout.endOfSectionOffsets.count - 1) ? 0 : calendarLayout.endOfSectionOffsets[stopSection]\n                setTargetContentOffset(calculatedOffSet)\n            default: return\n            }\n            \n        case let .nonStopTo(interval, resistance):\n            let diffResist = diffResistance(targetOffset: theTargetContentOffset, currentOffset: theCurrentContentOffset, resistance: resistance)\n            let recalculatedOffsetAfterResistance = scrollDecision(currentScrollDirectionValue: translation,\n                                                                   previousScrollDirectionValue: lastMovedScrollDirection,\n                                                                   forward: { theTargetContentOffset - diffResist },\n                                                                   backward: { theTargetContentOffset + diffResist })\n\n            let offset = scrollDecision(currentScrollDirectionValue: translation,\n                                        previousScrollDirectionValue: lastMovedScrollDirection,\n                                        forward: { ceil(recalculatedOffsetAfterResistance / interval) * interval },\n                                        backward: { floor(recalculatedOffsetAfterResistance / interval) * interval })\n            \n            setTargetContentOffset(offset)\n        case .none: break\n        }\n        \n        let futureScrollPoint = CGPoint(x: targetContentOffset.pointee.x, y: targetContentOffset.pointee.y)\n        let dateSegmentInfo = datesAtCurrentOffset(futureScrollPoint)\n        calendarDelegate?.calendar(self, willScrollToDateSegmentWith: dateSegmentInfo)\n\n        self.lastMovedScrollDirection = translation\n        \n        DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) {\n            self.decelerationRate = UIScrollView.DecelerationRate(rawValue: self.decelerationRateMatchingScrollingMode)\n        }\n    }\n    \n    public func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {\n        if decelerate {\n            DispatchQueue.main.async {\n                self.calendarDelegate?.scrollDidEndDecelerating(for: self)\n            }\n        }\n    }\n    \n    /// Tells the delegate when a scrolling\n    /// animation in the scroll view concludes.\n    public func scrollViewDidEndScrollingAnimation(_ scrollView: UIScrollView) {\n        isScrollInProgress = false\n        if\n            let shouldTrigger = triggerScrollToDateDelegate,\n            shouldTrigger == true {\n            scrollViewDidEndDecelerating(scrollView)\n            triggerScrollToDateDelegate = nil\n        }\n        \n        DispatchQueue.main.async { // https://github.com/patchthecode/JTAppleCalendar/issues/778\n            self.executeDelayedTasks(.scroll)\n        }\n    }\n    \n    /// Tells the delegate that the scroll view has\n    /// ended decelerating the scrolling movement.\n    open func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {\n        visibleDates {[unowned self] dates in\n            self.calendarDelegate?.calendar(self, didScrollToDateSegmentWith: dates)\n        }\n    }\n    \n    /// Tells the delegate that a scroll occured\n    public func scrollViewDidScroll(_ scrollView: UIScrollView) {\n        calendarDelegate?.calendarDidScroll(self)\n    }\n    \n    func rectAfterApplying(resistance: CGFloat,\n                           targetContentOffset: CGFloat,\n                           currentContentOffset: CGFloat,\n                           currentScrollDirectionValue: CGFloat,\n                           previousScrollDirectionValue: CGFloat) -> (recalculatedOffset: CGFloat, elementProperty: (item: Int, section: Int, xOffset: CGFloat, yOffset: CGFloat, width: CGFloat, height: CGFloat)?) {\n        \n        let diffResist = diffResistance(targetOffset: targetContentOffset, currentOffset: currentContentOffset, resistance: resistance)\n        let recalcOffsetAfterResistanceApplied = scrollDecision(currentScrollDirectionValue: currentScrollDirectionValue,\n                                                                previousScrollDirectionValue: previousScrollDirectionValue,\n                                                                forward: { () -> CGFloat in return targetContentOffset - diffResist },\n                                                                backward: { () -> CGFloat in return targetContentOffset + diffResist })\n \n        let element: UICollectionViewLayoutAttributes?\n        let rect: CGRect\n        if scrollDirection == .horizontal {\n            rect = CGRect(x: recalcOffsetAfterResistanceApplied + 1, y: contentOffset.y + 1, width: 10, height: frame.height - 2)\n            element = calendarViewLayout.elementsAtRect(excludeHeaders: true, from: rect).sorted { $0.indexPath < $1.indexPath }.first\n        } else {\n            rect = CGRect(x: contentOffset.x + 1, y: recalcOffsetAfterResistanceApplied + 1, width: frame.width - 2, height: 10)\n            element = calendarViewLayout.elementsAtRect(from: rect).sorted { $0.indexPath < $1.indexPath }.first\n        }\n        \n        guard let validElement = element else { return (recalcOffsetAfterResistanceApplied, nil) }\n        let elementProperties:  (item: Int, section: Int, xOffset: CGFloat, yOffset: CGFloat, width: CGFloat, height: CGFloat)?\n        \n        if validElement.representedElementKind == UICollectionView.elementKindSectionHeader {\n            elementProperties = calendarViewLayout.headerCache[validElement.indexPath.section]\n        } else {\n            elementProperties = calendarViewLayout.cachedValue(for: validElement.indexPath.item, section: validElement.indexPath.section)\n        }\n        \n        return (recalcOffsetAfterResistanceApplied, elementProperties)\n    }\n    \n    func diffResistance(targetOffset: CGFloat, currentOffset: CGFloat, resistance: CGFloat) -> CGFloat {\n        let difference = abs(targetOffset - currentOffset)\n        return difference * resistance\n    }\n    \n    func scrollDecision<T>(currentScrollDirectionValue: CGFloat,\n                           previousScrollDirectionValue: CGFloat,\n                           forward: ()->T,\n                           backward: ()->T,\n                           fixed: (()->T)? = nil) -> T {\n        if currentScrollDirectionValue < 0 {\n            return forward()\n        } else if currentScrollDirectionValue > 0 {\n            return backward()\n        } else if previousScrollDirectionValue < 0 {\n            return forward()\n        } else if previousScrollDirectionValue > 0 {\n            return backward()\n        } else {\n            guard let fixed = fixed else { return forward() }\n            return fixed()\n        }\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACVariables.swift",
    "content": "//\n//  JTACVariables.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\nimport UIKit\n\n// Calculated Variables\nextension JTACMonthView {\n    /// Workaround for Xcode bug that prevents you from connecting the delegate in the storyboard.\n    /// Remove this extra property once Xcode gets fixed.\n    @IBOutlet public var ibCalendarDelegate: AnyObject? {\n        get { return calendarDelegate as AnyObject? }\n        set {\n            if (newValue != nil) {\n                assert(newValue as? JTACMonthViewDelegate != nil, \"Error, your delegate is not of type JTACMonthViewDelegate.\")\n            }\n            calendarDelegate = newValue as? JTACMonthViewDelegate\n        }\n    }\n    \n    /// Workaround for Xcode bug that prevents you from connecting the delegate in the storyboard.\n    /// Remove this extra property once Xcode gets fixed.\n    @IBOutlet public var ibCalendarDataSource: AnyObject? {\n        get { return calendarDataSource as AnyObject? }\n        set {\n            if (newValue != nil) {\n                assert(newValue as? JTACMonthViewDataSource != nil, \"Error, your dataSource is not of type JTACMonthViewDataSource.\")\n            }\n            calendarDataSource = newValue as? JTACMonthViewDataSource\n        }\n    }\n    \n    @available(*, unavailable)\n    /// Will not be used by subclasses\n    open override var delegate: UICollectionViewDelegate? {\n        get { return super.delegate }\n        set { /* Do nothing */ }\n    }\n    \n    @available(*, unavailable)\n    /// Will not be used by subclasses\n    open override var dataSource: UICollectionViewDataSource? {\n        get { return super.dataSource }\n        set {/* Do nothing */ }\n    }\n    \n    /// Returns all selected dates\n    public var selectedDates: [Date] {\n        return selectedDatesSet.sorted()\n    }\n    \n    var selectedDatesSet: Set<Date> {\n        return Set(selectedCellData.values.map { $0.date })\n    }\n    \n    var monthInfo: [Month] {\n        get { return theData.months }\n        set { theData.months = newValue }\n    }\n    \n    var numberOfMonths: Int {\n        return monthInfo.count\n    }\n    \n    var totalDays: Int {\n        return theData.totalDays\n    }\n             \n    var calendarViewLayout: JTACMonthLayout {\n        guard let layout = collectionViewLayout as? JTACMonthLayout else {\n            developerError(string: \"Calendar layout is not of type JTAppleCalendarMonthLayout.\")\n            return JTACMonthLayout(withDelegate: self)\n        }\n        return layout\n    }\n    \n    var functionIsUnsafeSafeToRun: Bool {\n        return !calendarLayoutIsLoaded || isScrollInProgress || isReloadDataInProgress\n    }\n    \n    var calendarLayoutIsLoaded: Bool { return calendarViewLayout.isCalendarLayoutLoaded }\n    var startDateCache: Date {\n        guard let date = _cachedConfiguration?.startDate else {\n            assert(false, \"Attemped to access startDate when Datasource/delegate is not set yet. Returning todays's date\")\n            return Date()\n        }\n        return date\n    }\n    var endDateCache: Date           {\n        guard let date = _cachedConfiguration?.endDate else {\n            assert(false, \"Attemped to access endDate when Datasource/delegate is not set yet. Returning todays's date\")\n            return Date()\n        }\n        return date\n    }\n    var calendar: Calendar {\n        guard let calendar = _cachedConfiguration?.calendar else {\n            assert(false, \"Attemped to access calendar when Datasource/delegate is not set yet. Returning default value\")\n            return Calendar.current\n        }\n        return calendar\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACYearView.swift",
    "content": "//\n//  JTAppleCalendarYearView.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\nimport UIKit\n\nopen class JTACYearView: UICollectionView {\n    var configurationParameters = ConfigurationParameters(startDate: Date(), endDate: Date())\n    var monthData: [Any] = []\n    \n    \n    /// The object that acts as the delegate of the calendar year view.\n    weak open var calendarDelegate: JTACYearViewDelegate?\n    weak open var calendarDataSource: JTACYearViewDataSource? {\n        didSet { setupYearViewCalendar() }\n    }\n    \n    /// Workaround for Xcode bug that prevents you from connecting the delegate in the storyboard.\n    /// Remove this extra property once Xcode gets fixed.\n    @IBOutlet public var ibCalendarDelegate: AnyObject? {\n        get { return calendarDelegate }\n        set { calendarDelegate = newValue as? JTACYearViewDelegate }\n    }\n    \n    /// Workaround for Xcode bug that prevents you from connecting the delegate in the storyboard.\n    /// Remove this extra property once Xcode gets fixed.\n    @IBOutlet public var ibCalendarDataSource: AnyObject? {\n        get { return calendarDataSource }\n        set { calendarDataSource = newValue as? JTACYearViewDataSource }\n    }\n    \n    open func dataSourcefrom(configurationParameters: ConfigurationParameters) -> [Any] {\n        return JTAppleDateConfigGenerator.shared.setupMonthInfoDataForStartAndEndDate(configurationParameters).months\n    }\n    \n    func setupYearViewCalendar() {\n        guard let validConfig = calendarDataSource?.configureCalendar(self) else {\n            print(\"Invalid datasource\")\n            return;\n        }\n        \n        configurationParameters = validConfig.configurationParameters\n        monthData               = validConfig.months\n        dataSource = self\n        delegate = self\n    }\n    \n}\n\nextension JTACYearView: JTACCellMonthViewDelegate {\n    public func monthView(_ monthView: JTACCellMonthView, drawingFor segmentRect: CGRect, with date: Date, dateOwner: DateOwner, monthIndex: Int) {\n        calendarDelegate?.calendar(self, monthView: monthView, drawingFor: segmentRect, with: date, dateOwner: dateOwner, monthIndex: monthIndex)\n    }\n}\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTACYearViewProtocols.swift",
    "content": "//\n//  JTACYearViewProtocols.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\nimport Foundation\nimport UIKit\n\npublic protocol JTACYearViewDelegate: AnyObject {\n    func calendar(_ calendar: JTACYearView, cellFor item: Any, at date: Date, indexPath: IndexPath) -> JTACMonthCell\n    func calendar(_ calendar: JTACYearView,\n                  monthView: JTACCellMonthView,\n                  drawingFor segmentRect: CGRect,\n                  with date: Date,\n                  dateOwner: DateOwner,\n                  monthIndex index: Int)\n    func calendar(_ calendar: JTACYearView, sizeFor item: Any) -> CGSize\n}\n\nextension JTACYearViewDelegate {\n    func calendar(_ calendar: JTACYearView,\n                  monthView: JTACCellMonthView,\n                  drawingFor segmentRect: CGRect,\n                  with date: Date,\n                  dateOwner: DateOwner,\n                  monthIndex index: Int){}\n    func calendar(_ calendar: JTACYearView, sizeFor item: Any) -> CGSize { return .zero }\n}\n\npublic protocol JTACYearViewDataSource: AnyObject {\n    func configureCalendar(_ calendar: JTACYearView) -> (configurationParameters: ConfigurationParameters, months: [Any])\n}\n\n"
  },
  {
    "path": "Sources/JTAppleCalendar/JTAppleCalendar.h",
    "content": "//\n//  JTACMonthView.swift\n//\n//  Copyright (c) 2016-2020 JTAppleCalendar (https://github.com/patchthecode/JTAppleCalendar)\n//\n//  Permission is hereby granted, free of charge, to any person obtaining a copy\n//  of this software and associated documentation files (the \"Software\"), to deal\n//  in the Software without restriction, including without limitation the rights\n//  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n//  copies of the Software, and to permit persons to whom the Software is\n//  furnished to do so, subject to the following conditions:\n//\n//  The above copyright notice and this permission notice shall be included in\n//  all copies or substantial portions of the Software.\n//\n//  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n//  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n//  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n//  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n//  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n//  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n//  THE SOFTWARE.\n//\n\n#import <Foundation/Foundation.h>\n\n//! Project version number for JTAppleCalendar.\nFOUNDATION_EXPORT double JTAppleCalendarVersionNumber;\n\n//! Project version string for JTAppleCalendar.\nFOUNDATION_EXPORT const unsigned char JTAppleCalendarVersionString[];\n\n// In this header, you should import all the public headers of your framework using statements like #import <JTAppleCalendar/PublicHeader.h>\n\n\n"
  },
  {
    "path": "Sources/JTAppleCalendar/PrivacyInfo.xcprivacy",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>NSPrivacyTrackingDomains</key>\n\t<array/>\n\t<key>NSPrivacyCollectedDataTypes</key>\n\t<array/>\n\t<key>NSPrivacyAccessedAPITypes</key>\n\t<array/>\n\t<key>NSPrivacyTracking</key>\n\t<false/>\n</dict>\n</plist>\n"
  },
  {
    "path": "Tests/JTAppleCalendarTests/JTAppleCalendarTests.swift",
    "content": "import XCTest\n@testable import JTAppleCalendar\n\nfinal class JTAppleCalendarTests: XCTestCase {\n    func testExample() {\n        // This is an example of a functional test case.\n        // Use XCTAssert and related functions to verify your tests produce the correct\n        // results.\n//        XCTAssertEqual(JTAppleCalendar().text, \"Hello, World!\")\n    }\n\n    static var allTests = [\n        (\"testExample\", testExample),\n    ]\n}\n"
  },
  {
    "path": "Tests/JTAppleCalendarTests/XCTestManifests.swift",
    "content": "import XCTest\n\n#if !canImport(ObjectiveC)\npublic func allTests() -> [XCTestCaseEntry] {\n    return [\n        testCase(JTAppleCalendarTests.allTests),\n    ]\n}\n#endif\n"
  },
  {
    "path": "Tests/LinuxMain.swift",
    "content": "import XCTest\n\nimport JTAppleCalendarTests\n\nvar tests = [XCTestCaseEntry]()\ntests += JTAppleCalendarTests.allTests()\nXCTMain(tests)\n"
  },
  {
    "path": "docs/adding-events/Adding Events.md",
    "content": "# Adding Events\n\n> [!WARNING]\n> This documentation requires assistance, particularly updating to SwiftUI. If possible, please submit a PR to help improve the documentation\n\nAdding events – or adding a dot-view to signify an event on a date cell – is exactly the same as you would add a custom view to a UITableView or UICollectionView cell.\n\nIn the case of UICollectionView/UITableView, you would design the cell in the cellForItemAtIndexPath function based on the cell’s index, in relation the the dataSource’s index.\n\nIn the case of this library, it is exactly the same. The only difference is that instead of using a cell’s associated index, we use a cell’s associated date.\n\n# Creating the dot view\n\nFirst, for better viewing, increase the constraint height of the calendar to 450.\n\n![increase height of container](./images/image1.png)\n\nNext, create the red `dotView` as seen below. Take note of the constraints used.\n\n![create red dotView](./images/image2.png)\n\nThe dotView needs to look round, therefore set a cornerRadius for it. I use storyboard for simplicity, but code may be preferred.\n\n![create cornerRadius](./images/image3.png)\n\nAdd an IBOutlet for the the dotView. Go to the DateCell class and add this code.\n\n```swift\nimport JTAppleCalendar\nimport UIKit\n\nclass DateCell: JTAppleCell {\n    @IBOutlet var dateLabel: UILabel!\n    @IBOutlet var dotView: UIView!\n}\n```\n\nNow connect your dotView IBOutlet on storyboard as seen below.\n\n![connect IBOutlet](./images/image4.png)\n\nRun your app. It should look like this\n\n![dots on calendar view](./images/image5.png)\n\n## Attaching events to your dotView\n\nNow we only want the dot view to be visible for specific dates in our dataSource. The calendar library operates on dates and not indexes, therefore the dataSource should relate every cell to dates.\n\nLets add a DateFormatter to be used globally for events & the dataSource dictionary. DataSource will be explained below.\n\n```swift\nclass ViewController: UIViewController {\n    @IBOutlet var calendarView: JTAppleCalendarView!\n\n    var calendarDataSource: [String:String] = [:]\n    var formatter: DateFormatter {\n        let formatter = DateFormatter()\n        formatter.dateFormat = \"dd-MMM-yyyy\"\n        return formatter\n    }\n```\n\nModify the `configureCalendar` function\n\n```swift\nextension ViewController: JTAppleCalendarViewDataSource {\n    func configureCalendar(_ calendar: JTAppleCalendarView) ->; ConfigurationParameters {\n        let startDate = formatter.date(from: \"01-jan-2018\")!\n        let endDate = Date()\n        return ConfigurationParameters(startDate: startDate, endDate: endDate)\n    }\n}\n```\n\nAdd this line of code\n\n```swift\nfunc configureCell(view: JTAppleCell?, cellState: CellState) {\n    guard let cell = view as? DateCell  else { return }\n    cell.dateLabel.text = cellState.text\n    handleCellTextColor(cell: cell, cellState: cellState)\n    handleCellEvents(cell: cell, cellState: cellState)\n}\n```\n\n## The dataSource\n\nFinally, let’s talk about population of the dataSource. Add the following code.\n\n```swift\nfunc populateDataSource() {\n    // You can get the data from a server.\n    // Then convert that data into a form that can be used by the calendar.\n    calendarDataSource = [\n        \"07-Jan-2018\": \"SomeData\",\n        \"15-Jan-2018\": \"SomeMoreData\",\n        \"15-Feb-2018\": \"MoreData\",\n        \"21-Feb-2018\": \"onlyData\",\n    ]\n    // update the calendar\n    calendarView.reloadData()\n}\n```\n\nWe need some way to associate the dateCells with the datasource. The best way to identify a cell is by Date, therefore I chose a dataSource with a date string as the key.\n\nNow create the following function. It is responsible for determining the visibility of the dotView. If the date has an event, it will be visible, else it will be hidden.\n\n```swift\nfunc handleCellEvents(cell: DateCell, cellState: CellState) {\n    let dateString = formatter.string(from: cellState.date)\n    if calendarDataSource[dateString] == nil {\n        cell.dotView.isHidden = true\n    } else {\n        cell.dotView.isHidden = false\n    }\n}\n```\n\nTo test this code, finally add this line of code and run the app.\n\n```swift\noverride func viewDidLoad() {\n    super.viewDidLoad()\n    calendarView.scrollDirection = .horizontal\n    calendarView.scrollingMode   = .stopAtEachCalendarFrame\n    calendarView.showsHorizontalScrollIndicator = false\n\n    populateDataSource()\n}\n```\n\n## Next Steps\n\nLearn more about [implementing week numbers](../implementing-week-numbers/Implementing%20week%20numbers.md)\n"
  },
  {
    "path": "docs/build-calendar/Build A Calendar From Scratch.md",
    "content": "# Build a Calendar from scratch\n\n## HELP REQUIRED - Using SwiftUI\n\n> [!WARNING]\n> This section is incomplete, please help update it by submitting a PR\n\n## Using story board\n\n1. Drag a UICollectionView unto the screen. Change its class and module to JTAppleCalendarView and JTAppleCalendar respectively.\n\nCorrectly set both the height and width constraints. Constraints are needed for the library to determine cell size.\n\n![constraints](./images/image1.png)\n\n2. UICollectionView may come with default minimum-cell-spacing and minimum-line-spacing. Unless your design requires it, please set both to zero as shown below.\n\n![constraints](./images/image2.png)\n\n3. Design the cell. This example uses a single UILabel. But this design can be anything (example images, rounded selections, dot-views for events etc).\n\nBe sure to set correct constraints for the label (typically center the label in the cell both vertically and horizontally). Improper constraints results in bugged views. Also remember to set the cell’s `reusableIdentifier` to `dateCell`.\n\n![dateCell](./images/image3.png)\n\n4. Create a new cell class.\n\n```swift\nimport JTAppleCalendar\nimport UIKit\nclass DateCell: JTAppleCell {\n    @IBOutlet var dateLabel: UILabel!\n}\n```\n\nNow head back to Storyboard. The cell’s class is already set, so just connect the IBOutlet to the UILabel of the cell.\n\n![IBOutlet](./images/image4.png)\n![IBOutlet](./images/image5.png)\n\n5. Now lets write some more code.\n\nThe following is self explanatory.\n\n```swift\nimport UIKit\nimport JTAppleCalendar\nclass ViewController: UIViewController {\n    override func viewDidLoad() {\n        super.viewDidLoad()\n    }\n}\n```\n\n6. Go back to Storyboard and set the calendar’s ibCalendarDataSource and ibCalendarDelegate to be the ViewController subclass.\n\n![IBOutlet](./images/image6.png)\n\nWrite some more code.\n\nThis is the first required delegate.\n\n```swift\nextension ViewController: JTAppleCalendarViewDataSource {\n    func configureCalendar(\\_ calendar: JTAppleCalendarView) -> ConfigurationParameters {\n        let formatter = DateFormatter()\n        formatter.dateFormat = \"yyyy MM dd\"\n        let startDate = formatter.date(from: \"2018 01 01\")!\n        let endDate = Date()\n        return ConfigurationParameters(startDate: startDate, endDate: endDate)\n    }\n}\n```\n\nThis library is a ranged calendar. It has no infinite scrolling out-of-the-box (although some creative developers have accomplished it). There are 2 mandatory parameters, `startDate` for `startMonth`, and `endDate` for `endMonth`.\n\nConfigurationParameters full parameter list is:\n\n- **startDate** – start boundary for calendar\n- **endDate** – end boundary for calendar\n- **numberOfRows** – default is 6\n- **calendar** – this calendar() instance is responsible for region/timezones and the way your calendar will look in case you want an Arabic calendar for example. If none is given, the default iOS Calendar instance is provided.\n- **generateInDates** – control the generation of inDates.\n- **generateOutDates** – control the generation of outDates.\n- **firstDayOfWeek** – set any day to be the first day of the week. Sunday is default.\n- **hasStrictBoundaries** – controls the strictness of month boundaries.\n\nThese are the final 2 delegate functions.\n\n```swift\nextension ViewController: JTAppleCalendarViewDelegate {\n    func calendar(_ calendar: JTAppleCalendarView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -> JTAppleCell {\n        let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: \"dateCell\", for: indexPath) as! DateCell\n        cell.dateLabel.text = cellState.text\n        return cell\n    }\n    func calendar(_ calendar: JTAppleCalendarView, willDisplay cell: JTAppleCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {\n        let cell = cell as! DateCell\n        cell.dateLabel.text = cellState.text\n    }\n}\n```\n\nThese 2 functions should contain the same code, therefore it is wise to have a shared function to reduce code duplication. The only difference between these two functions should be the first line of code (the dequeuing code). Reasons for the 2 functions having the same code are found [here](https://github.com/patchthecode/JTAppleCalendar/issues/553) under problem#1.\n\nNow run your test app and you should have a simple calendar going. If you wish to have paging enabled or have the scrollBar be invisible etc etc, then just remember that this library is a UICollectionView. Therefore enabling and hiding these are done the exact same way as a UICollectionView.\n\n## Next Steps\n\nWhere to go from here? Learn about [common elements](../common-elements/Common%20Elements.md)\n"
  },
  {
    "path": "docs/common-elements/Common Elements.md",
    "content": "# Common elements of every calendar\n\n> [!WARNING]\n> This section requires assistance. Please submit a PR if possible to help improve documentation\n\nEach calendar has a set of common elements. Configuration for these elements can be found here:\n\n- [Configuring inDates/monthDates/outDates](./configure-in-out-month-dates/Configuring%20inDates%20monthDates%20outDates.md)\n- [Regular selection](./regular-selection/Regular%20Selection.md)\n- [Handle device rotation](./device-rotation/Handling%20Device%20Rotation.md)\n\n# Next Steps\n\nLearn more about [scrolling modes](../scrolling-modes/Scrolling%20Modes.md)\n"
  },
  {
    "path": "docs/common-elements/configure-in-out-month-dates/Configuring inDates monthDates outDates.md",
    "content": "# Configuring inDates monthDates outDates\n\n> [!WARNING]\n> This documentation requires assistance, particularly updating to SwiftUI. If possible, please submit a PR to help improve the documentation\n\nIf you followed the [building from scratch tutorial](../../build-calendar/Build%20A%20Calendar%20From%20Scratch.md), your calendar should look like this. You would also know what inDates/outDates are.\n\n![calendar built from scratch](./images/image1.png)\n\n## Set fixed inDates/outDates/monthDates\n\nThe calendar is difficult to read with inDates/outDates/monthDates the same color. Lets change that. Create the following 2 functions.\n\n```swift\nfunc configureCell(view: JTAppleCell?, cellState: CellState) {\n   guard let cell = view as? DateCell  else { return }\n   cell.dateLabel.text = cellState.text\n   handleCellTextColor(cell: cell, cellState: cellState)\n}\n\nfunc handleCellTextColor(cell: DateCell, cellState: CellState) {\n   if cellState.dateBelongsTo == .thisMonth {\n      cell.dateLabel.textColor = UIColor.black\n   } else {\n      cell.dateLabel.textColor = UIColor.gray\n   }\n}\n```\n\n![coloured containers of dates](./images/image2.png)\n\n- Blue indicates `thisMonth`\n- Red indicates `previousMonthWithinBoundary`\n- Green indicates `followingMonthWithinBoundary`\n\nRewrite the following functions\n\n```swift\nfunc calendar(_ calendar: JTAppleCalendarView, cellForItemAt date: Date, cellState: CellState, indexPath: IndexPath) -> JTAppleCell {\n   let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: \"dateCell\", for: indexPath) as! DateCell\n   self.calendar(calendar, willDisplay: cell, forItemAt: date, cellState: cellState, indexPath: indexPath)\n   return cell\n}\n\nfunc calendar(_ calendar: JTAppleCalendarView, willDisplay cell: JTAppleCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {\n   configureCell(view: cell, cellState: cellState)\n}\n```\n\nThe `cellForItemAtDate` function calls the `willDisplayCell` function so that code can be reused. This is done because both functions have to [contain the same code](https://github.com/patchthecode/JTAppleCalendar/issues/553)\n\nFinally, get rid of the UIScrollView (either through code or InterfaceBuilder), and enable paging. This is done exactly the same way as would be done for a UICollectionView.\n\nNow run your app. It should look like this.\n\n![greyed out numbers on each end of month](./images/image3.png)\n\n## Other design considerations\n\n### Hidden inDates/outDates\n\nApart from making the changing the color of inDates/outDates you can also make them hidden.\n\n```swift\nif cellState.dateBelongsTo == .thisMonth {\n   cell.isHidden = false\n} else {\n   cell.isHidden = true\n}\n```\n\nTo give the following effect\n\n![calendar with missing start and end dates](./images/image4.png)\n\nYou can hide inDates, but leave outDates visible or vice-versa. Any combination is possible. This is done by changing the if condition.\n\nThe full list of `dateBelongsTo`:\n\n- thisMonth\n- previousMonthWithinBoundary\n- previousMonthOutsideBoundary\n- followingMonthWithinBoundary\n- followingMonthOutsideBoundary\n\n### Generating inDates/outDates. What are they?\n\nIt is important to note that generating in/out dates is different from hiding them as shown above. Hidden ones are still generated. The difference affects how your calendar looks.\n\nHeading back to the `configureCalendar` delegate introduced in the [calendar from scratch tutorial](../../build-calendar/Build%20A%20Calendar%20From%20Scratch.md). Lets modify the ConfigurationParameters to configure the generation of inDates/outDates\n\n```swift\nfunc configureCalendar(_ calendar: JTAppleCalendarView) -> ConfigurationParameters {\n    let formatter = DateFormatter()\n    formatter.dateFormat = \"yyyy MM dd\"\n\n    let startDate = formatter.date(from: \"2018 01 01\")!\n    let endDate = Date()\n    return ConfigurationParameters(startDate: startDate,\n                                    endDate: endDate,\n                                    generateInDates: .forAllMonths,\n                                    generateOutDates: .tillEndOfGrid)\n}\n```\n\n#### generateInDates\n\n- `forFirstMonthOnly` – Only your first month will generate inDates/offsets. All the other months will start with no inDates/offsets.\n- `forAllMonths` – All months will have inDates/offsets\n- `off` – No months will have any inDates/offsets.\n\n#### generateOutDates\n\n- `tillEndOfRow` – This will generate outDates till it reaches the first end of a row. In short – if your calendar month has 6 rows, then it will display 6 rows. If your calendar month has 5 rows, then it will display 5 rows.\n- `tillEndOfGrid` – This will generate outDates until it reaches the end of a 6 x 7 grid (42 cells). In Short, it will always display a 6 row calendar month.\n- `off` – Your calendar month will not generate any outDates.\n\n## Next Steps\n\nLearn more about [regular selection of dates](../regular-selection/Regular%20Selection.md)\n"
  },
  {
    "path": "docs/common-elements/device-rotation/Handling Device Rotation.md",
    "content": "# Handling device rotation\n\nWhenever the device orientation changes, you need to let the library know about it by calling this function\n\n```swift\npublic func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator, anchorDate: Date?)\n```\n\nTypically, developers should add it to the `viewWillTransition` delegate function of their ViewController SubClass.\n\nHere is an example of the usage:\n\n```swift\noverride func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {\n    let visibleDates = calendarView.visibleDates()\n    calendarView.viewWillTransition(to: .zero, with: coordinator, anchorDate: visibleDates.monthDates.first?.date)\n}\n```\n\nThe library needs to know what date should be focused on the screen when the orientation changes. In the above code, the first visible `monthDate` was captured and used as the anchor focus date.\n\nWhen the orientation change completes, that month’s date will be focused on the screen.\n\n## Next Steps\n\nLearn more about [scrolling modes](../../scrolling-modes/Scrolling%20Modes.md)\n"
  },
  {
    "path": "docs/common-elements/regular-selection/Regular Selection.md",
    "content": "# Regular selection\n\n> [!WARNING]\n> This section requires assistance, particularly updating to SwiftUI. Please submit a PR if possible to help improve documentation\n\nWhen user taps a date cell, you’ll need a highlighted UIView to show the user that the cell was selected.\n\nWe need to create a `selectedView` in the DateCell class. We’ll use this to display a red-color selection to the user.\n\nModify the DateCell to include the highlighted code below\n\n```swift\nclass DateCell: JTAppleCell {\n    @IBOutlet var dateLabel: UILabel!\n    @IBOutlet var selectedView: UIView!\n}\n```\n\nOn storyboard, create a UIView and place it behind the UILabel so that it will not hide the label. Set color to red. It is important that you set valid constraints else it will not display correctly. I have set both width and height to be 50. I have also set the view to be centered both vertical and horizontal inside the cell.\n\n![storyboard](./images/image1.png)\n\nNext, connect this UIView to the `selectedView` IBOutlet variable in the DateCell class. The `selectedView` should now be connected to the cell.\n\nNext, Add the following highlighted code to the ViewController class\n\n```swift\nfunc configureCell(view: JTAppleCell?, cellState: CellState) {\n    guard let cell = view as? DateCell else { return }\n    cell.dateLabel.text = cellState.text\n    handleCellTextColor(cell: cell, cellState: cellState)\n    handleCellSelected(cell: cell, cellState: cellState)\n    }\n\nfunc handleCellSelected(cell: DateCell, cellState: CellState) {\n    if cellState.isSelected {\n    cell.selectedView.layer.cornerRadius = 13\n    cell.selectedView.isHidden = false\n    } else {\n    cell.selectedView.isHidden = true\n    }\n}\n```\n\nThe code is now ready to handle both selections and de-selections.\n\nThe final step is to call this function both when a cell is selected and deselected. Add the following code to the ViewController class.\n\n```swift\nfunc calendar(\\_ calendar: JTAppleCalendarView, didSelectDate date: Date, cell: JTAppleCell?, cellState: CellState) {\n    configureCell(view: cell, cellState: cellState)\n}\n\nfunc calendar(\\_ calendar: JTAppleCalendarView, didDeselectDate date: Date, cell: JTAppleCell?, cellState: CellState) {\n    configureCell(view: cell, cellState: cellState)\n}\n```\n\nOther delegate functions that may be of interest are:\n\n```swift\nfunc calendar(\\_ calendar: JTAppleCalendarView, shouldSelectDate date: Date, cell: JTAppleCell?, cellState: CellState) -> Bool {\n    return true // Based on a criteria, return true or false\n}\n```\n\nVery useful if you want to prevent selection.\n\n## Next Steps\n\nLearn more about [device rotation](../device-rotation/Handling%20Device%20Rotation.md)\n"
  },
  {
    "path": "docs/get-started/Get Started.md",
    "content": "# JTAppleCalendar Tutorials and Examples [V 7.1.7]\n\n> [!CAUTION]\n> This documentation comes from [this zipped version of the old docs site](https://github.com/patchthecode/JTAppleCalendar/issues/1397#issuecomment-2054113374) in the repo, and may be out of date with respect to the latest changes. Please submit an issue (or better yet a PR) to resolve any issues in the documentation\n\n## [Version 8.0.0 migration guide](../migration-guide/v8%20Migration%20Guide.md)\n\n## Why use this library?\n\n![alt text](./image1.gif)\n\n- **Total customization of all views** – This lib does not design anything. It only provides a layout (7 columns and 1-6 rows). Therefore any visual design of both cells and calendar is possible.\n- **Horizontal or vertical mode** – Ability to switch from a vertical scrolling to horizontal scrolling calendar.\n- **Range selection** – Select dates in a range.\n- **Week/Month mode** – 7 columns (Sunday to Saturday). But you decide how many rows to display. Number of rows are limited to the range 1 to 6.\n- **Custom first day of week** – First day of week does not have to be Sunday. You can pick any day.\n- Headers – Ability to add headers of varying sizes for each month.\n\nThese are a fraction of many more features. Here are [calendar styles](https://github.com/patchthecode/JTAppleCalendar/issues/2) created by developers using this lib.\n\n## Repetitive questions / delayed answers\n\nFamiliarity with the following non-calendar pointers, helps avoid repetitive questions and delayed answers.\n\n- How to use UITableView or UICollectionView and understand how delegate functions work. Knowledge that cells are reused in these controls.\n- Questions about this library asked on Github, will get a faster response than contacting me by email.\n- Knowledge about the iOS Calendar() class and how time zones work in iOS to avoid questions such as [this one](https://github.com/patchthecode/JTAppleCalendar/issues/252) (2nd most repeated question)\n\nLets Begin!\n\n1. [Installation](../installation/Installation.md)\n2. [Build calendar from scratch](../build-calendar/Build%20A%20Calendar%20From%20Scratch.md)\n3. [Common elements of every calendar](../common-elements/Common%20Elements.md)\n   - [Configuring inDates/monthDates/outDates](../common-elements/configure-in-out-month-dates/Configuring%20inDates%20monthDates%20outDates.md)\n   - [Regular selection](../common-elements//regular-selection/Regular%20Selection.md)\n   - [Handle device rotation](../common-elements/device-rotation/Handling%20Device%20Rotation.md)\n4. [Scrolling modes](../scrolling-modes/Scrolling%20Modes.md)\n5. [Switch between month-view and week-view](../switch-month-to-week-view/Switch%20between%20month-view%20and%20week-view.md)\n6. [Headers](../headers/Headers.md)\n7. [Range selection styles](../range-selection-styles/Range%20selection%20styles.md)\n8. [Events and loading information from a server](../adding-events/Adding%20Events.md)\n9. [How to add a week number column](../implementing-week-numbers/Implementing%20week%20numbers.md)\n"
  },
  {
    "path": "docs/headers/Headers.md",
    "content": "# Headers\n\n## Outside Headers\n\nThe easiest header you can create is with a UIStackView containing 7 UILabels for the days and another label for the month.\n\n![easiest header](./images/image1.png)\n\nThese headers will not scroll with calendar-view (seen below) and have nothing to do with the calendar as they are created by yourself.\n\n![non scrolling header](./images/image2.gif)\n\n## Inside Headers\n\nThese are generated by the calendar. They will scroll as the user scrolls.\n\n![scrolling headers](./images/image3.gif)\n\n> [!WARNING]\n> This documentation requires assistance getting up to date, especially with SwiftUI. Please submit a PR if possible to help out\n\n### Step 1\n\nWe will use storyboard mixed with some code, but this can also be done with xibs or pure code only.\n\nLet’s make the calendar both horizontally scrolled and paged. To do that we need a calendar IBOutlet. Add the following to the ViewController class.\n\n```swift\nclass ViewController: UIViewController {\n@IBOutlet var calendarView: JTAppleCalendarView!\n    override func viewDidLoad() {\n        super.viewDidLoad()\n    }\n}\n```\n\nNext, let’s connect this outlet with the calendar on storyboard.\n\n![connect outlet to calendar](./images/image4.png)\n\nNow, write the following code to make the calendar horizontal and paged. Keep in mind that everything in code can also be done direct via xibs/storyboard.\n\n```swift\nclass ViewController: UIViewController {\n@IBOutlet var calendarView: JTAppleCalendarView!\n    override func viewDidLoad() {\n        super.viewDidLoad()\n        calendarView.scrollDirection = .horizontal\n        calendarView.scrollingMode   = .stopAtEachCalendarFrame\n        calendarView.showsHorizontalScrollIndicator = false\n    }\n}\n```\n\nIf you run your project, the calendar should look better visually.\n\nNow head back to storyboard, and let’s create the header.\n\n### Step 2\n\nIn storyboard, click on the CollectionView and add the section header. Set the color to green and then add a UILabel. Using constraints, center the UILabel both vertically and horizontally inside of the green header.\n\n![center UILabel](./images/image5.png)\n\nNote, these parts should already be familiar to you because it is exactly the same as a regular UICollectionView.\n\nSet the header’s reusable identifier to `DateHeader`\n\n![set to DateHeader](./images/image6.png)\n\n### Step 3\n\nNow we need to create a class for the header, then set it on storyboard. Create the following class.\n\n```swift\nimport UIKit\nimport JTAppleCalendar\n\nclass DateHeader: JTAppleCollectionReusableView {\n@IBOutlet var monthTitle: UILabel!\n}\n```\n\nHead to storyboard and set the header’s class to be `DateHeader`\n\n![set class to DateHeader](./images/image6.png)\n\nNow connect the IBOutlet `monthTitle` to the UILabel within the header on storyboard.\n\n![connect IBOutlet](./images/image6.png)\n\n4.  Finally, let’s write the header delegates. You notice this entire process is almost exactly the way headers are done in a UICollectionView.\n\n```swift\nfunc calendar(\\_ calendar: JTAppleCalendarView, headerViewForDateRange range: (start: Date, end: Date), at indexPath: IndexPath) -> JTAppleCollectionReusableView {\n    let formatter = DateFormatter() // Declare this outside, to avoid instancing this heavy class multiple times.\n    formatter.dateFormat = \"MMM\"\n    let header = calendar.dequeueReusableJTAppleSupplementaryView(withReuseIdentifier: \"DateHeader\", for: indexPath) as! DateHeader\n    header.monthTitle.text = formatter.string(from: range.start)\n    return header\n}\n\nfunc calendarSizeForMonths(\\_ calendar: JTAppleCalendarView?) -> MonthSize? {\n    return MonthSize(defaultSize: 50)\n}\n```\n\nNow run your app. You should have a working calendar with an implemented header.\n\n## Next Steps\n\nFind out more about [range selection style](../range-selection-styles/Range%20selection%20styles.md)\n"
  },
  {
    "path": "docs/implementing-week-numbers/Implementing week numbers.md",
    "content": "# Implementing week numbers\n\n> [!WARNING]\n> This documentation requires assistance, particularly updating to SwiftUI. If possible, please submit a PR to help improve the documentation\n\nThis library does not come with week numbers built in. However building one is easy.\n\n## Design the views\n\nFirst we need to design the week number views. Head to storyboard and modify it to be similar to the image below.\n\n![storyboard](./images/image1.png)\n\nA UILabel for the week number was added on top. A UICollectionView added below to hold the week numbers. Finally a UILabel was centered inside the UICollectionViewCell. Add proper constraints so that it appears visually as shown.\n\n## Setup week-number cells\n\nCreate a week number cell class to display the numbers.\n\n```swift\nimport UIKit\n\nclass WeekCountCell: UICollectionViewCell {\n    @IBOutlet var countLabel: UILabel!\n}\n```\n\nNow that we have our cell class, head to storyboard and set the class of the cell inside the UICollectionView to be `WeekCountCell`\n\n![set cell class to WeekCountCell](./images/image2.png)\n\nNow that the class is set, connect the label IBOutlet to `countLabel`\n\n## Setup the UICollectionView\n\nWith the cell setup complete, let’s configure the collectionView. Create an IBOutlet for it in the ViewController subclass.\n\n> [!WARNING]\n> The old documentation includes the following section verbatim, but the code may be incomplete. Please use caution when following, and if it is incorrect, submit an issue or PR to improve this documentation\n\n```swift\nclass ViewController: UIViewController {\n    @IBOutlet var calendarView: JTAppleCalendarView!\n    @IBOutlet var weekCount: UICollectionView!\n\n    override func viewDidLoad() {\n```\n\nConnect the UICollectionView’s reference outlet to `weekCount`. Also set its `dataSource` and delegate to be ViewController as seen below.\n\n![set UICollectionView to weekCount](./images/image3.png)\n\n## Final Setup code\n\nHead to the ViewController class and add the following code. We will assume that a year does not have more than 55 weeks.\n\n```swift\nextension ViewController: UICollectionViewDataSource, UICollectionViewDelegate {\n    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {\n        return 55\n    }\n\n    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {\n        let cell = collectionView.dequeueReusableCell(withReuseIdentifier: \"WeekCountCell\", for: indexPath) as! WeekCountCell\n        cell.countLabel.text = \"\\(indexPath.item + 1)\"\n        return cell\n    }\n}\n```\n\nFinally, we need this code to be run every time the user swipes the calendar. Therefore we will put in the willScroll delegate function. It will look better visually if placed there than if it were placed in the didScroll delegate function. Place the following code after the willDisplay function as shown below.\n\n> [!WARNING]\n> The old documentation includes the following section verbatim, but the code may be incomplete. Please use caution when following, and if it is incorrect, submit an issue or PR to improve this documentation\n\n```swift\nfunc calendar(_ calendar: JTAppleCalendarView, willDisplay cell: JTAppleCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {\n    configureCell(view: cell, cellState: cellState)\n}\n\nfunc calendar(_ calendar: JTAppleCalendarView, willScrollToDateSegmentWith visibleDates: DateSegmentInfo) {\n    let date: Date = visibleDates.monthDates.first!.date\n    let weekNumber = Calendar.current.component(.weekOfYear, from: date)\n    weekCount.scrollToItem(at: IndexPath(item: weekNumber - 1, section: 0), at: .top, animated: true)\n}\n\nfunc calendar(_ calendar: JTAppleCalendarView, headerViewForDateRange range: (start: Date, end: Date), at indexPath: IndexPath) ->; JTAppleCollectionReusableView {\n```\n"
  },
  {
    "path": "docs/installation/Installation.md",
    "content": "# Installation\n\nThis library can be installed in 3 ways; Cocoapods, Carthage, or manually.\n\n## Via Cocoapods\n\nCocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:\n\n```\ngem install cocoapods\n```\n\n> [!NOTE]\n> CocoaPods 1.1.0+ is required to build JTApplecalendar.\n\nTo integrate JTAppleCalendar into your Xcode project using CocoaPods, specify it in your Podfile:\n\n```\nsource 'https://github.com/CocoaPods/Specs.git'\nplatform :ios, '10.0'\nuse_frameworks!\n\ntarget '<Your Target Name>' do\n    pod 'JTAppleCalendar', '~>; 7.1'\nend\n```\n\nThen, run the following command:\n\n```\npod install\n```\n\nOnce installation is complete, JTAppleCalendar should be installed\n\n## Troubleshooting\n\nIf you’re new to CocoaPods, search how to integrate Cocoapods into your project. CocoaPods is one of the top dependency managers for integrating 3rd party frameworks into your project. But in a nut-shell, here is how to complete installation with a sample project called `test`\n\n1. Install Cocoapods\n2. Create a new xcode project. Save the name as: `test`\n3. Go to your console in the directory location where your project is located\n4. Type and run the command: `pod init`\n\nThis will create a `Podfile` in that same location\n\nEdit `Podfile` so that it looks like the following:\n\n```\n# Uncomment the next line to define a global platform for your project\n\n# platform :ios, '9.0'\n\ntarget 'test' do\n    use_frameworks!\n    pod 'JTAppleCalendar'\nend\n```\n\nSave, and head back to terminal and run: `pod install`\n\nIf all went well, installation should be complete. Close the XCodeproject, and instead reopen it using the workspace file which was generated when installation was completed\n\n## Via Carthage\n\nCarthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.\n\nYou can install Carthage with Homebrew using the following commands:\n\n```\nbrew update\nbrew install carthage\n```\n\nTo integrate JTAppleCalendar into your Xcode project using Carthage, specify it in your `Cartfile`\n\n```\ngithub \"patchthecode/JTAppleCalendar\" ~> 7.1\n```\n\nRun `carthage update` to build the framework and drag the built `JTApplecalendar.framework` into your Xcode project.\n\n## Manually install\n\nSimply drag the source files into your project. Make sure you remove the unnecessary import statements where needed.\n\n## Next steps\n\nOnce installed, learn how to [build a calendar from scratch](../build-calendar/Build%20A%20Calendar%20From%20Scratch.md)\n"
  },
  {
    "path": "docs/migration-guide/v8 Migration Guide.md",
    "content": "# JTAppleCalendar Version 8.0.0 Migration guide\n\nChanges in version 8.0.0 are mainly that the function names are changed. why? We now support YearView. because of this, distiction has to be made between yearView and monthView.\n\n**Important**: Because the names of some function have changed, if you forget to change their names you might notice things like “my functions are not being called”. If you are experiencing this, changes are you did not change the names.\n\n## Renamed Delegate Function Names\n\n```swift\nfunc calendar(_ calendar: JTACMonthView, shouldSelectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) -> Bool\nfunc calendar(_ calendar: JTACMonthView, shouldDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath) -> Bool\nfunc calendar(_ calendar: JTACMonthView, didSelectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath)\nfunc calendar(_ calendar: JTACMonthView, didDeselectDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath)\nfunc calendar(_ calendar: JTACMonthView, didHighlightDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath)\nfunc calendar(_ calendar: JTACMonthView, didUnhighlightDate date: Date, cell: JTACDayCell?, cellState: CellState, indexPath: IndexPath)\nfunc calendar(_ calendar: JTACMonthView, willScrollToDateSegmentWith visibleDates: DateSegmentInfo)\nfunc calendar(_ calendar: JTACMonthView, didScrollToDateSegmentWith visibleDates: DateSegmentInfo)\nfunc calendar(_ calendar: JTACMonthView, headerViewForDateRange range: (start: Date, end: Date), at indexPath: IndexPath) -> JTACMonthReusableView\nfunc calendarDidScroll(_ calendar: JTACMonthView)\nfunc calendarSizeForMonths(_ calendar: JTACMonthView?) -> MonthSize?\nfunc sizeOfDecorationView(indexPath: IndexPath) -> CGRect\nfunc scrollDidEndDecelerating(for calendar: JTACMonthView)\n```\n\n## New Object Names\n\n```swift\nJTApplecalendarView           --&gt; JTACMonthView\nJTAppleCalendarViewDelegate   --&gt; JTACMonthViewDelegate\nJTAppleCalendarViewDataSource --&gt; JTACMonthViewDataSource\nJTAppleDayCell                --&gt; JTACMonthCell\nJTAppleCollectionReusableView --&gt; JTACMonthReusableView\n```\n\n## REPORTING / NOTES\n\nIf you used storyboards/xibs, remember to change the name of the classes in there as well. If we missed out any thing that caused the transition experience to be complicated, then open an issue and let us know right away. It will be fixed.\n"
  },
  {
    "path": "docs/range-selection-styles/Range selection styles.md",
    "content": "# Range selection styles\n\n> [!WARNING]\n> This documentation requires assistance, particularly updating to SwiftUI. If possible, please submit a PR to help improve the documentation\n\n## Single tap range selection\n\n![single tap range selection](./images/image1.gif)\n\nFirst let’s create an outlet for the calendarView. Add the following line and connect the IBOutlet to the calendarView on Storyboard.\n\n```swift\nimport UIKit\nimport JTAppleCalendar\n\nclass ViewController: UIViewController {\n    @IBOutlet var calendarView: JTAppleCalendarView!\n}\n```\n\n![connect IBOutlet](./images/image2.png)\n\nNow add the following code.\n\n```swift\noverride func viewDidLoad() {\n   super.viewDidLoad()\n   calendarView.allowsMultipleSelection = true\n   calendarView.isRangeSelectionUsed = true\n}\n```\n\nMultiple selection is needed to multi-select. Informing that range-selection will be used makes the calendar refresh cells both to the left and right of a selected cell to update its selectedView.\n\nThe final code needed for range selection is below. Modify the function to the following.\n\n```swift\nfunc handleCellSelected(cell: DateCell, cellState: CellState) {\n    cell.selectedView.isHidden = !cellState.isSelected\n    switch cellState.selectedPosition() {\n    case .left:\n        cell.selectedView.layer.cornerRadius = 20\n        cell.selectedView.layer.maskedCorners = [.layerMinXMaxYCorner, .layerMinXMinYCorner]\n    case .middle:\n        cell.selectedView.layer.cornerRadius = 0\n        cell.selectedView.layer.maskedCorners = []\n    case .right:\n        cell.selectedView.layer.cornerRadius = 20\n        cell.selectedView.layer.maskedCorners = [.layerMaxXMaxYCorner, .layerMaxXMinYCorner]\n    case .full:\n        cell.selectedView.layer.cornerRadius = 20\n        cell.selectedView.layer.maskedCorners = [.layerMaxXMaxYCorner, .layerMaxXMinYCorner, .layerMinXMaxYCorner, .layerMinXMinYCorner]\n    default: break\n    }\n}\n```\n\nThe selected view was morphed in this example for simplicity, but you can customize your view to anything.\n\nThis library determines a reasonable setting for what each cell’s selectedPosition should be. If your app needs something other than this default, then, you will have to implement it your self based on your own criteria.\n\n## Drag to select range\n\n![drag on screen to select range](./images/image3.gif)\n\nThis example requires the `UITapGestureRecornizer` in order to work. We’ll start by modifying the following code:\n\n```swift\nclass ViewController: UIViewController {\n\n    @IBOutlet var calendarView: JTAppleCalendarView!\n    let testCalendar = Calendar(identifier: .gregorian)\n\n    override func viewDidLoad() {\n        super.viewDidLoad()\n\n        calendarView.allowsMultipleSelection = true\n        calendarView.isRangeSelectionUsed = true\n\n        let panGensture = UILongPressGestureRecognizer(target: self, action: #selector(didStartRangeSelecting(gesture:)))\n        panGensture.minimumPressDuration = 0.5\n        calendarView.addGestureRecognizer(panGensture)\n    }\n}\n```\n\nNote that we set the minimum press duration to 0.5 seconds. This means you need to press the cell for at least 0.5 seconds before drag-selection can begin. Also note the need for the `testCalendar` instance. We use this variable for date calculations in the function below.\n\nFinally, add the following function.\n\n```swift\n@objc func didStartRangeSelecting(gesture: UILongPressGestureRecognizer) {\n    let point = gesture.location(in: gesture.view!)\n    let rangeSelectedDates = calendarView.selectedDates\n\n    guard let cellState = calendarView.cellStatus(at: point) else { return }\n\n    if !rangeSelectedDates.contains(cellState.date) {\n        let dateRange = calendarView.generateDateRange(from: rangeSelectedDates.first ?? cellState.date, to: cellState.date)\n        calendarView.selectDates(dateRange, keepSelectionIfMultiSelectionAllowed: true)\n    } else {\n        let followingDay = testCalendar.date(byAdding: .day, value: 1, to: cellState.date)!\n        calendarView.selectDates(from: followingDay, to: rangeSelectedDates.last!, keepSelectionIfMultiSelectionAllowed: false)\n    }\n}\n```\n\nThe code above is just an example. If your drag-selection needs to behave differently, then please modify to suite your needs.\n\n## Select range via multiple taps\n\n![selct range via multiple taps](./images/image4.gif)\n\n> [!CAUTION]\n> This section is not available from the original docs source. If you can, please submit a PR to update this section\n\n## Next Steps\n\nLearn more about [events and loading information from a server](../adding-events/Adding%20Events.md)\n"
  },
  {
    "path": "docs/scrolling-modes/Scrolling Modes.md",
    "content": "# Scrolling modes\n\n> [!WARNING]\n> This section requires assistance. Please submit a PR if possible to help improve documentation\n\nThere are 7 modes.\n\ncalendarView.scrollingMode =\n\n1. stopAtEachCalendarFrame\n\nNon-continuous scrolling. Calendar will stop scrolling when it has scrolled a distance of frame.width, before accepting another scroll.\n\n![stop at each frame](./images/image1.gif)\n\n2. stopAtEachSection\n\nNon-continuous scrolling. Calendar will stop scrolling when it has scrolled a distance of a section’s width, before accepting another scroll. Months can be divided into sections depending on how many rows per month you chose to display.\n\n![stop at each section](./images/image2.gif)\n\n3. stopAtEach(customInterval: CGFloat)\n\nNon-continuous scrolling. Calendar will stop scrolling at every point where your set interval has been reached.\n\n4. nonStopToSection(withResistance: CGFloat)\n\nContinuous scrolling. Calendar will smoothly scroll and gradually decelerate. When stopped, it will snap to a section. Deceleration rate is based on resistance value (from 0.0 to 1.0)\n\n![nonstop to section](./images/image3.gif)\n\n5. nonStopToCell(withResistance: CGFloat)\n\nContinuous scrolling. Calendar will smoothly scroll and gradually decelerate. When stopped, it will snap to a cell. Deceleration rate is based on resistance value (from 0.0 to 1.0)\n\n![nonstop to cell](./images/image4.gif)\n\n6. nonStopTo(customInterval: CGFloat, withResistance: CGFloat)\n\nContinuous scrolling. Calendar will smoothly scroll and gradually decelerate. When stopped, it will snap to your set custom interval. Deceleration rate is based on resistance value (from 0.0 to 1.0)\n\n7. none\n\nContinuous scrolling. Calendar will smoothly scroll and gradually decelerate till it stops.\n\n# Next Steps\n\nLearn how to [switch between month-view and week-view](../switch-month-to-week-view/Switch%20between%20month-view%20and%20week-view.md)\n"
  },
  {
    "path": "docs/switch-month-to-week-view/Switch between month-view and week-view.md",
    "content": "# Switch between month-view and week-view\n\n> [!WARNING]\n> This documentation requires assistance, particularly updating to SwiftUI. If possible, please submit a PR to help improve the documentation\n\nThis library has no concept of week/month view. You as the developer will need to define this. For this example, we will change state between a 6-row calendar and a 1-row calendar.\n\nSwitching between a 6-row and 1-row calendar is pretty simple. First we’ll look at the configuration. Then we’ll look at the animation.\n\n## Configuration\n\n![indates and outdates](./images/image1.png)\n\nIt is important to remember that if you switch your calendar from 6 rows to 1, the inDates/outDates will make your 1 row calendar look as if dates are being repeated.\n\nAlthough you can make your 1-row calendar with what ever design you want, the regular 6 row configuration will not work on a 1 row calendar for 90% of developers. This is because of the inDates/outDates shown above.\n\nHere is a proper configuration for a 1 row calendar\n\n```swift\nlet parameters = ConfigurationParameters(\n                    startDate: startDate,\n                    endDate: endDate,\n                    numberOfRows: 1,\n                    generateInDates: .forFirstMonthOnly,\n                    generateOutDates: .off,\n                    hasStrictBoundaries: false\n                )\n```\n\nTherefore, modify your `configureCalendar` function to have the following code\n\n```swift\nfunc configureCalendar(_ calendar: JTAppleCalendarView) -> ConfigurationParameters {\n    let formatter = DateFormatter()\n    formatter.dateFormat = \"yyyy MM dd\"\n\n    let startDate = formatter.date(from: \"2018 01 01\")!\n    let endDate = Date()\n\n    if numberOfRows == 6 {\n        return ConfigurationParameters(startDate: startDate, endDate: endDate, numberOfRows: numberOfRows)\n    } else {\n        return ConfigurationParameters(startDate: startDate,\n                                       endDate: endDate,\n                                       numberOfRows: numberOfRows,\n                                       generateInDates: .forFirstMonthOnly,\n                                       generateOutDates: .off,\n                                       hasStrictBoundaries: false)\n    }\n}\n```\n\n## Animation\n\nIt all has to do with constraints.\n\nGo to storyboard and modify the height constraint of the calendar to 350.\n\n![modify height](./images/image2.png)\n\nNext create a blue colored view at the bottom of the calendar. Make its left, right and bottom constraints fixed. But make it’s top constraint to sit right below the collectionView with zero (0) space. This view represents the view below the calendarView that you will build in your real app. See its completed constraints below.\n\n![completed constraints](./images/image3.png)\n\nThe views are now ready. What we now need is an outlet to the hight-constraint for the calendar. Click on the height constraint of the CollectionView and create an IBOutlet for it in your view controller class.\n\n![create IBOutlet](./images/image4.png)\n\nThe created IBOutlet should be called constraint in your ViewController subclass. Also add a new variable called numberOfRows. We will use this to change the row number. Below shows both added code.\n\n```swift\nclass ViewController: UIViewController {\n    @IBOutlet var calendarView: JTAppleCalendarView!\n    @IBOutlet weak var constraint: NSLayoutConstraint!\n\n    var numberOfRows = 6\n}\n```\n\nFinally create a toggle button on storyboard\n\n![create toggle](./images/image5.png)\n\nand connect its IBAction to the following code\n\n```swift\n@IBAction func toggle(_ sender: Any) {\n    if numberOfRows == 6 {\n        self.constraint.constant = 58.33\n        self.numberOfRows = 1\n        UIView.animate(withDuration: 0.2, animations: {\n            self.view.layoutIfNeeded()\n        }) { completed in\n            self.calendarView.reloadData(withanchor: Date())\n        }\n    } else {\n        self.constraint.constant = 350\n        self.numberOfRows = 6\n\n        UIView.animate(withDuration: 0.2, animations: {\n            self.view.layoutIfNeeded()\n            self.calendarView.reloadData(withanchor: Date())\n        })\n    }\n}\n```\n\nIn the code above we set the `anchorDate` to be the current date, but you can set it to what ever date you wish. `anchorDate` is the date the calendar will focus on once the number of rows change. This parameter is optional. Remove if not needed.\n\nFinally delete the following 2 functions and run the app. These header functions are removed for simplicity. A new tutorial will be created on how headers affect 1 row calendars\n\n```swift\nfunc calendar(_ calendar: JTAppleCalendarView, headerViewForDateRange range: (start: Date, end: Date), at indexPath: IndexPath) -> JTAppleCollectionReusableView {}\nfunc calendarSizeForMonths(_ calendar: JTAppleCalendarView?) -> MonthSize? {}\n```\n\n## Next Steps\n\nFind out more about [headers](../headers/Headers.md)\n"
  }
]